LLVMFuzzerTestOneInput:
    8|  14.0k|{
    9|  14.0k|    struct ly_ctx *ctx = NULL;
   10|  14.0k|    static bool log = false;
   11|  14.0k|    char *data = NULL;
   12|  14.0k|    LY_ERR err;
   13|       |
   14|  14.0k|    if (!log) {
  ------------------
  |  Branch (14:9): [True: 1, False: 14.0k]
  ------------------
   15|      1|        ly_log_options(0);
   16|      1|        log = true;
   17|      1|    }
   18|       |
   19|  14.0k|    err = ly_ctx_new(NULL, 0, &ctx);
   20|  14.0k|    if (err != LY_SUCCESS) {
  ------------------
  |  Branch (20:9): [True: 0, False: 14.0k]
  ------------------
   21|      0|        fprintf(stderr, "Failed to create context\n");
   22|      0|        exit(EXIT_FAILURE);
   23|      0|    }
   24|       |
   25|  14.0k|    data = malloc(len + 1);
   26|  14.0k|    if (data == NULL) {
  ------------------
  |  Branch (26:9): [True: 0, False: 14.0k]
  ------------------
   27|      0|        return 0;
   28|      0|    }
   29|       |
   30|  14.0k|    memcpy(data, buf, len);
   31|  14.0k|    data[len] = 0;
   32|       |
   33|  14.0k|    lys_parse_mem(ctx, data, LYS_IN_YANG, NULL);
   34|  14.0k|    ly_ctx_destroy(ctx);
   35|  14.0k|    free(data);
   36|  14.0k|    return 0;
   37|  14.0k|}

strnstr:
  152|   281k|{
  153|   281k|    char c, sc;
  154|   281k|    size_t len;
  155|       |
  156|   281k|    if ((c = *find++) != '\0') {
  ------------------
  |  Branch (156:9): [True: 281k, False: 0]
  ------------------
  157|   281k|        len = strlen(find);
  158|   281k|        do {
  159|  2.02M|            do {
  160|  2.02M|                if ((slen-- < 1) || ((sc = *s++) == '\0')) {
  ------------------
  |  Branch (160:21): [True: 168k, False: 1.86M]
  |  Branch (160:37): [True: 0, False: 1.86M]
  ------------------
  161|   168k|                    return NULL;
  162|   168k|                }
  163|  2.02M|            } while (sc != c);
  ------------------
  |  Branch (163:22): [True: 1.74M, False: 112k]
  ------------------
  164|   112k|            if (len > slen) {
  ------------------
  |  Branch (164:17): [True: 0, False: 112k]
  ------------------
  165|      0|                return NULL;
  166|      0|            }
  167|   112k|        } while (strncmp(s, find, len));
  ------------------
  |  Branch (167:18): [True: 0, False: 112k]
  ------------------
  168|   112k|        s--;
  169|   112k|    }
  170|   112k|    return (char *)s;
  171|   281k|}

ly_realloc:
   42|  40.1M|{
   43|  40.1M|    void *new_mem;
   44|       |
   45|  40.1M|    new_mem = realloc(ptr, size);
   46|  40.1M|    if (!new_mem) {
  ------------------
  |  Branch (46:9): [True: 0, False: 40.1M]
  ------------------
   47|      0|        free(ptr);
   48|      0|    }
   49|       |
   50|  40.1M|    return new_mem;
   51|  40.1M|}
ly_strnchr:
   55|   447k|{
   56|  2.96M|    for ( ; len && (*s != (char)c); ++s, --len) {}
  ------------------
  |  Branch (56:13): [True: 2.87M, False: 84.3k]
  |  Branch (56:20): [True: 2.51M, False: 363k]
  ------------------
   57|   447k|    return len ? (char *)s : NULL;
  ------------------
  |  Branch (57:12): [True: 363k, False: 84.3k]
  ------------------
   58|   447k|}
ly_strncmp:
   62|  2.15M|{
   63|  2.15M|    int rc = strncmp(refstr, str, str_len);
   64|       |
   65|  2.15M|    if (!rc && (refstr[str_len] == '\0')) {
  ------------------
  |  Branch (65:9): [True: 1.40M, False: 748k]
  |  Branch (65:16): [True: 1.22M, False: 182k]
  ------------------
   66|  1.22M|        return 0;
   67|  1.22M|    } else {
   68|   931k|        return rc ? rc : 1;
  ------------------
  |  Branch (68:16): [True: 748k, False: 182k]
  ------------------
   69|   931k|    }
   70|  2.15M|}
ly_value_prefix_next:
  108|   182k|{
  109|   182k|    const char *stop, *prefix;
  110|   182k|    size_t bytes_read;
  111|   182k|    uint32_t c;
  112|   182k|    ly_bool prefix_found;
  113|   182k|    LY_ERR ret = LY_SUCCESS;
  114|       |
  115|   182k|    assert(len && is_prefix && str_next);
  116|       |
  117|      0|#define IS_AT_END(PTR, STR_END) (STR_END ? PTR == STR_END : !(*PTR))
  118|       |
  119|      0|    *str_next = NULL;
  120|   182k|    *is_prefix = 0;
  121|   182k|    *len = 0;
  122|       |
  123|   182k|    if (!str_begin || !(*str_begin) || (str_begin == str_end)) {
  ------------------
  |  Branch (123:9): [True: 0, False: 182k]
  |  Branch (123:23): [True: 0, False: 182k]
  |  Branch (123:40): [True: 0, False: 182k]
  ------------------
  124|      0|        return ret;
  125|      0|    }
  126|       |
  127|   182k|    stop = str_begin;
  128|   182k|    prefix = NULL;
  129|   182k|    prefix_found = 0;
  130|       |
  131|   253k|    do {
  132|       |        /* look for the beginning of the YANG value */
  133|   534k|        do {
  134|   534k|            LY_CHECK_RET(ly_getutf8(&stop, &c, &bytes_read));
  ------------------
  |  |  206|   534k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   534k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   534k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   534k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 534k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  135|   534k|        } while (!is_xmlqnamestartchar(c) && !IS_AT_END(stop, str_end));
  ------------------
  |  |   33|  1.06M|#define is_xmlqnamestartchar(c) ((c >= 'a' && c <= 'z') || c == '_' || \
  |  |  ------------------
  |  |  |  Branch (33:35): [True: 253k, False: 281k]
  |  |  |  Branch (33:47): [True: 253k, False: 0]
  |  |  |  Branch (33:60): [True: 0, False: 281k]
  |  |  ------------------
  |  |   34|   534k|        (c >= 'A' && c <= 'Z') || /* c == ':' || */ \
  |  |  ------------------
  |  |  |  Branch (34:10): [True: 0, False: 281k]
  |  |  |  Branch (34:22): [True: 0, False: 0]
  |  |  ------------------
  |  |   35|   534k|        (c >= 0x370 && c <= 0x1fff && c != 0x37e ) || \
  |  |  ------------------
  |  |  |  Branch (35:10): [True: 0, False: 281k]
  |  |  |  Branch (35:24): [True: 0, False: 0]
  |  |  |  Branch (35:39): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   534k|        (c >= 0xc0 && c <= 0x2ff && c != 0xd7 && c != 0xf7) || c == 0x200c || \
  |  |  ------------------
  |  |  |  Branch (36:10): [True: 0, False: 281k]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  |  Branch (36:37): [True: 0, False: 0]
  |  |  |  Branch (36:50): [True: 0, False: 0]
  |  |  |  Branch (36:64): [True: 0, False: 281k]
  |  |  ------------------
  |  |   37|   534k|        c == 0x200d || (c >= 0x2070 && c <= 0x218f) || \
  |  |  ------------------
  |  |  |  Branch (37:9): [True: 0, False: 281k]
  |  |  |  Branch (37:25): [True: 0, False: 281k]
  |  |  |  Branch (37:40): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|   534k|        (c >= 0x2c00 && c <= 0x2fef) || (c >= 0x3001 && c <= 0xd7ff) || \
  |  |  ------------------
  |  |  |  Branch (38:10): [True: 0, False: 281k]
  |  |  |  Branch (38:25): [True: 0, False: 0]
  |  |  |  Branch (38:42): [True: 0, False: 281k]
  |  |  |  Branch (38:57): [True: 0, False: 0]
  |  |  ------------------
  |  |   39|   534k|        (c >= 0xf900 && c <= 0xfdcf) || (c >= 0xfdf0 && c <= 0xfffd) || \
  |  |  ------------------
  |  |  |  Branch (39:10): [True: 0, False: 281k]
  |  |  |  Branch (39:25): [True: 0, False: 0]
  |  |  |  Branch (39:42): [True: 0, False: 281k]
  |  |  |  Branch (39:57): [True: 0, False: 0]
  |  |  ------------------
  |  |   40|  1.06M|        (c >= 0x10000 && c <= 0xeffff))
  |  |  ------------------
  |  |  |  Branch (40:10): [True: 0, False: 281k]
  |  |  |  Branch (40:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                      } while (!is_xmlqnamestartchar(c) && !IS_AT_END(stop, str_end));
  ------------------
  |  |  117|   281k|#define IS_AT_END(PTR, STR_END) (STR_END ? PTR == STR_END : !(*PTR))
  |  |  ------------------
  |  |  |  Branch (117:34): [True: 281k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (135:46): [True: 281k, False: 0]
  ------------------
  136|       |
  137|   253k|        if (IS_AT_END(stop, str_end)) {
  ------------------
  |  |  117|   253k|#define IS_AT_END(PTR, STR_END) (STR_END ? PTR == STR_END : !(*PTR))
  |  |  ------------------
  |  |  |  Branch (117:33): [True: 0, False: 253k]
  |  |  |  Branch (117:34): [True: 253k, False: 0]
  |  |  ------------------
  ------------------
  138|      0|            break;
  139|      0|        }
  140|       |
  141|       |        /* maybe the prefix was found */
  142|   253k|        prefix = stop - bytes_read;
  143|       |
  144|       |        /* look for the the end of the prefix */
  145|  1.86M|        do {
  146|  1.86M|            LY_CHECK_RET(ly_getutf8(&stop, &c, &bytes_read));
  ------------------
  |  |  206|  1.86M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.86M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.86M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.86M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 1.86M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  147|  1.86M|        } while (is_xmlqnamechar(c) && !IS_AT_END(stop, str_end));
  ------------------
  |  |   43|  3.73M|#define is_xmlqnamechar(c) ((c >= 'a' && c <= 'z') || c == '_' || c == '-' || \
  |  |  ------------------
  |  |  |  Branch (43:30): [True: 1.60M, False: 267k]
  |  |  |  Branch (43:42): [True: 1.60M, False: 0]
  |  |  |  Branch (43:55): [True: 0, False: 267k]
  |  |  |  Branch (43:67): [True: 84.3k, False: 182k]
  |  |  ------------------
  |  |   44|  1.86M|        (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || /* c == ':' || */ \
  |  |  ------------------
  |  |  |  Branch (44:10): [True: 0, False: 182k]
  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  Branch (44:36): [True: 112k, False: 70.2k]
  |  |  |  Branch (44:48): [True: 0, False: 112k]
  |  |  ------------------
  |  |   45|  1.86M|        c == '.' || c == 0xb7 || (c >= 0x370 && c <= 0x1fff && c != 0x37e ) ||\
  |  |  ------------------
  |  |  |  Branch (45:9): [True: 0, False: 182k]
  |  |  |  Branch (45:21): [True: 0, False: 182k]
  |  |  |  Branch (45:35): [True: 0, False: 182k]
  |  |  |  Branch (45:49): [True: 0, False: 0]
  |  |  |  Branch (45:64): [True: 0, False: 0]
  |  |  ------------------
  |  |   46|  1.86M|        (c >= 0xc0 && c <= 0x2ff && c != 0xd7 && c != 0xf7) || c == 0x200c || \
  |  |  ------------------
  |  |  |  Branch (46:10): [True: 0, False: 182k]
  |  |  |  Branch (46:23): [True: 0, False: 0]
  |  |  |  Branch (46:37): [True: 0, False: 0]
  |  |  |  Branch (46:50): [True: 0, False: 0]
  |  |  |  Branch (46:64): [True: 0, False: 182k]
  |  |  ------------------
  |  |   47|  1.86M|        c == 0x200d || (c >= 0x300 && c <= 0x36f) || \
  |  |  ------------------
  |  |  |  Branch (47:9): [True: 0, False: 182k]
  |  |  |  Branch (47:25): [True: 0, False: 182k]
  |  |  |  Branch (47:39): [True: 0, False: 0]
  |  |  ------------------
  |  |   48|  1.86M|        (c >= 0x2070 && c <= 0x218f) || (c >= 0x203f && c <= 0x2040) || \
  |  |  ------------------
  |  |  |  Branch (48:10): [True: 0, False: 182k]
  |  |  |  Branch (48:25): [True: 0, False: 0]
  |  |  |  Branch (48:42): [True: 0, False: 182k]
  |  |  |  Branch (48:57): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|  1.86M|        (c >= 0x2c00 && c <= 0x2fef) || (c >= 0x3001 && c <= 0xd7ff) || \
  |  |  ------------------
  |  |  |  Branch (49:10): [True: 0, False: 182k]
  |  |  |  Branch (49:25): [True: 0, False: 0]
  |  |  |  Branch (49:42): [True: 0, False: 182k]
  |  |  |  Branch (49:57): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|  1.86M|        (c >= 0xf900 && c <= 0xfdcf) || (c >= 0xfdf0 && c <= 0xfffd) || \
  |  |  ------------------
  |  |  |  Branch (50:10): [True: 0, False: 182k]
  |  |  |  Branch (50:25): [True: 0, False: 0]
  |  |  |  Branch (50:42): [True: 0, False: 182k]
  |  |  |  Branch (50:57): [True: 0, False: 0]
  |  |  ------------------
  |  |   51|  3.73M|        (c >= 0x10000 && c <= 0xeffff))
  |  |  ------------------
  |  |  |  Branch (51:10): [True: 0, False: 182k]
  |  |  |  Branch (51:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                      } while (is_xmlqnamechar(c) && !IS_AT_END(stop, str_end));
  ------------------
  |  |  117|  1.68M|#define IS_AT_END(PTR, STR_END) (STR_END ? PTR == STR_END : !(*PTR))
  |  |  ------------------
  |  |  |  Branch (117:34): [True: 1.68M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (147:40): [True: 1.61M, False: 70.2k]
  ------------------
  148|       |
  149|   253k|        prefix_found = c == ':' ? 1 : 0;
  ------------------
  |  Branch (149:24): [True: 112k, False: 140k]
  ------------------
  150|       |
  151|       |        /* if it wasn't the prefix, keep looking */
  152|   253k|    } while (!IS_AT_END(stop, str_end) && !prefix_found);
  ------------------
  |  |  117|   506k|#define IS_AT_END(PTR, STR_END) (STR_END ? PTR == STR_END : !(*PTR))
  |  |  ------------------
  |  |  |  Branch (117:34): [True: 253k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (152:14): [True: 182k, False: 70.2k]
  |  Branch (152:43): [True: 70.2k, False: 112k]
  ------------------
  153|       |
  154|   182k|    if ((str_begin == prefix) && prefix_found) {
  ------------------
  |  Branch (154:9): [True: 84.3k, False: 98.4k]
  |  Branch (154:34): [True: 56.2k, False: 28.1k]
  ------------------
  155|       |        /* prefix found at the beginning of the input string */
  156|  56.2k|        *is_prefix = 1;
  157|  56.2k|        *str_next = IS_AT_END(stop, str_end) ? NULL : stop;
  ------------------
  |  |  117|  56.2k|#define IS_AT_END(PTR, STR_END) (STR_END ? PTR == STR_END : !(*PTR))
  |  |  ------------------
  |  |  |  Branch (117:33): [True: 0, False: 56.2k]
  |  |  |  Branch (117:34): [True: 56.2k, False: 0]
  |  |  ------------------
  ------------------
  158|  56.2k|        *len = (stop - bytes_read) - str_begin;
  159|   126k|    } else if ((str_begin != prefix) && (prefix_found)) {
  ------------------
  |  Branch (159:16): [True: 98.4k, False: 28.1k]
  |  Branch (159:41): [True: 56.2k, False: 42.1k]
  ------------------
  160|       |        /* there is a some string before prefix */
  161|  56.2k|        *str_next = prefix;
  162|  56.2k|        *len = prefix - str_begin;
  163|  70.2k|    } else {
  164|       |        /* no prefix found */
  165|  70.2k|        *len = stop - str_begin;
  166|  70.2k|    }
  167|       |
  168|   182k|#undef IS_AT_END
  169|       |
  170|   182k|    return ret;
  171|   182k|}
ly_getutf8:
  175|   885M|{
  176|   885M|    uint32_t c, aux;
  177|   885M|    size_t len;
  178|       |
  179|   885M|    if (bytes_read) {
  ------------------
  |  Branch (179:9): [True: 885M, False: 0]
  ------------------
  180|   885M|        (*bytes_read) = 0;
  181|   885M|    }
  182|       |
  183|   885M|    c = (*input)[0];
  184|   885M|    LY_CHECK_RET(!c, LY_EINVAL);
  ------------------
  |  |  206|   885M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   885M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   885M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|   885M|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:41): [True: 40, False: 885M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  185|       |
  186|   885M|    if (!(c & 0x80)) {
  ------------------
  |  Branch (186:9): [True: 885M, False: 64.7k]
  ------------------
  187|       |        /* one byte character */
  188|   885M|        len = 1;
  189|       |
  190|   885M|        if ((c < 0x20) && (c != 0x9) && (c != 0xa) && (c != 0xd)) {
  ------------------
  |  Branch (190:13): [True: 15.6M, False: 869M]
  |  Branch (190:27): [True: 15.6M, False: 8.44k]
  |  Branch (190:41): [True: 5.08k, False: 15.6M]
  |  Branch (190:55): [True: 363, False: 4.72k]
  ------------------
  191|    363|            return LY_EINVAL;
  192|    363|        }
  193|   885M|    } else if ((c & 0xe0) == 0xc0) {
  ------------------
  |  Branch (193:16): [True: 13.4k, False: 51.2k]
  ------------------
  194|       |        /* two bytes character */
  195|  13.4k|        len = 2;
  196|       |
  197|  13.4k|        aux = (*input)[1];
  198|  13.4k|        if ((aux & 0xc0) != 0x80) {
  ------------------
  |  Branch (198:13): [True: 164, False: 13.3k]
  ------------------
  199|    164|            return LY_EINVAL;
  200|    164|        }
  201|  13.3k|        c = ((c & 0x1f) << 6) | (aux & 0x3f);
  202|       |
  203|  13.3k|        if (c < 0x80) {
  ------------------
  |  Branch (203:13): [True: 9, False: 13.3k]
  ------------------
  204|      9|            return LY_EINVAL;
  205|      9|        }
  206|  51.2k|    } else if ((c & 0xf0) == 0xe0) {
  ------------------
  |  Branch (206:16): [True: 9.53k, False: 41.6k]
  ------------------
  207|       |        /* three bytes character */
  208|  9.53k|        len = 3;
  209|       |
  210|  9.53k|        c &= 0x0f;
  211|  28.4k|        for (uint64_t i = 1; i <= 2; i++) {
  ------------------
  |  Branch (211:30): [True: 18.9k, False: 9.44k]
  ------------------
  212|  18.9k|            aux = (*input)[i];
  213|  18.9k|            if ((aux & 0xc0) != 0x80) {
  ------------------
  |  Branch (213:17): [True: 88, False: 18.8k]
  ------------------
  214|     88|                return LY_EINVAL;
  215|     88|            }
  216|       |
  217|  18.8k|            c = (c << 6) | (aux & 0x3f);
  218|  18.8k|        }
  219|       |
  220|  9.44k|        if ((c < 0x800) || ((c > 0xd7ff) && (c < 0xe000)) || (c > 0xfffd)) {
  ------------------
  |  Branch (220:13): [True: 9, False: 9.43k]
  |  Branch (220:29): [True: 1.59k, False: 7.84k]
  |  Branch (220:45): [True: 10, False: 1.58k]
  |  Branch (220:62): [True: 3, False: 9.42k]
  ------------------
  221|     22|            return LY_EINVAL;
  222|     22|        }
  223|  41.6k|    } else if ((c & 0xf8) == 0xf0) {
  ------------------
  |  Branch (223:16): [True: 40.4k, False: 1.23k]
  ------------------
  224|       |        /* four bytes character */
  225|  40.4k|        len = 4;
  226|       |
  227|  40.4k|        c &= 0x07;
  228|   161k|        for (uint64_t i = 1; i <= 3; i++) {
  ------------------
  |  Branch (228:30): [True: 120k, False: 40.2k]
  ------------------
  229|   120k|            aux = (*input)[i];
  230|   120k|            if ((aux & 0xc0) != 0x80) {
  ------------------
  |  Branch (230:17): [True: 232, False: 120k]
  ------------------
  231|    232|                return LY_EINVAL;
  232|    232|            }
  233|       |
  234|   120k|            c = (c << 6) | (aux & 0x3f);
  235|   120k|        }
  236|       |
  237|  40.2k|        if ((c < 0x1000) || (c > 0x10ffff)) {
  ------------------
  |  Branch (237:13): [True: 2, False: 40.2k]
  |  Branch (237:29): [True: 5, False: 40.2k]
  ------------------
  238|      7|            return LY_EINVAL;
  239|      7|        }
  240|  40.2k|    } else {
  241|  1.23k|        return LY_EINVAL;
  242|  1.23k|    }
  243|       |
  244|   885M|    (*utf8_char) = c;
  245|   885M|    (*input) += len;
  246|   885M|    if (bytes_read) {
  ------------------
  |  Branch (246:9): [True: 885M, False: 0]
  ------------------
  247|   885M|        (*bytes_read) = len;
  248|   885M|    }
  249|   885M|    return LY_SUCCESS;
  250|   885M|}
ly_parse_uint:
  556|  98.4k|{
  557|  98.4k|    LY_ERR rc = LY_SUCCESS;
  558|  98.4k|    char *ptr, *str;
  559|  98.4k|    uint64_t u;
  560|       |
  561|   196k|    LY_CHECK_ARG_RET(NULL, val_str, val_str[0], val_len, LY_EINVAL);
  ------------------
  |  |  226|  98.4k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  98.4k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  98.4k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  219|  98.4k|#define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  218|  98.4k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|  98.4k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 98.4k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|  98.4k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 98.4k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  98.4k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 98.4k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  98.4k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  562|       |
  563|       |    /* duplicate the value to avoid accessing following bytes */
  564|  98.4k|    str = strndup(val_str, val_len);
  565|  98.4k|    LY_CHECK_RET(!str, LY_EMEM);
  ------------------
  |  |  206|  98.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  98.4k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  98.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|  98.4k|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:41): [True: 0, False: 98.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  566|       |
  567|       |    /* parse the value */
  568|  98.4k|    errno = 0;
  569|  98.4k|    u = strtoull(str, &ptr, base);
  570|  98.4k|    if (errno || (ptr == str)) {
  ------------------
  |  Branch (570:18): [True: 0, False: 98.4k]
  ------------------
  571|       |        /* invalid string */
  572|      0|        rc = LY_EVALID;
  573|  98.4k|    } else if ((u > max) || (u && (str[0] == '-'))) {
  ------------------
  |  Branch (573:16): [True: 0, False: 98.4k]
  |  Branch (573:30): [True: 42.1k, False: 56.2k]
  |  Branch (573:35): [True: 0, False: 42.1k]
  ------------------
  574|       |        /* invalid number */
  575|      0|        rc = LY_EDENIED;
  576|  98.4k|    } else if (*ptr) {
  ------------------
  |  Branch (576:16): [True: 0, False: 98.4k]
  ------------------
  577|      0|        while (isspace(*ptr)) {
  578|      0|            ++ptr;
  579|      0|        }
  580|      0|        if (*ptr) {
  ------------------
  |  Branch (580:13): [True: 0, False: 0]
  ------------------
  581|       |            /* invalid characters after some number */
  582|      0|            rc = LY_EVALID;
  583|      0|        }
  584|      0|    }
  585|       |
  586|       |    /* cleanup */
  587|  98.4k|    free(str);
  588|  98.4k|    if (!rc) {
  ------------------
  |  Branch (588:9): [True: 98.4k, False: 0]
  ------------------
  589|  98.4k|        *ret = u;
  590|  98.4k|    }
  591|  98.4k|    return rc;
  592|  98.4k|}
ly_parse_nodeid:
  622|   365k|{
  623|   365k|    assert(id && *id);
  624|      0|    assert(prefix && prefix_len);
  625|      0|    assert(name && name_len);
  626|       |
  627|      0|    *prefix = *id;
  628|   365k|    *prefix_len = 0;
  629|   365k|    *name = NULL;
  630|   365k|    *name_len = 0;
  631|       |
  632|   365k|    LY_CHECK_RET(lys_parse_id(id));
  ------------------
  |  |  206|   365k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   365k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   365k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   365k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 365k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  633|   365k|    if (**id == ':') {
  ------------------
  |  Branch (633:9): [True: 140k, False: 224k]
  ------------------
  634|       |        /* there is prefix */
  635|   140k|        *prefix_len = *id - *prefix;
  636|   140k|        ++(*id);
  637|   140k|        *name = *id;
  638|       |
  639|   140k|        LY_CHECK_RET(lys_parse_id(id));
  ------------------
  |  |  206|   140k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   140k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   140k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   140k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 140k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  640|   140k|        *name_len = *id - *name;
  641|   224k|    } else {
  642|       |        /* there is no prefix, so what we have as prefix now is actually the name */
  643|   224k|        *name = *prefix;
  644|   224k|        *name_len = *id - *name;
  645|   224k|        *prefix = NULL;
  646|   224k|    }
  647|       |
  648|   365k|    return LY_SUCCESS;
  649|   365k|}
common.c:lys_parse_id:
  606|   506k|{
  607|   506k|    assert(id && *id);
  608|       |
  609|   506k|    if (!is_yangidentstartchar(**id)) {
  ------------------
  |  |   59|   506k|#define is_yangidentstartchar(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_')
  |  |  ------------------
  |  |  |  Branch (59:36): [True: 506k, False: 0]
  |  |  |  Branch (59:48): [True: 506k, False: 0]
  |  |  |  Branch (59:62): [True: 0, False: 0]
  |  |  |  Branch (59:74): [True: 0, False: 0]
  |  |  |  Branch (59:87): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  610|      0|        return LY_EINVAL;
  611|      0|    }
  612|   506k|    ++(*id);
  613|       |
  614|  5.87M|    while (is_yangidentchar(**id)) {
  ------------------
  |  |   60|  5.87M|#define is_yangidentchar(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || \
  |  |  ------------------
  |  |  |  Branch (60:31): [True: 5.00M, False: 871k]
  |  |  |  Branch (60:43): [True: 5.00M, False: 0]
  |  |  |  Branch (60:57): [True: 0, False: 871k]
  |  |  |  Branch (60:69): [True: 0, False: 0]
  |  |  |  Branch (60:83): [True: 140k, False: 731k]
  |  |  |  Branch (60:95): [True: 0, False: 140k]
  |  |  ------------------
  |  |   61|  5.87M|                              c == '_' || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  Branch (61:31): [True: 0, False: 871k]
  |  |  |  Branch (61:43): [True: 365k, False: 506k]
  |  |  |  Branch (61:55): [True: 0, False: 506k]
  |  |  ------------------
  ------------------
  615|  5.37M|        ++(*id);
  616|  5.37M|    }
  617|   506k|    return LY_SUCCESS;
  618|   506k|}

ly_ctx_get_searchdirs:
  130|  28.1k|{
  131|  28.1k|#define LY_CTX_SEARCHDIRS_SIZE_STEP 8
  132|  28.1k|    void **new;
  133|       |
  134|  28.1k|    LY_CHECK_ARG_RET(ctx, ctx, NULL);
  ------------------
  |  |  226|  28.1k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  28.1k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  28.1k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  28.1k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  28.1k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  135|       |
  136|  28.1k|    if (ctx->search_paths.count == ctx->search_paths.size) {
  ------------------
  |  Branch (136:9): [True: 14.0k, False: 14.0k]
  ------------------
  137|       |        /* not enough space for terminating NULL byte */
  138|  14.0k|        new = realloc(((struct ly_ctx *)ctx)->search_paths.objs,
  139|  14.0k|                (ctx->search_paths.size + LY_CTX_SEARCHDIRS_SIZE_STEP) * sizeof *ctx->search_paths.objs);
  ------------------
  |  |  131|  14.0k|#define LY_CTX_SEARCHDIRS_SIZE_STEP 8
  ------------------
  140|  14.0k|        LY_CHECK_ERR_RET(!new, LOGMEM(NULL), NULL);
  ------------------
  |  |  207|  14.0k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  141|  14.0k|        ((struct ly_ctx *)ctx)->search_paths.size += LY_CTX_SEARCHDIRS_SIZE_STEP;
  ------------------
  |  |  131|  14.0k|#define LY_CTX_SEARCHDIRS_SIZE_STEP 8
  ------------------
  142|  14.0k|        ((struct ly_ctx *)ctx)->search_paths.objs = new;
  143|  14.0k|    }
  144|       |    /* set terminating NULL byte to the strings list */
  145|  28.1k|    ctx->search_paths.objs[ctx->search_paths.count] = NULL;
  146|       |
  147|  28.1k|    return (const char * const *)ctx->search_paths.objs;
  148|  28.1k|}
ly_ctx_new:
  244|  14.0k|{
  245|  14.0k|    struct ly_ctx *ctx = NULL;
  246|  14.0k|    struct lys_module *module;
  247|  14.0k|    char *search_dir_list, *sep, *dir;
  248|  14.0k|    const char **imp_f, *all_f[] = {"*", NULL};
  249|  14.0k|    uint32_t i;
  250|  14.0k|    struct ly_in *in = NULL;
  251|  14.0k|    LY_ERR rc = LY_SUCCESS;
  252|  14.0k|    struct lys_glob_unres unres = {0};
  253|       |
  254|  14.0k|    LY_CHECK_ARG_RET(NULL, new_ctx, LY_EINVAL);
  ------------------
  |  |  226|  14.0k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  14.0k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  255|       |
  256|  14.0k|    ctx = calloc(1, sizeof *ctx);
  257|  14.0k|    LY_CHECK_ERR_GOTO(!ctx, LOGMEM(NULL); rc = LY_EMEM, cleanup);
  ------------------
  |  |  203|  14.0k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  258|       |
  259|       |    /* dictionary */
  260|  14.0k|    lydict_init(&ctx->dict);
  261|       |
  262|       |    /* plugins */
  263|  14.0k|    LY_CHECK_ERR_GOTO(lyplg_init(), LOGINT(NULL); rc = LY_EINT, cleanup);
  ------------------
  |  |  203|  14.0k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  264|       |
  265|       |    /* initialize thread-specific error hash table */
  266|  14.0k|    ctx->err_ht = lyht_new(1, sizeof(struct ly_ctx_err_rec), ly_ctx_ht_err_equal_cb, NULL, 1);
  267|  14.0k|    LY_CHECK_ERR_GOTO(!ctx->err_ht, rc = LY_EMEM, cleanup);
  ------------------
  |  |  203|  14.0k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  268|       |
  269|       |    /* init LYB hash lock */
  270|  14.0k|    pthread_mutex_init(&ctx->lyb_hash_lock, NULL);
  271|       |
  272|       |    /* models list */
  273|  14.0k|    ctx->flags = options;
  274|  14.0k|    if (search_dir) {
  ------------------
  |  Branch (274:9): [True: 0, False: 14.0k]
  ------------------
  275|      0|        search_dir_list = strdup(search_dir);
  276|      0|        LY_CHECK_ERR_GOTO(!search_dir_list, LOGMEM(NULL); rc = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  277|       |
  278|      0|        for (dir = search_dir_list; (sep = strchr(dir, PATH_SEPARATOR[0])) != NULL && rc == LY_SUCCESS; dir = sep + 1) {
  ------------------
  |  |   51|      0|# define PATH_SEPARATOR ":"
  ------------------
  |  Branch (278:37): [True: 0, False: 0]
  |  Branch (278:87): [True: 0, False: 0]
  ------------------
  279|      0|            *sep = 0;
  280|      0|            rc = ly_ctx_set_searchdir(ctx, dir);
  281|      0|            if (rc == LY_EEXIST) {
  ------------------
  |  Branch (281:17): [True: 0, False: 0]
  ------------------
  282|       |                /* ignore duplication */
  283|      0|                rc = LY_SUCCESS;
  284|      0|            }
  285|      0|        }
  286|      0|        if (*dir && (rc == LY_SUCCESS)) {
  ------------------
  |  Branch (286:13): [True: 0, False: 0]
  |  Branch (286:21): [True: 0, False: 0]
  ------------------
  287|      0|            rc = ly_ctx_set_searchdir(ctx, dir);
  288|      0|            if (rc == LY_EEXIST) {
  ------------------
  |  Branch (288:17): [True: 0, False: 0]
  ------------------
  289|       |                /* ignore duplication */
  290|      0|                rc = LY_SUCCESS;
  291|      0|            }
  292|      0|        }
  293|      0|        free(search_dir_list);
  294|       |
  295|       |        /* If ly_ctx_set_searchdir() failed, the error is already logged. Just exit */
  296|      0|        LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  297|      0|    }
  298|  14.0k|    ctx->change_count = 1;
  299|       |
  300|  14.0k|    if (!(options & LY_CTX_EXPLICIT_COMPILE)) {
  ------------------
  |  |  191|  14.0k|#define LY_CTX_EXPLICIT_COMPILE 0x80 /**< If this flag is set, the compiled modules and their schema nodes are
  ------------------
  |  Branch (300:9): [True: 14.0k, False: 0]
  ------------------
  301|       |        /* use it for creating the initial context */
  302|  14.0k|        ctx->flags |= LY_CTX_EXPLICIT_COMPILE;
  ------------------
  |  |  191|  14.0k|#define LY_CTX_EXPLICIT_COMPILE 0x80 /**< If this flag is set, the compiled modules and their schema nodes are
  ------------------
  303|  14.0k|    }
  304|       |
  305|       |    /* create dummy in */
  306|  14.0k|    rc = ly_in_new_memory(internal_modules[0].data, &in);
  307|  14.0k|    LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  308|       |
  309|       |    /* load internal modules */
  310|   126k|    for (i = 0; i < ((options & LY_CTX_NO_YANGLIBRARY) ? (LY_INTERNAL_MODS_COUNT - 2) : LY_INTERNAL_MODS_COUNT); i++) {
  ------------------
  |  |  169|   126k|#define LY_CTX_NO_YANGLIBRARY  0x04 /**< Do not internally implement ietf-yang-library module. The option
  ------------------
                  for (i = 0; i < ((options & LY_CTX_NO_YANGLIBRARY) ? (LY_INTERNAL_MODS_COUNT - 2) : LY_INTERNAL_MODS_COUNT); i++) {
  ------------------
  |  |   79|      0|#define LY_INTERNAL_MODS_COUNT sizeof(internal_modules) / sizeof(struct internal_modules_s)
  ------------------
                  for (i = 0; i < ((options & LY_CTX_NO_YANGLIBRARY) ? (LY_INTERNAL_MODS_COUNT - 2) : LY_INTERNAL_MODS_COUNT); i++) {
  ------------------
  |  |   79|   126k|#define LY_INTERNAL_MODS_COUNT sizeof(internal_modules) / sizeof(struct internal_modules_s)
  ------------------
  |  Branch (310:17): [True: 112k, False: 14.0k]
  |  Branch (310:22): [True: 0, False: 126k]
  ------------------
  311|   112k|        ly_in_memory(in, internal_modules[i].data);
  312|   112k|        LY_CHECK_GOTO(rc = lys_parse_in(ctx, in, internal_modules[i].format, NULL, NULL, &unres.creating, &module), cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
  313|   112k|        if (internal_modules[i].implemented || (ctx->flags & LY_CTX_ALL_IMPLEMENTED)) {
  ------------------
  |  |  162|  56.2k|#define LY_CTX_ALL_IMPLEMENTED 0x01 /**< All the imported modules of the schema being parsed are implemented. */
  ------------------
  |  Branch (313:13): [True: 56.2k, False: 56.2k]
  |  Branch (313:48): [True: 0, False: 56.2k]
  ------------------
  314|  56.2k|            imp_f = (ctx->flags & LY_CTX_ENABLE_IMP_FEATURES) ? all_f : NULL;
  ------------------
  |  |  197|  56.2k|#define LY_CTX_ENABLE_IMP_FEATURES 0x0100 /**< By default, all features of newly implemented imported modules of
  ------------------
  |  Branch (314:21): [True: 0, False: 56.2k]
  ------------------
  315|  56.2k|            LY_CHECK_GOTO(rc = lys_implement(module, imp_f, &unres), cleanup);
  ------------------
  |  |  202|  56.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 56.2k]
  |  |  ------------------
  ------------------
  316|  56.2k|        }
  317|   112k|    }
  318|       |
  319|  14.0k|    if (!(options & LY_CTX_EXPLICIT_COMPILE)) {
  ------------------
  |  |  191|  14.0k|#define LY_CTX_EXPLICIT_COMPILE 0x80 /**< If this flag is set, the compiled modules and their schema nodes are
  ------------------
  |  Branch (319:9): [True: 14.0k, False: 0]
  ------------------
  320|       |        /* compile now */
  321|  14.0k|        LY_CHECK_GOTO(rc = ly_ctx_compile(ctx), cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  322|  14.0k|        ctx->flags &= ~LY_CTX_EXPLICIT_COMPILE;
  ------------------
  |  |  191|  14.0k|#define LY_CTX_EXPLICIT_COMPILE 0x80 /**< If this flag is set, the compiled modules and their schema nodes are
  ------------------
  323|  14.0k|    }
  324|       |
  325|  14.0k|cleanup:
  326|  14.0k|    ly_in_free(in, 0);
  327|  14.0k|    lys_unres_glob_erase(&unres);
  328|  14.0k|    if (rc) {
  ------------------
  |  Branch (328:9): [True: 0, False: 14.0k]
  ------------------
  329|      0|        ly_ctx_destroy(ctx);
  330|  14.0k|    } else {
  331|  14.0k|        *new_ctx = ctx;
  332|  14.0k|    }
  333|  14.0k|    return rc;
  334|  14.0k|}
ly_ctx_compile:
  552|  14.0k|{
  553|  14.0k|    LY_ERR ret = LY_SUCCESS;
  554|       |
  555|  14.0k|    LY_CHECK_ARG_RET(NULL, ctx, LY_EINVAL);
  ------------------
  |  |  226|  14.0k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  14.0k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  556|       |
  557|       |    /* create dep sets and mark all the modules that will be (re)compiled */
  558|  14.0k|    LY_CHECK_GOTO(ret = lys_unres_dep_sets_create(ctx, &ctx->unres.dep_sets, NULL), cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  559|       |
  560|       |    /* (re)compile all the dep sets */
  561|  14.0k|    LY_CHECK_GOTO(ret = lys_compile_depset_all(ctx, &ctx->unres), cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  562|       |
  563|  14.0k|cleanup:
  564|  14.0k|    if (ret) {
  ------------------
  |  Branch (564:9): [True: 0, False: 14.0k]
  ------------------
  565|       |        /* revert changes of modules */
  566|      0|        lys_unres_glob_revert(ctx, &ctx->unres);
  567|      0|    }
  568|  14.0k|    lys_unres_glob_erase(&ctx->unres);
  569|  14.0k|    return ret;
  570|  14.0k|}
ly_ctx_get_options:
  574|   183k|{
  575|   183k|    LY_CHECK_ARG_RET(ctx, ctx, 0);
  ------------------
  |  |  226|   183k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   183k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   183k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|   183k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 183k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   183k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  576|       |
  577|   183k|    return ctx->flags;
  578|   183k|}
ly_ctx_get_module_iter:
  741|   393k|{
  742|   393k|    LY_CHECK_ARG_RET(ctx, ctx, index, NULL);
  ------------------
  |  |  226|   393k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   393k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   393k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|   393k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   393k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 393k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   393k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 393k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   393k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  743|       |
  744|   393k|    if (*index < ctx->list.count) {
  ------------------
  |  Branch (744:9): [True: 351k, False: 42.1k]
  ------------------
  745|   351k|        return ctx->list.objs[(*index)++];
  746|   351k|    } else {
  747|  42.1k|        return NULL;
  748|  42.1k|    }
  749|   393k|}
ly_ctx_get_module:
  824|   126k|{
  825|   126k|    LY_CHECK_ARG_RET(ctx, ctx, name, NULL);
  ------------------
  |  |  226|   126k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   126k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   126k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|   126k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   126k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   126k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   126k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  826|   126k|    return ly_ctx_get_module_by(ctx, name, offsetof(struct lys_module, name), revision);
  827|   126k|}
ly_ctx_get_module_latest:
  853|   143k|{
  854|   143k|    LY_CHECK_ARG_RET(ctx, ctx, name, NULL);
  ------------------
  |  |  226|   143k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   143k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   143k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|   143k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   143k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 143k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   143k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 143k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   143k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  855|   143k|    return ly_ctx_get_module_latest_by(ctx, name, offsetof(struct lys_module, name));
  856|   143k|}
ly_ctx_get_module_latest_ns:
  860|   112k|{
  861|   112k|    LY_CHECK_ARG_RET(ctx, ctx, ns, NULL);
  ------------------
  |  |  226|   112k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   112k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   112k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|   112k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   112k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   112k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   112k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  862|   112k|    return ly_ctx_get_module_latest_by(ctx, ns, offsetof(struct lys_module, ns));
  863|   112k|}
ly_ctx_get_module_implemented:
  890|   126k|{
  891|   126k|    LY_CHECK_ARG_RET(ctx, ctx, name, NULL);
  ------------------
  |  |  226|   126k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   126k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   126k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|   126k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   126k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   126k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   126k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  892|   126k|    return ly_ctx_get_module_implemented_by(ctx, name, 0, offsetof(struct lys_module, name));
  893|   126k|}
ly_ctx_get_submodule_latest:
  987|   112k|{
  988|   112k|    return _ly_ctx_get_submodule(ctx, submodule, NULL, 1);
  989|   112k|}
ly_ctx_destroy:
 1291|  14.0k|{
 1292|  14.0k|    struct lysf_ctx fctx = {.ctx = ctx};
 1293|       |
 1294|  14.0k|    if (!ctx) {
  ------------------
  |  Branch (1294:9): [True: 0, False: 14.0k]
  ------------------
 1295|      0|        return;
 1296|      0|    }
 1297|       |
 1298|       |    /* models list */
 1299|   126k|    for ( ; ctx->list.count; ctx->list.count--) {
  ------------------
  |  Branch (1299:13): [True: 112k, False: 14.0k]
  ------------------
 1300|   112k|        fctx.mod = ctx->list.objs[ctx->list.count - 1];
 1301|       |
 1302|       |        /* remove the module */
 1303|   112k|        if (fctx.mod->implemented) {
  ------------------
  |  Branch (1303:13): [True: 56.2k, False: 56.2k]
  ------------------
 1304|  56.2k|            fctx.mod->implemented = 0;
 1305|  56.2k|            lysc_module_free(&fctx, fctx.mod->compiled);
 1306|  56.2k|            fctx.mod->compiled = NULL;
 1307|  56.2k|        }
 1308|   112k|        lys_module_free(&fctx, fctx.mod, 0);
 1309|   112k|    }
 1310|  14.0k|    free(ctx->list.objs);
 1311|       |
 1312|       |    /* free extensions */
 1313|  14.0k|    lysf_ctx_erase(&fctx);
 1314|       |
 1315|       |    /* search paths list */
 1316|  14.0k|    ly_set_erase(&ctx->search_paths, free);
 1317|       |
 1318|       |    /* leftover unres */
 1319|  14.0k|    lys_unres_glob_erase(&ctx->unres);
 1320|       |
 1321|       |    /* clean the error hash table */
 1322|  14.0k|    lyht_free(ctx->err_ht, ly_ctx_ht_err_rec_free);
 1323|       |
 1324|       |    /* dictionary */
 1325|  14.0k|    lydict_clean(&ctx->dict);
 1326|       |
 1327|       |    /* LYB hash lock */
 1328|  14.0k|    pthread_mutex_destroy(&ctx->lyb_hash_lock);
 1329|       |
 1330|       |    /* plugins - will be removed only if this is the last context */
 1331|  14.0k|    lyplg_clean();
 1332|       |
 1333|  14.0k|    free(ctx);
 1334|  14.0k|}
context.c:ly_ctx_get_module_by:
  794|   126k|{
  795|   126k|    struct lys_module *mod;
  796|   126k|    uint32_t index = 0;
  797|       |
  798|   126k|    while ((mod = ly_ctx_get_module_by_iter(ctx, key, 0, key_offset, &index))) {
  ------------------
  |  Branch (798:12): [True: 14.0k, False: 112k]
  ------------------
  799|  14.0k|        if (!revision) {
  ------------------
  |  Branch (799:13): [True: 0, False: 14.0k]
  ------------------
  800|      0|            if (!mod->revision) {
  ------------------
  |  Branch (800:17): [True: 0, False: 0]
  ------------------
  801|       |                /* found requested module without revision */
  802|      0|                return mod;
  803|      0|            }
  804|  14.0k|        } else {
  805|  14.0k|            if (mod->revision && !strcmp(mod->revision, revision)) {
  ------------------
  |  Branch (805:17): [True: 14.0k, False: 0]
  |  Branch (805:34): [True: 14.0k, False: 0]
  ------------------
  806|       |                /* found requested module of the specific revision */
  807|  14.0k|                return mod;
  808|  14.0k|            }
  809|  14.0k|        }
  810|  14.0k|    }
  811|       |
  812|   112k|    return NULL;
  813|   126k|}
context.c:ly_ctx_get_module_by_iter:
  766|   621k|{
  767|   621k|    struct lys_module *mod;
  768|   621k|    const char *value;
  769|       |
  770|  2.54M|    for ( ; *index < ctx->list.count; ++(*index)) {
  ------------------
  |  Branch (770:13): [True: 2.09M, False: 453k]
  ------------------
  771|  2.09M|        mod = ctx->list.objs[*index];
  772|  2.09M|        value = *(const char **)(((int8_t *)(mod)) + key_offset);
  773|  2.09M|        if ((!key_size && !strcmp(key, value)) || (key_size && !strncmp(key, value, key_size) && (value[key_size] == '\0'))) {
  ------------------
  |  Branch (773:14): [True: 2.09M, False: 0]
  |  Branch (773:27): [True: 168k, False: 1.92M]
  |  Branch (773:52): [True: 0, False: 1.92M]
  |  Branch (773:64): [True: 0, False: 0]
  |  Branch (773:98): [True: 0, False: 0]
  ------------------
  774|       |            /* increment index for the next run */
  775|   168k|            ++(*index);
  776|   168k|            return mod;
  777|   168k|        }
  778|  2.09M|    }
  779|       |    /* done */
  780|   453k|    return NULL;
  781|   621k|}
context.c:ly_ctx_get_module_latest_by:
  838|   256k|{
  839|   256k|    struct lys_module *mod;
  840|   256k|    uint32_t index = 0;
  841|       |
  842|   256k|    while ((mod = ly_ctx_get_module_by_iter(ctx, key, 0, key_offset, &index))) {
  ------------------
  |  Branch (842:12): [True: 28.1k, False: 228k]
  ------------------
  843|  28.1k|        if (mod->latest_revision & LYS_MOD_LATEST_REV) {
  ------------------
  |  | 2122|  28.1k|#define LYS_MOD_LATEST_REV          0x01 /**< This is the latest revision of the module in the current context. */
  ------------------
  |  Branch (843:13): [True: 28.1k, False: 0]
  ------------------
  844|  28.1k|            return mod;
  845|  28.1k|        }
  846|  28.1k|    }
  847|       |
  848|   228k|    return NULL;
  849|   256k|}
context.c:ly_ctx_get_module_implemented_by:
  875|   126k|{
  876|   126k|    struct lys_module *mod;
  877|   126k|    uint32_t index = 0;
  878|       |
  879|   238k|    while ((mod = ly_ctx_get_module_by_iter(ctx, key, key_size, key_offset, &index))) {
  ------------------
  |  Branch (879:12): [True: 126k, False: 112k]
  ------------------
  880|   126k|        if (mod->implemented) {
  ------------------
  |  Branch (880:13): [True: 14.0k, False: 112k]
  ------------------
  881|  14.0k|            return mod;
  882|  14.0k|        }
  883|   126k|    }
  884|       |
  885|   112k|    return NULL;
  886|   126k|}
context.c:_ly_ctx_get_submodule:
  957|   112k|{
  958|   112k|    const struct lys_module *mod;
  959|   112k|    const struct lysp_submodule *submod = NULL;
  960|   112k|    uint32_t v;
  961|       |
  962|   112k|    LY_CHECK_ARG_RET(ctx, ctx, submodule, NULL);
  ------------------
  |  |  226|   112k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   112k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   112k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|   112k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   112k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   112k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   112k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  963|       |
  964|   506k|    for (v = 0; v < ctx->list.count; ++v) {
  ------------------
  |  Branch (964:17): [True: 393k, False: 112k]
  ------------------
  965|   393k|        mod = ctx->list.objs[v];
  966|   393k|        if (!mod->parsed) {
  ------------------
  |  Branch (966:13): [True: 0, False: 393k]
  ------------------
  967|      0|            continue;
  968|      0|        }
  969|       |
  970|   393k|        submod = _ly_ctx_get_submodule2(mod, submodule, revision, latest);
  971|   393k|        if (submod) {
  ------------------
  |  Branch (971:13): [True: 0, False: 393k]
  ------------------
  972|      0|            break;
  973|      0|        }
  974|   393k|    }
  975|       |
  976|   112k|    return submod;
  977|   112k|}
context.c:_ly_ctx_get_submodule2:
  920|   393k|{
  921|   393k|    struct lysp_include *inc;
  922|   393k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   393k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  923|       |
  924|   787k|    LY_CHECK_ARG_RET(NULL, module, module->parsed, submodule, NULL);
  ------------------
  |  |  226|   393k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   393k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   393k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  219|   393k|#define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  218|   393k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|   393k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 393k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|   393k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 393k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   393k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 393k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   393k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  925|       |
  926|   393k|    LY_ARRAY_FOR(module->parsed->includes, u) {
  ------------------
  |  |  167|   393k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   393k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   393k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   393k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   393k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   393k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 393k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 393k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   393k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|      0|        if (module->parsed->includes[u].submodule && !strcmp(submodule, module->parsed->includes[u].submodule->name)) {
  ------------------
  |  Branch (927:13): [True: 0, False: 0]
  |  Branch (927:54): [True: 0, False: 0]
  ------------------
  928|      0|            inc = &module->parsed->includes[u];
  929|       |
  930|      0|            if (latest && inc->submodule->latest_revision) {
  ------------------
  |  Branch (930:17): [True: 0, False: 0]
  |  Branch (930:27): [True: 0, False: 0]
  ------------------
  931|       |                /* latest revision */
  932|      0|                return inc->submodule;
  933|      0|            } else if (!revision && !inc->submodule->revs) {
  ------------------
  |  Branch (933:24): [True: 0, False: 0]
  |  Branch (933:37): [True: 0, False: 0]
  ------------------
  934|       |                /* no revision */
  935|      0|                return inc->submodule;
  936|      0|            } else if (revision && inc->submodule->revs && !strcmp(revision, inc->submodule->revs[0].date)) {
  ------------------
  |  Branch (936:24): [True: 0, False: 0]
  |  Branch (936:36): [True: 0, False: 0]
  |  Branch (936:60): [True: 0, False: 0]
  ------------------
  937|       |                /* specific revision */
  938|      0|                return inc->submodule;
  939|      0|            }
  940|      0|        }
  941|      0|    }
  942|       |
  943|   393k|    return NULL;
  944|   393k|}

lydict_init:
   56|  14.0k|{
   57|  14.0k|    LY_CHECK_ARG_RET(NULL, dict, );
  ------------------
  |  |  226|  14.0k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  14.0k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
   58|       |
   59|  14.0k|    dict->hash_tab = lyht_new(LYDICT_MIN_SIZE, sizeof(struct ly_dict_rec), lydict_val_eq, NULL, 1);
  ------------------
  |  |   29|  14.0k|#define LYDICT_MIN_SIZE 1024
  ------------------
   60|  14.0k|    LY_CHECK_ERR_RET(!dict->hash_tab, LOGINT(NULL), );
  ------------------
  |  |  207|  14.0k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
   61|  14.0k|    pthread_mutex_init(&dict->lock, NULL);
   62|  14.0k|}
lydict_clean:
   66|  14.0k|{
   67|  14.0k|    struct ly_dict_rec *dict_rec = NULL;
   68|  14.0k|    struct ly_ht_rec *rec = NULL;
   69|       |
   70|  14.0k|    LY_CHECK_ARG_RET(NULL, dict, );
  ------------------
  |  |  226|  14.0k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  14.0k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
   71|       |
   72|  14.3M|    for (uint32_t i = 0; i < dict->hash_tab->size; i++) {
  ------------------
  |  Branch (72:26): [True: 14.3M, False: 14.0k]
  ------------------
   73|       |        /* get ith record */
   74|  14.3M|        rec = (struct ly_ht_rec *)&dict->hash_tab->recs[i * dict->hash_tab->rec_size];
   75|  14.3M|        if (rec->hits == 1) {
  ------------------
  |  Branch (75:13): [True: 0, False: 14.3M]
  ------------------
   76|       |            /*
   77|       |             * this should not happen, all records inserted into
   78|       |             * dictionary are supposed to be removed using lydict_remove()
   79|       |             * before calling lydict_clean()
   80|       |             */
   81|      0|            dict_rec = (struct ly_dict_rec *)rec->val;
   82|      0|            LOGWRN(NULL, "String \"%s\" not freed from the dictionary, refcount %d", dict_rec->value, dict_rec->refcount);
  ------------------
  |  |  155|      0|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  ------------------
   83|       |            /* if record wasn't removed before free string allocated for that record */
   84|       |#ifdef NDEBUG
   85|       |            free(dict_rec->value);
   86|       |#endif
   87|      0|        }
   88|  14.3M|    }
   89|       |
   90|       |    /* free table and destroy mutex */
   91|  14.0k|    lyht_free(dict->hash_tab, NULL);
   92|  14.0k|    pthread_mutex_destroy(&dict->lock);
   93|  14.0k|}
lydict_remove:
  121|  22.4M|{
  122|  22.4M|    LY_ERR ret = LY_SUCCESS;
  123|  22.4M|    size_t len;
  124|  22.4M|    uint32_t hash;
  125|  22.4M|    struct ly_dict_rec rec, *match = NULL;
  126|  22.4M|    char *val_p;
  127|       |
  128|  22.4M|    if (!ctx || !value) {
  ------------------
  |  Branch (128:9): [True: 0, False: 22.4M]
  |  Branch (128:17): [True: 9.52M, False: 12.9M]
  ------------------
  129|  9.52M|        return LY_SUCCESS;
  130|  9.52M|    }
  131|       |
  132|  12.9M|    LOGDBG(LY_LDGDICT, "removing \"%s\"", value);
  ------------------
  |  |  162|  12.9M|#  define LOGDBG(dbg_group, ...) ly_log_dbg(dbg_group, __VA_ARGS__);
  ------------------
  133|       |
  134|  12.9M|    len = strlen(value);
  135|  12.9M|    hash = lyht_hash(value, len);
  136|       |
  137|       |    /* create record for lyht_find call */
  138|  12.9M|    rec.value = (char *)value;
  139|  12.9M|    rec.refcount = 0;
  140|       |
  141|  12.9M|    pthread_mutex_lock((pthread_mutex_t *)&ctx->dict.lock);
  142|       |    /* set len as data for compare callback */
  143|  12.9M|    lyht_set_cb_data(ctx->dict.hash_tab, (void *)&len);
  144|       |    /* check if value is already inserted */
  145|  12.9M|    ret = lyht_find(ctx->dict.hash_tab, &rec, hash, (void **)&match);
  146|       |
  147|  12.9M|    if (ret == LY_SUCCESS) {
  ------------------
  |  Branch (147:9): [True: 12.9M, False: 0]
  ------------------
  148|  12.9M|        LY_CHECK_ERR_GOTO(!match, LOGINT(ctx), finish);
  ------------------
  |  |  203|  12.9M|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 12.9M]
  |  |  ------------------
  ------------------
  149|       |
  150|       |        /* if value is already in dictionary, decrement reference counter */
  151|  12.9M|        match->refcount--;
  152|  12.9M|        if (match->refcount == 0) {
  ------------------
  |  Branch (152:13): [True: 5.54M, False: 7.36M]
  ------------------
  153|       |            /*
  154|       |             * remove record
  155|       |             * save pointer to stored string before lyht_remove to
  156|       |             * free it after it is removed from hash table
  157|       |             */
  158|  5.54M|            val_p = match->value;
  159|  5.54M|            ret = lyht_remove_with_resize_cb(ctx->dict.hash_tab, &rec, hash, lydict_resize_val_eq);
  160|  5.54M|            free(val_p);
  161|  5.54M|            LY_CHECK_ERR_GOTO(ret, LOGINT(ctx), finish);
  ------------------
  |  |  203|  5.54M|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 5.54M]
  |  |  ------------------
  ------------------
  162|  5.54M|        }
  163|  12.9M|    } else if (ret == LY_ENOTFOUND) {
  ------------------
  |  Branch (163:16): [True: 0, False: 0]
  ------------------
  164|      0|        LOGERR(ctx, LY_ENOTFOUND, "Value \"%s\" was not found in the dictionary.", value);
  ------------------
  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  ------------------
  165|      0|    } else {
  166|      0|        LOGINT(ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  167|      0|    }
  168|       |
  169|  12.9M|finish:
  170|  12.9M|    pthread_mutex_unlock((pthread_mutex_t *)&ctx->dict.lock);
  171|  12.9M|    return ret;
  172|  12.9M|}
dict_insert:
  176|  12.9M|{
  177|  12.9M|    LY_ERR ret = LY_SUCCESS;
  178|  12.9M|    struct ly_dict_rec *match = NULL, rec;
  179|  12.9M|    uint32_t hash;
  180|       |
  181|  12.9M|    LOGDBG(LY_LDGDICT, "inserting \"%.*s\"", (int)len, value);
  ------------------
  |  |  162|  12.9M|#  define LOGDBG(dbg_group, ...) ly_log_dbg(dbg_group, __VA_ARGS__);
  ------------------
  182|       |
  183|  12.9M|    hash = lyht_hash(value, len);
  184|       |    /* set len as data for compare callback */
  185|  12.9M|    lyht_set_cb_data(ctx->dict.hash_tab, (void *)&len);
  186|       |    /* create record for lyht_insert */
  187|  12.9M|    rec.value = value;
  188|  12.9M|    rec.refcount = 1;
  189|       |
  190|  12.9M|    ret = lyht_insert_with_resize_cb(ctx->dict.hash_tab, (void *)&rec, hash, lydict_resize_val_eq, (void **)&match);
  191|  12.9M|    if (ret == LY_EEXIST) {
  ------------------
  |  Branch (191:9): [True: 7.36M, False: 5.54M]
  ------------------
  192|  7.36M|        match->refcount++;
  193|  7.36M|        if (zerocopy) {
  ------------------
  |  Branch (193:13): [True: 179k, False: 7.18M]
  ------------------
  194|   179k|            free(value);
  195|   179k|        }
  196|  7.36M|        ret = LY_SUCCESS;
  197|  7.36M|    } else if (ret == LY_SUCCESS) {
  ------------------
  |  Branch (197:16): [True: 5.54M, False: 0]
  ------------------
  198|  5.54M|        if (!zerocopy) {
  ------------------
  |  Branch (198:13): [True: 3.44M, False: 2.09M]
  ------------------
  199|       |            /*
  200|       |             * allocate string for new record
  201|       |             * record is already inserted in hash table
  202|       |             */
  203|  3.44M|            match->value = malloc(sizeof *match->value * (len + 1));
  204|  3.44M|            LY_CHECK_ERR_RET(!match->value, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|  3.44M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 3.44M]
  |  |  ------------------
  ------------------
  205|  3.44M|            if (len) {
  ------------------
  |  Branch (205:17): [True: 3.44M, False: 188]
  ------------------
  206|  3.44M|                memcpy(match->value, value, len);
  207|  3.44M|            }
  208|  3.44M|            match->value[len] = '\0';
  209|  3.44M|        }
  210|  5.54M|    } else {
  211|       |        /* lyht_insert returned error */
  212|      0|        if (zerocopy) {
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|            free(value);
  214|      0|        }
  215|      0|        return ret;
  216|      0|    }
  217|       |
  218|  12.9M|    if (str_p) {
  ------------------
  |  Branch (218:9): [True: 12.9M, False: 0]
  ------------------
  219|  12.9M|        *str_p = match->value;
  220|  12.9M|    }
  221|       |
  222|  12.9M|    return ret;
  223|  12.9M|}
lydict_insert:
  227|  12.4M|{
  228|  12.4M|    LY_ERR result;
  229|       |
  230|  12.4M|    LY_CHECK_ARG_RET(ctx, ctx, str_p, LY_EINVAL);
  ------------------
  |  |  226|  12.4M|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  12.4M|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  12.4M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|  12.4M|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  12.4M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 12.4M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  12.4M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 12.4M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  12.4M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  231|       |
  232|  12.4M|    if (!value) {
  ------------------
  |  Branch (232:9): [True: 1.77M, False: 10.6M]
  ------------------
  233|  1.77M|        *str_p = NULL;
  234|  1.77M|        return LY_SUCCESS;
  235|  1.77M|    }
  236|       |
  237|  10.6M|    if (!len) {
  ------------------
  |  Branch (237:9): [True: 3.42M, False: 7.20M]
  ------------------
  238|  3.42M|        len = strlen(value);
  239|  3.42M|    }
  240|       |
  241|  10.6M|    pthread_mutex_lock((pthread_mutex_t *)&ctx->dict.lock);
  242|  10.6M|    result = dict_insert(ctx, (char *)value, len, 0, str_p);
  243|  10.6M|    pthread_mutex_unlock((pthread_mutex_t *)&ctx->dict.lock);
  244|       |
  245|  10.6M|    return result;
  246|  12.4M|}
lydict_insert_zc:
  250|  2.27M|{
  251|  2.27M|    LY_ERR result;
  252|       |
  253|  2.27M|    LY_CHECK_ARG_RET(ctx, ctx, str_p, LY_EINVAL);
  ------------------
  |  |  226|  2.27M|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  2.27M|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  2.27M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|  2.27M|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  2.27M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 2.27M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  2.27M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 2.27M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  2.27M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  254|       |
  255|  2.27M|    if (!value) {
  ------------------
  |  Branch (255:9): [True: 0, False: 2.27M]
  ------------------
  256|      0|        *str_p = NULL;
  257|      0|        return LY_SUCCESS;
  258|      0|    }
  259|       |
  260|  2.27M|    pthread_mutex_lock((pthread_mutex_t *)&ctx->dict.lock);
  261|  2.27M|    result = dict_insert(ctx, value, strlen(value), 1, str_p);
  262|  2.27M|    pthread_mutex_unlock((pthread_mutex_t *)&ctx->dict.lock);
  263|       |
  264|  2.27M|    return result;
  265|  2.27M|}
dict.c:lydict_val_eq:
   38|  25.8M|{
   39|  51.6M|    LY_CHECK_ARG_RET(NULL, val1_p, val2_p, cb_data, 0);
  ------------------
  |  |  226|  25.8M|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  25.8M|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  25.8M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  219|  25.8M|#define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  218|  25.8M|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|  25.8M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 25.8M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|  25.8M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 25.8M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  25.8M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 25.8M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  25.8M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
   40|       |
   41|  25.8M|    const char *str1 = ((struct ly_dict_rec *)val1_p)->value;
   42|  25.8M|    const char *str2 = ((struct ly_dict_rec *)val2_p)->value;
   43|       |
   44|  25.8M|    LY_CHECK_ERR_RET(!str1, LOGARG(NULL, val1_p), 0);
  ------------------
  |  |  207|  25.8M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 25.8M]
  |  |  ------------------
  ------------------
   45|  25.8M|    LY_CHECK_ERR_RET(!str2, LOGARG(NULL, val2_p), 0);
  ------------------
  |  |  207|  25.8M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 25.8M]
  |  |  ------------------
  ------------------
   46|       |
   47|  25.8M|    if (strncmp(str1, str2, *(size_t *)cb_data) == 0) {
  ------------------
  |  Branch (47:9): [True: 25.8M, False: 990]
  ------------------
   48|  25.8M|        return 1;
   49|  25.8M|    }
   50|       |
   51|    990|    return 0;
   52|  25.8M|}
dict.c:lydict_resize_val_eq:
   97|     29|{
   98|     29|    LY_CHECK_ARG_RET(NULL, val1_p, val2_p, 0);
  ------------------
  |  |  226|     29|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|     29|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|     29|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|     29|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|     29|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 29]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|     29|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 29]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|     29|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
   99|       |
  100|     29|    const char *str1 = ((struct ly_dict_rec *)val1_p)->value;
  101|     29|    const char *str2 = ((struct ly_dict_rec *)val2_p)->value;
  102|       |
  103|     29|    LY_CHECK_ERR_RET(!str1, LOGARG(NULL, val1_p), 0);
  ------------------
  |  |  207|     29|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 29]
  |  |  ------------------
  ------------------
  104|     29|    LY_CHECK_ERR_RET(!str2, LOGARG(NULL, val2_p), 0);
  ------------------
  |  |  207|     29|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 29]
  |  |  ------------------
  ------------------
  105|       |
  106|     29|    if (mod) {
  ------------------
  |  Branch (106:9): [True: 10, False: 19]
  ------------------
  107|       |        /* used when inserting new values */
  108|     10|        if (strcmp(str1, str2) == 0) {
  ------------------
  |  Branch (108:13): [True: 0, False: 10]
  ------------------
  109|      0|            return 1;
  110|      0|        }
  111|     19|    } else {
  112|       |        /* used when finding the original value again in the resized table */
  113|     19|        return lydict_val_eq(val1_p, val2_p, mod, cb_data);
  114|     19|    }
  115|       |
  116|     10|    return 0;
  117|     29|}

lyht_hash_multi:
   31|  53.1M|{
   32|  53.1M|    uint32_t i;
   33|       |
   34|  53.1M|    if (key_part && len) {
  ------------------
  |  Branch (34:9): [True: 26.5M, False: 26.5M]
  |  Branch (34:21): [True: 26.5M, False: 13.9k]
  ------------------
   35|  2.18G|        for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (35:21): [True: 2.16G, False: 26.5M]
  ------------------
   36|  2.16G|            hash += key_part[i];
   37|  2.16G|            hash += (hash << 10);
   38|  2.16G|            hash ^= (hash >> 6);
   39|  2.16G|        }
   40|  26.5M|    } else {
   41|  26.5M|        hash += (hash << 3);
   42|  26.5M|        hash ^= (hash >> 11);
   43|  26.5M|        hash += (hash << 15);
   44|  26.5M|    }
   45|       |
   46|  53.1M|    return hash;
   47|  53.1M|}
lyht_hash:
   51|  26.5M|{
   52|  26.5M|    uint32_t hash;
   53|       |
   54|  26.5M|    hash = lyht_hash_multi(0, key, len);
   55|  26.5M|    return lyht_hash_multi(hash, NULL, len);
   56|  26.5M|}
lyht_get_rec:
   60|  48.2M|{
   61|  48.2M|    return (struct ly_ht_rec *)&recs[idx * rec_size];
   62|  48.2M|}
lyht_new:
   66|   477k|{
   67|   477k|    struct ly_ht *ht;
   68|       |
   69|       |    /* check that 2^x == size (power of 2) */
   70|   477k|    assert(size && !(size & (size - 1)));
   71|      0|    assert(val_equal && val_size);
   72|      0|    assert(resize == 0 || resize == 1);
   73|       |
   74|   477k|    if (size < LYHT_MIN_SIZE) {
  ------------------
  |  |   42|   477k|#define LYHT_MIN_SIZE 8
  ------------------
  |  Branch (74:9): [True: 14.0k, False: 463k]
  ------------------
   75|  14.0k|        size = LYHT_MIN_SIZE;
  ------------------
  |  |   42|  14.0k|#define LYHT_MIN_SIZE 8
  ------------------
   76|  14.0k|    }
   77|       |
   78|   477k|    ht = malloc(sizeof *ht);
   79|   477k|    LY_CHECK_ERR_RET(!ht, LOGMEM(NULL), NULL);
  ------------------
  |  |  207|   477k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 477k]
  |  |  ------------------
  ------------------
   80|       |
   81|   477k|    ht->used = 0;
   82|   477k|    ht->size = size;
   83|   477k|    ht->invalid = 0;
   84|   477k|    ht->val_equal = val_equal;
   85|   477k|    ht->cb_data = cb_data;
   86|   477k|    ht->resize = resize;
   87|       |
   88|   477k|    ht->rec_size = (sizeof(struct ly_ht_rec) - 1) + val_size;
   89|       |    /* allocate the records correctly */
   90|   477k|    ht->recs = calloc(size, ht->rec_size);
   91|   477k|    LY_CHECK_ERR_RET(!ht->recs, free(ht); LOGMEM(NULL), NULL);
  ------------------
  |  |  207|   477k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 477k]
  |  |  ------------------
  ------------------
   92|       |
   93|   477k|    return ht;
   94|   477k|}
lyht_set_cb:
   98|  1.03k|{
   99|  1.03k|    lyht_value_equal_cb prev;
  100|       |
  101|  1.03k|    prev = ht->val_equal;
  102|  1.03k|    ht->val_equal = new_val_equal;
  103|  1.03k|    return prev;
  104|  1.03k|}
lyht_set_cb_data:
  108|  25.8M|{
  109|  25.8M|    void *prev;
  110|       |
  111|  25.8M|    prev = ht->cb_data;
  112|  25.8M|    ht->cb_data = new_cb_data;
  113|  25.8M|    return prev;
  114|  25.8M|}
lyht_free:
  136|   477k|{
  137|   477k|    struct ly_ht_rec *rec;
  138|   477k|    uint32_t i;
  139|       |
  140|   477k|    if (!ht) {
  ------------------
  |  Branch (140:9): [True: 0, False: 477k]
  ------------------
  141|      0|        return;
  142|      0|    }
  143|       |
  144|   477k|    if (val_free) {
  ------------------
  |  Branch (144:9): [True: 14.0k, False: 463k]
  ------------------
  145|   126k|        for (i = 0; i < ht->size; ++i) {
  ------------------
  |  Branch (145:21): [True: 112k, False: 14.0k]
  ------------------
  146|   112k|            rec = lyht_get_rec(ht->recs, ht->rec_size, i);
  147|   112k|            if (rec->hits > 0) {
  ------------------
  |  Branch (147:17): [True: 0, False: 112k]
  ------------------
  148|      0|                val_free(&rec->val);
  149|      0|            }
  150|   112k|        }
  151|  14.0k|    }
  152|   477k|    free(ht->recs);
  153|   477k|    free(ht);
  154|   477k|}
lyht_find:
  377|  12.9M|{
  378|  12.9M|    struct ly_ht_rec *rec;
  379|       |
  380|  12.9M|    lyht_find_rec(ht, val_p, hash, 0, NULL, NULL, &rec);
  381|       |
  382|  12.9M|    if (rec && match_p) {
  ------------------
  |  Branch (382:9): [True: 12.9M, False: 39.3k]
  |  Branch (382:16): [True: 12.9M, False: 0]
  ------------------
  383|  12.9M|        *match_p = rec->val;
  384|  12.9M|    }
  385|  12.9M|    return rec ? LY_SUCCESS : LY_ENOTFOUND;
  ------------------
  |  Branch (385:12): [True: 12.9M, False: 39.3k]
  ------------------
  386|  12.9M|}
lyht_insert_with_resize_cb:
  443|  14.3M|{
  444|  14.3M|    LY_ERR r, ret = LY_SUCCESS;
  445|  14.3M|    struct ly_ht_rec *rec, *crec = NULL;
  446|  14.3M|    int32_t i;
  447|  14.3M|    lyht_value_equal_cb old_val_equal = NULL;
  448|       |
  449|  14.3M|    if (!lyht_find_first(ht, hash, &rec)) {
  ------------------
  |  Branch (449:9): [True: 8.82M, False: 5.54M]
  ------------------
  450|       |        /* we found matching shortened hash */
  451|  8.82M|        if ((rec->hash == hash) && ht->val_equal(val_p, &rec->val, 1, ht->cb_data)) {
  ------------------
  |  Branch (451:13): [True: 5.70M, False: 3.12M]
  |  Branch (451:36): [True: 5.69M, False: 284]
  ------------------
  452|       |            /* even the value matches */
  453|  5.69M|            if (match_p) {
  ------------------
  |  Branch (453:17): [True: 5.69M, False: 0]
  ------------------
  454|  5.69M|                *match_p = (void *)&rec->val;
  455|  5.69M|            }
  456|  5.69M|            return LY_EEXIST;
  457|  5.69M|        }
  458|       |
  459|       |        /* some collisions, we need to go through them, too */
  460|  3.12M|        crec = rec;
  461|  3.80M|        for (i = 1; i < crec->hits; ++i) {
  ------------------
  |  Branch (461:21): [True: 2.34M, False: 1.46M]
  ------------------
  462|  2.34M|            r = lyht_find_collision(ht, &rec, crec);
  463|  2.34M|            assert(!r);
  464|       |
  465|       |            /* compare values */
  466|  2.34M|            if ((rec->hash == hash) && ht->val_equal(val_p, &rec->val, 1, ht->cb_data)) {
  ------------------
  |  Branch (466:17): [True: 1.66M, False: 676k]
  |  Branch (466:40): [True: 1.66M, False: 207]
  ------------------
  467|  1.66M|                if (match_p) {
  ------------------
  |  Branch (467:21): [True: 1.66M, False: 0]
  ------------------
  468|  1.66M|                    *match_p = (void *)&rec->val;
  469|  1.66M|                }
  470|  1.66M|                return LY_EEXIST;
  471|  1.66M|            }
  472|  2.34M|        }
  473|       |
  474|       |        /* value not found, get the record where it will be inserted */
  475|  1.46M|        r = lyht_find_collision(ht, &rec, crec);
  476|  1.46M|        assert(r);
  477|  1.46M|    }
  478|       |
  479|       |    /* insert it into the returned record */
  480|  7.00M|    assert(rec->hits < 1);
  481|  7.00M|    if (rec->hits < 0) {
  ------------------
  |  Branch (481:9): [True: 0, False: 7.00M]
  ------------------
  482|      0|        --ht->invalid;
  483|      0|    }
  484|  7.00M|    rec->hash = hash;
  485|  7.00M|    rec->hits = 1;
  486|  7.00M|    memcpy(&rec->val, val_p, ht->rec_size - (sizeof(struct ly_ht_rec) - 1));
  487|  7.00M|    if (match_p) {
  ------------------
  |  Branch (487:9): [True: 5.54M, False: 1.46M]
  ------------------
  488|  5.54M|        *match_p = (void *)&rec->val;
  489|  5.54M|    }
  490|       |
  491|  7.00M|    if (crec) {
  ------------------
  |  Branch (491:9): [True: 1.46M, False: 5.54M]
  ------------------
  492|       |        /* there was a collision, increase hits */
  493|  1.46M|        if (crec->hits == INT32_MAX) {
  ------------------
  |  Branch (493:13): [True: 0, False: 1.46M]
  ------------------
  494|      0|            LOGINT(NULL);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  495|      0|        }
  496|  1.46M|        ++crec->hits;
  497|  1.46M|    }
  498|       |
  499|       |    /* check size & enlarge if needed */
  500|  7.00M|    ++ht->used;
  501|  7.00M|    if (ht->resize) {
  ------------------
  |  Branch (501:9): [True: 7.00M, False: 0]
  ------------------
  502|  7.00M|        r = (ht->used * LYHT_HUNDRED_PERCENTAGE) / ht->size;
  ------------------
  |  |   27|  7.00M|#define LYHT_HUNDRED_PERCENTAGE 100
  ------------------
  503|  7.00M|        if ((ht->resize == 1) && (r >= LYHT_FIRST_SHRINK_PERCENTAGE)) {
  ------------------
  |  |   33|  5.79M|#define LYHT_FIRST_SHRINK_PERCENTAGE 50
  ------------------
  |  Branch (503:13): [True: 5.79M, False: 1.20M]
  |  Branch (503:34): [True: 56.3k, False: 5.74M]
  ------------------
  504|       |            /* enable shrinking */
  505|  56.3k|            ht->resize = 2;
  506|  56.3k|        }
  507|  7.00M|        if ((ht->resize == 2) && (r >= LYHT_ENLARGE_PERCENTAGE)) {
  ------------------
  |  |   30|  1.26M|#define LYHT_ENLARGE_PERCENTAGE 75
  ------------------
  |  Branch (507:13): [True: 1.26M, False: 5.74M]
  |  Branch (507:34): [True: 84.3k, False: 1.17M]
  ------------------
  508|  84.3k|            if (resize_val_equal) {
  ------------------
  |  Branch (508:17): [True: 17, False: 84.3k]
  ------------------
  509|     17|                old_val_equal = lyht_set_cb(ht, resize_val_equal);
  510|     17|            }
  511|       |
  512|       |            /* enlarge */
  513|  84.3k|            ret = lyht_resize(ht, 1);
  514|       |            /* if hash_table was resized, we need to find new matching value */
  515|  84.3k|            if ((ret == LY_SUCCESS) && match_p) {
  ------------------
  |  Branch (515:17): [True: 84.3k, False: 0]
  |  Branch (515:40): [True: 17, False: 84.3k]
  ------------------
  516|     17|                lyht_find(ht, val_p, hash, match_p);
  517|     17|            }
  518|       |
  519|  84.3k|            if (resize_val_equal) {
  ------------------
  |  Branch (519:17): [True: 17, False: 84.3k]
  ------------------
  520|     17|                lyht_set_cb(ht, old_val_equal);
  521|     17|            }
  522|  84.3k|        }
  523|  7.00M|    }
  524|  7.00M|    return ret;
  525|  14.3M|}
lyht_insert:
  529|  1.46M|{
  530|  1.46M|    return lyht_insert_with_resize_cb(ht, val_p, hash, NULL, match_p);
  531|  1.46M|}
lyht_remove_with_resize_cb:
  535|  5.54M|{
  536|  5.54M|    struct ly_ht_rec *rec, *crec;
  537|  5.54M|    int32_t i;
  538|  5.54M|    ly_bool first_matched = 0;
  539|  5.54M|    LY_ERR r, ret = LY_SUCCESS;
  540|  5.54M|    lyht_value_equal_cb old_val_equal = NULL;
  541|       |
  542|  5.54M|    LY_CHECK_ERR_RET(lyht_find_first(ht, hash, &rec), LOGARG(NULL, hash), LY_ENOTFOUND); /* hash not found */
  ------------------
  |  |  207|  5.54M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 5.54M]
  |  |  ------------------
  ------------------
  543|       |
  544|  5.54M|    if ((rec->hash == hash) && ht->val_equal(val_p, &rec->val, 1, ht->cb_data)) {
  ------------------
  |  Branch (544:9): [True: 4.54M, False: 999k]
  |  Branch (544:32): [True: 4.54M, False: 12]
  ------------------
  545|       |        /* even the value matches */
  546|  4.54M|        first_matched = 1;
  547|  4.54M|    }
  548|       |
  549|       |    /* we always need to go through collisions */
  550|  5.54M|    crec = rec;
  551|  5.95M|    for (i = 1; i < crec->hits; ++i) {
  ------------------
  |  Branch (551:17): [True: 1.41M, False: 4.54M]
  ------------------
  552|  1.41M|        r = lyht_find_collision(ht, &rec, crec);
  553|  1.41M|        assert(!r);
  554|       |
  555|       |        /* compare values */
  556|  1.41M|        if (!first_matched && (rec->hash == hash) && ht->val_equal(val_p, &rec->val, 1, ht->cb_data)) {
  ------------------
  |  Branch (556:13): [True: 1.28M, False: 130k]
  |  Branch (556:31): [True: 999k, False: 287k]
  |  Branch (556:54): [True: 999k, False: 14]
  ------------------
  557|   999k|            break;
  558|   999k|        }
  559|  1.41M|    }
  560|       |
  561|  5.54M|    if (i < crec->hits) {
  ------------------
  |  Branch (561:9): [True: 999k, False: 4.54M]
  ------------------
  562|       |        /* one of collisions matched, reduce collision count, remove the record */
  563|   999k|        assert(!first_matched);
  564|      0|        --crec->hits;
  565|   999k|        rec->hits = -1;
  566|  4.54M|    } else if (first_matched) {
  ------------------
  |  Branch (566:16): [True: 4.54M, False: 0]
  ------------------
  567|       |        /* the first record matches */
  568|  4.54M|        if (crec != rec) {
  ------------------
  |  Branch (568:13): [True: 115k, False: 4.42M]
  ------------------
  569|       |            /* ... so put the last collision in its place */
  570|   115k|            rec->hits = crec->hits - 1;
  571|   115k|            memcpy(crec, rec, ht->rec_size);
  572|   115k|        }
  573|  4.54M|        rec->hits = -1;
  574|  4.54M|    } else {
  575|       |        /* value not found even in collisions */
  576|      0|        return LY_ENOTFOUND;
  577|      0|    }
  578|       |
  579|       |    /* check size & shrink if needed */
  580|  5.54M|    --ht->used;
  581|  5.54M|    ++ht->invalid;
  582|  5.54M|    if (ht->resize == 2) {
  ------------------
  |  Branch (582:9): [True: 44.5k, False: 5.49M]
  ------------------
  583|  44.5k|        r = (ht->used * LYHT_HUNDRED_PERCENTAGE) / ht->size;
  ------------------
  |  |   27|  44.5k|#define LYHT_HUNDRED_PERCENTAGE 100
  ------------------
  584|  44.5k|        if ((r < LYHT_SHRINK_PERCENTAGE) && (ht->size > LYHT_MIN_SIZE)) {
  ------------------
  |  |   36|  44.5k|#define LYHT_SHRINK_PERCENTAGE 25
  ------------------
                      if ((r < LYHT_SHRINK_PERCENTAGE) && (ht->size > LYHT_MIN_SIZE)) {
  ------------------
  |  |   42|    638|#define LYHT_MIN_SIZE 8
  ------------------
  |  Branch (584:13): [True: 638, False: 43.9k]
  |  Branch (584:45): [True: 500, False: 138]
  ------------------
  585|    500|            if (resize_val_equal) {
  ------------------
  |  Branch (585:17): [True: 500, False: 0]
  ------------------
  586|    500|                old_val_equal = lyht_set_cb(ht, resize_val_equal);
  587|    500|            }
  588|       |
  589|       |            /* shrink */
  590|    500|            ret = lyht_resize(ht, -1);
  591|       |
  592|    500|            if (resize_val_equal) {
  ------------------
  |  Branch (592:17): [True: 500, False: 0]
  ------------------
  593|    500|                lyht_set_cb(ht, old_val_equal);
  594|    500|            }
  595|    500|        }
  596|  44.5k|    }
  597|       |
  598|       |    /* rehash all records if needed */
  599|  5.54M|    r = ((ht->size - ht->used - ht->invalid) * 100) / ht->size;
  600|  5.54M|    if (r < LYHT_REHASH_PERCENTAGE) {
  ------------------
  |  |   39|  5.54M|#define LYHT_REHASH_PERCENTAGE 2
  ------------------
  |  Branch (600:9): [True: 0, False: 5.54M]
  ------------------
  601|      0|        if (resize_val_equal) {
  ------------------
  |  Branch (601:13): [True: 0, False: 0]
  ------------------
  602|      0|            old_val_equal = lyht_set_cb(ht, resize_val_equal);
  603|      0|        }
  604|       |
  605|       |        /* rehash */
  606|      0|        ret = lyht_resize(ht, 0);
  607|       |
  608|      0|        if (resize_val_equal) {
  ------------------
  |  Branch (608:13): [True: 0, False: 0]
  ------------------
  609|      0|            lyht_set_cb(ht, old_val_equal);
  610|      0|        }
  611|      0|    }
  612|       |
  613|  5.54M|    return ret;
  614|  5.54M|}
hash_table.c:lyht_find_rec:
  321|  12.9M|{
  322|  12.9M|    struct ly_ht_rec *rec, *crec;
  323|  12.9M|    uint32_t i, c;
  324|  12.9M|    LY_ERR r;
  325|       |
  326|  12.9M|    if (crec_p) {
  ------------------
  |  Branch (326:9): [True: 0, False: 12.9M]
  ------------------
  327|      0|        *crec_p = NULL;
  328|      0|    }
  329|  12.9M|    if (col) {
  ------------------
  |  Branch (329:9): [True: 0, False: 12.9M]
  ------------------
  330|      0|        *col = 0;
  331|      0|    }
  332|  12.9M|    *rec_p = NULL;
  333|       |
  334|  12.9M|    if (lyht_find_first(ht, hash, &rec)) {
  ------------------
  |  Branch (334:9): [True: 25.3k, False: 12.9M]
  ------------------
  335|       |        /* not found */
  336|  25.3k|        return LY_ENOTFOUND;
  337|  25.3k|    }
  338|  12.9M|    if ((rec->hash == hash) && ht->val_equal(val_p, &rec->val, mod, ht->cb_data)) {
  ------------------
  |  Branch (338:9): [True: 10.3M, False: 2.53M]
  |  Branch (338:32): [True: 10.3M, False: 280]
  ------------------
  339|       |        /* even the value matches */
  340|  10.3M|        if (crec_p) {
  ------------------
  |  Branch (340:13): [True: 0, False: 10.3M]
  ------------------
  341|      0|            *crec_p = rec;
  342|      0|        }
  343|  10.3M|        if (col) {
  ------------------
  |  Branch (343:13): [True: 0, False: 10.3M]
  ------------------
  344|      0|            *col = 0;
  345|      0|        }
  346|  10.3M|        *rec_p = rec;
  347|  10.3M|        return LY_SUCCESS;
  348|  10.3M|    }
  349|       |
  350|       |    /* some collisions, we need to go through them, too */
  351|  2.53M|    crec = rec;
  352|  2.53M|    c = crec->hits;
  353|  3.14M|    for (i = 1; i < c; ++i) {
  ------------------
  |  Branch (353:17): [True: 3.12M, False: 14.0k]
  ------------------
  354|  3.12M|        r = lyht_find_collision(ht, &rec, crec);
  355|  3.12M|        assert(!r);
  356|      0|        (void)r;
  357|       |
  358|       |        /* compare values */
  359|  3.12M|        if ((rec->hash == hash) && ht->val_equal(val_p, &rec->val, mod, ht->cb_data)) {
  ------------------
  |  Branch (359:13): [True: 2.52M, False: 601k]
  |  Branch (359:36): [True: 2.52M, False: 203]
  ------------------
  360|  2.52M|            if (crec_p) {
  ------------------
  |  Branch (360:17): [True: 0, False: 2.52M]
  ------------------
  361|      0|                *crec_p = crec;
  362|      0|            }
  363|  2.52M|            if (col) {
  ------------------
  |  Branch (363:17): [True: 0, False: 2.52M]
  ------------------
  364|      0|                *col = i;
  365|      0|            }
  366|  2.52M|            *rec_p = rec;
  367|  2.52M|            return LY_SUCCESS;
  368|  2.52M|        }
  369|  3.12M|    }
  370|       |
  371|       |    /* not found even in collisions */
  372|  14.0k|    return LY_ENOTFOUND;
  373|  2.53M|}
hash_table.c:lyht_find_collision:
  267|  8.35M|{
  268|  8.35M|    struct ly_ht_rec *empty = NULL;
  269|  8.35M|    uint32_t i, idx;
  270|       |
  271|  8.35M|    assert(last && *last);
  272|       |
  273|      0|    idx = (*last)->hash & (ht->size - 1);
  274|  8.35M|    i = (((unsigned char *)*last) - ht->recs) / ht->rec_size;
  275|       |
  276|  12.3M|    do {
  277|  12.3M|        i = (i + 1) % ht->size;
  278|  12.3M|        *last = lyht_get_rec(ht->recs, ht->rec_size, i);
  279|  12.3M|        if (*last == first) {
  ------------------
  |  Branch (279:13): [True: 0, False: 12.3M]
  ------------------
  280|       |            /* we went through all the records (very unlikely, but possible when many records are invalid),
  281|       |             * just return an invalid record */
  282|      0|            assert(empty);
  283|      0|            *last = empty;
  284|      0|            return LY_ENOTFOUND;
  285|      0|        }
  286|       |
  287|  12.3M|        if (((*last)->hits == -1) && !empty) {
  ------------------
  |  Branch (287:13): [True: 162k, False: 12.1M]
  |  Branch (287:38): [True: 128k, False: 33.6k]
  ------------------
  288|   128k|            empty = *last;
  289|   128k|        }
  290|  12.3M|    } while (((*last)->hits != 0) && (((*last)->hits == -1) || (((*last)->hash & (ht->size - 1)) != idx)));
  ------------------
  |  Branch (290:14): [True: 10.8M, False: 1.46M]
  |  Branch (290:39): [True: 162k, False: 10.6M]
  |  Branch (290:64): [True: 3.79M, False: 6.88M]
  ------------------
  291|       |
  292|  8.35M|    if ((*last)->hits > 0) {
  ------------------
  |  Branch (292:9): [True: 6.88M, False: 1.46M]
  ------------------
  293|       |        /* we found a collision */
  294|  6.88M|        assert((*last)->hits == 1);
  295|      0|        return LY_SUCCESS;
  296|  6.88M|    }
  297|       |
  298|       |    /* no next collision found, return the record where it would be inserted */
  299|  1.46M|    if (empty) {
  ------------------
  |  Branch (299:9): [True: 0, False: 1.46M]
  ------------------
  300|      0|        *last = empty;
  301|      0|    } /* else (*last)->hits == 0, it is already correct */
  302|  1.46M|    return LY_ENOTFOUND;
  303|  8.35M|}
hash_table.c:lyht_find_first:
  215|  32.8M|{
  216|  32.8M|    struct ly_ht_rec *rec;
  217|  32.8M|    uint32_t i, idx;
  218|       |
  219|  32.8M|    if (rec_p) {
  ------------------
  |  Branch (219:9): [True: 32.8M, False: 0]
  ------------------
  220|  32.8M|        *rec_p = NULL;
  221|  32.8M|    }
  222|       |
  223|  32.8M|    idx = i = hash & (ht->size - 1);
  224|  32.8M|    rec = lyht_get_rec(ht->recs, ht->rec_size, idx);
  225|       |
  226|       |    /* skip through overflow and deleted records */
  227|  34.7M|    while ((rec->hits != 0) && ((rec->hits == -1) || ((rec->hash & (ht->size - 1)) != idx))) {
  ------------------
  |  Branch (227:12): [True: 29.1M, False: 5.56M]
  |  Branch (227:33): [True: 151k, False: 28.9M]
  |  Branch (227:54): [True: 1.70M, False: 27.2M]
  ------------------
  228|  1.85M|        if ((rec->hits == -1) && rec_p && !(*rec_p)) {
  ------------------
  |  Branch (228:13): [True: 151k, False: 1.70M]
  |  Branch (228:34): [True: 151k, False: 0]
  |  Branch (228:43): [True: 143k, False: 7.32k]
  ------------------
  229|       |            /* remember this record for return */
  230|   143k|            *rec_p = rec;
  231|   143k|        }
  232|  1.85M|        i = (i + 1) % ht->size;
  233|  1.85M|        if (i == idx) {
  ------------------
  |  Branch (233:13): [True: 0, False: 1.85M]
  ------------------
  234|       |            /* we went through all the records (very unlikely, but possible when many records are invalid),
  235|       |             * just return not found */
  236|      0|            assert(!rec_p || *rec_p);
  237|      0|            return LY_ENOTFOUND;
  238|      0|        }
  239|  1.85M|        rec = lyht_get_rec(ht->recs, ht->rec_size, i);
  240|  1.85M|    }
  241|  32.8M|    if (rec->hits == 0) {
  ------------------
  |  Branch (241:9): [True: 5.56M, False: 27.2M]
  ------------------
  242|       |        /* we could not find the value */
  243|  5.56M|        if (rec_p && !*rec_p) {
  ------------------
  |  Branch (243:13): [True: 5.56M, False: 0]
  |  Branch (243:22): [True: 5.56M, False: 0]
  ------------------
  244|  5.56M|            *rec_p = rec;
  245|  5.56M|        }
  246|  5.56M|        return LY_ENOTFOUND;
  247|  5.56M|    }
  248|       |
  249|       |    /* we have found a record with equal (shortened) hash */
  250|  27.2M|    if (rec_p) {
  ------------------
  |  Branch (250:9): [True: 27.2M, False: 0]
  ------------------
  251|  27.2M|        *rec_p = rec;
  252|  27.2M|    }
  253|  27.2M|    return LY_SUCCESS;
  254|  32.8M|}
hash_table.c:lyht_resize:
  165|  84.8k|{
  166|  84.8k|    struct ly_ht_rec *rec;
  167|  84.8k|    unsigned char *old_recs;
  168|  84.8k|    uint32_t i, old_size;
  169|       |
  170|  84.8k|    old_recs = ht->recs;
  171|  84.8k|    old_size = ht->size;
  172|       |
  173|  84.8k|    if (operation > 0) {
  ------------------
  |  Branch (173:9): [True: 84.3k, False: 500]
  ------------------
  174|       |        /* double the size */
  175|  84.3k|        ht->size <<= 1;
  176|  84.3k|    } else if (operation < 0) {
  ------------------
  |  Branch (176:16): [True: 500, False: 0]
  ------------------
  177|       |        /* half the size */
  178|    500|        ht->size >>= 1;
  179|    500|    }
  180|       |
  181|  84.8k|    ht->recs = calloc(ht->size, ht->rec_size);
  182|  84.8k|    LY_CHECK_ERR_RET(!ht->recs, LOGMEM(NULL); ht->recs = old_recs; ht->size = old_size, LY_EMEM);
  ------------------
  |  |  207|  84.8k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 84.8k]
  |  |  ------------------
  ------------------
  183|       |
  184|       |    /* reset used and invalid, it will increase again */
  185|  84.8k|    ht->used = 0;
  186|  84.8k|    ht->invalid = 0;
  187|       |
  188|       |    /* add all the old records into the new records array */
  189|  1.17M|    for (i = 0; i < old_size; ++i) {
  ------------------
  |  Branch (189:17): [True: 1.09M, False: 84.8k]
  ------------------
  190|  1.09M|        rec = lyht_get_rec(old_recs, ht->rec_size, i);
  191|  1.09M|        if (rec->hits > 0) {
  ------------------
  |  Branch (191:13): [True: 731k, False: 361k]
  ------------------
  192|   731k|            LY_ERR ret = lyht_insert(ht, rec->val, rec->hash, NULL);
  193|       |
  194|   731k|            assert(!ret);
  195|      0|            (void)ret;
  196|   731k|        }
  197|  1.09M|    }
  198|       |
  199|       |    /* final touches */
  200|  84.8k|    free(old_recs);
  201|  84.8k|    return LY_SUCCESS;
  202|  84.8k|}

ly_in_new_memory:
  158|  28.1k|{
  159|  28.1k|    LY_CHECK_ARG_RET(NULL, str, in, LY_EINVAL);
  ------------------
  |  |  226|  28.1k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  28.1k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  28.1k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|  28.1k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  28.1k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  28.1k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  28.1k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  160|       |
  161|  28.1k|    *in = calloc(1, sizeof **in);
  162|  28.1k|    LY_CHECK_ERR_RET(!*in, LOGMEM(NULL), LY_EMEM);
  ------------------
  |  |  207|  28.1k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
  163|       |
  164|  28.1k|    (*in)->type = LY_IN_MEMORY;
  165|  28.1k|    (*in)->start = (*in)->current = (*in)->func_start = str;
  166|  28.1k|    (*in)->line = 1;
  167|       |
  168|  28.1k|    return LY_SUCCESS;
  169|  28.1k|}
ly_in_memory:
  173|   112k|{
  174|   112k|    const char *data;
  175|       |
  176|   112k|    LY_CHECK_ARG_RET(NULL, in, in->type == LY_IN_MEMORY, NULL);
  ------------------
  |  |  226|   112k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   112k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   112k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|   112k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   112k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   112k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   112k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  177|       |
  178|   112k|    data = in->current;
  179|       |
  180|   112k|    if (str) {
  ------------------
  |  Branch (180:9): [True: 112k, False: 0]
  ------------------
  181|   112k|        in->start = in->current = str;
  182|   112k|        in->line = 1;
  183|   112k|    }
  184|       |
  185|   112k|    return data;
  186|   112k|}
ly_in_free:
  264|  28.1k|{
  265|  28.1k|    if (!in) {
  ------------------
  |  Branch (265:9): [True: 0, False: 28.1k]
  ------------------
  266|      0|        return;
  267|  28.1k|    } else if (in->type == LY_IN_ERROR) {
  ------------------
  |  Branch (267:16): [True: 0, False: 28.1k]
  ------------------
  268|      0|        LOGINT(NULL);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  269|      0|        return;
  270|      0|    }
  271|       |
  272|  28.1k|    if (destroy) {
  ------------------
  |  Branch (272:9): [True: 0, False: 28.1k]
  ------------------
  273|      0|        if (in->type == LY_IN_MEMORY) {
  ------------------
  |  Branch (273:13): [True: 0, False: 0]
  ------------------
  274|      0|            free((char *)in->start);
  275|      0|        } else {
  276|      0|            ly_munmap((char *)in->start, in->length);
  277|       |
  278|      0|            if (in->type == LY_IN_FILE) {
  ------------------
  |  Branch (278:17): [True: 0, False: 0]
  ------------------
  279|      0|                fclose(in->method.f);
  280|      0|            } else {
  281|      0|                close(in->method.fd);
  282|       |
  283|      0|                if (in->type == LY_IN_FILEPATH) {
  ------------------
  |  Branch (283:21): [True: 0, False: 0]
  ------------------
  284|      0|                    free(in->method.fpath.filepath);
  285|      0|                }
  286|      0|            }
  287|      0|        }
  288|  28.1k|    } else if (in->type != LY_IN_MEMORY) {
  ------------------
  |  Branch (288:16): [True: 0, False: 28.1k]
  ------------------
  289|      0|        ly_munmap((char *)in->start, in->length);
  290|       |
  291|      0|        if (in->type == LY_IN_FILEPATH) {
  ------------------
  |  Branch (291:13): [True: 0, False: 0]
  ------------------
  292|      0|            close(in->method.fpath.fd);
  293|      0|            free(in->method.fpath.filepath);
  294|      0|        }
  295|      0|    }
  296|       |
  297|  28.1k|    free(in);
  298|  28.1k|}
ly_in_read:
  302|   588M|{
  303|   588M|    LY_CHECK_ARG_RET(NULL, in, buf, LY_EINVAL);
  ------------------
  |  |  226|   588M|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   588M|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   588M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|   588M|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   588M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 588M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   588M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 588M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   588M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  304|       |
  305|   588M|    if (in->length && (in->length - (in->current - in->start) < count)) {
  ------------------
  |  Branch (305:9): [True: 0, False: 588M]
  |  Branch (305:23): [True: 0, False: 0]
  ------------------
  306|       |        /* EOF */
  307|      0|        return LY_EDENIED;
  308|      0|    }
  309|       |
  310|   588M|    if (count) {
  ------------------
  |  Branch (310:9): [True: 588M, False: 0]
  ------------------
  311|   588M|        memcpy(buf, in->current, count);
  312|   588M|    }
  313|   588M|    in->current += count;
  314|   588M|    return LY_SUCCESS;
  315|   588M|}
ly_in_skip:
  319|   430M|{
  320|   430M|    LY_CHECK_ARG_RET(NULL, in, LY_EINVAL);
  ------------------
  |  |  226|   430M|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   430M|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   430M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|   430M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 430M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   430M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  321|       |
  322|   430M|    if (in->length && (in->length - (in->current - in->start) < count)) {
  ------------------
  |  Branch (322:9): [True: 0, False: 430M]
  |  Branch (322:23): [True: 0, False: 0]
  ------------------
  323|       |        /* EOF */
  324|      0|        return LY_EDENIED;
  325|      0|    }
  326|       |
  327|   430M|    in->current += count;
  328|   430M|    return LY_SUCCESS;
  329|   430M|}

ly_err_last:
  241|  11.2k|{
  242|  11.2k|    struct ly_ctx_err_rec *rec;
  243|       |
  244|  11.2k|    LY_CHECK_ARG_RET(NULL, ctx, NULL);
  ------------------
  |  |  226|  11.2k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  11.2k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  11.2k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  11.2k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 11.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  11.2k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  245|       |
  246|       |    /* get the pointer to the matching record */
  247|  11.2k|    if (!(rec = ly_err_get_rec(ctx))) {
  ------------------
  |  Branch (247:9): [True: 11.2k, False: 0]
  ------------------
  248|  11.2k|        return NULL;
  249|  11.2k|    }
  250|       |
  251|      0|    return rec->err ? rec->err->prev : NULL;
  ------------------
  |  Branch (251:12): [True: 0, False: 0]
  ------------------
  252|  11.2k|}
ly_log_options:
  332|      1|{
  333|      1|    uint32_t prev = ATOMIC_LOAD_RELAXED(ly_log_opts);
  ------------------
  |  |  107|      1|# define ATOMIC_LOAD_RELAXED(var) atomic_load_explicit(&(var), memory_order_relaxed)
  ------------------
  334|       |
  335|      1|    ATOMIC_STORE_RELAXED(ly_log_opts, opts);
  ------------------
  |  |  106|      1|# define ATOMIC_STORE_RELAXED(var, x) atomic_store_explicit(&(var), x, memory_order_relaxed)
  ------------------
  336|      1|    return prev;
  337|      1|}
ly_log_location:
  375|  5.54M|{
  376|  5.54M|    if (scnode) {
  ------------------
  |  Branch (376:9): [True: 351k, False: 5.19M]
  ------------------
  377|   351k|        ly_set_add(&log_location.scnodes, (void *)scnode, 1, NULL);
  378|   351k|    }
  379|  5.54M|    if (dnode) {
  ------------------
  |  Branch (379:9): [True: 0, False: 5.54M]
  ------------------
  380|      0|        ly_set_add(&log_location.dnodes, (void *)dnode, 1, NULL);
  381|      0|    }
  382|  5.54M|    if (path) {
  ------------------
  |  Branch (382:9): [True: 4.82M, False: 723k]
  ------------------
  383|  4.82M|        char *s = strdup(path);
  384|       |
  385|  4.82M|        LY_CHECK_ERR_RET(!s, LOGMEM(NULL), );
  ------------------
  |  |  207|  4.82M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 4.82M]
  |  |  ------------------
  ------------------
  386|  4.82M|        ly_set_add(&log_location.paths, s, 1, NULL);
  387|  4.82M|    }
  388|  5.54M|    if (in) {
  ------------------
  |  Branch (388:9): [True: 126k, False: 5.41M]
  ------------------
  389|   126k|        ly_set_add(&log_location.inputs, (void *)in, 1, NULL);
  390|   126k|    }
  391|  5.54M|    if (line) {
  ------------------
  |  Branch (391:9): [True: 0, False: 5.54M]
  ------------------
  392|      0|        log_location.line = line;
  393|      0|    }
  394|  5.54M|}
ly_log_location_revert:
  398|  5.77M|{
  399|  6.12M|    for (uint32_t i = scnode_steps; i && log_location.scnodes.count; i--) {
  ------------------
  |  Branch (399:37): [True: 351k, False: 5.77M]
  |  Branch (399:42): [True: 351k, False: 0]
  ------------------
  400|   351k|        log_location.scnodes.count--;
  401|   351k|    }
  402|       |
  403|  5.77M|    for (uint32_t i = dnode_steps; i && log_location.dnodes.count; i--) {
  ------------------
  |  Branch (403:36): [True: 0, False: 5.77M]
  |  Branch (403:41): [True: 0, False: 0]
  ------------------
  404|      0|        log_location.dnodes.count--;
  405|      0|    }
  406|       |
  407|  10.5M|    for (uint32_t i = path_steps; i && log_location.paths.count; i--) {
  ------------------
  |  Branch (407:35): [True: 5.04M, False: 5.54M]
  |  Branch (407:40): [True: 4.82M, False: 224k]
  ------------------
  408|  4.82M|        ly_set_rm_index(&log_location.paths, log_location.paths.count - 1, free);
  409|  4.82M|    }
  410|       |
  411|  5.89M|    for (uint32_t i = in_steps; i && log_location.inputs.count; i--) {
  ------------------
  |  Branch (411:33): [True: 126k, False: 5.77M]
  |  Branch (411:38): [True: 126k, False: 0]
  ------------------
  412|   126k|        log_location.inputs.count--;
  413|   126k|    }
  414|       |
  415|       |    /* deallocate the empty sets */
  416|  5.77M|    if (scnode_steps && !log_location.scnodes.count) {
  ------------------
  |  Branch (416:9): [True: 351k, False: 5.41M]
  |  Branch (416:25): [True: 168k, False: 182k]
  ------------------
  417|   168k|        ly_set_erase(&log_location.scnodes, NULL);
  418|   168k|    }
  419|  5.77M|    if (dnode_steps && !log_location.dnodes.count) {
  ------------------
  |  Branch (419:9): [True: 0, False: 5.77M]
  |  Branch (419:24): [True: 0, False: 0]
  ------------------
  420|      0|        ly_set_erase(&log_location.dnodes, NULL);
  421|      0|    }
  422|  5.77M|    if (path_steps && !log_location.paths.count) {
  ------------------
  |  Branch (422:9): [True: 5.04M, False: 723k]
  |  Branch (422:23): [True: 5.04M, False: 0]
  ------------------
  423|  5.04M|        ly_set_erase(&log_location.paths, free);
  424|  5.04M|    }
  425|  5.77M|    if (in_steps && !log_location.inputs.count) {
  ------------------
  |  Branch (425:9): [True: 126k, False: 5.64M]
  |  Branch (425:21): [True: 126k, False: 0]
  ------------------
  426|   126k|        ly_set_erase(&log_location.inputs, NULL);
  427|   126k|    }
  428|  5.77M|}
ly_log_dbg:
  605|  26.0M|{
  606|  26.0M|    char *dbg_format;
  607|  26.0M|    const char *str_group;
  608|  26.0M|    va_list ap;
  609|       |
  610|  26.0M|    if (!(ATOMIC_LOAD_RELAXED(ly_ldbg_groups) & group)) {
  ------------------
  |  |  107|  26.0M|# define ATOMIC_LOAD_RELAXED(var) atomic_load_explicit(&(var), memory_order_relaxed)
  ------------------
  |  Branch (610:9): [True: 26.0M, False: 0]
  ------------------
  611|  26.0M|        return;
  612|  26.0M|    }
  613|       |
  614|      0|    switch (group) {
  615|      0|    case LY_LDGDICT:
  ------------------
  |  |  157|      0|#define LY_LDGDICT      0x01    /**< Dictionary additions and deletions. */
  ------------------
  |  Branch (615:5): [True: 0, False: 0]
  ------------------
  616|      0|        str_group = "DICT";
  617|      0|        break;
  618|      0|    case LY_LDGXPATH:
  ------------------
  |  |  158|      0|#define LY_LDGXPATH     0x02    /**< XPath parsing end evaluation. */
  ------------------
  |  Branch (618:5): [True: 0, False: 0]
  ------------------
  619|      0|        str_group = "XPATH";
  620|      0|        break;
  621|      0|    case LY_LDGDEPSETS:
  ------------------
  |  |  159|      0|#define LY_LDGDEPSETS   0x04    /**< Dependency module sets for schema compilation. */
  ------------------
  |  Branch (621:5): [True: 0, False: 0]
  ------------------
  622|      0|        str_group = "DEPSETS";
  623|      0|        break;
  624|      0|    default:
  ------------------
  |  Branch (624:5): [True: 0, False: 0]
  ------------------
  625|      0|        LOGINT(NULL);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  626|      0|        return;
  627|      0|    }
  628|       |
  629|      0|    if (asprintf(&dbg_format, "%s: %s", str_group, format) == -1) {
  ------------------
  |  Branch (629:9): [True: 0, False: 0]
  ------------------
  630|      0|        LOGMEM(NULL);
  ------------------
  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  631|      0|        return;
  632|      0|    }
  633|       |
  634|      0|    va_start(ap, format);
  635|      0|    log_vprintf(NULL, LY_LLDBG, 0, 0, NULL, NULL, dbg_format, ap);
  636|      0|    va_end(ap);
  637|       |
  638|      0|    free(dbg_format);
  639|      0|}
ly_log:
  645|  59.0k|{
  646|  59.0k|    va_list ap;
  647|       |
  648|  59.0k|    va_start(ap, format);
  649|  59.0k|    log_vprintf(ctx, level, no, 0, NULL, NULL, format, ap);
  650|  59.0k|    va_end(ap);
  651|  59.0k|}
ly_vlog:
  774|  14.0k|{
  775|  14.0k|    va_list ap;
  776|  14.0k|    char *path = NULL;
  777|       |
  778|  14.0k|    if (ATOMIC_LOAD_RELAXED(path_flag) && ctx) {
  ------------------
  |  |  107|  28.0k|# define ATOMIC_LOAD_RELAXED(var) atomic_load_explicit(&(var), memory_order_relaxed)
  |  |  ------------------
  |  |  |  Branch (107:35): [True: 14.0k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (778:43): [True: 14.0k, False: 0]
  ------------------
  779|  14.0k|        ly_vlog_build_path(ctx, &path);
  780|  14.0k|    }
  781|       |
  782|  14.0k|    va_start(ap, format);
  783|  14.0k|    log_vprintf(ctx, LY_LLERR, LY_EVALID, code, path, apptag, format, ap);
  784|       |    /* path is spent and should not be freed! */
  785|  14.0k|    va_end(ap);
  786|  14.0k|}
log.c:ly_err_get_rec:
  184|  11.2k|{
  185|  11.2k|    struct ly_ctx_err_rec rec, *match;
  186|       |
  187|       |    /* prepare record */
  188|  11.2k|    rec.tid = pthread_self();
  189|       |
  190|       |    /* get the pointer to the matching record */
  191|  11.2k|    if (lyht_find(ctx->err_ht, &rec, lyht_hash((void *)&rec.tid, sizeof rec.tid), (void **)&match)) {
  ------------------
  |  Branch (191:9): [True: 11.2k, False: 0]
  ------------------
  192|  11.2k|        return NULL;
  193|  11.2k|    }
  194|       |
  195|      0|    return match;
  196|  11.2k|}
log.c:log_vprintf:
  520|  73.0k|{
  521|  73.0k|    char *msg = NULL;
  522|  73.0k|    ly_bool free_strs, lolog, lostore;
  523|       |
  524|       |    /* learn effective logger options */
  525|  73.0k|    if (temp_ly_log_opts) {
  ------------------
  |  Branch (525:9): [True: 0, False: 73.0k]
  ------------------
  526|      0|        lolog = *temp_ly_log_opts & LY_LOLOG;
  ------------------
  |  |  116|      0|#define LY_LOLOG        0x01 /**< Log messages normally, using callback if set. If not set, messages will
  ------------------
  527|      0|        lostore = *temp_ly_log_opts & LY_LOSTORE;
  ------------------
  |  |  118|      0|#define LY_LOSTORE      0x02 /**< Store any generated errors or warnings, never verbose or debug messages.
  ------------------
  528|  73.0k|    } else {
  529|  73.0k|        lolog = ATOMIC_LOAD_RELAXED(ly_log_opts) & LY_LOLOG;
  ------------------
  |  |  107|  73.0k|# define ATOMIC_LOAD_RELAXED(var) atomic_load_explicit(&(var), memory_order_relaxed)
  ------------------
                      lolog = ATOMIC_LOAD_RELAXED(ly_log_opts) & LY_LOLOG;
  ------------------
  |  |  116|  73.0k|#define LY_LOLOG        0x01 /**< Log messages normally, using callback if set. If not set, messages will
  ------------------
  530|  73.0k|        lostore = ATOMIC_LOAD_RELAXED(ly_log_opts) & LY_LOSTORE;
  ------------------
  |  |  107|  73.0k|# define ATOMIC_LOAD_RELAXED(var) atomic_load_explicit(&(var), memory_order_relaxed)
  ------------------
                      lostore = ATOMIC_LOAD_RELAXED(ly_log_opts) & LY_LOSTORE;
  ------------------
  |  |  118|  73.0k|#define LY_LOSTORE      0x02 /**< Store any generated errors or warnings, never verbose or debug messages.
  ------------------
  531|  73.0k|    }
  532|       |
  533|  73.0k|    if (level > ATOMIC_LOAD_RELAXED(ly_ll)) {
  ------------------
  |  |  107|  73.0k|# define ATOMIC_LOAD_RELAXED(var) atomic_load_explicit(&(var), memory_order_relaxed)
  ------------------
  |  Branch (533:9): [True: 56.2k, False: 16.8k]
  ------------------
  534|       |        /* do not print or store the message */
  535|  56.2k|        free(path);
  536|  56.2k|        return;
  537|  56.2k|    }
  538|       |
  539|  16.8k|    if (no == LY_EMEM) {
  ------------------
  |  Branch (539:9): [True: 0, False: 16.8k]
  ------------------
  540|       |        /* just print it, anything else would most likely fail anyway */
  541|      0|        if (lolog) {
  ------------------
  |  Branch (541:13): [True: 0, False: 0]
  ------------------
  542|      0|            if (log_clb) {
  ------------------
  |  Branch (542:17): [True: 0, False: 0]
  ------------------
  543|      0|                log_clb(level, LY_EMEM_MSG, path);
  ------------------
  |  |  168|      0|#define LY_EMEM_MSG "Memory allocation failed."
  ------------------
  544|      0|            } else {
  545|      0|                fprintf(stderr, "libyang[%d]: ", level);
  546|      0|                vfprintf(stderr, format, args);
  547|      0|                if (path) {
  ------------------
  |  Branch (547:21): [True: 0, False: 0]
  ------------------
  548|      0|                    fprintf(stderr, " (path: %s)\n", path);
  549|      0|                } else {
  550|      0|                    fprintf(stderr, "\n");
  551|      0|                }
  552|      0|            }
  553|      0|        }
  554|      0|        free(path);
  555|      0|        return;
  556|      0|    }
  557|       |
  558|       |    /* print into a single message */
  559|  16.8k|    if (vasprintf(&msg, format, args) == -1) {
  ------------------
  |  Branch (559:9): [True: 0, False: 16.8k]
  ------------------
  560|      0|        LOGMEM(ctx);
  ------------------
  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  561|      0|        free(path);
  562|      0|        return;
  563|      0|    }
  564|       |
  565|       |    /* store as the last message */
  566|  16.8k|    strncpy(last_msg, msg, LY_LAST_MSG_SIZE - 1);
  ------------------
  |  |   69|  16.8k|#define LY_LAST_MSG_SIZE 512
  ------------------
  567|       |
  568|       |    /* store the error/warning in the context (if we need to store errors internally, it does not matter what are
  569|       |     * the user log options) */
  570|  16.8k|    if ((level < LY_LLVRB) && ctx && lostore) {
  ------------------
  |  Branch (570:9): [True: 16.8k, False: 0]
  |  Branch (570:31): [True: 16.8k, False: 1]
  |  Branch (570:38): [True: 0, False: 16.8k]
  ------------------
  571|      0|        if (((no & ~LY_EPLUGIN) == LY_EVALID) && (vecode == LYVE_SUCCESS)) {
  ------------------
  |  Branch (571:13): [True: 0, False: 0]
  |  Branch (571:50): [True: 0, False: 0]
  ------------------
  572|       |            /* assume we are inheriting the error, so inherit vecode as well */
  573|      0|            vecode = ly_vecode(ctx);
  574|      0|        }
  575|      0|        if (log_store(ctx, level, no, vecode, msg, path, apptag ? strdup(apptag) : NULL)) {
  ------------------
  |  Branch (575:13): [True: 0, False: 0]
  |  Branch (575:58): [True: 0, False: 0]
  ------------------
  576|      0|            return;
  577|      0|        }
  578|      0|        free_strs = 0;
  579|  16.8k|    } else {
  580|  16.8k|        free_strs = 1;
  581|  16.8k|    }
  582|       |
  583|       |    /* if we are only storing errors internally, never print the message (yet) */
  584|  16.8k|    if (lolog) {
  ------------------
  |  Branch (584:9): [True: 0, False: 16.8k]
  ------------------
  585|      0|        if (log_clb) {
  ------------------
  |  Branch (585:13): [True: 0, False: 0]
  ------------------
  586|      0|            log_clb(level, msg, path);
  587|      0|        } else {
  588|      0|            fprintf(stderr, "libyang[%d]: %s%s", level, msg, path ? " " : "\n");
  ------------------
  |  Branch (588:62): [True: 0, False: 0]
  ------------------
  589|      0|            if (path) {
  ------------------
  |  Branch (589:17): [True: 0, False: 0]
  ------------------
  590|      0|                fprintf(stderr, "(path: %s)\n", path);
  591|      0|            }
  592|      0|        }
  593|      0|    }
  594|       |
  595|  16.8k|    if (free_strs) {
  ------------------
  |  Branch (595:9): [True: 16.8k, False: 0]
  ------------------
  596|  16.8k|        free(path);
  597|  16.8k|        free(msg);
  598|  16.8k|    }
  599|  16.8k|}
log.c:ly_vlog_build_path:
  704|  14.0k|{
  705|  14.0k|    int r;
  706|  14.0k|    char *str = NULL, *prev = NULL;
  707|  14.0k|    const struct lyd_node *dnode;
  708|       |
  709|  14.0k|    *path = NULL;
  710|       |
  711|  14.0k|    if (log_location.paths.count && ((const char *)(log_location.paths.objs[log_location.paths.count - 1]))[0]) {
  ------------------
  |  Branch (711:9): [True: 0, False: 14.0k]
  |  Branch (711:37): [True: 0, False: 0]
  ------------------
  712|       |        /* simply get what is in the provided path string */
  713|      0|        r = asprintf(path, "Path \"%s\".", (const char *)log_location.paths.objs[log_location.paths.count - 1]);
  714|      0|        LY_CHECK_ERR_RET(r == -1, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  715|  14.0k|    } else {
  716|       |        /* data/schema node */
  717|  14.0k|        if (log_location.dnodes.count) {
  ------------------
  |  Branch (717:13): [True: 0, False: 14.0k]
  ------------------
  718|      0|            dnode = log_location.dnodes.objs[log_location.dnodes.count - 1];
  719|      0|            if (dnode->parent || !lysc_data_parent(dnode->schema)) {
  ------------------
  |  | 1780|      0|#define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
  |  |  ------------------
  |  |  |  Branch (1780:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (719:17): [True: 0, False: 0]
  |  Branch (719:34): [True: 0, False: 0]
  ------------------
  720|       |                /* data node with all of its parents */
  721|      0|                str = lyd_path(log_location.dnodes.objs[log_location.dnodes.count - 1], LYD_PATH_STD, NULL, 0);
  722|      0|                LY_CHECK_ERR_RET(!str, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  723|      0|            } else {
  724|       |                /* data parsers put all the parent nodes in the set, but they are not connected */
  725|      0|                str = lyd_path_set(&log_location.dnodes, LYD_PATH_STD);
  726|      0|                LY_CHECK_ERR_RET(!str, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  727|      0|            }
  728|       |
  729|       |            /* sometimes the last node is not created yet and we only have the schema node */
  730|      0|            if (log_location.scnodes.count) {
  ------------------
  |  Branch (730:17): [True: 0, False: 0]
  ------------------
  731|      0|                ly_vlog_build_path_append(&str, log_location.scnodes.objs[log_location.scnodes.count - 1], dnode);
  732|      0|            }
  733|       |
  734|      0|            r = asprintf(path, "Data location \"%s\"", str);
  735|      0|            free(str);
  736|      0|            LY_CHECK_ERR_RET(r == -1, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  737|  14.0k|        } else if (log_location.scnodes.count) {
  ------------------
  |  Branch (737:20): [True: 0, False: 14.0k]
  ------------------
  738|      0|            str = lysc_path(log_location.scnodes.objs[log_location.scnodes.count - 1], LYSC_PATH_LOG, NULL, 0);
  739|      0|            LY_CHECK_ERR_RET(!str, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  740|       |
  741|      0|            r = asprintf(path, "Schema location \"%s\"", str);
  742|      0|            free(str);
  743|      0|            LY_CHECK_ERR_RET(r == -1, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  744|      0|        }
  745|       |
  746|       |        /* line */
  747|  14.0k|        prev = *path;
  748|  14.0k|        if (log_location.line) {
  ------------------
  |  Branch (748:13): [True: 0, False: 14.0k]
  ------------------
  749|      0|            r = asprintf(path, "%s%sine number %" PRIu64, prev ? prev : "", prev ? ", l" : "L", log_location.line);
  ------------------
  |  Branch (749:59): [True: 0, False: 0]
  |  Branch (749:77): [True: 0, False: 0]
  ------------------
  750|      0|            free(prev);
  751|      0|            LY_CHECK_ERR_RET(r == -1, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  752|       |
  753|      0|            log_location.line = 0;
  754|  14.0k|        } else if (log_location.inputs.count) {
  ------------------
  |  Branch (754:20): [True: 14.0k, False: 0]
  ------------------
  755|  14.0k|            r = asprintf(path, "%s%sine number %" PRIu64, prev ? prev : "", prev ? ", l" : "L",
  ------------------
  |  Branch (755:59): [True: 0, False: 14.0k]
  |  Branch (755:77): [True: 0, False: 14.0k]
  ------------------
  756|  14.0k|                    ((struct ly_in *)log_location.inputs.objs[log_location.inputs.count - 1])->line);
  757|  14.0k|            free(prev);
  758|  14.0k|            LY_CHECK_ERR_RET(r == -1, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|  14.0k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  759|  14.0k|        }
  760|       |
  761|  14.0k|        if (*path) {
  ------------------
  |  Branch (761:13): [True: 14.0k, False: 0]
  ------------------
  762|  14.0k|            prev = *path;
  763|  14.0k|            r = asprintf(path, "%s.", prev);
  764|  14.0k|            free(prev);
  765|  14.0k|            LY_CHECK_ERR_RET(r == -1, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|  14.0k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  766|  14.0k|        }
  767|  14.0k|    }
  768|       |
  769|  14.0k|    return LY_SUCCESS;
  770|  14.0k|}

lys_parser_fill_filepath:
  357|   112k|{
  358|   112k|    char path[PATH_MAX];
  359|       |
  360|   112k|#ifndef __APPLE__
  361|   112k|    char proc_path[32];
  362|   112k|    int len;
  363|   112k|#endif
  364|       |
  365|   224k|    LY_CHECK_ARG_RET(NULL, ctx, in, filepath, );
  ------------------
  |  |  226|   112k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   112k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   112k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  219|   112k|#define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  218|   112k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|   112k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|   112k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   112k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   112k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  366|   112k|    if (*filepath) {
  ------------------
  |  Branch (366:9): [True: 0, False: 112k]
  ------------------
  367|       |        /* filepath already set */
  368|      0|        return;
  369|      0|    }
  370|       |
  371|   112k|    switch (in->type) {
  372|      0|    case LY_IN_FILEPATH:
  ------------------
  |  Branch (372:5): [True: 0, False: 112k]
  ------------------
  373|      0|        if (realpath(in->method.fpath.filepath, path) != NULL) {
  ------------------
  |  Branch (373:13): [True: 0, False: 0]
  ------------------
  374|      0|            lydict_insert(ctx, path, 0, filepath);
  375|      0|        } else {
  376|      0|            lydict_insert(ctx, in->method.fpath.filepath, 0, filepath);
  377|      0|        }
  378|       |
  379|      0|        break;
  380|      0|    case LY_IN_FD:
  ------------------
  |  Branch (380:5): [True: 0, False: 112k]
  ------------------
  381|       |#ifdef __APPLE__
  382|       |        if (fcntl(in->method.fd, F_GETPATH, path) != -1) {
  383|       |            lydict_insert(ctx, path, 0, filepath);
  384|       |        }
  385|       |#elif defined _WIN32
  386|       |        HANDLE h = _get_osfhandle(in->method.fd);
  387|       |        FILE_NAME_INFO info;
  388|       |
  389|       |        if (GetFileInformationByHandleEx(h, FileNameInfo, &info, sizeof info)) {
  390|       |            char *buf = calloc(info.FileNameLength + 1 /* trailing NULL */, MB_CUR_MAX);
  391|       |
  392|       |            len = wcstombs(buf, info.FileName, info.FileNameLength * MB_CUR_MAX);
  393|       |            lydict_insert(ctx, buf, len, filepath);
  394|       |        }
  395|       |#else
  396|       |        /* get URI if there is /proc */
  397|      0|        sprintf(proc_path, "/proc/self/fd/%d", in->method.fd);
  398|      0|        if ((len = readlink(proc_path, path, PATH_MAX - 1)) > 0) {
  ------------------
  |  Branch (398:13): [True: 0, False: 0]
  ------------------
  399|      0|            lydict_insert(ctx, path, len, filepath);
  400|      0|        }
  401|      0|#endif
  402|      0|        break;
  403|   112k|    case LY_IN_MEMORY:
  ------------------
  |  Branch (403:5): [True: 112k, False: 0]
  ------------------
  404|   112k|    case LY_IN_FILE:
  ------------------
  |  Branch (404:5): [True: 0, False: 112k]
  ------------------
  405|       |        /* nothing to do */
  406|   112k|        break;
  407|      0|    default:
  ------------------
  |  Branch (407:5): [True: 0, False: 112k]
  ------------------
  408|      0|        LOGINT(ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  409|      0|        break;
  410|   112k|    }
  411|   112k|}
lys_parse_ext_instance_stmt:
 3481|   309k|{
 3482|   309k|    LY_ERR rc = LY_SUCCESS;
 3483|       |
 3484|   309k|    if (!substmt->storage) {
  ------------------
  |  Branch (3484:9): [True: 0, False: 309k]
  ------------------
 3485|       |        /* nothing to parse, ignored */
 3486|      0|        goto cleanup;
 3487|      0|    }
 3488|       |
 3489|   309k|    switch (stmt->kw) {
 3490|      0|    case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (3490:5): [True: 0, False: 309k]
  ------------------
 3491|      0|    case LY_STMT_INPUT:
  ------------------
  |  Branch (3491:5): [True: 0, False: 309k]
  ------------------
 3492|      0|    case LY_STMT_OUTPUT:
  ------------------
  |  Branch (3492:5): [True: 0, False: 309k]
  ------------------
 3493|      0|    case LY_STMT_ACTION:
  ------------------
  |  Branch (3493:5): [True: 0, False: 309k]
  ------------------
 3494|      0|    case LY_STMT_RPC:
  ------------------
  |  Branch (3494:5): [True: 0, False: 309k]
  ------------------
 3495|      0|    case LY_STMT_ANYDATA:
  ------------------
  |  Branch (3495:5): [True: 0, False: 309k]
  ------------------
 3496|      0|    case LY_STMT_ANYXML:
  ------------------
  |  Branch (3496:5): [True: 0, False: 309k]
  ------------------
 3497|      0|    case LY_STMT_AUGMENT:
  ------------------
  |  Branch (3497:5): [True: 0, False: 309k]
  ------------------
 3498|      0|    case LY_STMT_CASE:
  ------------------
  |  Branch (3498:5): [True: 0, False: 309k]
  ------------------
 3499|      0|    case LY_STMT_CHOICE:
  ------------------
  |  Branch (3499:5): [True: 0, False: 309k]
  ------------------
 3500|      0|    case LY_STMT_CONTAINER:
  ------------------
  |  Branch (3500:5): [True: 0, False: 309k]
  ------------------
 3501|      0|    case LY_STMT_GROUPING:
  ------------------
  |  Branch (3501:5): [True: 0, False: 309k]
  ------------------
 3502|      0|    case LY_STMT_LEAF:
  ------------------
  |  Branch (3502:5): [True: 0, False: 309k]
  ------------------
 3503|      0|    case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (3503:5): [True: 0, False: 309k]
  ------------------
 3504|      0|    case LY_STMT_LIST:
  ------------------
  |  Branch (3504:5): [True: 0, False: 309k]
  ------------------
 3505|      0|    case LY_STMT_USES: {
  ------------------
  |  Branch (3505:5): [True: 0, False: 309k]
  ------------------
 3506|      0|        struct lysp_node **pnodes_p, *pnode = NULL;
 3507|       |
 3508|       |        /* parse the node */
 3509|      0|        LY_CHECK_GOTO(rc = lysp_stmt_parse(pctx, stmt, (void **)&pnode, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3510|       |
 3511|       |        /* usually is a linked-list of all the parsed schema nodes */
 3512|      0|        pnodes_p = substmt->storage;
 3513|      0|        while (*pnodes_p) {
  ------------------
  |  Branch (3513:16): [True: 0, False: 0]
  ------------------
 3514|      0|            pnodes_p = &(*pnodes_p)->next;
 3515|      0|        }
 3516|      0|        *pnodes_p = pnode;
 3517|       |
 3518|      0|        break;
 3519|      0|    }
 3520|      0|    case LY_STMT_BASE:
  ------------------
  |  Branch (3520:5): [True: 0, False: 309k]
  ------------------
 3521|      0|    case LY_STMT_BIT:
  ------------------
  |  Branch (3521:5): [True: 0, False: 309k]
  ------------------
 3522|      0|    case LY_STMT_DEFAULT:
  ------------------
  |  Branch (3522:5): [True: 0, False: 309k]
  ------------------
 3523|      0|    case LY_STMT_DEVIATE:
  ------------------
  |  Branch (3523:5): [True: 0, False: 309k]
  ------------------
 3524|      0|    case LY_STMT_DEVIATION:
  ------------------
  |  Branch (3524:5): [True: 0, False: 309k]
  ------------------
 3525|      0|    case LY_STMT_ENUM:
  ------------------
  |  Branch (3525:5): [True: 0, False: 309k]
  ------------------
 3526|      0|    case LY_STMT_EXTENSION:
  ------------------
  |  Branch (3526:5): [True: 0, False: 309k]
  ------------------
 3527|      0|    case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3527:5): [True: 0, False: 309k]
  ------------------
 3528|      0|    case LY_STMT_FEATURE:
  ------------------
  |  Branch (3528:5): [True: 0, False: 309k]
  ------------------
 3529|      0|    case LY_STMT_IDENTITY:
  ------------------
  |  Branch (3529:5): [True: 0, False: 309k]
  ------------------
 3530|      0|    case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (3530:5): [True: 0, False: 309k]
  ------------------
 3531|      0|    case LY_STMT_IMPORT:
  ------------------
  |  Branch (3531:5): [True: 0, False: 309k]
  ------------------
 3532|      0|    case LY_STMT_INCLUDE:
  ------------------
  |  Branch (3532:5): [True: 0, False: 309k]
  ------------------
 3533|      0|    case LY_STMT_MUST:
  ------------------
  |  Branch (3533:5): [True: 0, False: 309k]
  ------------------
 3534|      0|    case LY_STMT_PATTERN:
  ------------------
  |  Branch (3534:5): [True: 0, False: 309k]
  ------------------
 3535|      0|    case LY_STMT_REFINE:
  ------------------
  |  Branch (3535:5): [True: 0, False: 309k]
  ------------------
 3536|      0|    case LY_STMT_REVISION:
  ------------------
  |  Branch (3536:5): [True: 0, False: 309k]
  ------------------
 3537|      0|    case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (3537:5): [True: 0, False: 309k]
  ------------------
 3538|      0|    case LY_STMT_UNIQUE:
  ------------------
  |  Branch (3538:5): [True: 0, False: 309k]
  ------------------
 3539|       |        /* parse, sized array */
 3540|      0|        LY_CHECK_GOTO(rc = lysp_stmt_parse(pctx, stmt, substmt->storage, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3541|      0|        break;
 3542|       |
 3543|      0|    case LY_STMT_ARGUMENT:
  ------------------
  |  Branch (3543:5): [True: 0, False: 309k]
  ------------------
 3544|      0|    case LY_STMT_BELONGS_TO:
  ------------------
  |  Branch (3544:5): [True: 0, False: 309k]
  ------------------
 3545|      0|    case LY_STMT_CONTACT:
  ------------------
  |  Branch (3545:5): [True: 0, False: 309k]
  ------------------
 3546|   126k|    case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (3546:5): [True: 126k, False: 182k]
  ------------------
 3547|   126k|    case LY_STMT_ERROR_APP_TAG:
  ------------------
  |  Branch (3547:5): [True: 0, False: 309k]
  ------------------
 3548|   126k|    case LY_STMT_ERROR_MESSAGE:
  ------------------
  |  Branch (3548:5): [True: 0, False: 309k]
  ------------------
 3549|   126k|    case LY_STMT_FRACTION_DIGITS:
  ------------------
  |  Branch (3549:5): [True: 0, False: 309k]
  ------------------
 3550|   126k|    case LY_STMT_KEY:
  ------------------
  |  Branch (3550:5): [True: 0, False: 309k]
  ------------------
 3551|   126k|    case LY_STMT_LENGTH:
  ------------------
  |  Branch (3551:5): [True: 0, False: 309k]
  ------------------
 3552|   126k|    case LY_STMT_MANDATORY:
  ------------------
  |  Branch (3552:5): [True: 0, False: 309k]
  ------------------
 3553|   126k|    case LY_STMT_MAX_ELEMENTS:
  ------------------
  |  Branch (3553:5): [True: 0, False: 309k]
  ------------------
 3554|   126k|    case LY_STMT_MIN_ELEMENTS:
  ------------------
  |  Branch (3554:5): [True: 0, False: 309k]
  ------------------
 3555|   126k|    case LY_STMT_MODIFIER:
  ------------------
  |  Branch (3555:5): [True: 0, False: 309k]
  ------------------
 3556|   126k|    case LY_STMT_MODULE:
  ------------------
  |  Branch (3556:5): [True: 0, False: 309k]
  ------------------
 3557|   126k|    case LY_STMT_NAMESPACE:
  ------------------
  |  Branch (3557:5): [True: 0, False: 309k]
  ------------------
 3558|   126k|    case LY_STMT_ORGANIZATION:
  ------------------
  |  Branch (3558:5): [True: 0, False: 309k]
  ------------------
 3559|   126k|    case LY_STMT_PATH:
  ------------------
  |  Branch (3559:5): [True: 0, False: 309k]
  ------------------
 3560|   126k|    case LY_STMT_POSITION:
  ------------------
  |  Branch (3560:5): [True: 0, False: 309k]
  ------------------
 3561|   126k|    case LY_STMT_PREFIX:
  ------------------
  |  Branch (3561:5): [True: 0, False: 309k]
  ------------------
 3562|   126k|    case LY_STMT_PRESENCE:
  ------------------
  |  Branch (3562:5): [True: 0, False: 309k]
  ------------------
 3563|   126k|    case LY_STMT_RANGE:
  ------------------
  |  Branch (3563:5): [True: 0, False: 309k]
  ------------------
 3564|   182k|    case LY_STMT_REFERENCE:
  ------------------
  |  Branch (3564:5): [True: 56.2k, False: 253k]
  ------------------
 3565|   182k|    case LY_STMT_REQUIRE_INSTANCE:
  ------------------
  |  Branch (3565:5): [True: 0, False: 309k]
  ------------------
 3566|   182k|    case LY_STMT_REVISION_DATE:
  ------------------
  |  Branch (3566:5): [True: 0, False: 309k]
  ------------------
 3567|   182k|    case LY_STMT_SUBMODULE:
  ------------------
  |  Branch (3567:5): [True: 0, False: 309k]
  ------------------
 3568|   309k|    case LY_STMT_TYPE:
  ------------------
  |  Branch (3568:5): [True: 126k, False: 182k]
  ------------------
 3569|   309k|    case LY_STMT_UNITS:
  ------------------
  |  Branch (3569:5): [True: 0, False: 309k]
  ------------------
 3570|   309k|    case LY_STMT_VALUE:
  ------------------
  |  Branch (3570:5): [True: 0, False: 309k]
  ------------------
 3571|   309k|    case LY_STMT_WHEN:
  ------------------
  |  Branch (3571:5): [True: 0, False: 309k]
  ------------------
 3572|   309k|    case LY_STMT_YANG_VERSION:
  ------------------
  |  Branch (3572:5): [True: 0, False: 309k]
  ------------------
 3573|   309k|    case LY_STMT_YIN_ELEMENT:
  ------------------
  |  Branch (3573:5): [True: 0, False: 309k]
  ------------------
 3574|       |        /* single item */
 3575|   309k|        if (*(void **)substmt->storage) {
  ------------------
  |  Branch (3575:13): [True: 0, False: 309k]
  ------------------
 3576|      0|            LOGVAL(PARSER_CTX(pctx), LY_VCODE_DUPSTMT, stmt->stmt);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3577|      0|            rc = LY_EVALID;
 3578|      0|            goto cleanup;
 3579|      0|        }
 3580|       |
 3581|       |        /* parse */
 3582|   309k|        LY_CHECK_GOTO(rc = lysp_stmt_parse(pctx, stmt, substmt->storage, NULL), cleanup);
  ------------------
  |  |  202|   309k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 309k]
  |  |  ------------------
  ------------------
 3583|   309k|        break;
 3584|       |
 3585|      0|    case LY_STMT_CONFIG:
  ------------------
  |  Branch (3585:5): [True: 0, False: 309k]
  ------------------
 3586|       |        /* single item */
 3587|      0|        if ((*(uint16_t *)substmt->storage) & LYS_CONFIG_MASK) {
  ------------------
  |  |  653|      0|#define LYS_CONFIG_MASK  0x03        /**< mask for config value */
  ------------------
  |  Branch (3587:13): [True: 0, False: 0]
  ------------------
 3588|      0|            LOGVAL(PARSER_CTX(pctx), LY_VCODE_DUPSTMT, stmt->stmt);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3589|      0|            rc = LY_EVALID;
 3590|      0|            goto cleanup;
 3591|      0|        }
 3592|       |
 3593|       |        /* parse */
 3594|      0|        LY_CHECK_GOTO(rc = lysp_stmt_parse(pctx, stmt, substmt->storage, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3595|      0|        break;
 3596|       |
 3597|      0|    case LY_STMT_ORDERED_BY:
  ------------------
  |  Branch (3597:5): [True: 0, False: 309k]
  ------------------
 3598|       |        /* single item */
 3599|      0|        if ((*(uint16_t *)substmt->storage) & LYS_ORDBY_MASK) {
  ------------------
  |  |  680|      0|#define LYS_ORDBY_MASK   0x60        /**< mask for ordered-by values */
  ------------------
  |  Branch (3599:13): [True: 0, False: 0]
  ------------------
 3600|      0|            LOGVAL(PARSER_CTX(pctx), LY_VCODE_DUPSTMT, stmt->stmt);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3601|      0|            rc = LY_EVALID;
 3602|      0|            goto cleanup;
 3603|      0|        }
 3604|       |
 3605|       |        /* parse */
 3606|      0|        LY_CHECK_GOTO(rc = lysp_stmt_parse(pctx, stmt, substmt->storage, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3607|      0|        break;
 3608|       |
 3609|      0|    case LY_STMT_STATUS:
  ------------------
  |  Branch (3609:5): [True: 0, False: 309k]
  ------------------
 3610|       |        /* single item */
 3611|      0|        if ((*(uint16_t *)substmt->storage) & LYS_STATUS_MASK) {
  ------------------
  |  |  657|      0|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
  |  Branch (3611:13): [True: 0, False: 0]
  ------------------
 3612|      0|            LOGVAL(PARSER_CTX(pctx), LY_VCODE_DUPSTMT, stmt->stmt);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3613|      0|            rc = LY_EVALID;
 3614|      0|            goto cleanup;
 3615|      0|        }
 3616|       |
 3617|       |        /* parse */
 3618|      0|        LY_CHECK_GOTO(rc = lysp_stmt_parse(pctx, stmt, substmt->storage, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3619|      0|        break;
 3620|       |
 3621|      0|    default:
  ------------------
  |  Branch (3621:5): [True: 0, False: 309k]
  ------------------
 3622|      0|        LOGINT(PARSER_CTX(pctx));
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3623|      0|        rc = LY_EINT;
 3624|      0|        goto cleanup;
 3625|   309k|    }
 3626|       |
 3627|   309k|cleanup:
 3628|   309k|    return rc;
 3629|   309k|}
parser_common.c:lysp_stmt_parse:
 3262|   309k|{
 3263|   309k|    LY_ERR ret = LY_SUCCESS;
 3264|   309k|    uint16_t flags;
 3265|       |
 3266|   309k|    switch (stmt->kw) {
 3267|      0|    case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (3267:5): [True: 0, False: 309k]
  ------------------
 3268|      0|        ret = lysp_stmt_notif(pctx, stmt, NULL, (struct lysp_node_notif **)result);
 3269|      0|        break;
 3270|      0|    case LY_STMT_INPUT:
  ------------------
  |  Branch (3270:5): [True: 0, False: 309k]
  ------------------
 3271|      0|    case LY_STMT_OUTPUT: {
  ------------------
  |  Branch (3271:5): [True: 0, False: 309k]
  ------------------
 3272|      0|        struct lysp_node_action_inout *inout;
 3273|       |
 3274|      0|        *result = inout = calloc(1, sizeof *inout);
 3275|      0|        LY_CHECK_ERR_RET(!inout, LOGMEM(PARSER_CTX(pctx)), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3276|      0|        ret = lysp_stmt_inout(pctx, stmt, NULL, inout);
 3277|      0|        break;
 3278|      0|    }
 3279|      0|    case LY_STMT_ACTION:
  ------------------
  |  Branch (3279:5): [True: 0, False: 309k]
  ------------------
 3280|      0|    case LY_STMT_RPC:
  ------------------
  |  Branch (3280:5): [True: 0, False: 309k]
  ------------------
 3281|      0|        ret = lysp_stmt_action(pctx, stmt, NULL, (struct lysp_node_action **)result);
 3282|      0|        break;
 3283|      0|    case LY_STMT_ANYDATA:
  ------------------
  |  Branch (3283:5): [True: 0, False: 309k]
  ------------------
 3284|      0|    case LY_STMT_ANYXML:
  ------------------
  |  Branch (3284:5): [True: 0, False: 309k]
  ------------------
 3285|      0|        ret = lysp_stmt_any(pctx, stmt, NULL, (struct lysp_node **)result);
 3286|      0|        break;
 3287|      0|    case LY_STMT_AUGMENT:
  ------------------
  |  Branch (3287:5): [True: 0, False: 309k]
  ------------------
 3288|      0|        ret = lysp_stmt_augment(pctx, stmt, NULL, (struct lysp_node_augment **)result);
 3289|      0|        break;
 3290|      0|    case LY_STMT_CASE:
  ------------------
  |  Branch (3290:5): [True: 0, False: 309k]
  ------------------
 3291|      0|        ret = lysp_stmt_case(pctx, stmt, NULL, (struct lysp_node **)result);
 3292|      0|        break;
 3293|      0|    case LY_STMT_CHOICE:
  ------------------
  |  Branch (3293:5): [True: 0, False: 309k]
  ------------------
 3294|      0|        ret = lysp_stmt_choice(pctx, stmt, NULL, (struct lysp_node **)result);
 3295|      0|        break;
 3296|      0|    case LY_STMT_CONTAINER:
  ------------------
  |  Branch (3296:5): [True: 0, False: 309k]
  ------------------
 3297|      0|        ret = lysp_stmt_container(pctx, stmt, NULL, (struct lysp_node **)result);
 3298|      0|        break;
 3299|      0|    case LY_STMT_GROUPING:
  ------------------
  |  Branch (3299:5): [True: 0, False: 309k]
  ------------------
 3300|      0|        ret = lysp_stmt_grouping(pctx, stmt, NULL, (struct lysp_node_grp **)result);
 3301|      0|        break;
 3302|      0|    case LY_STMT_LEAF:
  ------------------
  |  Branch (3302:5): [True: 0, False: 309k]
  ------------------
 3303|      0|        ret = lysp_stmt_leaf(pctx, stmt, NULL, (struct lysp_node **)result);
 3304|      0|        break;
 3305|      0|    case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (3305:5): [True: 0, False: 309k]
  ------------------
 3306|      0|        ret = lysp_stmt_leaflist(pctx, stmt, NULL, (struct lysp_node **)result);
 3307|      0|        break;
 3308|      0|    case LY_STMT_LIST:
  ------------------
  |  Branch (3308:5): [True: 0, False: 309k]
  ------------------
 3309|      0|        ret = lysp_stmt_list(pctx, stmt, NULL, (struct lysp_node **)result);
 3310|      0|        break;
 3311|      0|    case LY_STMT_USES:
  ------------------
  |  Branch (3311:5): [True: 0, False: 309k]
  ------------------
 3312|      0|        ret = lysp_stmt_uses(pctx, stmt, NULL, (struct lysp_node **)result);
 3313|      0|        break;
 3314|      0|    case LY_STMT_BASE:
  ------------------
  |  Branch (3314:5): [True: 0, False: 309k]
  ------------------
 3315|      0|        ret = lysp_stmt_text_fields(pctx, stmt, (const char ***)result, Y_PREF_IDENTIF_ARG, exts);
 3316|      0|        break;
 3317|      0|    case LY_STMT_ARGUMENT:
  ------------------
  |  Branch (3317:5): [True: 0, False: 309k]
  ------------------
 3318|      0|    case LY_STMT_BELONGS_TO:
  ------------------
  |  Branch (3318:5): [True: 0, False: 309k]
  ------------------
 3319|      0|    case LY_STMT_CONTACT:
  ------------------
  |  Branch (3319:5): [True: 0, False: 309k]
  ------------------
 3320|   126k|    case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (3320:5): [True: 126k, False: 182k]
  ------------------
 3321|   126k|    case LY_STMT_ERROR_APP_TAG:
  ------------------
  |  Branch (3321:5): [True: 0, False: 309k]
  ------------------
 3322|   126k|    case LY_STMT_ERROR_MESSAGE:
  ------------------
  |  Branch (3322:5): [True: 0, False: 309k]
  ------------------
 3323|   126k|    case LY_STMT_KEY:
  ------------------
  |  Branch (3323:5): [True: 0, False: 309k]
  ------------------
 3324|   126k|    case LY_STMT_NAMESPACE:
  ------------------
  |  Branch (3324:5): [True: 0, False: 309k]
  ------------------
 3325|   126k|    case LY_STMT_ORGANIZATION:
  ------------------
  |  Branch (3325:5): [True: 0, False: 309k]
  ------------------
 3326|   126k|    case LY_STMT_PRESENCE:
  ------------------
  |  Branch (3326:5): [True: 0, False: 309k]
  ------------------
 3327|   182k|    case LY_STMT_REFERENCE:
  ------------------
  |  Branch (3327:5): [True: 56.2k, False: 253k]
  ------------------
 3328|   182k|    case LY_STMT_REVISION_DATE:
  ------------------
  |  Branch (3328:5): [True: 0, False: 309k]
  ------------------
 3329|   182k|    case LY_STMT_UNITS:
  ------------------
  |  Branch (3329:5): [True: 0, False: 309k]
  ------------------
 3330|   182k|        ret = lysp_stmt_text_field(pctx, stmt, 0, (const char **)result, Y_STR_ARG, exts);
 3331|   182k|        break;
 3332|      0|    case LY_STMT_BIT:
  ------------------
  |  Branch (3332:5): [True: 0, False: 309k]
  ------------------
 3333|      0|    case LY_STMT_ENUM:
  ------------------
  |  Branch (3333:5): [True: 0, False: 309k]
  ------------------
 3334|      0|        ret = lysp_stmt_type_enum(pctx, stmt, (struct lysp_type_enum **)result);
 3335|      0|        break;
 3336|      0|    case LY_STMT_CONFIG:
  ------------------
  |  Branch (3336:5): [True: 0, False: 309k]
  ------------------
 3337|      0|        assert(*result);
 3338|      0|        ret = lysp_stmt_config(pctx, stmt, *(uint16_t **)result, exts);
 3339|      0|        break;
 3340|      0|    case LY_STMT_DEFAULT:
  ------------------
  |  Branch (3340:5): [True: 0, False: 309k]
  ------------------
 3341|      0|    case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (3341:5): [True: 0, False: 309k]
  ------------------
 3342|      0|    case LY_STMT_UNIQUE:
  ------------------
  |  Branch (3342:5): [True: 0, False: 309k]
  ------------------
 3343|      0|        ret = lysp_stmt_qnames(pctx, stmt, (struct lysp_qname **)result, Y_STR_ARG, exts);
 3344|      0|        break;
 3345|      0|    case LY_STMT_DEVIATE:
  ------------------
  |  Branch (3345:5): [True: 0, False: 309k]
  ------------------
 3346|      0|        ret = lysp_stmt_deviate(pctx, stmt, (struct lysp_deviate **)result, exts);
 3347|      0|        break;
 3348|      0|    case LY_STMT_DEVIATION:
  ------------------
  |  Branch (3348:5): [True: 0, False: 309k]
  ------------------
 3349|      0|        ret = lysp_stmt_deviation(pctx, stmt, (struct lysp_deviation **)result);
 3350|      0|        break;
 3351|      0|    case LY_STMT_EXTENSION:
  ------------------
  |  Branch (3351:5): [True: 0, False: 309k]
  ------------------
 3352|      0|        ret = lysp_stmt_extension(pctx, stmt, (struct lysp_ext **)result);
 3353|      0|        break;
 3354|      0|    case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3354:5): [True: 0, False: 309k]
  ------------------
 3355|      0|        ret = lysp_stmt_ext(pctx, stmt, LY_STMT_EXTENSION_INSTANCE, 0, (struct lysp_ext_instance **)result);
 3356|      0|        break;
 3357|      0|    case LY_STMT_FEATURE:
  ------------------
  |  Branch (3357:5): [True: 0, False: 309k]
  ------------------
 3358|      0|        ret = lysp_stmt_feature(pctx, stmt, (struct lysp_feature **)result);
 3359|      0|        break;
 3360|      0|    case LY_STMT_FRACTION_DIGITS:
  ------------------
  |  Branch (3360:5): [True: 0, False: 309k]
  ------------------
 3361|      0|        ret = lysp_stmt_type_fracdigits(pctx, stmt, *(uint8_t **)result, exts);
 3362|      0|        break;
 3363|      0|    case LY_STMT_LENGTH:
  ------------------
  |  Branch (3363:5): [True: 0, False: 309k]
  ------------------
 3364|      0|    case LY_STMT_RANGE: {
  ------------------
  |  Branch (3364:5): [True: 0, False: 309k]
  ------------------
 3365|      0|        struct lysp_restr *restr;
 3366|       |
 3367|      0|        *result = restr = calloc(1, sizeof *restr);
 3368|      0|        LY_CHECK_ERR_RET(!restr, LOGMEM(PARSER_CTX(pctx)), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3369|       |
 3370|      0|        ret = lysp_stmt_restr(pctx, stmt, restr);
 3371|      0|        break;
 3372|      0|    }
 3373|      0|    case LY_STMT_MUST:
  ------------------
  |  Branch (3373:5): [True: 0, False: 309k]
  ------------------
 3374|      0|        ret = lysp_stmt_restrs(pctx, stmt, (struct lysp_restr **)result);
 3375|      0|        break;
 3376|      0|    case LY_STMT_IDENTITY:
  ------------------
  |  Branch (3376:5): [True: 0, False: 309k]
  ------------------
 3377|      0|        ret = lysp_stmt_identity(pctx, stmt, (struct lysp_ident **)result);
 3378|      0|        break;
 3379|      0|    case LY_STMT_IMPORT:
  ------------------
  |  Branch (3379:5): [True: 0, False: 309k]
  ------------------
 3380|      0|        ret = lysp_stmt_import(pctx, stmt, (struct lysp_import **)result);
 3381|      0|        break;
 3382|      0|    case LY_STMT_INCLUDE:
  ------------------
  |  Branch (3382:5): [True: 0, False: 309k]
  ------------------
 3383|      0|        ret = lysp_stmt_include(pctx, stmt, (struct lysp_include **)result);
 3384|      0|        break;
 3385|      0|    case LY_STMT_MANDATORY:
  ------------------
  |  Branch (3385:5): [True: 0, False: 309k]
  ------------------
 3386|      0|        ret = lysp_stmt_mandatory(pctx, stmt, *(uint16_t **)result, exts);
 3387|      0|        break;
 3388|      0|    case LY_STMT_MAX_ELEMENTS:
  ------------------
  |  Branch (3388:5): [True: 0, False: 309k]
  ------------------
 3389|      0|        flags = 0;
 3390|      0|        ret = lysp_stmt_maxelements(pctx, stmt, *(uint32_t **)result, &flags, exts);
 3391|      0|        break;
 3392|      0|    case LY_STMT_MIN_ELEMENTS:
  ------------------
  |  Branch (3392:5): [True: 0, False: 309k]
  ------------------
 3393|      0|        flags = 0;
 3394|      0|        ret = lysp_stmt_minelements(pctx, stmt, *(uint32_t **)result, &flags, exts);
 3395|      0|        break;
 3396|      0|    case LY_STMT_MODIFIER:
  ------------------
  |  Branch (3396:5): [True: 0, False: 309k]
  ------------------
 3397|      0|        ret = lysp_stmt_type_pattern_modifier(pctx, stmt, (const char **)result, exts);
 3398|      0|        break;
 3399|      0|    case LY_STMT_MODULE: {
  ------------------
  |  Branch (3399:5): [True: 0, False: 309k]
  ------------------
 3400|      0|        struct lysp_module *mod;
 3401|       |
 3402|      0|        *result = mod = calloc(1, sizeof *mod);
 3403|      0|        LY_CHECK_ERR_RET(!mod, LOGMEM(PARSER_CTX(pctx)), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3404|      0|        ret = lysp_stmt_module(pctx, stmt, mod);
 3405|      0|        break;
 3406|      0|    }
 3407|      0|    case LY_STMT_ORDERED_BY:
  ------------------
  |  Branch (3407:5): [True: 0, False: 309k]
  ------------------
 3408|      0|        ret = lysp_stmt_orderedby(pctx, stmt, *(uint16_t **)result, exts);
 3409|      0|        break;
 3410|      0|    case LY_STMT_PATH: {
  ------------------
  |  Branch (3410:5): [True: 0, False: 309k]
  ------------------
 3411|      0|        const char *str_path = NULL;
 3412|       |
 3413|      0|        LY_CHECK_RET(lysp_stmt_text_field(pctx, stmt, 0, &str_path, Y_STR_ARG, exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3414|      0|        ret = ly_path_parse(PARSER_CTX(pctx), NULL, str_path, 0, 1, LY_PATH_BEGIN_EITHER,
  ------------------
  |  |  128|      0|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                      ret = ly_path_parse(PARSER_CTX(pctx), NULL, str_path, 0, 1, LY_PATH_BEGIN_EITHER,
  ------------------
  |  |   72|      0|#define LY_PATH_BEGIN_EITHER    0x02    /**< path be be either absolute or relative */
  ------------------
 3415|      0|                LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, (struct lyxp_expr **)result);
  ------------------
  |  |   79|      0|#define LY_PATH_PREFIX_OPTIONAL     0x10    /**< prefixes in the path are optional (XML path) */
  ------------------
                              LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, (struct lyxp_expr **)result);
  ------------------
  |  |   92|      0|#define LY_PATH_PRED_LEAFREF    0x0400  /** expected predicates only leafref - [node=current()/../../../node/node];
  ------------------
 3416|      0|        lydict_remove(PARSER_CTX(pctx), str_path);
  ------------------
  |  |  128|      0|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3417|      0|        break;
 3418|      0|    }
 3419|      0|    case LY_STMT_PATTERN:
  ------------------
  |  Branch (3419:5): [True: 0, False: 309k]
  ------------------
 3420|      0|        ret = lysp_stmt_type_pattern(pctx, stmt, (struct lysp_restr **)result);
 3421|      0|        break;
 3422|      0|    case LY_STMT_POSITION:
  ------------------
  |  Branch (3422:5): [True: 0, False: 309k]
  ------------------
 3423|      0|    case LY_STMT_VALUE:
  ------------------
  |  Branch (3423:5): [True: 0, False: 309k]
  ------------------
 3424|      0|        flags = 0;
 3425|      0|        ret = lysp_stmt_type_enum_value_pos(pctx, stmt, *(int64_t **)result, &flags, exts);
 3426|      0|        break;
 3427|      0|    case LY_STMT_PREFIX:
  ------------------
  |  Branch (3427:5): [True: 0, False: 309k]
  ------------------
 3428|      0|        ret = lysp_stmt_text_field(pctx, stmt, 0, (const char **)result, Y_IDENTIF_ARG, exts);
 3429|      0|        break;
 3430|      0|    case LY_STMT_REFINE:
  ------------------
  |  Branch (3430:5): [True: 0, False: 309k]
  ------------------
 3431|      0|        ret = lysp_stmt_refine(pctx, stmt, (struct lysp_refine **)result);
 3432|      0|        break;
 3433|      0|    case LY_STMT_REQUIRE_INSTANCE:
  ------------------
  |  Branch (3433:5): [True: 0, False: 309k]
  ------------------
 3434|      0|        flags = 0;
 3435|      0|        ret = lysp_stmt_type_reqinstance(pctx, stmt, *(uint8_t **)result, &flags, exts);
 3436|      0|        break;
 3437|      0|    case LY_STMT_REVISION:
  ------------------
  |  Branch (3437:5): [True: 0, False: 309k]
  ------------------
 3438|      0|        ret = lysp_stmt_revision(pctx, stmt, (struct lysp_revision **)result);
 3439|      0|        break;
 3440|      0|    case LY_STMT_STATUS:
  ------------------
  |  Branch (3440:5): [True: 0, False: 309k]
  ------------------
 3441|      0|        ret = lysp_stmt_status(pctx, stmt, (uint16_t *)result, exts);
 3442|      0|        break;
 3443|      0|    case LY_STMT_SUBMODULE: {
  ------------------
  |  Branch (3443:5): [True: 0, False: 309k]
  ------------------
 3444|      0|        struct lysp_submodule *submod;
 3445|       |
 3446|      0|        *result = submod = calloc(1, sizeof *submod);
 3447|      0|        LY_CHECK_ERR_RET(!submod, LOGMEM(PARSER_CTX(pctx)), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3448|      0|        ret = lysp_stmt_submodule(pctx, stmt, submod);
 3449|      0|        break;
 3450|      0|    }
 3451|   126k|    case LY_STMT_TYPE: {
  ------------------
  |  Branch (3451:5): [True: 126k, False: 182k]
  ------------------
 3452|   126k|        struct lysp_type *type;
 3453|       |
 3454|   126k|        *result = type = calloc(1, sizeof *type);
 3455|   126k|        LY_CHECK_ERR_RET(!type, LOGMEM(PARSER_CTX(pctx)), LY_EMEM);
  ------------------
  |  |  207|   126k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 126k]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3456|   126k|        ret = lysp_stmt_type(pctx, stmt, type);
 3457|   126k|        break;
 3458|   126k|    }
 3459|      0|    case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (3459:5): [True: 0, False: 309k]
  ------------------
 3460|      0|        ret = lysp_stmt_typedef(pctx, stmt, NULL, (struct lysp_tpdf **)result);
 3461|      0|        break;
 3462|      0|    case LY_STMT_WHEN:
  ------------------
  |  Branch (3462:5): [True: 0, False: 309k]
  ------------------
 3463|      0|        ret = lysp_stmt_when(pctx, stmt, (struct lysp_when **)result);
 3464|      0|        break;
 3465|      0|    case LY_STMT_YANG_VERSION:
  ------------------
  |  Branch (3465:5): [True: 0, False: 309k]
  ------------------
 3466|      0|        ret = lysp_stmt_yangver(pctx, stmt, *(uint8_t **)result, exts);
 3467|      0|        break;
 3468|      0|    case LY_STMT_YIN_ELEMENT:
  ------------------
  |  Branch (3468:5): [True: 0, False: 309k]
  ------------------
 3469|      0|        ret = lysp_stmt_yinelem(pctx, stmt, *(uint16_t **)result, exts);
 3470|      0|        break;
 3471|      0|    default:
  ------------------
  |  Branch (3471:5): [True: 0, False: 309k]
  ------------------
 3472|      0|        LOGINT(PARSER_CTX(pctx));
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3473|      0|        return LY_EINT;
 3474|   309k|    }
 3475|       |
 3476|   309k|    return ret;
 3477|   309k|}
parser_common.c:lysp_stmt_validate_value:
  436|   618k|{
  437|   618k|    uint8_t prefix = 0;
  438|   618k|    ly_bool first = 1;
  439|   618k|    uint32_t c;
  440|   618k|    size_t utf8_char_len;
  441|       |
  442|   618k|    if (!val) {
  ------------------
  |  Branch (442:9): [True: 0, False: 618k]
  ------------------
  443|      0|        if (val_type == Y_MAYBE_STR_ARG) {
  ------------------
  |  Branch (443:13): [True: 0, False: 0]
  ------------------
  444|       |            /* fine */
  445|      0|            return LY_SUCCESS;
  446|      0|        }
  447|       |
  448|      0|        LOGVAL_PARSER(ctx, LYVE_SYNTAX, "Missing an expected string.");
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  449|      0|        return LY_EVALID;
  450|      0|    }
  451|       |
  452|  40.6M|    while (*val) {
  ------------------
  |  Branch (452:12): [True: 40.0M, False: 618k]
  ------------------
  453|  40.0M|        LY_CHECK_ERR_RET(ly_getutf8(&val, &c, &utf8_char_len),
  ------------------
  |  |  207|  40.0M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 40.0M]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  454|  40.0M|                LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, (val)[-utf8_char_len]), LY_EVALID);
  455|       |
  456|  40.0M|        switch (val_type) {
  ------------------
  |  Branch (456:17): [True: 0, False: 40.0M]
  ------------------
  457|      0|        case Y_IDENTIF_ARG:
  ------------------
  |  Branch (457:9): [True: 0, False: 40.0M]
  ------------------
  458|      0|            LY_CHECK_RET(lysp_check_identifierchar(ctx, c, first, NULL));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  459|      0|            break;
  460|  1.98M|        case Y_PREF_IDENTIF_ARG:
  ------------------
  |  Branch (460:9): [True: 1.98M, False: 38.0M]
  ------------------
  461|  1.98M|            LY_CHECK_RET(lysp_check_identifierchar(ctx, c, first, &prefix));
  ------------------
  |  |  206|  1.98M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.98M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.98M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.98M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 1.98M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  462|  1.98M|            break;
  463|  38.0M|        case Y_STR_ARG:
  ------------------
  |  Branch (463:9): [True: 38.0M, False: 1.98M]
  ------------------
  464|  38.0M|        case Y_MAYBE_STR_ARG:
  ------------------
  |  Branch (464:9): [True: 0, False: 40.0M]
  ------------------
  465|  38.0M|            LY_CHECK_RET(lysp_check_stringchar(ctx, c));
  ------------------
  |  |  206|  38.0M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  38.0M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  38.0M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  38.0M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 38.0M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  466|  38.0M|            break;
  467|  40.0M|        }
  468|  40.0M|        first = 0;
  469|  40.0M|    }
  470|       |
  471|   618k|    return LY_SUCCESS;
  472|   618k|}
parser_common.c:lysp_stmt_text_field:
  562|   238k|{
  563|   238k|    if (*value) {
  ------------------
  |  Branch (563:9): [True: 0, False: 238k]
  ------------------
  564|      0|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyplg_ext_stmt2str(stmt->kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  565|      0|        return LY_EVALID;
  566|      0|    }
  567|       |
  568|   238k|    LY_CHECK_RET(lysp_stmt_validate_value(ctx, arg, stmt->arg));
  ------------------
  |  |  206|   238k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   238k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   238k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   238k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 238k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  569|   238k|    LY_CHECK_RET(lydict_insert(PARSER_CTX(ctx), stmt->arg, 0, value));
  ------------------
  |  |  206|   238k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   238k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   238k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   477k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 238k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 238k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  570|       |
  571|   238k|    for (const struct lysp_stmt *child = stmt->child; child; child = child->next) {
  ------------------
  |  Branch (571:55): [True: 0, False: 238k]
  ------------------
  572|      0|        switch (child->kw) {
  573|      0|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (573:9): [True: 0, False: 0]
  ------------------
  574|      0|            LY_CHECK_RET(lysp_stmt_ext(ctx, child, stmt->kw, substmt_index, exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  575|      0|            break;
  576|      0|        default:
  ------------------
  |  Branch (576:9): [True: 0, False: 0]
  ------------------
  577|      0|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(child->kw), lyplg_ext_stmt2str(stmt->kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  578|      0|            return LY_EVALID;
  579|      0|        }
  580|      0|    }
  581|   238k|    return LY_SUCCESS;
  582|   238k|}
parser_common.c:lysp_stmt_type_enum:
 1055|   112k|{
 1056|   112k|    struct lysp_type_enum *enm;
 1057|       |
 1058|   112k|    LY_CHECK_RET(lysp_stmt_validate_value(ctx, stmt->kw == LY_STMT_ENUM ? Y_STR_ARG : Y_IDENTIF_ARG, stmt->arg));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   224k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 112k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1059|       |
 1060|   112k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *enums, enm, LY_EMEM);
  ------------------
  |  |   96|   112k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|   112k|    { \
  |  |  |  |   62|   112k|        char *p__; \
  |  |  |  |   63|   112k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 84.3k, False: 28.1k]
  |  |  |  |  ------------------
  |  |  |  |   64|  84.3k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  84.3k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  84.3k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  84.3k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 84.3k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  84.3k|        } else { \
  |  |  |  |   73|  28.1k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  28.1k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 28.1k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  28.1k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  28.1k|        } \
  |  |  |  |   80|   112k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   112k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   112k|    }
  |  |  ------------------
  |  |   97|   112k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|   112k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1061|       |
 1062|   112k|    if (stmt->kw == LY_STMT_ENUM) {
  ------------------
  |  Branch (1062:9): [True: 112k, False: 0]
  ------------------
 1063|   112k|        LY_CHECK_RET(lysp_check_enum_name(ctx, stmt->arg, strlen(stmt->arg)));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1064|   112k|    } /* else nothing specific for YANG_BIT */
 1065|       |
 1066|   112k|    LY_CHECK_RET(lydict_insert(PARSER_CTX(ctx), stmt->arg, 0, &enm->name));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   224k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 112k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1067|   112k|    CHECK_UNIQUENESS(ctx, *enums, name, lyplg_ext_stmt2str(stmt->kw), enm->name);
  ------------------
  |  |   86|   112k|    if (ARRAY) { \
  |  |  ------------------
  |  |  |  Branch (86:9): [True: 112k, False: 0]
  |  |  ------------------
  |  |   87|   281k|        for (LY_ARRAY_COUNT_TYPE u_ = 0; u_ < LY_ARRAY_COUNT(ARRAY) - 1; ++u_) { \
  |  |  ------------------
  |  |  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       for (LY_ARRAY_COUNT_TYPE u_ = 0; u_ < LY_ARRAY_COUNT(ARRAY) - 1; ++u_) { \
  |  |  ------------------
  |  |  |  |  148|   281k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 281k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (87:42): [True: 168k, False: 112k]
  |  |  ------------------
  |  |   88|   168k|            if (!strcmp((ARRAY)[u_].MEMBER, IDENT)) { \
  |  |  ------------------
  |  |  |  Branch (88:17): [True: 0, False: 168k]
  |  |  ------------------
  |  |   89|      0|                LOGVAL_PARSER(CTX, LY_VCODE_DUPIDENT, IDENT, STMT); \
  |  |  ------------------
  |  |  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|      0|                return LY_EVALID; \
  |  |   91|      0|            } \
  |  |   92|   168k|        } \
  |  |   93|   112k|    }
  ------------------
 1068|       |
 1069|   168k|    for (const struct lysp_stmt *child = stmt->child; child; child = child->next) {
  ------------------
  |  Branch (1069:55): [True: 56.2k, False: 112k]
  ------------------
 1070|  56.2k|        switch (child->kw) {
 1071|  56.2k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (1071:9): [True: 56.2k, False: 0]
  ------------------
 1072|  56.2k|            LY_CHECK_RET(lysp_stmt_text_field(ctx, child, 0, &enm->dsc, Y_STR_ARG, &enm->exts));
  ------------------
  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  56.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  56.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1073|  56.2k|            break;
 1074|      0|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (1074:9): [True: 0, False: 56.2k]
  ------------------
 1075|      0|            PARSER_CHECK_STMTVER2_RET(ctx, "if-feature", lyplg_ext_stmt2str(stmt->kw));
  ------------------
  |  |   56|      0|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1076|      0|            LY_CHECK_RET(lysp_stmt_qnames(ctx, child, &enm->iffeatures, Y_STR_ARG, &enm->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1077|      0|            break;
 1078|      0|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (1078:9): [True: 0, False: 56.2k]
  ------------------
 1079|      0|            LY_CHECK_RET(lysp_stmt_text_field(ctx, child, 0, &enm->ref, Y_STR_ARG, &enm->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1080|      0|            break;
 1081|      0|        case LY_STMT_STATUS:
  ------------------
  |  Branch (1081:9): [True: 0, False: 56.2k]
  ------------------
 1082|      0|            LY_CHECK_RET(lysp_stmt_status(ctx, child, &enm->flags, &enm->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1083|      0|            break;
 1084|      0|        case LY_STMT_VALUE:
  ------------------
  |  Branch (1084:9): [True: 0, False: 56.2k]
  ------------------
 1085|      0|            LY_CHECK_ERR_RET(stmt->kw == LY_STMT_BIT, LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(child->kw),
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1086|      0|                    lyplg_ext_stmt2str(stmt->kw)), LY_EVALID);
 1087|      0|            LY_CHECK_RET(lysp_stmt_type_enum_value_pos(ctx, child, &enm->value, &enm->flags, &enm->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1088|      0|            break;
 1089|      0|        case LY_STMT_POSITION:
  ------------------
  |  Branch (1089:9): [True: 0, False: 56.2k]
  ------------------
 1090|      0|            LY_CHECK_ERR_RET(stmt->kw == LY_STMT_ENUM, LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(child->kw),
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1091|      0|                    lyplg_ext_stmt2str(stmt->kw)), LY_EVALID);
 1092|      0|            LY_CHECK_RET(lysp_stmt_type_enum_value_pos(ctx, child, &enm->value, &enm->flags, &enm->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1093|      0|            break;
 1094|      0|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1094:9): [True: 0, False: 56.2k]
  ------------------
 1095|      0|            LY_CHECK_RET(lysp_stmt_ext(ctx, child, stmt->kw, 0, &enm->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1096|      0|            break;
 1097|      0|        default:
  ------------------
  |  Branch (1097:9): [True: 0, False: 56.2k]
  ------------------
 1098|      0|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(child->kw), lyplg_ext_stmt2str(stmt->kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1099|      0|            return LY_EVALID;
 1100|  56.2k|        }
 1101|  56.2k|    }
 1102|       |
 1103|   112k|    return LY_SUCCESS;
 1104|   112k|}
parser_common.c:lysp_stmt_restr:
  852|  28.1k|{
  853|  28.1k|    LY_CHECK_RET(lysp_stmt_validate_value(ctx, Y_STR_ARG, stmt->arg));
  ------------------
  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  854|  28.1k|    LY_CHECK_RET(lydict_insert(PARSER_CTX(ctx), stmt->arg, 0, &restr->arg.str));
  ------------------
  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  56.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 28.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  855|  28.1k|    restr->arg.mod = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|  28.1k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
  856|       |
  857|  28.1k|    for (const struct lysp_stmt *child = stmt->child; child; child = child->next) {
  ------------------
  |  Branch (857:55): [True: 0, False: 28.1k]
  ------------------
  858|      0|        switch (child->kw) {
  859|      0|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (859:9): [True: 0, False: 0]
  ------------------
  860|      0|            LY_CHECK_RET(lysp_stmt_text_field(ctx, child, 0, &restr->dsc, Y_STR_ARG, &restr->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  861|      0|            break;
  862|      0|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (862:9): [True: 0, False: 0]
  ------------------
  863|      0|            LY_CHECK_RET(lysp_stmt_text_field(ctx, child, 0, &restr->ref, Y_STR_ARG, &restr->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  864|      0|            break;
  865|      0|        case LY_STMT_ERROR_APP_TAG:
  ------------------
  |  Branch (865:9): [True: 0, False: 0]
  ------------------
  866|      0|            LY_CHECK_RET(lysp_stmt_text_field(ctx, child, 0, &restr->eapptag, Y_STR_ARG, &restr->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  867|      0|            break;
  868|      0|        case LY_STMT_ERROR_MESSAGE:
  ------------------
  |  Branch (868:9): [True: 0, False: 0]
  ------------------
  869|      0|            LY_CHECK_RET(lysp_stmt_text_field(ctx, child, 0, &restr->emsg, Y_STR_ARG, &restr->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  870|      0|            break;
  871|      0|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (871:9): [True: 0, False: 0]
  ------------------
  872|      0|            LY_CHECK_RET(lysp_stmt_ext(ctx, child, stmt->kw, 0, &restr->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  873|      0|            break;
  874|      0|        default:
  ------------------
  |  Branch (874:9): [True: 0, False: 0]
  ------------------
  875|      0|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(child->kw), lyplg_ext_stmt2str(stmt->kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  876|      0|            return LY_EVALID;
  877|      0|        }
  878|      0|    }
  879|  28.1k|    return LY_SUCCESS;
  880|  28.1k|}
parser_common.c:lysp_stmt_type:
 1830|   238k|{
 1831|   238k|    struct lysp_type *nest_type;
 1832|   238k|    const char *str_path = NULL;
 1833|   238k|    LY_ERR ret;
 1834|       |
 1835|   238k|    if (type->name) {
  ------------------
  |  Branch (1835:9): [True: 0, False: 238k]
  ------------------
 1836|      0|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "type");
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1837|      0|        return LY_EVALID;
 1838|      0|    }
 1839|       |
 1840|   238k|    LY_CHECK_RET(lysp_stmt_validate_value(ctx, Y_PREF_IDENTIF_ARG, stmt->arg));
  ------------------
  |  |  206|   238k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   238k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   238k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   238k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 238k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1841|   238k|    LY_CHECK_RET(lydict_insert(PARSER_CTX(ctx), stmt->arg, 0, &type->name));
  ------------------
  |  |  206|   238k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   238k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   238k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   477k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 238k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 238k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1842|   238k|    type->pmod = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|   238k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 1843|       |
 1844|   492k|    for (const struct lysp_stmt *child = stmt->child; child; child = child->next) {
  ------------------
  |  Branch (1844:55): [True: 253k, False: 238k]
  ------------------
 1845|   253k|        switch (child->kw) {
 1846|      0|        case LY_STMT_BASE:
  ------------------
  |  Branch (1846:9): [True: 0, False: 253k]
  ------------------
 1847|      0|            LY_CHECK_RET(lysp_stmt_text_fields(ctx, child, &type->bases, Y_PREF_IDENTIF_ARG, &type->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1848|      0|            type->flags |= LYS_SET_BASE;
  ------------------
  |  |  690|      0|#define LYS_SET_BASE     0x0001      /**< type's flag for present base substatement */
  ------------------
 1849|      0|            break;
 1850|      0|        case LY_STMT_BIT:
  ------------------
  |  Branch (1850:9): [True: 0, False: 253k]
  ------------------
 1851|      0|            LY_CHECK_RET(lysp_stmt_type_enum(ctx, child, &type->bits));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1852|      0|            type->flags |= LYS_SET_BIT;
  ------------------
  |  |  691|      0|#define LYS_SET_BIT      0x0002      /**< type's flag for present bit substatement */
  ------------------
 1853|      0|            break;
 1854|   112k|        case LY_STMT_ENUM:
  ------------------
  |  Branch (1854:9): [True: 112k, False: 140k]
  ------------------
 1855|   112k|            LY_CHECK_RET(lysp_stmt_type_enum(ctx, child, &type->enums));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1856|   112k|            type->flags |= LYS_SET_ENUM;
  ------------------
  |  |  692|   112k|#define LYS_SET_ENUM     0x0004      /**< type's flag for present enum substatement */
  ------------------
 1857|   112k|            break;
 1858|      0|        case LY_STMT_FRACTION_DIGITS:
  ------------------
  |  Branch (1858:9): [True: 0, False: 253k]
  ------------------
 1859|      0|            LY_CHECK_RET(lysp_stmt_type_fracdigits(ctx, child, &type->fraction_digits, &type->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1860|      0|            type->flags |= LYS_SET_FRDIGITS;
  ------------------
  |  |  693|      0|#define LYS_SET_FRDIGITS 0x0008      /**< type's flag for present fraction-digits substatement */
  ------------------
 1861|      0|            break;
 1862|      0|        case LY_STMT_LENGTH:
  ------------------
  |  Branch (1862:9): [True: 0, False: 253k]
  ------------------
 1863|      0|            if (type->length) {
  ------------------
  |  Branch (1863:17): [True: 0, False: 0]
  ------------------
 1864|      0|                LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyplg_ext_stmt2str(child->kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1865|      0|                return LY_EVALID;
 1866|      0|            }
 1867|      0|            type->length = calloc(1, sizeof *type->length);
 1868|      0|            LY_CHECK_ERR_RET(!type->length, LOGMEM(PARSER_CTX(ctx)), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1869|       |
 1870|      0|            LY_CHECK_RET(lysp_stmt_restr(ctx, child, type->length));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1871|      0|            type->flags |= LYS_SET_LENGTH;
  ------------------
  |  |  694|      0|#define LYS_SET_LENGTH   0x0010      /**< type's flag for present length substatement */
  ------------------
 1872|      0|            break;
 1873|      0|        case LY_STMT_PATH:
  ------------------
  |  Branch (1873:9): [True: 0, False: 253k]
  ------------------
 1874|      0|            LY_CHECK_RET(lysp_stmt_text_field(ctx, child, 0, &str_path, Y_STR_ARG, &type->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1875|      0|            ret = ly_path_parse(PARSER_CTX(ctx), NULL, str_path, 0, 1, LY_PATH_BEGIN_EITHER,
  ------------------
  |  |  128|      0|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                          ret = ly_path_parse(PARSER_CTX(ctx), NULL, str_path, 0, 1, LY_PATH_BEGIN_EITHER,
  ------------------
  |  |   72|      0|#define LY_PATH_BEGIN_EITHER    0x02    /**< path be be either absolute or relative */
  ------------------
 1876|      0|                    LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, &type->path);
  ------------------
  |  |   79|      0|#define LY_PATH_PREFIX_OPTIONAL     0x10    /**< prefixes in the path are optional (XML path) */
  ------------------
                                  LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, &type->path);
  ------------------
  |  |   92|      0|#define LY_PATH_PRED_LEAFREF    0x0400  /** expected predicates only leafref - [node=current()/../../../node/node];
  ------------------
 1877|      0|            lydict_remove(PARSER_CTX(ctx), str_path);
  ------------------
  |  |  128|      0|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1878|      0|            LY_CHECK_RET(ret);
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1879|      0|            type->flags |= LYS_SET_PATH;
  ------------------
  |  |  695|      0|#define LYS_SET_PATH     0x0020      /**< type's flag for present path substatement */
  ------------------
 1880|      0|            break;
 1881|      0|        case LY_STMT_PATTERN:
  ------------------
  |  Branch (1881:9): [True: 0, False: 253k]
  ------------------
 1882|      0|            LY_CHECK_RET(lysp_stmt_type_pattern(ctx, child, &type->patterns));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1883|      0|            type->flags |= LYS_SET_PATTERN;
  ------------------
  |  |  696|      0|#define LYS_SET_PATTERN  0x0040      /**< type's flag for present pattern substatement */
  ------------------
 1884|      0|            break;
 1885|  28.1k|        case LY_STMT_RANGE:
  ------------------
  |  Branch (1885:9): [True: 28.1k, False: 224k]
  ------------------
 1886|  28.1k|            if (type->range) {
  ------------------
  |  Branch (1886:17): [True: 0, False: 28.1k]
  ------------------
 1887|      0|                LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyplg_ext_stmt2str(child->kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1888|      0|                return LY_EVALID;
 1889|      0|            }
 1890|  28.1k|            type->range = calloc(1, sizeof *type->range);
 1891|  28.1k|            LY_CHECK_ERR_RET(!type->range, LOGMEM(PARSER_CTX(ctx)), LY_EMEM);
  ------------------
  |  |  207|  28.1k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 28.1k]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1892|       |
 1893|  28.1k|            LY_CHECK_RET(lysp_stmt_restr(ctx, child, type->range));
  ------------------
  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1894|  28.1k|            type->flags |= LYS_SET_RANGE;
  ------------------
  |  |  697|  28.1k|#define LYS_SET_RANGE    0x0080      /**< type's flag for present range substatement */
  ------------------
 1895|  28.1k|            break;
 1896|      0|        case LY_STMT_REQUIRE_INSTANCE:
  ------------------
  |  Branch (1896:9): [True: 0, False: 253k]
  ------------------
 1897|      0|            LY_CHECK_RET(lysp_stmt_type_reqinstance(ctx, child, &type->require_instance, &type->flags, &type->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1898|       |            /* LYS_SET_REQINST checked and set inside lysp_stmt_type_reqinstance() */
 1899|      0|            break;
 1900|   112k|        case LY_STMT_TYPE:
  ------------------
  |  Branch (1900:9): [True: 112k, False: 140k]
  ------------------
 1901|   112k|            LY_ARRAY_NEW_RET(PARSER_CTX(ctx), type->types, nest_type, LY_EMEM);
  ------------------
  |  |   96|   112k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|   112k|    { \
  |  |  |  |   62|   112k|        char *p__; \
  |  |  |  |   63|   112k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 56.2k, False: 56.2k]
  |  |  |  |  ------------------
  |  |  |  |   64|  56.2k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  56.2k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  56.2k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  56.2k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 56.2k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  56.2k|        } else { \
  |  |  |  |   73|  56.2k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  56.2k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 56.2k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  56.2k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  56.2k|        } \
  |  |  |  |   80|   112k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   112k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   112k|    }
  |  |  ------------------
  |  |   97|   112k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|   112k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1902|   112k|            LY_CHECK_RET(lysp_stmt_type(ctx, child, nest_type));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1903|   112k|            type->flags |= LYS_SET_TYPE;
  ------------------
  |  |  698|   112k|#define LYS_SET_TYPE     0x0100      /**< type's flag for present type substatement */
  ------------------
 1904|   112k|            break;
 1905|      0|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1905:9): [True: 0, False: 253k]
  ------------------
 1906|      0|            LY_CHECK_RET(lysp_stmt_ext(ctx, child, LY_STMT_TYPE, 0, &type->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1907|      0|            break;
 1908|      0|        default:
  ------------------
  |  Branch (1908:9): [True: 0, False: 253k]
  ------------------
 1909|      0|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(child->kw), "type");
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1910|      0|            return LY_EVALID;
 1911|   253k|        }
 1912|   253k|    }
 1913|   238k|    return LY_SUCCESS;
 1914|   238k|}

buf_add_char:
  131|   588M|{
  132|   588M|#define BUF_STEP 16;
  133|   588M|    if (*buf_len <= (*buf_used) + len) {
  ------------------
  |  Branch (133:9): [True: 37.8M, False: 550M]
  ------------------
  134|  37.8M|        *buf_len += BUF_STEP;
  ------------------
  |  |  132|  37.8M|#define BUF_STEP 16;
  ------------------
  135|  37.8M|        *buf = ly_realloc(*buf, *buf_len);
  136|  37.8M|        LY_CHECK_ERR_RET(!*buf, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|  37.8M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 37.8M]
  |  |  ------------------
  ------------------
  137|  37.8M|    }
  138|   588M|    if (*buf_used) {
  ------------------
  |  Branch (138:9): [True: 588M, False: 6.88k]
  ------------------
  139|   588M|        ly_in_read(in, &(*buf)[*buf_used], len);
  140|   588M|    } else {
  141|  6.88k|        ly_in_read(in, *buf, len);
  142|  6.88k|    }
  143|       |
  144|   588M|    (*buf_used) += len;
  145|   588M|    return LY_SUCCESS;
  146|   588M|#undef BUF_STEP
  147|   588M|}
buf_store_char:
  169|   832M|{
  170|   832M|    uint32_t c;
  171|   832M|    size_t len;
  172|       |
  173|       |    /* check  valid combination of input paremeters - if need_buf specified, word_b must be provided */
  174|   832M|    assert(!need_buf || (need_buf && word_b));
  175|       |
  176|       |    /* get UTF8 code point (and number of bytes coding the character) */
  177|   832M|    LY_CHECK_ERR_RET(ly_getutf8(&ctx->in->current, &c, &len),
  ------------------
  |  |  207|   832M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 285, False: 832M]
  |  |  |  Branch (207:58): [True: 285, False: 0]
  |  |  ------------------
  ------------------
  178|   832M|            LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, ctx->in->current[-len]), LY_EVALID);
  179|   832M|    ctx->in->current -= len;
  180|   832M|    if (c == '\n') {
  ------------------
  |  Branch (180:9): [True: 15.0M, False: 817M]
  ------------------
  181|  15.0M|        ctx->indent = 0;
  182|  15.0M|        LY_IN_NEW_LINE(ctx->in);
  ------------------
  |  |   48|  15.0M|    (IN)->line++
  ------------------
  183|   817M|    } else {
  184|       |        /* note - even the multibyte character is count as 1 */
  185|   817M|        ++ctx->indent;
  186|   817M|    }
  187|       |
  188|       |    /* check character validity */
  189|   832M|    switch (arg) {
  ------------------
  |  Branch (189:13): [True: 0, False: 832M]
  ------------------
  190|  24.3M|    case Y_IDENTIF_ARG:
  ------------------
  |  Branch (190:5): [True: 24.3M, False: 808M]
  ------------------
  191|  24.3M|        LY_CHECK_RET(lysp_check_identifierchar((struct lysp_ctx *)ctx, c, !(*word_len), NULL));
  ------------------
  |  |  206|  24.3M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  24.3M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  24.3M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  24.3M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 74, False: 24.3M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  192|  24.3M|        break;
  193|  17.3M|    case Y_PREF_IDENTIF_ARG:
  ------------------
  |  Branch (193:5): [True: 17.3M, False: 815M]
  ------------------
  194|  17.3M|        LY_CHECK_RET(lysp_check_identifierchar((struct lysp_ctx *)ctx, c, !(*word_len), prefix));
  ------------------
  |  |  206|  17.3M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  17.3M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  17.3M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  17.3M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 26, False: 17.3M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|  17.3M|        break;
  196|   748M|    case Y_STR_ARG:
  ------------------
  |  Branch (196:5): [True: 748M, False: 84.1M]
  ------------------
  197|   791M|    case Y_MAYBE_STR_ARG:
  ------------------
  |  Branch (197:5): [True: 42.4M, False: 790M]
  ------------------
  198|   791M|        LY_CHECK_RET(lysp_check_stringchar((struct lysp_ctx *)ctx, c));
  ------------------
  |  |  206|   791M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   791M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   791M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   791M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 23, False: 791M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  199|   791M|        break;
  200|   832M|    }
  201|       |
  202|   832M|    if (word_b && *word_b) {
  ------------------
  |  Branch (202:9): [True: 832M, False: 0]
  |  Branch (202:19): [True: 586M, False: 246M]
  ------------------
  203|       |        /* add another character into buffer */
  204|   586M|        if (buf_add_char(PARSER_CTX(ctx), ctx->in, len, word_b, buf_len, word_len)) {
  ------------------
  |  |  128|   586M|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|   586M|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 586M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (204:13): [True: 0, False: 586M]
  ------------------
  205|      0|            return LY_EMEM;
  206|      0|        }
  207|       |
  208|       |        /* in case of realloc */
  209|   586M|        *word_p = *word_b;
  210|   586M|    } else if (word_b && need_buf) {
  ------------------
  |  Branch (210:16): [True: 246M, False: 0]
  |  Branch (210:26): [True: 1.98M, False: 244M]
  ------------------
  211|       |        /* first time we need a buffer, copy everything read up to now */
  212|  1.98M|        if (*word_len) {
  ------------------
  |  Branch (212:13): [True: 1.98M, False: 6.83k]
  ------------------
  213|  1.98M|            *word_b = malloc(*word_len);
  214|  1.98M|            LY_CHECK_ERR_RET(!*word_b, LOGMEM(PARSER_CTX(ctx)), LY_EMEM);
  ------------------
  |  |  207|  1.98M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 1.98M]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  215|  1.98M|            *buf_len = *word_len;
  216|  1.98M|            memcpy(*word_b, *word_p, *word_len);
  217|  1.98M|        }
  218|       |
  219|       |        /* add this new character into buffer */
  220|  1.98M|        if (buf_add_char(PARSER_CTX(ctx), ctx->in, len, word_b, buf_len, word_len)) {
  ------------------
  |  |  128|  1.98M|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|  1.98M|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 1.98M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (220:13): [True: 0, False: 1.98M]
  ------------------
  221|      0|            return LY_EMEM;
  222|      0|        }
  223|       |
  224|       |        /* in case of realloc */
  225|  1.98M|        *word_p = *word_b;
  226|   244M|    } else {
  227|       |        /* just remember the first character pointer */
  228|   244M|        if (!*word_p) {
  ------------------
  |  Branch (228:13): [True: 9.16M, False: 235M]
  ------------------
  229|  9.16M|            *word_p = (char *)ctx->in->current;
  230|  9.16M|        }
  231|       |        /* ... and update the word's length */
  232|   244M|        (*word_len) += len;
  233|   244M|        ly_in_skip(ctx->in, len);
  234|   244M|    }
  235|       |
  236|   832M|    return LY_SUCCESS;
  237|   832M|}
skip_comment:
  250|   174k|{
  251|       |    /* internal statuses: */
  252|   174k|#define COMMENT_NO        0 /* comment ended */
  253|   174k|#define COMMENT_LINE      1 /* in line comment */
  254|   174k|#define COMMENT_BLOCK     2 /* in block comment */
  255|   174k|#define COMMENT_BLOCK_END 3 /* in block comment with last read character '*' */
  256|       |
  257|  5.65M|    while (ctx->in->current[0] && comment) {
  ------------------
  |  Branch (257:12): [True: 5.65M, False: 147]
  |  Branch (257:35): [True: 5.47M, False: 174k]
  ------------------
  258|  5.47M|        switch (comment) {
  259|  68.4k|        case COMMENT_LINE:
  ------------------
  |  |  253|  68.4k|#define COMMENT_LINE      1 /* in line comment */
  ------------------
  |  Branch (259:9): [True: 68.4k, False: 5.40M]
  ------------------
  260|  68.4k|            if (ctx->in->current[0] == '\n') {
  ------------------
  |  Branch (260:17): [True: 17.2k, False: 51.2k]
  ------------------
  261|  17.2k|                comment = COMMENT_NO;
  ------------------
  |  |  252|  17.2k|#define COMMENT_NO        0 /* comment ended */
  ------------------
  262|  17.2k|                LY_IN_NEW_LINE(ctx->in);
  ------------------
  |  |   48|  17.2k|    (IN)->line++
  ------------------
  263|  17.2k|            }
  264|  68.4k|            break;
  265|  5.09M|        case COMMENT_BLOCK:
  ------------------
  |  |  254|  5.09M|#define COMMENT_BLOCK     2 /* in block comment */
  ------------------
  |  Branch (265:9): [True: 5.09M, False: 383k]
  ------------------
  266|  5.09M|            if (ctx->in->current[0] == '*') {
  ------------------
  |  Branch (266:17): [True: 314k, False: 4.77M]
  ------------------
  267|   314k|                comment = COMMENT_BLOCK_END;
  ------------------
  |  |  255|   314k|#define COMMENT_BLOCK_END 3 /* in block comment with last read character '*' */
  ------------------
  268|  4.77M|            } else if (ctx->in->current[0] == '\n') {
  ------------------
  |  Branch (268:24): [True: 311k, False: 4.46M]
  ------------------
  269|   311k|                LY_IN_NEW_LINE(ctx->in);
  ------------------
  |  |   48|   311k|    (IN)->line++
  ------------------
  270|   311k|            }
  271|  5.09M|            break;
  272|   315k|        case COMMENT_BLOCK_END:
  ------------------
  |  |  255|   315k|#define COMMENT_BLOCK_END 3 /* in block comment with last read character '*' */
  ------------------
  |  Branch (272:9): [True: 315k, False: 5.16M]
  ------------------
  273|   315k|            if (ctx->in->current[0] == '/') {
  ------------------
  |  Branch (273:17): [True: 157k, False: 158k]
  ------------------
  274|   157k|                comment = COMMENT_NO;
  ------------------
  |  |  252|   157k|#define COMMENT_NO        0 /* comment ended */
  ------------------
  275|   158k|            } else if (ctx->in->current[0] != '*') {
  ------------------
  |  Branch (275:24): [True: 157k, False: 635]
  ------------------
  276|   157k|                if (ctx->in->current[0] == '\n') {
  ------------------
  |  Branch (276:21): [True: 320, False: 157k]
  ------------------
  277|    320|                    LY_IN_NEW_LINE(ctx->in);
  ------------------
  |  |   48|    320|    (IN)->line++
  ------------------
  278|    320|                }
  279|   157k|                comment = COMMENT_BLOCK;
  ------------------
  |  |  254|   157k|#define COMMENT_BLOCK     2 /* in block comment */
  ------------------
  280|   157k|            }
  281|   315k|            break;
  282|      0|        default:
  ------------------
  |  Branch (282:9): [True: 0, False: 5.47M]
  ------------------
  283|      0|            LOGINT_RET(PARSER_CTX(ctx));
  ------------------
  |  |  196|      0|#define LOGINT_RET(CTX) LOGINT(CTX); return LY_EINT
  |  |  ------------------
  |  |  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  284|  5.47M|        }
  285|       |
  286|  5.47M|        if (ctx->in->current[0] == '\n') {
  ------------------
  |  Branch (286:13): [True: 329k, False: 5.14M]
  ------------------
  287|   329k|            ctx->indent = 0;
  288|  5.14M|        } else {
  289|  5.14M|            ++ctx->indent;
  290|  5.14M|        }
  291|  5.47M|        ++ctx->in->current;
  292|  5.47M|    }
  293|       |
  294|   174k|    if (!ctx->in->current[0] && (comment >= COMMENT_BLOCK)) {
  ------------------
  |  |  254|    147|#define COMMENT_BLOCK     2 /* in block comment */
  ------------------
  |  Branch (294:9): [True: 147, False: 174k]
  |  Branch (294:33): [True: 88, False: 59]
  ------------------
  295|     88|        LOGVAL_PARSER(ctx, LYVE_SYNTAX, "Unexpected end-of-input, non-terminated comment.");
  ------------------
  |  |  129|     88|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    176|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 88, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  296|     88|        return LY_EVALID;
  297|     88|    }
  298|       |
  299|   174k|    return LY_SUCCESS;
  300|       |
  301|   174k|#undef COMMENT_NO
  302|   174k|#undef COMMENT_LINE
  303|   174k|#undef COMMENT_BLOCK
  304|   174k|#undef COMMENT_BLOCK_END
  305|   174k|}
get_argument:
  574|  9.42M|{
  575|  9.42M|    LY_ERR ret;
  576|  9.42M|    size_t buf_len = 0;
  577|  9.42M|    uint8_t prefix = 0;
  578|       |
  579|       |    /* word buffer - dynamically allocated */
  580|  9.42M|    *word_b = NULL;
  581|       |
  582|       |    /* word pointer - just a pointer to data */
  583|  9.42M|    *word_p = NULL;
  584|       |
  585|  9.42M|    *word_len = 0;
  586|  98.3M|    while (ctx->in->current[0]) {
  ------------------
  |  Branch (586:12): [True: 98.3M, False: 987]
  ------------------
  587|  98.3M|        switch (ctx->in->current[0]) {
  588|   286k|        case '\'':
  ------------------
  |  Branch (588:9): [True: 286k, False: 98.0M]
  ------------------
  589|  3.93M|        case '\"':
  ------------------
  |  Branch (589:9): [True: 3.65M, False: 94.6M]
  ------------------
  590|  3.93M|            if (*word_len) {
  ------------------
  |  Branch (590:17): [True: 15, False: 3.93M]
  ------------------
  591|       |                /* invalid - quotes cannot be in unquoted string and only optsep, ; or { can follow it */
  592|     15|                LOGVAL_PARSER(ctx, LY_VCODE_INSTREXP, 1, ctx->in->current,
  ------------------
  |  |  129|     15|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     30|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 15, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  593|     15|                        "unquoted string character, optsep, semicolon or opening brace");
  594|     15|                ret = LY_EVALID;
  595|     15|                goto error;
  596|     15|            }
  597|  3.93M|            if (flags) {
  ------------------
  |  Branch (597:17): [True: 244k, False: 3.69M]
  ------------------
  598|   244k|                (*flags) |= ctx->in->current[0] == '\'' ? LYS_SINGLEQUOTED : LYS_DOUBLEQUOTED;
  ------------------
  |  |  708|     17|#define LYS_SINGLEQUOTED 0x0100      /**< flag for single-quoted argument of an extension instance's substatement, only when the source is YANG */
  ------------------
                              (*flags) |= ctx->in->current[0] == '\'' ? LYS_SINGLEQUOTED : LYS_DOUBLEQUOTED;
  ------------------
  |  |  709|   488k|#define LYS_DOUBLEQUOTED 0x0200      /**< flag for double-quoted argument of an extension instance's substatement, only when the source is YANG */
  ------------------
  |  Branch (598:29): [True: 17, False: 244k]
  ------------------
  599|   244k|            }
  600|  3.93M|            LY_CHECK_GOTO(ret = read_qstring(ctx, arg, word_p, word_b, word_len, &buf_len), error);
  ------------------
  |  |  202|  3.93M|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 179, False: 3.93M]
  |  |  ------------------
  ------------------
  601|  3.93M|            if (!*word_p) {
  ------------------
  |  Branch (601:17): [True: 7.03k, False: 3.92M]
  ------------------
  602|       |                /* do not return NULL word */
  603|  7.03k|                *word_p = "";
  604|  7.03k|            }
  605|  3.93M|            goto str_end;
  606|  44.1k|        case '/':
  ------------------
  |  Branch (606:9): [True: 44.1k, False: 98.2M]
  ------------------
  607|  44.1k|            if (ctx->in->current[1] == '/') {
  ------------------
  |  Branch (607:17): [True: 833, False: 43.3k]
  ------------------
  608|       |                /* one-line comment */
  609|    833|                MOVE_INPUT(ctx, 2);
  ------------------
  |  |   59|    833|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  610|    833|                LY_CHECK_GOTO(ret = skip_comment(ctx, 1), error);
  ------------------
  |  |  202|    833|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 833]
  |  |  ------------------
  ------------------
  611|  43.3k|            } else if (ctx->in->current[1] == '*') {
  ------------------
  |  Branch (611:24): [True: 917, False: 42.3k]
  ------------------
  612|       |                /* block comment */
  613|    917|                MOVE_INPUT(ctx, 2);
  ------------------
  |  |   59|    917|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  614|    917|                LY_CHECK_GOTO(ret = skip_comment(ctx, 2), error);
  ------------------
  |  |  202|    917|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 12, False: 905]
  |  |  ------------------
  ------------------
  615|  42.3k|            } else {
  616|       |                /* not a comment after all */
  617|  42.3k|                LY_CHECK_GOTO(ret = buf_store_char(ctx, arg, word_p, word_len, word_b, &buf_len, 0, &prefix), error);
  ------------------
  |  |  202|  42.3k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 10, False: 42.3k]
  |  |  ------------------
  ------------------
  618|  42.3k|            }
  619|  44.1k|            break;
  620|  24.6M|        case ' ':
  ------------------
  |  Branch (620:9): [True: 24.6M, False: 73.6M]
  ------------------
  621|  24.6M|            if (*word_len) {
  ------------------
  |  Branch (621:17): [True: 2.92M, False: 21.7M]
  ------------------
  622|       |                /* word is finished */
  623|  2.92M|                goto str_end;
  624|  2.92M|            }
  625|  21.7M|            MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|  21.7M|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  626|  21.7M|            break;
  627|  59.4k|        case '\t':
  ------------------
  |  Branch (627:9): [True: 59.4k, False: 98.2M]
  ------------------
  628|  59.4k|            if (*word_len) {
  ------------------
  |  Branch (628:17): [True: 5.90k, False: 53.5k]
  ------------------
  629|       |                /* word is finished */
  630|  5.90k|                goto str_end;
  631|  5.90k|            }
  632|       |            /* tabs count for 8 spaces */
  633|  53.5k|            ctx->indent += Y_TAB_SPACES;
  ------------------
  |  |  103|  53.5k|#define Y_TAB_SPACES         8  /**< number of spaces instead of tab character */
  ------------------
  634|       |
  635|  53.5k|            ++ctx->in->current;
  636|  53.5k|            break;
  637|  1.05k|        case '\r':
  ------------------
  |  Branch (637:9): [True: 1.05k, False: 98.3M]
  ------------------
  638|  1.05k|            if (ctx->in->current[1] != '\n') {
  ------------------
  |  Branch (638:17): [True: 14, False: 1.04k]
  ------------------
  639|     14|                LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, ctx->in->current[0]);
  ------------------
  |  |  129|     14|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     28|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 14, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  640|     14|                ret = LY_EVALID;
  641|     14|                goto error;
  642|     14|            }
  643|  1.04k|            MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|  1.04k|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  644|       |        /* fallthrough */
  645|  3.11M|        case '\n':
  ------------------
  |  Branch (645:9): [True: 3.10M, False: 95.1M]
  ------------------
  646|  3.11M|            if (*word_len) {
  ------------------
  |  Branch (646:17): [True: 5.96k, False: 3.10M]
  ------------------
  647|       |                /* word is finished */
  648|  5.96k|                goto str_end;
  649|  5.96k|            }
  650|  3.10M|            LY_IN_NEW_LINE(ctx->in);
  ------------------
  |  |   48|  3.10M|    (IN)->line++
  ------------------
  651|  3.10M|            MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|  3.10M|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  652|       |
  653|       |            /* reset indent */
  654|  3.10M|            ctx->indent = 0;
  655|  3.10M|            break;
  656|  2.17M|        case ';':
  ------------------
  |  Branch (656:9): [True: 2.17M, False: 96.1M]
  ------------------
  657|  2.54M|        case '{':
  ------------------
  |  Branch (657:9): [True: 368k, False: 97.9M]
  ------------------
  658|  2.54M|            if (*word_len || (arg == Y_MAYBE_STR_ARG)) {
  ------------------
  |  Branch (658:17): [True: 2.30M, False: 244k]
  |  Branch (658:30): [True: 244k, False: 40]
  ------------------
  659|       |                /* word is finished */
  660|  2.54M|                goto str_end;
  661|  2.54M|            }
  662|       |
  663|     40|            LOGVAL_PARSER(ctx, LY_VCODE_INSTREXP, 1, ctx->in->current, "an argument");
  ------------------
  |  |  129|     40|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     80|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 40, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  664|     40|            ret = LY_EVALID;
  665|     40|            goto error;
  666|     13|        case '}':
  ------------------
  |  Branch (666:9): [True: 13, False: 98.3M]
  ------------------
  667|       |            /* invalid - braces cannot be in unquoted string (opening braces terminates the string and can follow it) */
  668|     13|            LOGVAL_PARSER(ctx, LY_VCODE_INSTREXP, 1, ctx->in->current,
  ------------------
  |  |  129|     13|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     26|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 13, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  669|     13|                    "unquoted string character, optsep, semicolon or opening brace");
  670|     13|            ret = LY_EVALID;
  671|     13|            goto error;
  672|  63.9M|        default:
  ------------------
  |  Branch (672:9): [True: 63.9M, False: 34.3M]
  ------------------
  673|  63.9M|            LY_CHECK_GOTO(ret = buf_store_char(ctx, arg, word_p, word_len, word_b, &buf_len, 0, &prefix), error);
  ------------------
  |  |  202|  63.9M|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 317, False: 63.9M]
  |  |  ------------------
  ------------------
  674|  63.9M|            break;
  675|  98.3M|        }
  676|  98.3M|    }
  677|       |
  678|       |    /* unexpected end of loop */
  679|    987|    LOGVAL_PARSER(ctx, LY_VCODE_EOF);
  ------------------
  |  |  129|    987|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|  1.97k|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 987, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  680|    987|    ret = LY_EVALID;
  681|    987|    goto error;
  682|       |
  683|  9.42M|str_end:
  684|       |    /* terminating NULL byte for buf */
  685|  9.42M|    if (*word_b) {
  ------------------
  |  Branch (685:9): [True: 1.98M, False: 7.43M]
  ------------------
  686|  1.98M|        (*word_b) = ly_realloc(*word_b, (*word_len) + 1);
  687|  1.98M|        LY_CHECK_ERR_RET(!(*word_b), LOGMEM(PARSER_CTX(ctx)), LY_EMEM);
  ------------------
  |  |  207|  1.98M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 1.98M]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  688|  1.98M|        (*word_b)[*word_len] = '\0';
  689|  1.98M|        *word_p = *word_b;
  690|  1.98M|    }
  691|       |
  692|  9.42M|    return LY_SUCCESS;
  693|       |
  694|  1.58k|error:
  695|  1.58k|    free(*word_b);
  696|  1.58k|    *word_b = NULL;
  697|  1.58k|    return ret;
  698|  9.42M|}
get_keyword:
  711|  21.9M|{
  712|  21.9M|    uint8_t prefix;
  713|  21.9M|    const char *word_start;
  714|  21.9M|    size_t len;
  715|       |
  716|  21.9M|    if (word_p) {
  ------------------
  |  Branch (716:9): [True: 21.9M, False: 0]
  ------------------
  717|  21.9M|        *word_p = NULL;
  718|  21.9M|        *word_len = 0;
  719|  21.9M|    }
  720|       |
  721|       |    /* first skip "optsep", comments */
  722|  84.8M|    while (ctx->in->current[0]) {
  ------------------
  |  Branch (722:12): [True: 84.8M, False: 1.69k]
  ------------------
  723|  84.8M|        switch (ctx->in->current[0]) {
  724|   171k|        case '/':
  ------------------
  |  Branch (724:9): [True: 171k, False: 84.6M]
  ------------------
  725|   171k|            if (ctx->in->current[1] == '/') {
  ------------------
  |  Branch (725:17): [True: 15.7k, False: 155k]
  ------------------
  726|       |                /* one-line comment */
  727|  15.7k|                MOVE_INPUT(ctx, 2);
  ------------------
  |  |   59|  15.7k|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  728|  15.7k|                LY_CHECK_RET(skip_comment(ctx, 1));
  ------------------
  |  |  206|  15.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  15.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  15.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  15.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 15.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  729|   155k|            } else if (ctx->in->current[1] == '*') {
  ------------------
  |  Branch (729:24): [True: 155k, False: 29]
  ------------------
  730|       |                /* block comment */
  731|   155k|                MOVE_INPUT(ctx, 2);
  ------------------
  |  |   59|   155k|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  732|   155k|                LY_CHECK_RET(skip_comment(ctx, 2));
  ------------------
  |  |  206|   155k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   155k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   155k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   155k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 155k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  733|   155k|            } else {
  734|       |                /* error - not a comment after all, keyword cannot start with slash */
  735|     29|                LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Invalid identifier first character '/'.");
  ------------------
  |  |  129|     29|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     58|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 29, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  736|     29|                return LY_EVALID;
  737|     29|            }
  738|   171k|            continue;
  739|  8.88M|        case '\n':
  ------------------
  |  Branch (739:9): [True: 8.88M, False: 75.9M]
  ------------------
  740|       |            /* skip whitespaces (optsep) */
  741|  8.88M|            LY_IN_NEW_LINE(ctx->in);
  ------------------
  |  |   48|  8.88M|    (IN)->line++
  ------------------
  742|  8.88M|            ctx->indent = 0;
  743|  8.88M|            break;
  744|  53.7M|        case ' ':
  ------------------
  |  Branch (744:9): [True: 53.7M, False: 31.0M]
  ------------------
  745|       |            /* skip whitespaces (optsep) */
  746|  53.7M|            ++ctx->indent;
  747|  53.7M|            break;
  748|  20.5k|        case '\t':
  ------------------
  |  Branch (748:9): [True: 20.5k, False: 84.8M]
  ------------------
  749|       |            /* skip whitespaces (optsep) */
  750|  20.5k|            ctx->indent += Y_TAB_SPACES;
  ------------------
  |  |  103|  20.5k|#define Y_TAB_SPACES         8  /**< number of spaces instead of tab character */
  ------------------
  751|  20.5k|            break;
  752|    868|        case '\r':
  ------------------
  |  Branch (752:9): [True: 868, False: 84.8M]
  ------------------
  753|       |            /* possible CRLF endline */
  754|    868|            if (ctx->in->current[1] == '\n') {
  ------------------
  |  Branch (754:17): [True: 852, False: 16]
  ------------------
  755|    852|                break;
  756|    852|            }
  757|       |        /* fallthrough */
  758|  21.9M|        default:
  ------------------
  |  Branch (758:9): [True: 21.9M, False: 62.8M]
  ------------------
  759|       |            /* either a keyword start or an invalid character */
  760|  21.9M|            goto keyword_start;
  761|  84.8M|        }
  762|       |
  763|  62.6M|        ly_in_skip(ctx->in, 1);
  764|  62.6M|    }
  765|       |
  766|  21.9M|keyword_start:
  767|  21.9M|    word_start = ctx->in->current;
  768|  21.9M|    *kw = lysp_match_kw(ctx->in, &ctx->indent);
  769|       |
  770|  21.9M|    if (*kw == LY_STMT_SYNTAX_SEMICOLON) {
  ------------------
  |  Branch (770:9): [True: 6.12M, False: 15.8M]
  ------------------
  771|  6.12M|        goto success;
  772|  15.8M|    } else if (*kw == LY_STMT_SYNTAX_LEFT_BRACE) {
  ------------------
  |  Branch (772:16): [True: 3.33M, False: 12.5M]
  ------------------
  773|  3.33M|        ctx->depth++;
  774|  3.33M|        if (ctx->depth > LY_MAX_BLOCK_DEPTH) {
  ------------------
  |  |   42|  3.33M|#define LY_MAX_BLOCK_DEPTH 500
  ------------------
  |  Branch (774:13): [True: 19, False: 3.33M]
  ------------------
  775|     19|            LOGERR(PARSER_CTX(ctx), LY_EINVAL, "The maximum number of block nestings has been exceeded.");
  ------------------
  |  |  154|     38|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (154:40): [True: 19, False: 0]
  |  |  ------------------
  ------------------
  776|     19|            return LY_EINVAL;
  777|     19|        }
  778|  3.33M|        goto success;
  779|  12.5M|    } else if (*kw == LY_STMT_SYNTAX_RIGHT_BRACE) {
  ------------------
  |  Branch (779:16): [True: 3.13M, False: 9.40M]
  ------------------
  780|  3.13M|        ctx->depth--;
  781|  3.13M|        goto success;
  782|  3.13M|    }
  783|       |
  784|  9.40M|    if (*kw != LY_STMT_NONE) {
  ------------------
  |  Branch (784:9): [True: 9.01M, False: 381k]
  ------------------
  785|       |        /* make sure we have the whole keyword */
  786|  9.01M|        switch (ctx->in->current[0]) {
  787|    214|        case '\r':
  ------------------
  |  Branch (787:9): [True: 214, False: 9.01M]
  ------------------
  788|    214|            if (ctx->in->current[1] != '\n') {
  ------------------
  |  Branch (788:17): [True: 7, False: 207]
  ------------------
  789|      7|                LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, ctx->in->current[0]);
  ------------------
  |  |  129|      7|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     14|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 7, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  790|      7|                return LY_EVALID;
  791|      7|            }
  792|    207|            MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|    207|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  793|       |        /* fallthrough */
  794|  3.04M|        case '\n':
  ------------------
  |  Branch (794:9): [True: 3.04M, False: 5.97M]
  ------------------
  795|  3.09M|        case '\t':
  ------------------
  |  Branch (795:9): [True: 47.8k, False: 8.97M]
  ------------------
  796|  9.00M|        case ' ':
  ------------------
  |  Branch (796:9): [True: 5.91M, False: 3.10M]
  ------------------
  797|       |            /* mandatory "sep" is just checked, not eaten so nothing in the context is updated */
  798|  9.00M|            break;
  799|  9.50k|        case ':':
  ------------------
  |  Branch (799:9): [True: 9.50k, False: 9.01M]
  ------------------
  800|       |            /* keyword is not actually a keyword, but prefix of an extension.
  801|       |             * To avoid repeated check of the prefix syntax, move to the point where the colon was read
  802|       |             * and we will be checking the keyword (extension instance) itself */
  803|  9.50k|            prefix = 1;
  804|  9.50k|            MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|  9.50k|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  805|  9.50k|            goto extension;
  806|  4.23k|        case '{':
  ------------------
  |  Branch (806:9): [True: 4.23k, False: 9.01M]
  ------------------
  807|       |            /* allowed only for input and output statements which can be without arguments */
  808|  4.23k|            if ((*kw == LY_STMT_INPUT) || (*kw == LY_STMT_OUTPUT)) {
  ------------------
  |  Branch (808:17): [True: 4.14k, False: 94]
  |  Branch (808:43): [True: 84, False: 10]
  ------------------
  809|  4.22k|                break;
  810|  4.22k|            }
  811|       |        /* fall through */
  812|    278|        default:
  ------------------
  |  Branch (812:9): [True: 268, False: 9.01M]
  ------------------
  813|    278|            MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|    278|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  814|    278|            LOGVAL_PARSER(ctx, LY_VCODE_INSTREXP, (int)(ctx->in->current - word_start), word_start,
  ------------------
  |  |  129|    278|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    556|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 278, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  815|    278|                    "a keyword followed by a separator");
  816|    278|            return LY_EVALID;
  817|  9.01M|        }
  818|  9.01M|    } else {
  819|       |        /* still can be an extension */
  820|   381k|        prefix = 0;
  821|       |
  822|   390k|extension:
  823|  4.20M|        while (ctx->in->current[0] && (ctx->in->current[0] != ' ') && (ctx->in->current[0] != '\t') &&
  ------------------
  |  Branch (823:16): [True: 4.20M, False: 3.77k]
  |  Branch (823:39): [True: 4.05M, False: 150k]
  |  Branch (823:71): [True: 4.05M, False: 4.08k]
  ------------------
  824|  4.20M|                (ctx->in->current[0] != '\n') && (ctx->in->current[0] != '\r') && (ctx->in->current[0] != '{') &&
  ------------------
  |  Branch (824:17): [True: 4.02M, False: 26.4k]
  |  Branch (824:50): [True: 4.02M, False: 745]
  |  Branch (824:83): [True: 3.97M, False: 46.5k]
  ------------------
  825|  4.20M|                (ctx->in->current[0] != ';')) {
  ------------------
  |  Branch (825:17): [True: 3.82M, False: 155k]
  ------------------
  826|  3.82M|            uint32_t c = 0;
  827|       |
  828|  3.82M|            LY_CHECK_ERR_RET(ly_getutf8(&ctx->in->current, &c, &len),
  ------------------
  |  |  207|  3.82M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 1.72k, False: 3.81M]
  |  |  |  Branch (207:58): [True: 1.72k, False: 0]
  |  |  ------------------
  ------------------
  829|  3.82M|                    LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, ctx->in->current[-len]), LY_EVALID);
  830|  3.81M|            ++ctx->indent;
  831|       |            /* check character validity */
  832|  3.81M|            LY_CHECK_RET(lysp_check_identifierchar((struct lysp_ctx *)ctx, c,
  ------------------
  |  |  206|  3.81M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  3.81M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.81M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  7.63M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 237k, False: 3.58M]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1.12k, False: 3.81M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  833|  3.81M|                    ctx->in->current - len == word_start ? 1 : 0, &prefix));
  834|  3.81M|        }
  835|   387k|        if (!ctx->in->current[0]) {
  ------------------
  |  Branch (835:13): [True: 3.77k, False: 384k]
  ------------------
  836|  3.77k|            LOGVAL_PARSER(ctx, LY_VCODE_EOF);
  ------------------
  |  |  129|  3.77k|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|  7.55k|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 3.77k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  3.77k|            return LY_EVALID;
  838|  3.77k|        }
  839|       |
  840|       |        /* prefix is mandatory for extension instances */
  841|   384k|        if (prefix != 2) {
  ------------------
  |  Branch (841:13): [True: 1.39k, False: 382k]
  ------------------
  842|  1.39k|            LOGVAL_PARSER(ctx, LY_VCODE_INSTREXP, (int)(ctx->in->current - word_start), word_start, "a keyword");
  ------------------
  |  |  129|  1.39k|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|  2.79k|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1.39k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  843|  1.39k|            return LY_EVALID;
  844|  1.39k|        }
  845|       |
  846|   382k|        *kw = LY_STMT_EXTENSION_INSTANCE;
  847|   382k|    }
  848|       |
  849|  21.9M|success:
  850|  21.9M|    if (word_p) {
  ------------------
  |  Branch (850:9): [True: 21.9M, False: 0]
  ------------------
  851|  21.9M|        *word_p = (char *)word_start;
  852|  21.9M|        *word_len = ctx->in->current - word_start;
  853|  21.9M|    }
  854|       |
  855|  21.9M|    return LY_SUCCESS;
  856|  9.40M|}
parse_when:
 1656|  2.18k|{
 1657|  2.18k|    LY_ERR ret = LY_SUCCESS;
 1658|  2.18k|    char *buf, *word;
 1659|  2.18k|    size_t word_len;
 1660|  2.18k|    enum ly_stmt kw;
 1661|  2.18k|    struct lysp_when *when;
 1662|  2.18k|    struct lysf_ctx fctx = {.ctx = PARSER_CTX(ctx)};
  ------------------
  |  |  128|  2.18k|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|  2.18k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 2.18k, False: 0]
  |  |  ------------------
  ------------------
 1663|       |
 1664|  2.18k|    if (*when_p) {
  ------------------
  |  Branch (1664:9): [True: 2, False: 2.18k]
  ------------------
 1665|      2|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "when");
  ------------------
  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|      2|        return LY_EVALID;
 1667|      2|    }
 1668|       |
 1669|  2.18k|    when = calloc(1, sizeof *when);
 1670|  2.18k|    LY_CHECK_ERR_GOTO(!when, LOGMEM(PARSER_CTX(ctx)); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|  2.18k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 2.18k]
  |  |  |  Branch (203:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1671|       |
 1672|       |    /* get value */
 1673|  2.18k|    LY_CHECK_GOTO(ret = get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len), cleanup);
  ------------------
  |  |  202|  2.18k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 17, False: 2.16k]
  |  |  ------------------
  ------------------
 1674|  2.16k|    CHECK_NONEMPTY(ctx, word_len, "when");
  ------------------
  |  |   96|  2.16k|    if (!VALUE_LEN) { \
  |  |  ------------------
  |  |  |  Branch (96:9): [True: 81, False: 2.08k]
  |  |  ------------------
  |  |   97|     81|        LOGWRN(PARSER_CTX(CTX), "Empty argument of %s statement does not make sense.", STMT); \
  |  |  ------------------
  |  |  |  |  155|    162|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (155:33): [True: 81, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|     81|    }
  ------------------
 1675|  2.16k|    INSERT_WORD_GOTO(ctx, buf, when->cond, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  2.16k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    240|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 120]
  |  |  |  |  |  Branch (202:40): [True: 120, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 120, False: 2.04k]
  |  |  ------------------
  |  |   51|  2.16k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  8.18k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 2.04k]
  |  |  |  |  |  Branch (202:40): [True: 2.04k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 1.96k, False: 81]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|       |
 1677|  4.55k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  2.16k|    ly_bool __loop_end = 0; \
  |  |   73|  2.16k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 17, False: 2.15k]
  |  |  ------------------
  |  |   74|     17|        goto ERR_LABEL; \
  |  |   75|     17|    } \
  |  |   76|  2.16k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 1.02k, False: 1.12k]
  |  |  ------------------
  |  |   77|  1.02k|        __loop_end = 1; \
  |  |   78|  1.12k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 5, False: 1.12k]
  |  |  ------------------
  |  |   79|      5|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      5|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     10|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 5, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      5|        RET = LY_EVALID; \
  |  |   81|      5|        goto ERR_LABEL; \
  |  |   82|  1.12k|    } else { \
  |  |   83|  1.12k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  1.12k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 5, False: 1.11k]
  |  |  |  |  ------------------
  |  |  |  |  100|      5|        goto ERR_LABEL; \
  |  |  |  |  101|      5|    } \
  |  |  |  |  102|  1.12k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 70, False: 1.04k]
  |  |  |  |  ------------------
  |  |  |  |  103|     70|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 70]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|     70|        __loop_end = 1; \
  |  |  |  |  107|     70|    }
  |  |  ------------------
  |  |   84|  1.11k|    } \
  |  |   85|  6.66k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 4.55k, False: 2.10k]
  |  |  ------------------
  ------------------
 1678|  4.55k|        switch (kw) {
 1679|    300|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (1679:9): [True: 300, False: 4.25k]
  ------------------
 1680|    300|            LY_CHECK_GOTO(ret = parse_text_field(ctx, when->dsc, LY_STMT_DESCRIPTION, 0, &when->dsc, Y_STR_ARG, &when->exts),
  ------------------
  |  |  202|    300|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 3, False: 297]
  |  |  ------------------
  ------------------
 1681|    300|                    cleanup);
 1682|    297|            break;
 1683|    594|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (1683:9): [True: 594, False: 3.96k]
  ------------------
 1684|    594|            LY_CHECK_GOTO(ret = parse_text_field(ctx, when->ref, LY_STMT_REFERENCE, 0, &when->ref, Y_STR_ARG, &when->exts),
  ------------------
  |  |  202|    594|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 2, False: 592]
  |  |  ------------------
  ------------------
 1685|    594|                    cleanup);
 1686|    592|            break;
 1687|  3.64k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1687:9): [True: 3.64k, False: 919]
  ------------------
 1688|  3.64k|            LY_CHECK_GOTO(ret = parse_ext(ctx, word, word_len, *when_p, LY_STMT_WHEN, 0, &when->exts), cleanup);
  ------------------
  |  |  202|  3.64k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 4, False: 3.63k]
  |  |  ------------------
  ------------------
 1689|  3.63k|            break;
 1690|     25|        default:
  ------------------
  |  Branch (1690:9): [True: 25, False: 4.53k]
  ------------------
 1691|     25|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "when");
  ------------------
  |  |  129|     25|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     50|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 25, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1692|     25|            ret = LY_EVALID;
 1693|     25|            goto cleanup;
 1694|  4.55k|        }
 1695|  9.04k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, when->exts, ret, cleanup);
  ------------------
  |  |   99|  4.52k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 4, False: 4.52k]
  |  |  ------------------
  |  |  100|      4|        goto ERR_LABEL; \
  |  |  101|      4|    } \
  |  |  102|  4.52k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 1.00k, False: 3.51k]
  |  |  ------------------
  |  |  103|  1.00k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 711, False: 296]
  |  |  |  Branch (103:21): [True: 0, False: 711]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  1.00k|        __loop_end = 1; \
  |  |  107|  1.00k|    }
  ------------------
 1696|  4.52k|    }
 1697|       |
 1698|  2.18k|cleanup:
 1699|  2.18k|    if (ret) {
  ------------------
  |  Branch (1699:9): [True: 82, False: 2.10k]
  ------------------
 1700|     82|        lysp_when_free(&fctx, when);
 1701|     82|        free(when);
 1702|  2.10k|    } else {
 1703|  2.10k|        *when_p = when;
 1704|  2.10k|    }
 1705|  2.18k|    return ret;
 1706|  4.29k|}
parse_any:
 1719|  9.94k|{
 1720|  9.94k|    LY_ERR ret = LY_SUCCESS;
 1721|  9.94k|    char *buf, *word;
 1722|  9.94k|    size_t word_len;
 1723|  9.94k|    struct lysp_node_anydata *any;
 1724|  9.94k|    enum ly_stmt kw;
 1725|       |
 1726|       |    /* create new structure and insert into siblings */
 1727|  9.94k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), siblings, any, next, LY_EMEM);
  ------------------
  |  |  285|  9.94k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|  9.94k|    { \
  |  |  |  |  266|  9.94k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|  9.94k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 9.94k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|  9.94k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|  9.94k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  9.94k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 4.05k, False: 5.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|  4.05k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|  5.89k|    } else { \
  |  |  |  |  |  |  245|  5.89k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|  5.89k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|   417k|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 411k, False: 5.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|   411k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|   411k|        } \
  |  |  |  |  |  |  250|  5.89k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|  5.89k|    }
  |  |  |  |  ------------------
  |  |  |  |  273|  9.94k|    }
  |  |  ------------------
  ------------------
 1728|       |
 1729|  9.94k|    any->nodetype = any_kw == LY_STMT_ANYDATA ? LYS_ANYDATA : LYS_ANYXML;
  ------------------
  |  |  246|      0|#define LYS_ANYDATA     0x0060    /**< anydata statement node, in tests it can be used for both #LYS_ANYXML and #LYS_ANYDATA */
  ------------------
                  any->nodetype = any_kw == LY_STMT_ANYDATA ? LYS_ANYDATA : LYS_ANYXML;
  ------------------
  |  |  245|  19.8k|#define LYS_ANYXML      0x0020    /**< anyxml statement node */
  ------------------
  |  Branch (1729:21): [True: 0, False: 9.94k]
  ------------------
 1730|  9.94k|    any->parent = parent;
 1731|       |
 1732|       |    /* get name */
 1733|  9.94k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  9.94k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  9.94k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  9.94k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  9.94k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 32, False: 9.91k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1734|  9.91k|    INSERT_WORD_GOTO(ctx, buf, any->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  9.91k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    132|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 66]
  |  |  |  |  |  Branch (202:40): [True: 66, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 66, False: 9.85k]
  |  |  ------------------
  |  |   51|  9.91k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  39.4k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 9.85k]
  |  |  |  |  |  Branch (202:40): [True: 9.85k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 9.85k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1735|       |
 1736|       |    /* parse substatements */
 1737|  19.7k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  9.91k|    ly_bool __loop_end = 0; \
  |  |   73|  9.91k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 19, False: 9.89k]
  |  |  ------------------
  |  |   74|     19|        goto ERR_LABEL; \
  |  |   75|     19|    } \
  |  |   76|  9.91k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 2.45k, False: 7.44k]
  |  |  ------------------
  |  |   77|  2.45k|        __loop_end = 1; \
  |  |   78|  7.44k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 8, False: 7.43k]
  |  |  ------------------
  |  |   79|      8|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      8|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     16|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 8, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      8|        RET = LY_EVALID; \
  |  |   81|      8|        goto ERR_LABEL; \
  |  |   82|  7.43k|    } else { \
  |  |   83|  7.43k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  7.43k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 21, False: 7.41k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|        goto ERR_LABEL; \
  |  |  |  |  101|     21|    } \
  |  |  |  |  102|  7.43k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 598, False: 6.81k]
  |  |  |  |  ------------------
  |  |  |  |  103|    598|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 598]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    598|        __loop_end = 1; \
  |  |  |  |  107|    598|    }
  |  |  ------------------
  |  |   84|  7.41k|    } \
  |  |   85|  20.8k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 11.1k, False: 9.67k]
  |  |  ------------------
  ------------------
 1738|  11.1k|        switch (kw) {
 1739|    168|        case LY_STMT_CONFIG:
  ------------------
  |  Branch (1739:9): [True: 168, False: 10.9k]
  ------------------
 1740|    168|            LY_CHECK_RET(parse_config(ctx, &any->flags, &any->exts));
  ------------------
  |  |  206|    168|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    168|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    168|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    168|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 163]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1741|    163|            break;
 1742|  1.11k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (1742:9): [True: 1.11k, False: 10.0k]
  ------------------
 1743|  1.11k|            LY_CHECK_RET(parse_text_field(ctx, any->dsc, LY_STMT_DESCRIPTION, 0, &any->dsc, Y_STR_ARG, &any->exts));
  ------------------
  |  |  206|  1.11k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.11k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.11k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.11k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 1.11k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1744|  1.11k|            break;
 1745|    756|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (1745:9): [True: 756, False: 10.3k]
  ------------------
 1746|    756|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &any->iffeatures, Y_STR_ARG, &any->exts));
  ------------------
  |  |  206|    756|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    756|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    756|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    756|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 6, False: 750]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1747|    750|            break;
 1748|  1.80k|        case LY_STMT_MANDATORY:
  ------------------
  |  Branch (1748:9): [True: 1.80k, False: 9.35k]
  ------------------
 1749|  1.80k|            LY_CHECK_RET(parse_mandatory(ctx, &any->flags, &any->exts));
  ------------------
  |  |  206|  1.80k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.80k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.80k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.80k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 25, False: 1.77k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1750|  1.77k|            break;
 1751|    361|        case LY_STMT_MUST:
  ------------------
  |  Branch (1751:9): [True: 361, False: 10.7k]
  ------------------
 1752|    361|            LY_CHECK_RET(parse_restrs(ctx, kw, &any->musts));
  ------------------
  |  |  206|    361|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    361|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    361|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    361|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 25, False: 336]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1753|    336|            break;
 1754|    228|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (1754:9): [True: 228, False: 10.9k]
  ------------------
 1755|    228|            LY_CHECK_RET(parse_text_field(ctx, any->ref, LY_STMT_REFERENCE, 0, &any->ref, Y_STR_ARG, &any->exts));
  ------------------
  |  |  206|    228|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    228|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    228|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    228|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 226]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1756|    226|            break;
 1757|  2.71k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (1757:9): [True: 2.71k, False: 8.43k]
  ------------------
 1758|  2.71k|            LY_CHECK_RET(parse_status(ctx, &any->flags, &any->exts));
  ------------------
  |  |  206|  2.71k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.71k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.71k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.71k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 22, False: 2.69k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1759|  2.69k|            break;
 1760|    981|        case LY_STMT_WHEN:
  ------------------
  |  Branch (1760:9): [True: 981, False: 10.1k]
  ------------------
 1761|    981|            LY_CHECK_RET(parse_when(ctx, &any->when));
  ------------------
  |  |  206|    981|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    981|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    981|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    981|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 12, False: 969]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1762|    969|            break;
 1763|  3.00k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1763:9): [True: 3.00k, False: 8.14k]
  ------------------
 1764|  3.00k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, any, any_kw, 0, &any->exts));
  ------------------
  |  |  206|  3.00k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  3.00k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.00k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  3.00k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 30, False: 2.97k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1765|  2.97k|            break;
 1766|     17|        default:
  ------------------
  |  Branch (1766:9): [True: 17, False: 11.1k]
  ------------------
 1767|     17|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(any_kw));
  ------------------
  |  |  129|     17|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     34|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 17, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1768|     17|            return LY_EVALID;
 1769|  11.1k|        }
 1770|  21.9k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, any->exts, ret, cleanup);
  ------------------
  |  |   99|  11.0k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 43, False: 10.9k]
  |  |  ------------------
  |  |  100|     43|        goto ERR_LABEL; \
  |  |  101|     43|    } \
  |  |  102|  11.0k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 6.62k, False: 4.33k]
  |  |  ------------------
  |  |  103|  6.62k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 2.62k, False: 4.00k]
  |  |  |  Branch (103:21): [True: 0, False: 2.62k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  6.62k|        __loop_end = 1; \
  |  |  107|  6.62k|    }
  ------------------
 1771|  10.9k|    }
 1772|       |
 1773|  9.77k|cleanup:
 1774|  9.77k|    return ret;
 1775|  19.7k|}
parse_type_enum_value_pos:
 1787|  48.7k|{
 1788|  48.7k|    LY_ERR ret = LY_SUCCESS;
 1789|  48.7k|    char *buf = NULL, *word, *ptr;
 1790|  48.7k|    size_t word_len;
 1791|  48.7k|    long long num = 0;
 1792|  48.7k|    unsigned long long unum = 0;
 1793|  48.7k|    enum ly_stmt kw;
 1794|       |
 1795|  48.7k|    if (enm->flags & LYS_SET_VALUE) {
  ------------------
  |  |  686|  48.7k|#define LYS_SET_VALUE    0x0200      /**< value attribute is set */
  ------------------
  |  Branch (1795:9): [True: 2, False: 48.7k]
  ------------------
 1796|      2|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyplg_ext_stmt2str(val_kw));
  ------------------
  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1797|      2|        ret = LY_EVALID;
 1798|      2|        goto cleanup;
 1799|      2|    }
 1800|  48.7k|    enm->flags |= LYS_SET_VALUE;
  ------------------
  |  |  686|  48.7k|#define LYS_SET_VALUE    0x0200      /**< value attribute is set */
  ------------------
 1801|       |
 1802|       |    /* get value */
 1803|  48.7k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  48.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  48.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  48.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  48.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 48.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1804|       |
 1805|  48.7k|    if (!word_len || (word[0] == '+') || ((word[0] == '0') && (word_len > 1)) || ((val_kw == LY_STMT_POSITION) && !strncmp(word, "-0", 2))) {
  ------------------
  |  Branch (1805:9): [True: 1, False: 48.7k]
  |  Branch (1805:22): [True: 1, False: 48.7k]
  |  Branch (1805:43): [True: 15.9k, False: 32.8k]
  |  Branch (1805:63): [True: 6, False: 15.9k]
  |  Branch (1805:83): [True: 4.05k, False: 44.7k]
  |  Branch (1805:115): [True: 1, False: 4.05k]
  ------------------
 1806|      9|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, lyplg_ext_stmt2str(val_kw));
  ------------------
  |  |  129|      9|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     18|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 9, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1807|      9|        ret = LY_EVALID;
 1808|      9|        goto cleanup;
 1809|      9|    }
 1810|       |
 1811|  48.7k|    errno = 0;
 1812|  48.7k|    if (val_kw == LY_STMT_VALUE) {
  ------------------
  |  Branch (1812:9): [True: 44.7k, False: 4.05k]
  ------------------
 1813|  44.7k|        num = strtoll(word, &ptr, LY_BASE_DEC);
  ------------------
  |  |  495|  44.7k|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
 1814|  44.7k|        if ((num < INT64_C(-2147483648)) || (num > INT64_C(2147483647))) {
  ------------------
  |  Branch (1814:13): [True: 36, False: 44.6k]
  |  Branch (1814:45): [True: 2, False: 44.6k]
  ------------------
 1815|     38|            LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, lyplg_ext_stmt2str(val_kw));
  ------------------
  |  |  129|     38|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     76|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 38, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1816|     38|            ret = LY_EVALID;
 1817|     38|            goto cleanup;
 1818|     38|        }
 1819|  44.7k|    } else {
 1820|  4.05k|        unum = strtoull(word, &ptr, LY_BASE_DEC);
  ------------------
  |  |  495|  4.05k|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
 1821|  4.05k|        if (unum > UINT64_C(4294967295)) {
  ------------------
  |  Branch (1821:13): [True: 45, False: 4.01k]
  ------------------
 1822|     45|            LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, lyplg_ext_stmt2str(val_kw));
  ------------------
  |  |  129|     45|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     90|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 45, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1823|     45|            ret = LY_EVALID;
 1824|     45|            goto cleanup;
 1825|     45|        }
 1826|  4.05k|    }
 1827|       |    /* we have not parsed the whole argument */
 1828|  48.6k|    if ((size_t)(ptr - word) != word_len) {
  ------------------
  |  Branch (1828:9): [True: 35, False: 48.6k]
  ------------------
 1829|     35|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, lyplg_ext_stmt2str(val_kw));
  ------------------
  |  |  129|     35|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     70|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 35, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1830|     35|        ret = LY_EVALID;
 1831|     35|        goto cleanup;
 1832|     35|    }
 1833|  48.6k|    if (errno == ERANGE) {
  ------------------
  |  Branch (1833:9): [True: 0, False: 48.6k]
  ------------------
 1834|      0|        LOGVAL_PARSER(ctx, LY_VCODE_OOB, word_len, word, lyplg_ext_stmt2str(val_kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1835|      0|        ret = LY_EVALID;
 1836|      0|        goto cleanup;
 1837|      0|    }
 1838|  48.6k|    if (val_kw == LY_STMT_VALUE) {
  ------------------
  |  Branch (1838:9): [True: 44.6k, False: 3.99k]
  ------------------
 1839|  44.6k|        enm->value = num;
 1840|  44.6k|    } else {
 1841|  3.99k|        enm->value = unum;
 1842|  3.99k|    }
 1843|       |
 1844|  97.2k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  48.6k|    ly_bool __loop_end = 0; \
  |  |   73|  48.6k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 5, False: 48.6k]
  |  |  ------------------
  |  |   74|      5|        goto ERR_LABEL; \
  |  |   75|      5|    } \
  |  |   76|  48.6k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 44.6k, False: 4.00k]
  |  |  ------------------
  |  |   77|  44.6k|        __loop_end = 1; \
  |  |   78|  44.6k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 3, False: 4.00k]
  |  |  ------------------
  |  |   79|      3|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      3|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      6|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      3|        RET = LY_EVALID; \
  |  |   81|      3|        goto ERR_LABEL; \
  |  |   82|  4.00k|    } else { \
  |  |   83|  4.00k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  4.00k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 32, False: 3.97k]
  |  |  |  |  ------------------
  |  |  |  |  100|     32|        goto ERR_LABEL; \
  |  |  |  |  101|     32|    } \
  |  |  |  |  102|  4.00k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 258, False: 3.71k]
  |  |  |  |  ------------------
  |  |  |  |  103|    258|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 258]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    258|        __loop_end = 1; \
  |  |  |  |  107|    258|    }
  |  |  ------------------
  |  |   84|  3.97k|    } \
  |  |   85|  52.7k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 4.15k, False: 48.5k]
  |  |  ------------------
  ------------------
 1845|  4.15k|        switch (kw) {
 1846|  4.14k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1846:9): [True: 4.14k, False: 11]
  ------------------
 1847|  4.14k|            ret = parse_ext(ctx, word, word_len, enm, val_kw, 0, &enm->exts);
 1848|  4.14k|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|  4.14k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 4, False: 4.14k]
  |  |  ------------------
  ------------------
 1849|  4.14k|            break;
 1850|     11|        default:
  ------------------
  |  Branch (1850:9): [True: 11, False: 4.14k]
  ------------------
 1851|     11|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(val_kw));
  ------------------
  |  |  129|     11|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     22|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 11, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1852|     11|            ret = LY_EVALID;
 1853|     11|            goto cleanup;
 1854|  4.15k|        }
 1855|  8.27k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|  4.14k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 9, False: 4.13k]
  |  |  ------------------
  |  |  100|      9|        goto ERR_LABEL; \
  |  |  101|      9|    } \
  |  |  102|  4.14k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 3.69k, False: 443]
  |  |  ------------------
  |  |  103|  3.69k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 3.69k]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  3.69k|        __loop_end = 1; \
  |  |  107|  3.69k|    }
  ------------------
 1856|  4.13k|    }
 1857|       |
 1858|  48.7k|cleanup:
 1859|  48.7k|    free(buf);
 1860|  48.7k|    return ret;
 1861|  97.2k|}
parse_leaf:
 2297|   356k|{
 2298|   356k|    LY_ERR ret = LY_SUCCESS;
 2299|   356k|    char *buf, *word;
 2300|   356k|    size_t word_len;
 2301|   356k|    enum ly_stmt kw;
 2302|   356k|    struct lysp_node_leaf *leaf;
 2303|       |
 2304|       |    /* create new leaf structure */
 2305|   356k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), siblings, leaf, next, LY_EMEM);
  ------------------
  |  |  285|   356k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|   356k|    { \
  |  |  |  |  266|   356k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|   356k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 356k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|   356k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|   356k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   356k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 176k, False: 180k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|   176k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|   180k|    } else { \
  |  |  |  |  |  |  245|   180k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|   180k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|   941k|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 761k, False: 180k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|   761k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|   761k|        } \
  |  |  |  |  |  |  250|   180k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|   180k|    }
  |  |  |  |  ------------------
  |  |  |  |  273|   356k|    }
  |  |  ------------------
  ------------------
 2306|   356k|    leaf->nodetype = LYS_LEAF;
  ------------------
  |  |  242|   356k|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
 2307|   356k|    leaf->parent = parent;
 2308|       |
 2309|       |    /* get name */
 2310|   356k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   356k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   356k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   356k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   356k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 18, False: 356k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2311|   356k|    INSERT_WORD_GOTO(ctx, buf, leaf->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|   356k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|      2|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  |  |  |  Branch (202:40): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 1, False: 356k]
  |  |  ------------------
  |  |   51|   356k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  1.42M|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 356k]
  |  |  |  |  |  Branch (202:40): [True: 356k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 356k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2312|       |
 2313|       |    /* parse substatements */
 2314|   951k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   356k|    ly_bool __loop_end = 0; \
  |  |   73|   356k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 12, False: 356k]
  |  |  ------------------
  |  |   74|     12|        goto ERR_LABEL; \
  |  |   75|     12|    } \
  |  |   76|   356k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 2, False: 356k]
  |  |  ------------------
  |  |   77|      2|        __loop_end = 1; \
  |  |   78|   356k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 10, False: 356k]
  |  |  ------------------
  |  |   79|     10|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|     10|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     20|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 10, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|     10|        RET = LY_EVALID; \
  |  |   81|     10|        goto ERR_LABEL; \
  |  |   82|   356k|    } else { \
  |  |   83|   356k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|   356k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 47, False: 356k]
  |  |  |  |  ------------------
  |  |  |  |  100|     47|        goto ERR_LABEL; \
  |  |  |  |  101|     47|    } \
  |  |  |  |  102|   356k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 3, False: 356k]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 3]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|      3|        __loop_end = 1; \
  |  |  |  |  107|      3|    }
  |  |  ------------------
  |  |   84|   356k|    } \
  |  |   85|  1.30M|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 951k, False: 353k]
  |  |  ------------------
  ------------------
 2315|   951k|        switch (kw) {
 2316|     81|        case LY_STMT_CONFIG:
  ------------------
  |  Branch (2316:9): [True: 81, False: 951k]
  ------------------
 2317|     81|            LY_CHECK_RET(parse_config(ctx, &leaf->flags, &leaf->exts));
  ------------------
  |  |  206|     81|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     81|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     81|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     81|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 73]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2318|     73|            break;
 2319|  14.0k|        case LY_STMT_DEFAULT:
  ------------------
  |  Branch (2319:9): [True: 14.0k, False: 937k]
  ------------------
 2320|  14.0k|            LY_CHECK_RET(parse_text_field(ctx, &leaf->dflt, LY_STMT_DEFAULT, 0, &leaf->dflt.str, Y_STR_ARG, &leaf->exts));
  ------------------
  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.0k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2321|  14.0k|            leaf->dflt.mod = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|  14.0k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 2322|  14.0k|            break;
 2323|   337k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (2323:9): [True: 337k, False: 614k]
  ------------------
 2324|   337k|            LY_CHECK_RET(parse_text_field(ctx, leaf->dsc, LY_STMT_DESCRIPTION, 0, &leaf->dsc, Y_STR_ARG, &leaf->exts));
  ------------------
  |  |  206|   337k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   337k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   337k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   337k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 337k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2325|   337k|            break;
 2326|  9.08k|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (2326:9): [True: 9.08k, False: 942k]
  ------------------
 2327|  9.08k|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &leaf->iffeatures, Y_STR_ARG, &leaf->exts));
  ------------------
  |  |  206|  9.08k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  9.08k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  9.08k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  9.08k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 9, False: 9.07k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2328|  9.07k|            break;
 2329|   140k|        case LY_STMT_MANDATORY:
  ------------------
  |  Branch (2329:9): [True: 140k, False: 811k]
  ------------------
 2330|   140k|            LY_CHECK_RET(parse_mandatory(ctx, &leaf->flags, &leaf->exts));
  ------------------
  |  |  206|   140k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   140k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   140k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   140k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 13, False: 140k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2331|   140k|            break;
 2332|    679|        case LY_STMT_MUST:
  ------------------
  |  Branch (2332:9): [True: 679, False: 950k]
  ------------------
 2333|    679|            LY_CHECK_RET(parse_restrs(ctx, kw, &leaf->musts));
  ------------------
  |  |  206|    679|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    679|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    679|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    679|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 52, False: 627]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2334|    627|            break;
 2335|     35|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (2335:9): [True: 35, False: 951k]
  ------------------
 2336|     35|            LY_CHECK_RET(parse_text_field(ctx, leaf->ref, LY_STMT_REFERENCE, 0, &leaf->ref, Y_STR_ARG, &leaf->exts));
  ------------------
  |  |  206|     35|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     35|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     35|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     35|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 34]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2337|     34|            break;
 2338|  84.3k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (2338:9): [True: 84.3k, False: 867k]
  ------------------
 2339|  84.3k|            LY_CHECK_RET(parse_status(ctx, &leaf->flags, &leaf->exts));
  ------------------
  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  84.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  84.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 29, False: 84.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2340|  84.3k|            break;
 2341|   356k|        case LY_STMT_TYPE:
  ------------------
  |  Branch (2341:9): [True: 356k, False: 595k]
  ------------------
 2342|   356k|            LY_CHECK_RET(parse_type(ctx, &leaf->type));
  ------------------
  |  |  206|   356k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   356k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   356k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   356k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3.33k, False: 353k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2343|   353k|            break;
 2344|  4.97k|        case LY_STMT_UNITS:
  ------------------
  |  Branch (2344:9): [True: 4.97k, False: 946k]
  ------------------
 2345|  4.97k|            LY_CHECK_RET(parse_text_field(ctx, leaf->units, LY_STMT_UNITS, 0, &leaf->units, Y_STR_ARG, &leaf->exts));
  ------------------
  |  |  206|  4.97k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  4.97k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  4.97k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  4.97k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 4.96k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2346|  4.96k|            break;
 2347|     24|        case LY_STMT_WHEN:
  ------------------
  |  Branch (2347:9): [True: 24, False: 951k]
  ------------------
 2348|     24|            LY_CHECK_RET(parse_when(ctx, &leaf->when));
  ------------------
  |  |  206|     24|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     24|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     24|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     24|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 22]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2349|     22|            break;
 2350|  3.85k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2350:9): [True: 3.85k, False: 947k]
  ------------------
 2351|  3.85k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, leaf, LY_STMT_LEAF, 0, &leaf->exts));
  ------------------
  |  |  206|  3.85k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  3.85k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.85k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  3.85k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 11, False: 3.84k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2352|  3.84k|            break;
 2353|     37|        default:
  ------------------
  |  Branch (2353:9): [True: 37, False: 951k]
  ------------------
 2354|     37|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "leaf");
  ------------------
  |  |  129|     37|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     74|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 37, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2355|     37|            return LY_EVALID;
 2356|   951k|        }
 2357|  1.89M|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, leaf->exts, ret, cleanup);
  ------------------
  |  |   99|   948k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 74, False: 948k]
  |  |  ------------------
  |  |  100|     74|        goto ERR_LABEL; \
  |  |  101|     74|    } \
  |  |  102|   948k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 353k, False: 594k]
  |  |  ------------------
  |  |  103|   353k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 210, False: 352k]
  |  |  |  Branch (103:21): [True: 0, False: 210]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|   353k|        __loop_end = 1; \
  |  |  107|   353k|    }
  ------------------
 2358|   948k|    }
 2359|       |
 2360|       |    /* mandatory substatements */
 2361|   353k|    if (!leaf->type.name) {
  ------------------
  |  Branch (2361:9): [True: 9, False: 353k]
  ------------------
 2362|      9|        LOGVAL_PARSER(ctx, LY_VCODE_MISSTMT, "type", "leaf");
  ------------------
  |  |  129|      9|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     18|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 9, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2363|      9|        return LY_EVALID;
 2364|      9|    }
 2365|       |
 2366|   353k|cleanup:
 2367|   353k|    return ret;
 2368|   353k|}
parse_maxelements:
 2381|  3.22k|{
 2382|  3.22k|    LY_ERR ret = LY_SUCCESS;
 2383|  3.22k|    char *buf = NULL, *word, *ptr;
 2384|  3.22k|    size_t word_len;
 2385|  3.22k|    unsigned long long num;
 2386|  3.22k|    enum ly_stmt kw;
 2387|       |
 2388|  3.22k|    if (*flags & LYS_SET_MAX) {
  ------------------
  |  |  688|  3.22k|#define LYS_SET_MAX      0x0400      /**< max attribute is set */
  ------------------
  |  Branch (2388:9): [True: 1, False: 3.22k]
  ------------------
 2389|      1|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "max-elements");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2390|      1|        return LY_EVALID;
 2391|      1|    }
 2392|  3.22k|    *flags |= LYS_SET_MAX;
  ------------------
  |  |  688|  3.22k|#define LYS_SET_MAX      0x0400      /**< max attribute is set */
  ------------------
 2393|       |
 2394|       |    /* get value */
 2395|  3.22k|    LY_CHECK_GOTO(ret = get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len), cleanup);
  ------------------
  |  |  202|  3.22k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 4, False: 3.21k]
  |  |  ------------------
  ------------------
 2396|       |
 2397|  3.21k|    if (!word_len || (word[0] == '0') || ((word[0] != 'u') && !isdigit(word[0]))) {
  ------------------
  |  Branch (2397:9): [True: 1, False: 3.21k]
  |  Branch (2397:22): [True: 1, False: 3.21k]
  |  Branch (2397:43): [True: 3.18k, False: 35]
  |  Branch (2397:63): [True: 8, False: 3.17k]
  ------------------
 2398|     10|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "max-elements");
  ------------------
  |  |  129|     10|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     20|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2399|     10|        ret = LY_EVALID;
 2400|     10|        goto cleanup;
 2401|     10|    }
 2402|       |
 2403|  3.20k|    if (ly_strncmp("unbounded", word, word_len)) {
  ------------------
  |  Branch (2403:9): [True: 3.20k, False: 1]
  ------------------
 2404|  3.20k|        errno = 0;
 2405|  3.20k|        num = strtoull(word, &ptr, LY_BASE_DEC);
  ------------------
  |  |  495|  3.20k|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
 2406|       |        /* we have not parsed the whole argument */
 2407|  3.20k|        if ((size_t)(ptr - word) != word_len) {
  ------------------
  |  Branch (2407:13): [True: 48, False: 3.15k]
  ------------------
 2408|     48|            LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "max-elements");
  ------------------
  |  |  129|     48|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     96|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 48, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2409|     48|            ret = LY_EVALID;
 2410|     48|            goto cleanup;
 2411|     48|        }
 2412|  3.15k|        if ((errno == ERANGE) || (num > UINT32_MAX)) {
  ------------------
  |  Branch (2412:13): [True: 1, False: 3.15k]
  |  Branch (2412:34): [True: 32, False: 3.12k]
  ------------------
 2413|     33|            LOGVAL_PARSER(ctx, LY_VCODE_OOB, word_len, word, "max-elements");
  ------------------
  |  |  129|     33|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     66|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 33, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2414|     33|            ret = LY_EVALID;
 2415|     33|            goto cleanup;
 2416|     33|        }
 2417|       |
 2418|  3.12k|        *max = num;
 2419|  3.12k|    } else {
 2420|       |        /* unbounded */
 2421|      1|        *max = 0;
 2422|      1|    }
 2423|       |
 2424|  9.32k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  3.12k|    ly_bool __loop_end = 0; \
  |  |   73|  3.12k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 27, False: 3.10k]
  |  |  ------------------
  |  |   74|     27|        goto ERR_LABEL; \
  |  |   75|     27|    } \
  |  |   76|  3.12k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 20, False: 3.08k]
  |  |  ------------------
  |  |   77|     20|        __loop_end = 1; \
  |  |   78|  3.08k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 2, False: 3.07k]
  |  |  ------------------
  |  |   79|      2|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      2|        RET = LY_EVALID; \
  |  |   81|      2|        goto ERR_LABEL; \
  |  |   82|  3.07k|    } else { \
  |  |   83|  3.07k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  3.07k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 3, False: 3.07k]
  |  |  |  |  ------------------
  |  |  |  |  100|      3|        goto ERR_LABEL; \
  |  |  |  |  101|      3|    } \
  |  |  |  |  102|  3.07k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 3.05k, False: 25]
  |  |  |  |  ------------------
  |  |  |  |  103|  3.05k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 3.05k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  3.05k|        __loop_end = 1; \
  |  |  |  |  107|  3.05k|    }
  |  |  ------------------
  |  |   84|  3.07k|    } \
  |  |   85|  3.31k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 237, False: 3.07k]
  |  |  ------------------
  ------------------
 2425|    237|        switch (kw) {
 2426|    229|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2426:9): [True: 229, False: 8]
  ------------------
 2427|    229|            LY_CHECK_GOTO(ret = parse_ext(ctx, word, word_len, max, LY_STMT_MAX_ELEMENTS, 0, exts), cleanup);
  ------------------
  |  |  202|    229|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 1, False: 228]
  |  |  ------------------
  ------------------
 2428|    228|            break;
 2429|      8|        default:
  ------------------
  |  Branch (2429:9): [True: 8, False: 229]
  ------------------
 2430|      8|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "max-elements");
  ------------------
  |  |  129|      8|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     16|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 8, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2431|      8|            ret = LY_EVALID;
 2432|      8|            goto cleanup;
 2433|    237|        }
 2434|    449|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    228|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 7, False: 221]
  |  |  ------------------
  |  |  100|      7|        goto ERR_LABEL; \
  |  |  101|      7|    } \
  |  |  102|    228|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 9, False: 212]
  |  |  ------------------
  |  |  103|      9|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 9]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|      9|        __loop_end = 1; \
  |  |  107|      9|    }
  ------------------
 2435|    221|    }
 2436|       |
 2437|  3.22k|cleanup:
 2438|  3.22k|    free(buf);
 2439|  3.22k|    return ret;
 2440|  9.32k|}
parse_minelements:
 2453|    752|{
 2454|    752|    LY_ERR ret = LY_SUCCESS;
 2455|    752|    char *buf = NULL, *word, *ptr;
 2456|    752|    size_t word_len;
 2457|    752|    unsigned long long num;
 2458|    752|    enum ly_stmt kw;
 2459|       |
 2460|    752|    if (*flags & LYS_SET_MIN) {
  ------------------
  |  |  687|    752|#define LYS_SET_MIN      0x0200      /**< min attribute is set */
  ------------------
  |  Branch (2460:9): [True: 1, False: 751]
  ------------------
 2461|      1|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "min-elements");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2462|      1|        return LY_EVALID;
 2463|      1|    }
 2464|    751|    *flags |= LYS_SET_MIN;
  ------------------
  |  |  687|    751|#define LYS_SET_MIN      0x0200      /**< min attribute is set */
  ------------------
 2465|       |
 2466|       |    /* get value */
 2467|    751|    LY_CHECK_GOTO(ret = get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len), cleanup);
  ------------------
  |  |  202|    751|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 4, False: 747]
  |  |  ------------------
  ------------------
 2468|       |
 2469|    747|    if (!word_len || !isdigit(word[0]) || ((word[0] == '0') && (word_len > 1))) {
  ------------------
  |  Branch (2469:9): [True: 1, False: 746]
  |  Branch (2469:22): [True: 2, False: 744]
  |  Branch (2469:44): [True: 453, False: 291]
  |  Branch (2469:64): [True: 4, False: 449]
  ------------------
 2470|      7|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "min-elements");
  ------------------
  |  |  129|      7|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     14|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 7, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2471|      7|        ret = LY_EVALID;
 2472|      7|        goto cleanup;
 2473|      7|    }
 2474|       |
 2475|    740|    errno = 0;
 2476|    740|    num = strtoull(word, &ptr, LY_BASE_DEC);
  ------------------
  |  |  495|    740|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
 2477|       |    /* we have not parsed the whole argument */
 2478|    740|    if ((size_t)(ptr - word) != word_len) {
  ------------------
  |  Branch (2478:9): [True: 18, False: 722]
  ------------------
 2479|     18|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "min-elements");
  ------------------
  |  |  129|     18|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     36|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 18, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2480|     18|        ret = LY_EVALID;
 2481|     18|        goto cleanup;
 2482|     18|    }
 2483|    722|    if ((errno == ERANGE) || (num > UINT32_MAX)) {
  ------------------
  |  Branch (2483:9): [True: 1, False: 721]
  |  Branch (2483:30): [True: 34, False: 687]
  ------------------
 2484|     35|        LOGVAL_PARSER(ctx, LY_VCODE_OOB, word_len, word, "min-elements");
  ------------------
  |  |  129|     35|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     70|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 35, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2485|     35|        ret = LY_EVALID;
 2486|     35|        goto cleanup;
 2487|     35|    }
 2488|    687|    *min = num;
 2489|       |
 2490|  1.33k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|    687|    ly_bool __loop_end = 0; \
  |  |   73|    687|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 18, False: 669]
  |  |  ------------------
  |  |   74|     18|        goto ERR_LABEL; \
  |  |   75|     18|    } \
  |  |   76|    687|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 128, False: 541]
  |  |  ------------------
  |  |   77|    128|        __loop_end = 1; \
  |  |   78|    541|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 5, False: 536]
  |  |  ------------------
  |  |   79|      5|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      5|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     10|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 5, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      5|        RET = LY_EVALID; \
  |  |   81|      5|        goto ERR_LABEL; \
  |  |   82|    536|    } else { \
  |  |   83|    536|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|    536|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 3, False: 533]
  |  |  |  |  ------------------
  |  |  |  |  100|      3|        goto ERR_LABEL; \
  |  |  |  |  101|      3|    } \
  |  |  |  |  102|    536|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 394, False: 139]
  |  |  |  |  ------------------
  |  |  |  |  103|    394|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 394]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    394|        __loop_end = 1; \
  |  |  |  |  107|    394|    }
  |  |  ------------------
  |  |   84|    533|    } \
  |  |   85|  1.00k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 362, False: 646]
  |  |  ------------------
  ------------------
 2491|    362|        switch (kw) {
 2492|    355|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2492:9): [True: 355, False: 7]
  ------------------
 2493|    355|            LY_CHECK_GOTO(ret = parse_ext(ctx, word, word_len, min, LY_STMT_MIN_ELEMENTS, 0, exts), cleanup);
  ------------------
  |  |  202|    355|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 1, False: 354]
  |  |  ------------------
  ------------------
 2494|    354|            break;
 2495|      7|        default:
  ------------------
  |  Branch (2495:9): [True: 7, False: 355]
  ------------------
 2496|      7|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "min-elements");
  ------------------
  |  |  129|      7|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     14|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 7, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2497|      7|            ret = LY_EVALID;
 2498|      7|            goto cleanup;
 2499|    362|        }
 2500|    701|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    354|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 7, False: 347]
  |  |  ------------------
  |  |  100|      7|        goto ERR_LABEL; \
  |  |  101|      7|    } \
  |  |  102|    354|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 124, False: 223]
  |  |  ------------------
  |  |  103|    124|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 124]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|    124|        __loop_end = 1; \
  |  |  107|    124|    }
  ------------------
 2501|    347|    }
 2502|       |
 2503|    751|cleanup:
 2504|    751|    free(buf);
 2505|    751|    return ret;
 2506|  1.33k|}
parse_leaflist:
 2569|  94.2k|{
 2570|  94.2k|    LY_ERR ret = LY_SUCCESS;
 2571|  94.2k|    char *buf, *word;
 2572|  94.2k|    size_t word_len;
 2573|  94.2k|    enum ly_stmt kw;
 2574|  94.2k|    struct lysp_node_leaflist *llist;
 2575|       |
 2576|       |    /* create new leaf-list structure */
 2577|  94.2k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), siblings, llist, next, LY_EMEM);
  ------------------
  |  |  285|  94.2k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|  94.2k|    { \
  |  |  |  |  266|  94.2k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|  94.2k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 94.2k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|  94.2k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|  94.2k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  94.2k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 43.3k, False: 50.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|  43.3k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|  50.9k|    } else { \
  |  |  |  |  |  |  245|  50.9k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|  50.9k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|   576k|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 525k, False: 50.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|   525k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|   525k|        } \
  |  |  |  |  |  |  250|  50.9k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|  50.9k|    }
  |  |  |  |  ------------------
  |  |  |  |  273|  94.2k|    }
  |  |  ------------------
  ------------------
 2578|  94.2k|    llist->nodetype = LYS_LEAFLIST;
  ------------------
  |  |  243|  94.2k|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
 2579|  94.2k|    llist->parent = parent;
 2580|       |
 2581|       |    /* get name */
 2582|  94.2k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  94.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  94.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  94.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  94.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 23, False: 94.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2583|  94.2k|    INSERT_WORD_GOTO(ctx, buf, llist->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  94.2k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|      2|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  |  |  |  Branch (202:40): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 1, False: 94.2k]
  |  |  ------------------
  |  |   51|  94.2k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   377k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 94.2k]
  |  |  |  |  |  Branch (202:40): [True: 94.2k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 94.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2584|       |
 2585|       |    /* parse substatements */
 2586|   203k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  94.2k|    ly_bool __loop_end = 0; \
  |  |   73|  94.2k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 5, False: 94.2k]
  |  |  ------------------
  |  |   74|      5|        goto ERR_LABEL; \
  |  |   75|      5|    } \
  |  |   76|  94.2k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 3, False: 94.2k]
  |  |  ------------------
  |  |   77|      3|        __loop_end = 1; \
  |  |   78|  94.2k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 8, False: 94.2k]
  |  |  ------------------
  |  |   79|      8|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      8|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     16|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 8, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      8|        RET = LY_EVALID; \
  |  |   81|      8|        goto ERR_LABEL; \
  |  |   82|  94.2k|    } else { \
  |  |   83|  94.2k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  94.2k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 26, False: 94.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     26|        goto ERR_LABEL; \
  |  |  |  |  101|     26|    } \
  |  |  |  |  102|  94.2k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 2, False: 94.2k]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 2]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|      2|        __loop_end = 1; \
  |  |  |  |  107|      2|    }
  |  |  ------------------
  |  |   84|  94.2k|    } \
  |  |   85|   297k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 203k, False: 94.0k]
  |  |  ------------------
  ------------------
 2587|   203k|        switch (kw) {
 2588|    203|        case LY_STMT_CONFIG:
  ------------------
  |  Branch (2588:9): [True: 203, False: 203k]
  ------------------
 2589|    203|            LY_CHECK_RET(parse_config(ctx, &llist->flags, &llist->exts));
  ------------------
  |  |  206|    203|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    203|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    203|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    203|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 198]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2590|    198|            break;
 2591|      1|        case LY_STMT_DEFAULT:
  ------------------
  |  Branch (2591:9): [True: 1, False: 203k]
  ------------------
 2592|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "default", "leaf-list");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 2593|      0|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_DEFAULT, &llist->dflts, Y_STR_ARG, &llist->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2594|      0|            break;
 2595|  84.3k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (2595:9): [True: 84.3k, False: 118k]
  ------------------
 2596|  84.3k|            LY_CHECK_RET(parse_text_field(ctx, llist->dsc, LY_STMT_DESCRIPTION, 0, &llist->dsc, Y_STR_ARG, &llist->exts));
  ------------------
  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  84.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  84.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 84.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2597|  84.3k|            break;
 2598|    203|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (2598:9): [True: 203, False: 203k]
  ------------------
 2599|    203|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &llist->iffeatures, Y_STR_ARG, &llist->exts));
  ------------------
  |  |  206|    203|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    203|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    203|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    203|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 200]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2600|    200|            break;
 2601|    676|        case LY_STMT_MAX_ELEMENTS:
  ------------------
  |  Branch (2601:9): [True: 676, False: 202k]
  ------------------
 2602|    676|            LY_CHECK_RET(parse_maxelements(ctx, &llist->max, &llist->flags, &llist->exts));
  ------------------
  |  |  206|    676|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    676|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    676|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    676|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 11, False: 665]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2603|    665|            break;
 2604|    373|        case LY_STMT_MIN_ELEMENTS:
  ------------------
  |  Branch (2604:9): [True: 373, False: 202k]
  ------------------
 2605|    373|            LY_CHECK_RET(parse_minelements(ctx, &llist->min, &llist->flags, &llist->exts));
  ------------------
  |  |  206|    373|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    373|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    373|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    373|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 371]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2606|    371|            break;
 2607|  5.12k|        case LY_STMT_MUST:
  ------------------
  |  Branch (2607:9): [True: 5.12k, False: 198k]
  ------------------
 2608|  5.12k|            LY_CHECK_RET(parse_restrs(ctx, kw, &llist->musts));
  ------------------
  |  |  206|  5.12k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  5.12k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  5.12k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  5.12k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 5.11k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2609|  5.11k|            break;
 2610|     86|        case LY_STMT_ORDERED_BY:
  ------------------
  |  Branch (2610:9): [True: 86, False: 203k]
  ------------------
 2611|     86|            LY_CHECK_RET(parse_orderedby(ctx, &llist->node));
  ------------------
  |  |  206|     86|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     86|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     86|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     86|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 78]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2612|     78|            break;
 2613|  1.38k|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (2613:9): [True: 1.38k, False: 201k]
  ------------------
 2614|  1.38k|            LY_CHECK_RET(parse_text_field(ctx, llist->ref, LY_STMT_REFERENCE, 0, &llist->ref, Y_STR_ARG, &llist->exts));
  ------------------
  |  |  206|  1.38k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.38k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.38k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.38k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 1.38k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2615|  1.38k|            break;
 2616|  14.0k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (2616:9): [True: 14.0k, False: 189k]
  ------------------
 2617|  14.0k|            LY_CHECK_RET(parse_status(ctx, &llist->flags, &llist->exts));
  ------------------
  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.0k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2618|  14.0k|            break;
 2619|  94.1k|        case LY_STMT_TYPE:
  ------------------
  |  Branch (2619:9): [True: 94.1k, False: 109k]
  ------------------
 2620|  94.1k|            LY_CHECK_RET(parse_type(ctx, &llist->type));
  ------------------
  |  |  206|  94.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  94.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  94.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  94.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 18, False: 94.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2621|  94.1k|            break;
 2622|    213|        case LY_STMT_UNITS:
  ------------------
  |  Branch (2622:9): [True: 213, False: 203k]
  ------------------
 2623|    213|            LY_CHECK_RET(parse_text_field(ctx, llist->units, LY_STMT_UNITS, 0, &llist->units, Y_STR_ARG, &llist->exts));
  ------------------
  |  |  206|    213|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    213|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    213|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    213|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 211]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2624|    211|            break;
 2625|    159|        case LY_STMT_WHEN:
  ------------------
  |  Branch (2625:9): [True: 159, False: 203k]
  ------------------
 2626|    159|            LY_CHECK_RET(parse_when(ctx, &llist->when));
  ------------------
  |  |  206|    159|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    159|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    159|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    159|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 7, False: 152]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2627|    152|            break;
 2628|  2.33k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2628:9): [True: 2.33k, False: 201k]
  ------------------
 2629|  2.33k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, llist, LY_STMT_LEAF_LIST, 0, &llist->exts));
  ------------------
  |  |  206|  2.33k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.33k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.33k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.33k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 24, False: 2.30k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2630|  2.30k|            break;
 2631|     17|        default:
  ------------------
  |  Branch (2631:9): [True: 17, False: 203k]
  ------------------
 2632|     17|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "llist");
  ------------------
  |  |  129|     17|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     34|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 17, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2633|     17|            return LY_EVALID;
 2634|   203k|        }
 2635|   406k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, llist->exts, ret, cleanup);
  ------------------
  |  |   99|   203k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 57, False: 203k]
  |  |  ------------------
  |  |  100|     57|        goto ERR_LABEL; \
  |  |  101|     57|    } \
  |  |  102|   203k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 94.0k, False: 109k]
  |  |  ------------------
  |  |  103|  94.0k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 1.41k, False: 92.6k]
  |  |  |  Branch (103:21): [True: 0, False: 1.41k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  94.0k|        __loop_end = 1; \
  |  |  107|  94.0k|    }
  ------------------
 2636|   203k|    }
 2637|       |
 2638|       |    /* mandatory substatements */
 2639|  94.0k|    if (!llist->type.name) {
  ------------------
  |  Branch (2639:9): [True: 8, False: 94.0k]
  ------------------
 2640|      8|        LOGVAL_PARSER(ctx, LY_VCODE_MISSTMT, "type", "leaf-list");
  ------------------
  |  |  129|      8|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     16|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 8, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2641|      8|        return LY_EVALID;
 2642|      8|    }
 2643|       |
 2644|  94.1k|cleanup:
 2645|  94.1k|    return ret;
 2646|  94.0k|}
parse_action:
 2881|  15.5k|{
 2882|  15.5k|    LY_ERR ret = LY_SUCCESS;
 2883|  15.5k|    char *buf, *word;
 2884|  15.5k|    size_t word_len;
 2885|  15.5k|    enum ly_stmt kw;
 2886|  15.5k|    struct lysp_node_action *act;
 2887|       |
 2888|  15.5k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), actions, act, next, LY_EMEM);
  ------------------
  |  |  285|  15.5k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|  15.5k|    { \
  |  |  |  |  266|  15.5k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|  15.5k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 15.5k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|  15.5k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|  15.5k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  15.5k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 509, False: 14.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|    509|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|  14.9k|    } else { \
  |  |  |  |  |  |  245|  14.9k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|  14.9k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|  2.13M|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 2.11M, False: 14.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|  2.11M|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|  2.11M|        } \
  |  |  |  |  |  |  250|  14.9k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|  14.9k|    }
  |  |  |  |  ------------------
  |  |  |  |  273|  15.5k|    }
  |  |  ------------------
  ------------------
 2889|       |
 2890|       |    /* get value */
 2891|  15.5k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  15.5k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  15.5k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  15.5k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  15.5k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 37, False: 15.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2892|  15.4k|    INSERT_WORD_GOTO(ctx, buf, act->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  15.4k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    428|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 214]
  |  |  |  |  |  Branch (202:40): [True: 214, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 214, False: 15.2k]
  |  |  ------------------
  |  |   51|  15.4k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  61.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 15.2k]
  |  |  |  |  |  Branch (202:40): [True: 15.2k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 15.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2893|  15.4k|    act->nodetype = parent ? LYS_ACTION : LYS_RPC;
  ------------------
  |  |  250|      0|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
                  act->nodetype = parent ? LYS_ACTION : LYS_RPC;
  ------------------
  |  |  249|  30.9k|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
  |  Branch (2893:21): [True: 0, False: 15.4k]
  ------------------
 2894|  15.4k|    act->parent = parent;
 2895|       |
 2896|  30.8k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  15.4k|    ly_bool __loop_end = 0; \
  |  |   73|  15.4k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 10, False: 15.4k]
  |  |  ------------------
  |  |   74|     10|        goto ERR_LABEL; \
  |  |   75|     10|    } \
  |  |   76|  15.4k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 2.82k, False: 12.6k]
  |  |  ------------------
  |  |   77|  2.82k|        __loop_end = 1; \
  |  |   78|  12.6k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 6, False: 12.6k]
  |  |  ------------------
  |  |   79|      6|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      6|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     12|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 6, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      6|        RET = LY_EVALID; \
  |  |   81|      6|        goto ERR_LABEL; \
  |  |   82|  12.6k|    } else { \
  |  |   83|  12.6k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  12.6k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 26, False: 12.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|     26|        goto ERR_LABEL; \
  |  |  |  |  101|     26|    } \
  |  |  |  |  102|  12.6k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 1.61k, False: 10.9k]
  |  |  |  |  ------------------
  |  |  |  |  103|  1.61k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 1.61k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  1.61k|        __loop_end = 1; \
  |  |  |  |  107|  1.61k|    }
  |  |  ------------------
  |  |   84|  12.6k|    } \
  |  |   85|  27.7k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 12.6k, False: 15.0k]
  |  |  ------------------
  ------------------
 2897|  12.6k|        switch (kw) {
 2898|     22|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (2898:9): [True: 22, False: 12.6k]
  ------------------
 2899|     22|            LY_CHECK_RET(parse_text_field(ctx, act->dsc, LY_STMT_DESCRIPTION, 0, &act->dsc, Y_STR_ARG, &act->exts));
  ------------------
  |  |  206|     22|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     22|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     22|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     22|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 21]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2900|     21|            break;
 2901|    216|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (2901:9): [True: 216, False: 12.4k]
  ------------------
 2902|    216|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &act->iffeatures, Y_STR_ARG, &act->exts));
  ------------------
  |  |  206|    216|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    216|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    216|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    216|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 211]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2903|    211|            break;
 2904|    661|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (2904:9): [True: 661, False: 12.0k]
  ------------------
 2905|    661|            LY_CHECK_RET(parse_text_field(ctx, act->ref, LY_STMT_REFERENCE, 0, &act->ref, Y_STR_ARG, &act->exts));
  ------------------
  |  |  206|    661|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    661|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    661|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    661|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 659]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2906|    659|            break;
 2907|     63|        case LY_STMT_STATUS:
  ------------------
  |  Branch (2907:9): [True: 63, False: 12.6k]
  ------------------
 2908|     63|            LY_CHECK_RET(parse_status(ctx, &act->flags, &act->exts));
  ------------------
  |  |  206|     63|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     63|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     63|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     63|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 45, False: 18]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2909|     18|            break;
 2910|       |
 2911|  3.92k|        case LY_STMT_INPUT:
  ------------------
  |  Branch (2911:9): [True: 3.92k, False: 8.76k]
  ------------------
 2912|  3.92k|            LY_CHECK_RET(parse_inout(ctx, kw, (struct lysp_node *)act, &act->input));
  ------------------
  |  |  206|  3.92k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  3.92k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.92k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  3.92k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 152, False: 3.77k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2913|  3.77k|            break;
 2914|     21|        case LY_STMT_OUTPUT:
  ------------------
  |  Branch (2914:9): [True: 21, False: 12.6k]
  ------------------
 2915|     21|            LY_CHECK_RET(parse_inout(ctx, kw, (struct lysp_node *)act, &act->output));
  ------------------
  |  |  206|     21|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     21|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     21|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     21|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 13, False: 8]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2916|      8|            break;
 2917|       |
 2918|    366|        case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (2918:9): [True: 366, False: 12.3k]
  ------------------
 2919|    366|            LY_CHECK_RET(parse_typedef(ctx, (struct lysp_node *)act, &act->typedefs));
  ------------------
  |  |  206|    366|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    366|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    366|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    366|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 9, False: 357]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2920|    357|            break;
 2921|    509|        case LY_STMT_GROUPING:
  ------------------
  |  Branch (2921:9): [True: 509, False: 12.1k]
  ------------------
 2922|    509|            LY_CHECK_RET(parse_grouping(ctx, (struct lysp_node *)act, &act->groupings));
  ------------------
  |  |  206|    509|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    509|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    509|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    509|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 21, False: 488]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2923|    488|            break;
 2924|  6.87k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2924:9): [True: 6.87k, False: 5.81k]
  ------------------
 2925|  6.87k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, act, parent ? LY_STMT_ACTION : LY_STMT_RPC, 0, &act->exts));
  ------------------
  |  |  206|  6.87k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  6.87k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  6.87k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  13.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 0, False: 6.87k]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 7, False: 6.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2926|  6.87k|            break;
 2927|     29|        default:
  ------------------
  |  Branch (2927:9): [True: 29, False: 12.6k]
  ------------------
 2928|     29|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), parent ? "action" : "rpc");
  ------------------
  |  |  129|     29|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     58|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 29, False: 0]
  |  |  |  |  |  Branch (178:45): [True: 0, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2929|     29|            return LY_EVALID;
 2930|  12.6k|        }
 2931|  24.7k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, act->exts, ret, cleanup);
  ------------------
  |  |   99|  12.4k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 43, False: 12.3k]
  |  |  ------------------
  |  |  100|     43|        goto ERR_LABEL; \
  |  |  101|     43|    } \
  |  |  102|  12.4k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 10.6k, False: 1.71k]
  |  |  ------------------
  |  |  103|  10.6k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 6.15k, False: 4.50k]
  |  |  |  Branch (103:21): [True: 0, False: 6.15k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  10.6k|        __loop_end = 1; \
  |  |  107|  10.6k|    }
  ------------------
 2932|  12.3k|    }
 2933|       |
 2934|       |    /* always initialize inout, they are technically present (needed for later deviations/refines) */
 2935|  15.0k|    if (!act->input.nodetype) {
  ------------------
  |  Branch (2935:9): [True: 11.3k, False: 3.77k]
  ------------------
 2936|  11.3k|        act->input.nodetype = LYS_INPUT;
  ------------------
  |  |  254|  11.3k|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
 2937|  11.3k|        act->input.parent = (struct lysp_node *)act;
 2938|  11.3k|        LY_CHECK_RET(lydict_insert(PARSER_CTX(ctx), "input", 0, &act->input.name));
  ------------------
  |  |  206|  11.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  11.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  11.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  22.6k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 11.3k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 11.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2939|  11.3k|    }
 2940|  15.0k|    if (!act->output.nodetype) {
  ------------------
  |  Branch (2940:9): [True: 15.0k, False: 7]
  ------------------
 2941|  15.0k|        act->output.nodetype = LYS_OUTPUT;
  ------------------
  |  |  255|  15.0k|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
 2942|  15.0k|        act->output.parent = (struct lysp_node *)act;
 2943|  15.0k|        LY_CHECK_RET(lydict_insert(PARSER_CTX(ctx), "output", 0, &act->output.name));
  ------------------
  |  |  206|  15.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  15.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  15.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  30.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 15.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 15.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2944|  15.0k|    }
 2945|       |
 2946|  15.1k|cleanup:
 2947|  15.1k|    return ret;
 2948|  15.0k|}
parse_notif:
 2959|  30.8k|{
 2960|  30.8k|    LY_ERR ret = LY_SUCCESS;
 2961|  30.8k|    char *buf, *word;
 2962|  30.8k|    size_t word_len;
 2963|  30.8k|    enum ly_stmt kw;
 2964|  30.8k|    struct lysp_node_notif *notif;
 2965|       |
 2966|  30.8k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), notifs, notif, next, LY_EMEM);
  ------------------
  |  |  285|  30.8k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|  30.8k|    { \
  |  |  |  |  266|  30.8k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|  30.8k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 30.8k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|  30.8k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|  30.8k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  30.8k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 14.3k, False: 16.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|  14.3k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|  16.4k|    } else { \
  |  |  |  |  |  |  245|  16.4k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|  16.4k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|   207k|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 190k, False: 16.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|   190k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|   190k|        } \
  |  |  |  |  |  |  250|  16.4k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|  16.4k|    }
  |  |  |  |  ------------------
  |  |  |  |  273|  30.8k|    }
  |  |  ------------------
  ------------------
 2967|       |
 2968|       |    /* get value */
 2969|  30.8k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  30.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  30.8k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  30.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  30.8k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 10, False: 30.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2970|  30.8k|    INSERT_WORD_GOTO(ctx, buf, notif->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  30.8k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    170|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 85]
  |  |  |  |  |  Branch (202:40): [True: 85, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 85, False: 30.7k]
  |  |  ------------------
  |  |   51|  30.8k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   122k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 30.7k]
  |  |  |  |  |  Branch (202:40): [True: 30.7k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 30.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2971|  30.8k|    notif->nodetype = LYS_NOTIF;
  ------------------
  |  |  251|  30.8k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
 2972|  30.8k|    notif->parent = parent;
 2973|       |
 2974|  78.2k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  30.8k|    ly_bool __loop_end = 0; \
  |  |   73|  30.8k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 10, False: 30.7k]
  |  |  ------------------
  |  |   74|     10|        goto ERR_LABEL; \
  |  |   75|     10|    } \
  |  |   76|  30.8k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 390, False: 30.4k]
  |  |  ------------------
  |  |   77|    390|        __loop_end = 1; \
  |  |   78|  30.4k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 3, False: 30.4k]
  |  |  ------------------
  |  |   79|      3|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      3|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      6|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      3|        RET = LY_EVALID; \
  |  |   81|      3|        goto ERR_LABEL; \
  |  |   82|  30.4k|    } else { \
  |  |   83|  30.4k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  30.4k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 7, False: 30.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|      7|        goto ERR_LABEL; \
  |  |  |  |  101|      7|    } \
  |  |  |  |  102|  30.4k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 71, False: 30.3k]
  |  |  |  |  ------------------
  |  |  |  |  103|     71|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 71]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|     71|        __loop_end = 1; \
  |  |  |  |  107|     71|    }
  |  |  ------------------
  |  |   84|  30.3k|    } \
  |  |   85|   108k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 78.2k, False: 30.6k]
  |  |  ------------------
  ------------------
 2975|  78.2k|        switch (kw) {
 2976|  28.1k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (2976:9): [True: 28.1k, False: 50.1k]
  ------------------
 2977|  28.1k|            LY_CHECK_RET(parse_text_field(ctx, notif->dsc, LY_STMT_DESCRIPTION, 0, &notif->dsc, Y_STR_ARG, &notif->exts));
  ------------------
  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2978|  28.1k|            break;
 2979|    214|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (2979:9): [True: 214, False: 78.0k]
  ------------------
 2980|    214|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &notif->iffeatures, Y_STR_ARG, &notif->exts));
  ------------------
  |  |  206|    214|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    214|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    214|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    214|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 210]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2981|    210|            break;
 2982|    235|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (2982:9): [True: 235, False: 78.0k]
  ------------------
 2983|    235|            LY_CHECK_RET(parse_text_field(ctx, notif->ref, LY_STMT_REFERENCE, 0, &notif->ref, Y_STR_ARG, &notif->exts));
  ------------------
  |  |  206|    235|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    235|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    235|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    235|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 231]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2984|    231|            break;
 2985|  14.0k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (2985:9): [True: 14.0k, False: 64.2k]
  ------------------
 2986|  14.0k|            LY_CHECK_RET(parse_status(ctx, &notif->flags, &notif->exts));
  ------------------
  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.0k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2987|  14.0k|            break;
 2988|       |
 2989|      1|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (2989:9): [True: 1, False: 78.2k]
  ------------------
 2990|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "anydata", "notification");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 2991|       |        /* fall through */
 2992|    396|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (2992:9): [True: 396, False: 77.8k]
  ------------------
 2993|    396|            LY_CHECK_RET(parse_any(ctx, kw, (struct lysp_node *)notif, &notif->child));
  ------------------
  |  |  206|    396|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    396|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    396|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    396|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 388]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2994|    388|            break;
 2995|     71|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (2995:9): [True: 71, False: 78.1k]
  ------------------
 2996|     71|            LY_CHECK_RET(parse_choice(ctx, (struct lysp_node *)notif, &notif->child));
  ------------------
  |  |  206|     71|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     71|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     71|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     71|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 69]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2997|     69|            break;
 2998|    267|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (2998:9): [True: 267, False: 77.9k]
  ------------------
 2999|    267|            LY_CHECK_RET(parse_container(ctx, (struct lysp_node *)notif, &notif->child));
  ------------------
  |  |  206|    267|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    267|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    267|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    267|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 265]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3000|    265|            break;
 3001|  28.4k|        case LY_STMT_LEAF:
  ------------------
  |  Branch (3001:9): [True: 28.4k, False: 49.8k]
  ------------------
 3002|  28.4k|            LY_CHECK_RET(parse_leaf(ctx, (struct lysp_node *)notif, &notif->child));
  ------------------
  |  |  206|  28.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.4k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.4k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 28.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3003|  28.3k|            break;
 3004|  2.38k|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (3004:9): [True: 2.38k, False: 75.8k]
  ------------------
 3005|  2.38k|            LY_CHECK_RET(parse_leaflist(ctx, (struct lysp_node *)notif, &notif->child));
  ------------------
  |  |  206|  2.38k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.38k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.38k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.38k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 14, False: 2.37k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3006|  2.37k|            break;
 3007|    433|        case LY_STMT_LIST:
  ------------------
  |  Branch (3007:9): [True: 433, False: 77.8k]
  ------------------
 3008|    433|            LY_CHECK_RET(parse_list(ctx, (struct lysp_node *)notif, &notif->child));
  ------------------
  |  |  206|    433|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    433|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    433|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    433|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 9, False: 424]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3009|    424|            break;
 3010|    202|        case LY_STMT_USES:
  ------------------
  |  Branch (3010:9): [True: 202, False: 78.0k]
  ------------------
 3011|    202|            LY_CHECK_RET(parse_uses(ctx, (struct lysp_node *)notif, &notif->child));
  ------------------
  |  |  206|    202|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    202|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    202|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    202|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 201]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3012|    201|            break;
 3013|       |
 3014|      1|        case LY_STMT_MUST:
  ------------------
  |  Branch (3014:9): [True: 1, False: 78.2k]
  ------------------
 3015|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "must", "notification");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3016|      0|            LY_CHECK_RET(parse_restrs(ctx, kw, &notif->musts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3017|      0|            break;
 3018|    154|        case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (3018:9): [True: 154, False: 78.1k]
  ------------------
 3019|    154|            LY_CHECK_RET(parse_typedef(ctx, (struct lysp_node *)notif, &notif->typedefs));
  ------------------
  |  |  206|    154|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    154|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    154|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    154|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 12, False: 142]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3020|    142|            break;
 3021|  1.74k|        case LY_STMT_GROUPING:
  ------------------
  |  Branch (3021:9): [True: 1.74k, False: 76.5k]
  ------------------
 3022|  1.74k|            LY_CHECK_RET(parse_grouping(ctx, (struct lysp_node *)notif, &notif->groupings));
  ------------------
  |  |  206|  1.74k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.74k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.74k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.74k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3023|  1.73k|            break;
 3024|  1.55k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3024:9): [True: 1.55k, False: 76.7k]
  ------------------
 3025|  1.55k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, notif, LY_STMT_NOTIFICATION, 0, &notif->exts));
  ------------------
  |  |  206|  1.55k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.55k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.55k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.55k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 1.55k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3026|  1.55k|            break;
 3027|     21|        default:
  ------------------
  |  Branch (3027:9): [True: 21, False: 78.2k]
  ------------------
 3028|     21|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "notification");
  ------------------
  |  |  129|     21|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     42|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 21, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3029|     21|            return LY_EVALID;
 3030|  78.2k|        }
 3031|   156k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, notif->exts, ret, cleanup);
  ------------------
  |  |   99|  78.1k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 70, False: 78.0k]
  |  |  ------------------
  |  |  100|     70|        goto ERR_LABEL; \
  |  |  101|     70|    } \
  |  |  102|  78.1k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 30.1k, False: 47.9k]
  |  |  ------------------
  |  |  103|  30.1k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 98, False: 30.0k]
  |  |  |  Branch (103:21): [True: 0, False: 98]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  30.1k|        __loop_end = 1; \
  |  |  107|  30.1k|    }
  ------------------
 3032|  78.0k|    }
 3033|       |
 3034|  30.7k|cleanup:
 3035|  30.7k|    return ret;
 3036|  61.5k|}
parse_grouping:
 3047|   129k|{
 3048|   129k|    LY_ERR ret = LY_SUCCESS;
 3049|   129k|    char *buf, *word;
 3050|   129k|    size_t word_len;
 3051|   129k|    enum ly_stmt kw;
 3052|   129k|    struct lysp_node_grp *grp;
 3053|       |
 3054|   129k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), groupings, grp, next, LY_EMEM);
  ------------------
  |  |  285|   129k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|   129k|    { \
  |  |  |  |  266|   129k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|   129k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 129k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|   129k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|   129k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   129k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 40.4k, False: 89.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|  40.4k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|  89.2k|    } else { \
  |  |  |  |  |  |  245|  89.2k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|  89.2k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|   483k|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 394k, False: 89.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|   394k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|   394k|        } \
  |  |  |  |  |  |  250|  89.2k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|  89.2k|    }
  |  |  |  |  ------------------
  |  |  |  |  273|   129k|    }
  |  |  ------------------
  ------------------
 3055|       |
 3056|       |    /* get value */
 3057|   129k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   129k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   129k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   129k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   129k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 35, False: 129k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3058|   129k|    INSERT_WORD_GOTO(ctx, buf, grp->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|   129k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    146|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 73]
  |  |  |  |  |  Branch (202:40): [True: 73, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 73, False: 129k]
  |  |  ------------------
  |  |   51|   129k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   518k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 129k]
  |  |  |  |  |  Branch (202:40): [True: 129k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 129k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3059|   129k|    grp->nodetype = LYS_GROUPING;
  ------------------
  |  |  256|   129k|#define LYS_GROUPING    0x4000
  ------------------
 3060|   129k|    grp->parent = parent;
 3061|       |
 3062|   410k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   129k|    ly_bool __loop_end = 0; \
  |  |   73|   129k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 14, False: 129k]
  |  |  ------------------
  |  |   74|     14|        goto ERR_LABEL; \
  |  |   75|     14|    } \
  |  |   76|   129k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 8.40k, False: 121k]
  |  |  ------------------
  |  |   77|  8.40k|        __loop_end = 1; \
  |  |   78|   121k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 6, False: 121k]
  |  |  ------------------
  |  |   79|      6|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      6|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     12|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 6, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      6|        RET = LY_EVALID; \
  |  |   81|      6|        goto ERR_LABEL; \
  |  |   82|   121k|    } else { \
  |  |   83|   121k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|   121k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 27, False: 121k]
  |  |  |  |  ------------------
  |  |  |  |  100|     27|        goto ERR_LABEL; \
  |  |  |  |  101|     27|    } \
  |  |  |  |  102|   121k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 1.87k, False: 119k]
  |  |  |  |  ------------------
  |  |  |  |  103|  1.87k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 1.87k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  1.87k|        __loop_end = 1; \
  |  |  |  |  107|  1.87k|    }
  |  |  ------------------
  |  |   84|   121k|    } \
  |  |   85|   535k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 410k, False: 125k]
  |  |  ------------------
  ------------------
 3063|   410k|        switch (kw) {
 3064|   112k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (3064:9): [True: 112k, False: 298k]
  ------------------
 3065|   112k|            LY_CHECK_RET(parse_text_field(ctx, grp->dsc, LY_STMT_DESCRIPTION, 0, &grp->dsc, Y_STR_ARG, &grp->exts));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3066|   112k|            break;
 3067|     68|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (3067:9): [True: 68, False: 410k]
  ------------------
 3068|     68|            LY_CHECK_RET(parse_text_field(ctx, grp->ref, LY_STMT_REFERENCE, 0, &grp->ref, Y_STR_ARG, &grp->exts));
  ------------------
  |  |  206|     68|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     68|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     68|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     68|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 67]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3069|     67|            break;
 3070|  42.1k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (3070:9): [True: 42.1k, False: 368k]
  ------------------
 3071|  42.1k|            LY_CHECK_RET(parse_status(ctx, &grp->flags, &grp->exts));
  ------------------
  |  |  206|  42.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  42.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  42.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  42.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 42.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3072|  42.1k|            break;
 3073|       |
 3074|      0|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (3074:9): [True: 0, False: 410k]
  ------------------
 3075|      0|            PARSER_CHECK_STMTVER2_RET(ctx, "anydata", "grouping");
  ------------------
  |  |   56|      0|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3076|       |        /* fall through */
 3077|  1.20k|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (3077:9): [True: 1.20k, False: 409k]
  ------------------
 3078|  1.20k|            LY_CHECK_RET(parse_any(ctx, kw, &grp->node, &grp->child));
  ------------------
  |  |  206|  1.20k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.20k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.20k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.20k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 1.20k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3079|  1.20k|            break;
 3080|    609|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (3080:9): [True: 609, False: 410k]
  ------------------
 3081|    609|            LY_CHECK_RET(parse_choice(ctx, &grp->node, &grp->child));
  ------------------
  |  |  206|    609|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    609|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    609|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    609|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 241, False: 368]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3082|    368|            break;
 3083|    547|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (3083:9): [True: 547, False: 410k]
  ------------------
 3084|    547|            LY_CHECK_RET(parse_container(ctx, &grp->node, &grp->child));
  ------------------
  |  |  206|    547|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    547|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    547|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    547|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 460, False: 87]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3085|     87|            break;
 3086|  85.5k|        case LY_STMT_LEAF:
  ------------------
  |  Branch (3086:9): [True: 85.5k, False: 325k]
  ------------------
 3087|  85.5k|            LY_CHECK_RET(parse_leaf(ctx, &grp->node, &grp->child));
  ------------------
  |  |  206|  85.5k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  85.5k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  85.5k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  85.5k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 7, False: 85.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3088|  85.5k|            break;
 3089|  42.3k|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (3089:9): [True: 42.3k, False: 368k]
  ------------------
 3090|  42.3k|            LY_CHECK_RET(parse_leaflist(ctx, &grp->node, &grp->child));
  ------------------
  |  |  206|  42.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  42.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  42.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  42.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 42.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3091|  42.3k|            break;
 3092|  89.1k|        case LY_STMT_LIST:
  ------------------
  |  Branch (3092:9): [True: 89.1k, False: 321k]
  ------------------
 3093|  89.1k|            LY_CHECK_RET(parse_list(ctx, &grp->node, &grp->child));
  ------------------
  |  |  206|  89.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  89.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  89.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  89.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 567, False: 88.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3094|  88.5k|            break;
 3095|    103|        case LY_STMT_USES:
  ------------------
  |  Branch (3095:9): [True: 103, False: 410k]
  ------------------
 3096|    103|            LY_CHECK_RET(parse_uses(ctx, &grp->node, &grp->child));
  ------------------
  |  |  206|    103|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    103|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    103|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    103|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 101]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3097|    101|            break;
 3098|       |
 3099|    136|        case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (3099:9): [True: 136, False: 410k]
  ------------------
 3100|    136|            LY_CHECK_RET(parse_typedef(ctx, &grp->node, &grp->typedefs));
  ------------------
  |  |  206|    136|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    136|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    136|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    136|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 128]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3101|    128|            break;
 3102|      1|        case LY_STMT_ACTION:
  ------------------
  |  Branch (3102:9): [True: 1, False: 410k]
  ------------------
 3103|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "action", "grouping");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3104|      0|            LY_CHECK_RET(parse_action(ctx, &grp->node, &grp->actions));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3105|      0|            break;
 3106|  33.6k|        case LY_STMT_GROUPING:
  ------------------
  |  Branch (3106:9): [True: 33.6k, False: 377k]
  ------------------
 3107|  33.6k|            LY_CHECK_RET(parse_grouping(ctx, &grp->node, &grp->groupings));
  ------------------
  |  |  206|  33.6k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  33.6k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  33.6k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  33.6k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2.97k, False: 30.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3108|  30.6k|            break;
 3109|      2|        case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (3109:9): [True: 2, False: 410k]
  ------------------
 3110|      2|            PARSER_CHECK_STMTVER2_RET(ctx, "notification", "grouping");
  ------------------
  |  |   56|      2|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      2|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 2, False: 0]
  |  |  ------------------
  ------------------
 3111|      0|            LY_CHECK_RET(parse_notif(ctx, &grp->node, &grp->notifs));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3112|      0|            break;
 3113|  2.66k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3113:9): [True: 2.66k, False: 408k]
  ------------------
 3114|  2.66k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, grp, LY_STMT_GROUPING, 0, &grp->exts));
  ------------------
  |  |  206|  2.66k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.66k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.66k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.66k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 11, False: 2.64k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3115|  2.64k|            break;
 3116|     18|        default:
  ------------------
  |  Branch (3116:9): [True: 18, False: 410k]
  ------------------
 3117|     18|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "grouping");
  ------------------
  |  |  129|     18|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     36|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 18, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3118|     18|            return LY_EVALID;
 3119|   410k|        }
 3120|   812k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, grp->exts, ret, cleanup);
  ------------------
  |  |   99|   406k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 93, False: 406k]
  |  |  ------------------
  |  |  100|     93|        goto ERR_LABEL; \
  |  |  101|     93|    } \
  |  |  102|   406k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 114k, False: 291k]
  |  |  ------------------
  |  |  103|   114k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 982, False: 113k]
  |  |  |  Branch (103:21): [True: 0, False: 982]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|   114k|        __loop_end = 1; \
  |  |  107|   114k|    }
  ------------------
 3121|   406k|    }
 3122|       |
 3123|       |    /* store data for collision check */
 3124|   125k|    if (parent) {
  ------------------
  |  Branch (3124:9): [True: 38.7k, False: 86.5k]
  ------------------
 3125|  38.7k|        assert(ctx->main_ctx);
 3126|  38.7k|        LY_CHECK_RET(ly_set_add(&ctx->main_ctx->grps_nodes, parent, 0, NULL));
  ------------------
  |  |  206|  38.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  38.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  38.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  38.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 38.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3127|  38.7k|    }
 3128|       |
 3129|   125k|cleanup:
 3130|   125k|    return ret;
 3131|   125k|}
parse_augment:
 3142|  3.19k|{
 3143|  3.19k|    LY_ERR ret = LY_SUCCESS;
 3144|  3.19k|    char *buf, *word;
 3145|  3.19k|    size_t word_len;
 3146|  3.19k|    enum ly_stmt kw;
 3147|  3.19k|    struct lysp_node_augment *aug;
 3148|       |
 3149|  3.19k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), augments, aug, next, LY_EMEM);
  ------------------
  |  |  285|  3.19k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|  3.19k|    { \
  |  |  |  |  266|  3.19k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|  3.19k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 3.19k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|  3.19k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|  3.19k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  3.19k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 2.34k, False: 841]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|  2.34k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|  2.34k|    } else { \
  |  |  |  |  |  |  245|    841|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|    841|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|  29.4k|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 28.5k, False: 841]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|  28.5k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|  28.5k|        } \
  |  |  |  |  |  |  250|    841|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|    841|    }
  |  |  |  |  ------------------
  |  |  |  |  273|  3.19k|    }
  |  |  ------------------
  ------------------
 3150|       |
 3151|       |    /* get value */
 3152|  3.19k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  3.19k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  3.19k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.19k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  3.19k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 22, False: 3.16k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3153|  3.16k|    CHECK_NONEMPTY(ctx, word_len, "augment");
  ------------------
  |  |   96|  3.16k|    if (!VALUE_LEN) { \
  |  |  ------------------
  |  |  |  Branch (96:9): [True: 91, False: 3.07k]
  |  |  ------------------
  |  |   97|     91|        LOGWRN(PARSER_CTX(CTX), "Empty argument of %s statement does not make sense.", STMT); \
  |  |  ------------------
  |  |  |  |  155|    182|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (155:33): [True: 91, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|     91|    }
  ------------------
 3154|  3.16k|    INSERT_WORD_GOTO(ctx, buf, aug->nodeid, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  3.16k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    146|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 73]
  |  |  |  |  |  Branch (202:40): [True: 73, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 73, False: 3.09k]
  |  |  ------------------
  |  |   51|  3.16k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  12.3k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 3.09k]
  |  |  |  |  |  Branch (202:40): [True: 3.09k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 3.00k, False: 91]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3155|  3.16k|    aug->nodetype = LYS_AUGMENT;
  ------------------
  |  |  257|  3.16k|#define LYS_AUGMENT     0x8000
  ------------------
 3156|  3.16k|    aug->parent = parent;
 3157|       |
 3158|  6.27k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  3.16k|    ly_bool __loop_end = 0; \
  |  |   73|  3.16k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 19, False: 3.14k]
  |  |  ------------------
  |  |   74|     19|        goto ERR_LABEL; \
  |  |   75|     19|    } \
  |  |   76|  3.16k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 784, False: 2.36k]
  |  |  ------------------
  |  |   77|    784|        __loop_end = 1; \
  |  |   78|  2.36k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 6, False: 2.35k]
  |  |  ------------------
  |  |   79|      6|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      6|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     12|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 6, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      6|        RET = LY_EVALID; \
  |  |   81|      6|        goto ERR_LABEL; \
  |  |   82|  2.35k|    } else { \
  |  |   83|  2.35k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  2.35k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 17, False: 2.34k]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|        goto ERR_LABEL; \
  |  |  |  |  101|     17|    } \
  |  |  |  |  102|  2.35k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 109, False: 2.23k]
  |  |  |  |  ------------------
  |  |  |  |  103|    109|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 109]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    109|        __loop_end = 1; \
  |  |  |  |  107|    109|    }
  |  |  ------------------
  |  |   84|  2.34k|    } \
  |  |   85|  6.81k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 5.77k, False: 1.04k]
  |  |  ------------------
  ------------------
 3159|  5.77k|        switch (kw) {
 3160|     27|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (3160:9): [True: 27, False: 5.74k]
  ------------------
 3161|     27|            LY_CHECK_RET(parse_text_field(ctx, aug->dsc, LY_STMT_DESCRIPTION, 0, &aug->dsc, Y_STR_ARG, &aug->exts));
  ------------------
  |  |  206|     27|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     27|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     27|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     27|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 26]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3162|     26|            break;
 3163|    365|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (3163:9): [True: 365, False: 5.40k]
  ------------------
 3164|    365|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &aug->iffeatures, Y_STR_ARG, &aug->exts));
  ------------------
  |  |  206|    365|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    365|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    365|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    365|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 363]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3165|    363|            break;
 3166|     83|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (3166:9): [True: 83, False: 5.68k]
  ------------------
 3167|     83|            LY_CHECK_RET(parse_text_field(ctx, aug->ref, LY_STMT_REFERENCE, 0, &aug->ref, Y_STR_ARG, &aug->exts));
  ------------------
  |  |  206|     83|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     83|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     83|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     83|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 81]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3168|     81|            break;
 3169|     36|        case LY_STMT_STATUS:
  ------------------
  |  Branch (3169:9): [True: 36, False: 5.73k]
  ------------------
 3170|     36|            LY_CHECK_RET(parse_status(ctx, &aug->flags, &aug->exts));
  ------------------
  |  |  206|     36|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     36|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     36|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     36|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 11, False: 25]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3171|     25|            break;
 3172|     51|        case LY_STMT_WHEN:
  ------------------
  |  Branch (3172:9): [True: 51, False: 5.72k]
  ------------------
 3173|     51|            LY_CHECK_RET(parse_when(ctx, &aug->when));
  ------------------
  |  |  206|     51|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     51|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     51|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     51|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3174|     47|            break;
 3175|       |
 3176|      1|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (3176:9): [True: 1, False: 5.77k]
  ------------------
 3177|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "anydata", "augment");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3178|       |        /* fall through */
 3179|  1.21k|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (3179:9): [True: 1.21k, False: 4.55k]
  ------------------
 3180|  1.21k|            LY_CHECK_RET(parse_any(ctx, kw, (struct lysp_node *)aug, &aug->child));
  ------------------
  |  |  206|  1.21k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.21k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.21k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.21k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 9, False: 1.20k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3181|  1.20k|            break;
 3182|    257|        case LY_STMT_CASE:
  ------------------
  |  Branch (3182:9): [True: 257, False: 5.51k]
  ------------------
 3183|    257|            LY_CHECK_RET(parse_case(ctx, (struct lysp_node *)aug, &aug->child));
  ------------------
  |  |  206|    257|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    257|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    257|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    257|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 124, False: 133]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3184|    133|            break;
 3185|    151|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (3185:9): [True: 151, False: 5.62k]
  ------------------
 3186|    151|            LY_CHECK_RET(parse_choice(ctx, (struct lysp_node *)aug, &aug->child));
  ------------------
  |  |  206|    151|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    151|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    151|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    151|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 76, False: 75]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3187|     75|            break;
 3188|    509|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (3188:9): [True: 509, False: 5.26k]
  ------------------
 3189|    509|            LY_CHECK_RET(parse_container(ctx, (struct lysp_node *)aug, &aug->child));
  ------------------
  |  |  206|    509|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    509|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    509|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    509|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 284, False: 225]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3190|    225|            break;
 3191|    222|        case LY_STMT_LEAF:
  ------------------
  |  Branch (3191:9): [True: 222, False: 5.55k]
  ------------------
 3192|    222|            LY_CHECK_RET(parse_leaf(ctx, (struct lysp_node *)aug, &aug->child));
  ------------------
  |  |  206|    222|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    222|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    222|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    222|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 214]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3193|    214|            break;
 3194|    197|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (3194:9): [True: 197, False: 5.57k]
  ------------------
 3195|    197|            LY_CHECK_RET(parse_leaflist(ctx, (struct lysp_node *)aug, &aug->child));
  ------------------
  |  |  206|    197|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    197|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    197|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    197|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 194]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3196|    194|            break;
 3197|    551|        case LY_STMT_LIST:
  ------------------
  |  Branch (3197:9): [True: 551, False: 5.22k]
  ------------------
 3198|    551|            LY_CHECK_RET(parse_list(ctx, (struct lysp_node *)aug, &aug->child));
  ------------------
  |  |  206|    551|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    551|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    551|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    551|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 358, False: 193]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3199|    193|            break;
 3200|  1.41k|        case LY_STMT_USES:
  ------------------
  |  Branch (3200:9): [True: 1.41k, False: 4.35k]
  ------------------
 3201|  1.41k|            LY_CHECK_RET(parse_uses(ctx, (struct lysp_node *)aug, &aug->child));
  ------------------
  |  |  206|  1.41k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.41k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.41k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.41k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1.10k, False: 315]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3202|    315|            break;
 3203|       |
 3204|      1|        case LY_STMT_ACTION:
  ------------------
  |  Branch (3204:9): [True: 1, False: 5.77k]
  ------------------
 3205|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "action", "augment");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3206|      0|            LY_CHECK_RET(parse_action(ctx, (struct lysp_node *)aug, &aug->actions));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3207|      0|            break;
 3208|      1|        case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (3208:9): [True: 1, False: 5.77k]
  ------------------
 3209|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "notification", "augment");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3210|      0|            LY_CHECK_RET(parse_notif(ctx, (struct lysp_node *)aug, &aug->notifs));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3211|      0|            break;
 3212|    670|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3212:9): [True: 670, False: 5.10k]
  ------------------
 3213|    670|            LY_CHECK_RET(parse_ext(ctx, word, word_len, aug, LY_STMT_AUGMENT, 0, &aug->exts));
  ------------------
  |  |  206|    670|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    670|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    670|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    670|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 665]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3214|    665|            break;
 3215|     16|        default:
  ------------------
  |  Branch (3215:9): [True: 16, False: 5.75k]
  ------------------
 3216|     16|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "augment");
  ------------------
  |  |  129|     16|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     32|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 16, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3217|     16|            return LY_EVALID;
 3218|  5.77k|        }
 3219|  7.45k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, aug->exts, ret, cleanup);
  ------------------
  |  |   99|  3.76k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 77, False: 3.68k]
  |  |  ------------------
  |  |  100|     77|        goto ERR_LABEL; \
  |  |  101|     77|    } \
  |  |  102|  3.76k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 148, False: 3.53k]
  |  |  ------------------
  |  |  103|    148|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 66, False: 82]
  |  |  |  Branch (103:21): [True: 0, False: 66]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|    148|        __loop_end = 1; \
  |  |  107|    148|    }
  ------------------
 3220|  3.68k|    }
 3221|       |
 3222|  1.16k|cleanup:
 3223|  1.16k|    return ret;
 3224|  6.27k|}
parse_uses:
 3235|   240k|{
 3236|   240k|    LY_ERR ret = LY_SUCCESS;
 3237|   240k|    char *buf, *word;
 3238|   240k|    size_t word_len;
 3239|   240k|    enum ly_stmt kw;
 3240|   240k|    struct lysp_node_uses *uses;
 3241|       |
 3242|       |    /* create uses structure */
 3243|   240k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), siblings, uses, next, LY_EMEM);
  ------------------
  |  |  285|   240k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|   240k|    { \
  |  |  |  |  266|   240k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|   240k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 240k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|   240k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|   240k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   240k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 118k, False: 121k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|   118k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|   121k|    } else { \
  |  |  |  |  |  |  245|   121k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|   121k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|   930k|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 808k, False: 121k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|   808k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|   808k|        } \
  |  |  |  |  |  |  250|   121k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|   121k|    }
  |  |  |  |  ------------------
  |  |  |  |  273|   240k|    }
  |  |  ------------------
  ------------------
 3244|   240k|    uses->nodetype = LYS_USES;
  ------------------
  |  |  253|   240k|#define LYS_USES        0x0800    /**< uses statement node */
  ------------------
 3245|   240k|    uses->parent = parent;
 3246|       |
 3247|       |    /* get name */
 3248|   240k|    LY_CHECK_RET(get_argument(ctx, Y_PREF_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   240k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   240k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   240k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   240k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 40, False: 240k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3249|   240k|    INSERT_WORD_GOTO(ctx, buf, uses->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|   240k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|     20|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 10]
  |  |  |  |  |  Branch (202:40): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 10, False: 240k]
  |  |  ------------------
  |  |   51|   240k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   960k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 240k]
  |  |  |  |  |  Branch (202:40): [True: 240k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 240k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3250|       |
 3251|       |    /* parse substatements */
 3252|   480k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   240k|    ly_bool __loop_end = 0; \
  |  |   73|   240k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 12, False: 240k]
  |  |  ------------------
  |  |   74|     12|        goto ERR_LABEL; \
  |  |   75|     12|    } \
  |  |   76|   240k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 151k, False: 89.1k]
  |  |  ------------------
  |  |   77|   151k|        __loop_end = 1; \
  |  |   78|   151k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 9, False: 89.1k]
  |  |  ------------------
  |  |   79|      9|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      9|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     18|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 9, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      9|        RET = LY_EVALID; \
  |  |   81|      9|        goto ERR_LABEL; \
  |  |   82|  89.1k|    } else { \
  |  |   83|  89.1k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  89.1k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 32, False: 89.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|     32|        goto ERR_LABEL; \
  |  |  |  |  101|     32|    } \
  |  |  |  |  102|  89.1k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 40, False: 89.0k]
  |  |  |  |  ------------------
  |  |  |  |  103|     40|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 40]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|     40|        __loop_end = 1; \
  |  |  |  |  107|     40|    }
  |  |  ------------------
  |  |   84|  89.0k|    } \
  |  |   85|   331k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 93.5k, False: 237k]
  |  |  ------------------
  ------------------
 3253|  93.5k|        switch (kw) {
 3254|     48|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (3254:9): [True: 48, False: 93.4k]
  ------------------
 3255|     48|            LY_CHECK_RET(parse_text_field(ctx, uses->dsc, LY_STMT_DESCRIPTION, 0, &uses->dsc, Y_STR_ARG, &uses->exts));
  ------------------
  |  |  206|     48|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     48|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     48|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     48|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 46]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3256|     46|            break;
 3257|    164|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (3257:9): [True: 164, False: 93.3k]
  ------------------
 3258|    164|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &uses->iffeatures, Y_STR_ARG, &uses->exts));
  ------------------
  |  |  206|    164|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    164|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    164|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    164|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 159]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3259|    159|            break;
 3260|     78|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (3260:9): [True: 78, False: 93.4k]
  ------------------
 3261|     78|            LY_CHECK_RET(parse_text_field(ctx, uses->ref, LY_STMT_REFERENCE, 0, &uses->ref, Y_STR_ARG, &uses->exts));
  ------------------
  |  |  206|     78|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     78|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     78|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     78|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 76]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3262|     76|            break;
 3263|  86.0k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (3263:9): [True: 86.0k, False: 7.48k]
  ------------------
 3264|  86.0k|            LY_CHECK_RET(parse_status(ctx, &uses->flags, &uses->exts));
  ------------------
  |  |  206|  86.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  86.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  86.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  86.0k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 10, False: 86.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3265|  86.0k|            break;
 3266|     40|        case LY_STMT_WHEN:
  ------------------
  |  Branch (3266:9): [True: 40, False: 93.5k]
  ------------------
 3267|     40|            LY_CHECK_RET(parse_when(ctx, &uses->when));
  ------------------
  |  |  206|     40|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     40|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     40|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     40|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 35]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3268|     35|            break;
 3269|       |
 3270|  3.88k|        case LY_STMT_REFINE:
  ------------------
  |  Branch (3270:9): [True: 3.88k, False: 89.6k]
  ------------------
 3271|  3.88k|            LY_CHECK_RET(parse_refine(ctx, &uses->refines));
  ------------------
  |  |  206|  3.88k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  3.88k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.88k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  3.88k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 218, False: 3.66k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3272|  3.66k|            break;
 3273|  2.25k|        case LY_STMT_AUGMENT:
  ------------------
  |  Branch (3273:9): [True: 2.25k, False: 91.2k]
  ------------------
 3274|  2.25k|            LY_CHECK_RET(parse_augment(ctx, (struct lysp_node *)uses, &uses->augments));
  ------------------
  |  |  206|  2.25k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.25k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.25k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.25k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1.88k, False: 361]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3275|    361|            break;
 3276|    999|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3276:9): [True: 999, False: 92.5k]
  ------------------
 3277|    999|            LY_CHECK_RET(parse_ext(ctx, word, word_len, uses, LY_STMT_USES, 0, &uses->exts));
  ------------------
  |  |  206|    999|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    999|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    999|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    999|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 12, False: 987]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3278|    987|            break;
 3279|     27|        default:
  ------------------
  |  Branch (3279:9): [True: 27, False: 93.5k]
  ------------------
 3280|     27|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "uses");
  ------------------
  |  |  129|     27|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     54|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 27, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3281|     27|            return LY_EVALID;
 3282|  93.5k|        }
 3283|   182k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, uses->exts, ret, cleanup);
  ------------------
  |  |   99|  91.3k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 74, False: 91.3k]
  |  |  ------------------
  |  |  100|     74|        goto ERR_LABEL; \
  |  |  101|     74|    } \
  |  |  102|  91.3k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 86.7k, False: 4.51k]
  |  |  ------------------
  |  |  103|  86.7k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 562, False: 86.2k]
  |  |  |  Branch (103:21): [True: 0, False: 562]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  86.7k|        __loop_end = 1; \
  |  |  107|  86.7k|    }
  ------------------
 3284|  91.3k|    }
 3285|       |
 3286|   238k|cleanup:
 3287|   238k|    return ret;
 3288|   480k|}
parse_case:
 3299|  6.03k|{
 3300|  6.03k|    LY_ERR ret = LY_SUCCESS;
 3301|  6.03k|    char *buf, *word;
 3302|  6.03k|    size_t word_len;
 3303|  6.03k|    enum ly_stmt kw;
 3304|  6.03k|    struct lysp_node_case *cas;
 3305|       |
 3306|       |    /* create new case structure */
 3307|  6.03k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), siblings, cas, next, LY_EMEM);
  ------------------
  |  |  285|  6.03k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|  6.03k|    { \
  |  |  |  |  266|  6.03k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|  6.03k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 6.03k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|  6.03k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|  6.03k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  6.03k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 3.24k, False: 2.78k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|  3.24k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|  3.24k|    } else { \
  |  |  |  |  |  |  245|  2.78k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|  2.78k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|  26.1k|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 23.3k, False: 2.78k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|  23.3k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|  23.3k|        } \
  |  |  |  |  |  |  250|  2.78k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|  2.78k|    }
  |  |  |  |  ------------------
  |  |  |  |  273|  6.03k|    }
  |  |  ------------------
  ------------------
 3308|  6.03k|    cas->nodetype = LYS_CASE;
  ------------------
  |  |  247|  6.03k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
 3309|  6.03k|    cas->parent = parent;
 3310|       |
 3311|       |    /* get name */
 3312|  6.03k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  6.03k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  6.03k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  6.03k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  6.03k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 29, False: 6.00k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3313|  6.00k|    INSERT_WORD_GOTO(ctx, buf, cas->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  6.00k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    138|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 69]
  |  |  |  |  |  Branch (202:40): [True: 69, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 69, False: 5.93k]
  |  |  ------------------
  |  |   51|  6.00k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  23.7k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 5.93k]
  |  |  |  |  |  Branch (202:40): [True: 5.93k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 5.93k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3314|       |
 3315|       |    /* parse substatements */
 3316|  11.9k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  6.00k|    ly_bool __loop_end = 0; \
  |  |   73|  6.00k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 12, False: 5.99k]
  |  |  ------------------
  |  |   74|     12|        goto ERR_LABEL; \
  |  |   75|     12|    } \
  |  |   76|  6.00k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 2.75k, False: 3.24k]
  |  |  ------------------
  |  |   77|  2.75k|        __loop_end = 1; \
  |  |   78|  3.24k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 6, False: 3.23k]
  |  |  ------------------
  |  |   79|      6|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      6|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     12|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 6, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      6|        RET = LY_EVALID; \
  |  |   81|      6|        goto ERR_LABEL; \
  |  |   82|  3.23k|    } else { \
  |  |   83|  3.23k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  3.23k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 11, False: 3.22k]
  |  |  |  |  ------------------
  |  |  |  |  100|     11|        goto ERR_LABEL; \
  |  |  |  |  101|     11|    } \
  |  |  |  |  102|  3.23k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 83, False: 3.14k]
  |  |  |  |  ------------------
  |  |  |  |  103|     83|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 83]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|     83|        __loop_end = 1; \
  |  |  |  |  107|     83|    }
  |  |  ------------------
  |  |   84|  3.22k|    } \
  |  |   85|  10.6k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 7.34k, False: 3.33k]
  |  |  ------------------
  ------------------
 3317|  7.34k|        switch (kw) {
 3318|    212|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (3318:9): [True: 212, False: 7.13k]
  ------------------
 3319|    212|            LY_CHECK_RET(parse_text_field(ctx, cas->dsc, LY_STMT_DESCRIPTION, 0, &cas->dsc, Y_STR_ARG, &cas->exts));
  ------------------
  |  |  206|    212|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    212|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    212|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    212|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 211]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3320|    211|            break;
 3321|    215|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (3321:9): [True: 215, False: 7.13k]
  ------------------
 3322|    215|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &cas->iffeatures, Y_STR_ARG, &cas->exts));
  ------------------
  |  |  206|    215|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    215|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    215|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    215|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 212]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3323|    212|            break;
 3324|     30|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (3324:9): [True: 30, False: 7.31k]
  ------------------
 3325|     30|            LY_CHECK_RET(parse_text_field(ctx, cas->ref, LY_STMT_REFERENCE, 0, &cas->ref, Y_STR_ARG, &cas->exts));
  ------------------
  |  |  206|     30|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     30|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     30|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     30|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 27]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3326|     27|            break;
 3327|    901|        case LY_STMT_STATUS:
  ------------------
  |  Branch (3327:9): [True: 901, False: 6.44k]
  ------------------
 3328|    901|            LY_CHECK_RET(parse_status(ctx, &cas->flags, &cas->exts));
  ------------------
  |  |  206|    901|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    901|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    901|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    901|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 10, False: 891]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3329|    891|            break;
 3330|     22|        case LY_STMT_WHEN:
  ------------------
  |  Branch (3330:9): [True: 22, False: 7.32k]
  ------------------
 3331|     22|            LY_CHECK_RET(parse_when(ctx, &cas->when));
  ------------------
  |  |  206|     22|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     22|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     22|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     22|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 19]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3332|     19|            break;
 3333|       |
 3334|      1|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (3334:9): [True: 1, False: 7.34k]
  ------------------
 3335|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "anydata", "case");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3336|       |        /* fall through */
 3337|    534|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (3337:9): [True: 534, False: 6.81k]
  ------------------
 3338|    534|            LY_CHECK_RET(parse_any(ctx, kw, (struct lysp_node *)cas, &cas->child));
  ------------------
  |  |  206|    534|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    534|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    534|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    534|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 9, False: 525]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3339|    525|            break;
 3340|  2.31k|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (3340:9): [True: 2.31k, False: 5.03k]
  ------------------
 3341|  2.31k|            LY_CHECK_RET(parse_choice(ctx, (struct lysp_node *)cas, &cas->child));
  ------------------
  |  |  206|  2.31k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.31k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.31k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.31k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1.99k, False: 311]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3342|    311|            break;
 3343|    286|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (3343:9): [True: 286, False: 7.06k]
  ------------------
 3344|    286|            LY_CHECK_RET(parse_container(ctx, (struct lysp_node *)cas, &cas->child));
  ------------------
  |  |  206|    286|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    286|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    286|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    286|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 81, False: 205]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3345|    205|            break;
 3346|    203|        case LY_STMT_LEAF:
  ------------------
  |  Branch (3346:9): [True: 203, False: 7.14k]
  ------------------
 3347|    203|            LY_CHECK_RET(parse_leaf(ctx, (struct lysp_node *)cas, &cas->child));
  ------------------
  |  |  206|    203|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    203|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    203|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    203|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 198]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3348|    198|            break;
 3349|    481|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (3349:9): [True: 481, False: 6.86k]
  ------------------
 3350|    481|            LY_CHECK_RET(parse_leaflist(ctx, (struct lysp_node *)cas, &cas->child));
  ------------------
  |  |  206|    481|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    481|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    481|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    481|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 6, False: 475]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3351|    475|            break;
 3352|    351|        case LY_STMT_LIST:
  ------------------
  |  Branch (3352:9): [True: 351, False: 6.99k]
  ------------------
 3353|    351|            LY_CHECK_RET(parse_list(ctx, (struct lysp_node *)cas, &cas->child));
  ------------------
  |  |  206|    351|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    351|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    351|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    351|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 274, False: 77]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3354|     77|            break;
 3355|    388|        case LY_STMT_USES:
  ------------------
  |  Branch (3355:9): [True: 388, False: 6.96k]
  ------------------
 3356|    388|            LY_CHECK_RET(parse_uses(ctx, (struct lysp_node *)cas, &cas->child));
  ------------------
  |  |  206|    388|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    388|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    388|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    388|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 160, False: 228]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3357|    228|            break;
 3358|  1.39k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3358:9): [True: 1.39k, False: 5.95k]
  ------------------
 3359|  1.39k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, cas, LY_STMT_CASE, 0, &cas->exts));
  ------------------
  |  |  206|  1.39k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.39k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.39k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.39k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 1.38k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3360|  1.38k|            break;
 3361|     21|        default:
  ------------------
  |  Branch (3361:9): [True: 21, False: 7.32k]
  ------------------
 3362|     21|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "case");
  ------------------
  |  |  129|     21|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     42|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 21, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3363|     21|            return LY_EVALID;
 3364|  7.34k|        }
 3365|  9.47k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, cas->exts, ret, cleanup);
  ------------------
  |  |   99|  4.76k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 63, False: 4.70k]
  |  |  ------------------
  |  |  100|     63|        goto ERR_LABEL; \
  |  |  101|     63|    } \
  |  |  102|  4.76k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 498, False: 4.20k]
  |  |  ------------------
  |  |  103|    498|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 456, False: 42]
  |  |  |  Branch (103:21): [True: 0, False: 456]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|    498|        __loop_end = 1; \
  |  |  107|    498|    }
  ------------------
 3366|  4.70k|    }
 3367|       |
 3368|  3.42k|cleanup:
 3369|  3.42k|    return ret;
 3370|  11.9k|}
parse_choice:
 3381|  30.3k|{
 3382|  30.3k|    LY_ERR ret = LY_SUCCESS;
 3383|  30.3k|    char *buf, *word;
 3384|  30.3k|    size_t word_len;
 3385|  30.3k|    enum ly_stmt kw;
 3386|  30.3k|    struct lysp_node_choice *choice;
 3387|       |
 3388|       |    /* create new choice structure */
 3389|  30.3k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), siblings, choice, next, LY_EMEM);
  ------------------
  |  |  285|  30.3k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|  30.3k|    { \
  |  |  |  |  266|  30.3k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|  30.3k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 30.3k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|  30.3k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|  30.3k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  30.3k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 10.1k, False: 20.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|  10.1k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|  20.1k|    } else { \
  |  |  |  |  |  |  245|  20.1k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|  20.1k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|   144k|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 124k, False: 20.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|   124k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|   124k|        } \
  |  |  |  |  |  |  250|  20.1k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|  20.1k|    }
  |  |  |  |  ------------------
  |  |  |  |  273|  30.3k|    }
  |  |  ------------------
  ------------------
 3390|  30.3k|    choice->nodetype = LYS_CHOICE;
  ------------------
  |  |  241|  30.3k|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
 3391|  30.3k|    choice->parent = parent;
 3392|       |
 3393|       |    /* get name */
 3394|  30.3k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  30.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  30.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  30.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  30.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 50, False: 30.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3395|  30.3k|    INSERT_WORD_GOTO(ctx, buf, choice->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  30.3k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    208|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 104]
  |  |  |  |  |  Branch (202:40): [True: 104, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 104, False: 30.2k]
  |  |  ------------------
  |  |   51|  30.3k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   120k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 30.2k]
  |  |  |  |  |  Branch (202:40): [True: 30.2k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 30.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3396|       |
 3397|       |    /* parse substatements */
 3398|  72.5k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  30.3k|    ly_bool __loop_end = 0; \
  |  |   73|  30.3k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 14, False: 30.3k]
  |  |  ------------------
  |  |   74|     14|        goto ERR_LABEL; \
  |  |   75|     14|    } \
  |  |   76|  30.3k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 9.56k, False: 20.7k]
  |  |  ------------------
  |  |   77|  9.56k|        __loop_end = 1; \
  |  |   78|  20.7k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 5, False: 20.7k]
  |  |  ------------------
  |  |   79|      5|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      5|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     10|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 5, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      5|        RET = LY_EVALID; \
  |  |   81|      5|        goto ERR_LABEL; \
  |  |   82|  20.7k|    } else { \
  |  |   83|  20.7k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  20.7k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 28, False: 20.7k]
  |  |  |  |  ------------------
  |  |  |  |  100|     28|        goto ERR_LABEL; \
  |  |  |  |  101|     28|    } \
  |  |  |  |  102|  20.7k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 79, False: 20.6k]
  |  |  |  |  ------------------
  |  |  |  |  103|     79|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 79]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|     79|        __loop_end = 1; \
  |  |  |  |  107|     79|    }
  |  |  ------------------
  |  |   84|  20.7k|    } \
  |  |   85|  99.0k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 72.5k, False: 26.4k]
  |  |  ------------------
  ------------------
 3399|  72.5k|        switch (kw) {
 3400|     67|        case LY_STMT_CONFIG:
  ------------------
  |  Branch (3400:9): [True: 67, False: 72.5k]
  ------------------
 3401|     67|            LY_CHECK_RET(parse_config(ctx, &choice->flags, &choice->exts));
  ------------------
  |  |  206|     67|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     67|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     67|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     67|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 13, False: 54]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3402|     54|            break;
 3403|  14.2k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (3403:9): [True: 14.2k, False: 58.3k]
  ------------------
 3404|  14.2k|            LY_CHECK_RET(parse_text_field(ctx, choice->dsc, LY_STMT_DESCRIPTION, 0, &choice->dsc, Y_STR_ARG, &choice->exts));
  ------------------
  |  |  206|  14.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 14.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3405|  14.2k|            break;
 3406|    222|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (3406:9): [True: 222, False: 72.3k]
  ------------------
 3407|    222|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &choice->iffeatures, Y_STR_ARG, &choice->exts));
  ------------------
  |  |  206|    222|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    222|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    222|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    222|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 7, False: 215]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3408|    215|            break;
 3409|  14.6k|        case LY_STMT_MANDATORY:
  ------------------
  |  Branch (3409:9): [True: 14.6k, False: 57.9k]
  ------------------
 3410|  14.6k|            LY_CHECK_RET(parse_mandatory(ctx, &choice->flags, &choice->exts));
  ------------------
  |  |  206|  14.6k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.6k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.6k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.6k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 14.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3411|  14.6k|            break;
 3412|     77|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (3412:9): [True: 77, False: 72.4k]
  ------------------
 3413|     77|            LY_CHECK_RET(parse_text_field(ctx, choice->ref, LY_STMT_REFERENCE, 0, &choice->ref, Y_STR_ARG, &choice->exts));
  ------------------
  |  |  206|     77|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     77|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     77|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     77|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 76]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3414|     76|            break;
 3415|  1.43k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (3415:9): [True: 1.43k, False: 71.1k]
  ------------------
 3416|  1.43k|            LY_CHECK_RET(parse_status(ctx, &choice->flags, &choice->exts));
  ------------------
  |  |  206|  1.43k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.43k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.43k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.43k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 11, False: 1.42k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3417|  1.42k|            break;
 3418|    217|        case LY_STMT_WHEN:
  ------------------
  |  Branch (3418:9): [True: 217, False: 72.3k]
  ------------------
 3419|    217|            LY_CHECK_RET(parse_when(ctx, &choice->when));
  ------------------
  |  |  206|    217|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    217|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    217|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    217|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 214]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3420|    214|            break;
 3421|     79|        case LY_STMT_DEFAULT:
  ------------------
  |  Branch (3421:9): [True: 79, False: 72.4k]
  ------------------
 3422|     79|            LY_CHECK_RET(parse_text_field(ctx, &choice->dflt, LY_STMT_DEFAULT, 0, &choice->dflt.str, Y_PREF_IDENTIF_ARG,
  ------------------
  |  |  206|     79|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     79|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     79|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     79|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 78]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3423|     78|                    &choice->exts));
 3424|     78|            choice->dflt.mod = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|     78|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 3425|     78|            break;
 3426|       |
 3427|      1|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (3427:9): [True: 1, False: 72.5k]
  ------------------
 3428|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "anydata", "choice");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3429|       |        /* fall through */
 3430|     65|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (3430:9): [True: 65, False: 72.5k]
  ------------------
 3431|     65|            LY_CHECK_RET(parse_any(ctx, kw, (struct lysp_node *)choice, &choice->child));
  ------------------
  |  |  206|     65|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     65|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     65|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     65|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 57]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3432|     57|            break;
 3433|  5.77k|        case LY_STMT_CASE:
  ------------------
  |  Branch (3433:9): [True: 5.77k, False: 66.7k]
  ------------------
 3434|  5.77k|            LY_CHECK_RET(parse_case(ctx, (struct lysp_node *)choice, &choice->child));
  ------------------
  |  |  206|  5.77k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  5.77k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  5.77k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  5.77k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2.57k, False: 3.19k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3435|  3.19k|            break;
 3436|      3|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (3436:9): [True: 3, False: 72.5k]
  ------------------
 3437|      3|            PARSER_CHECK_STMTVER2_RET(ctx, "choice", "choice");
  ------------------
  |  |   56|      3|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      3|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      3|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      6|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 3, False: 0]
  |  |  ------------------
  ------------------
 3438|      0|            LY_CHECK_RET(parse_choice(ctx, (struct lysp_node *)choice, &choice->child));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3439|      0|            break;
 3440|  29.8k|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (3440:9): [True: 29.8k, False: 42.7k]
  ------------------
 3441|  29.8k|            LY_CHECK_RET(parse_container(ctx, (struct lysp_node *)choice, &choice->child));
  ------------------
  |  |  206|  29.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  29.8k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  29.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  29.8k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 369, False: 29.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3442|  29.4k|            break;
 3443|    233|        case LY_STMT_LEAF:
  ------------------
  |  Branch (3443:9): [True: 233, False: 72.3k]
  ------------------
 3444|    233|            LY_CHECK_RET(parse_leaf(ctx, (struct lysp_node *)choice, &choice->child));
  ------------------
  |  |  206|    233|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    233|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    233|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    233|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 228]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3445|    228|            break;
 3446|  1.80k|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (3446:9): [True: 1.80k, False: 70.7k]
  ------------------
 3447|  1.80k|            LY_CHECK_RET(parse_leaflist(ctx, (struct lysp_node *)choice, &choice->child));
  ------------------
  |  |  206|  1.80k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.80k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.80k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.80k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 11, False: 1.79k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3448|  1.79k|            break;
 3449|  1.63k|        case LY_STMT_LIST:
  ------------------
  |  Branch (3449:9): [True: 1.63k, False: 70.9k]
  ------------------
 3450|  1.63k|            LY_CHECK_RET(parse_list(ctx, (struct lysp_node *)choice, &choice->child));
  ------------------
  |  |  206|  1.63k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.63k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.63k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.63k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 664, False: 971]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3451|    971|            break;
 3452|  2.26k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3452:9): [True: 2.26k, False: 70.3k]
  ------------------
 3453|  2.26k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, choice, LY_STMT_CHOICE, 0, &choice->exts));
  ------------------
  |  |  206|  2.26k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.26k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.26k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.26k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 2.26k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3454|  2.26k|            break;
 3455|     18|        default:
  ------------------
  |  Branch (3455:9): [True: 18, False: 72.5k]
  ------------------
 3456|     18|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "choice");
  ------------------
  |  |  129|     18|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     36|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 18, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3457|     18|            return LY_EVALID;
 3458|  72.5k|        }
 3459|   137k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, choice->exts, ret, cleanup);
  ------------------
  |  |   99|  68.8k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 83, False: 68.7k]
  |  |  ------------------
  |  |  100|     83|        goto ERR_LABEL; \
  |  |  101|     83|    } \
  |  |  102|  68.8k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 16.8k, False: 51.9k]
  |  |  ------------------
  |  |  103|  16.8k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 2.41k, False: 14.4k]
  |  |  |  Branch (103:21): [True: 0, False: 2.41k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  16.8k|        __loop_end = 1; \
  |  |  107|  16.8k|    }
  ------------------
 3460|  68.7k|    }
 3461|       |
 3462|  26.6k|cleanup:
 3463|  26.6k|    return ret;
 3464|  60.5k|}
parse_container:
 3475|  81.6k|{
 3476|  81.6k|    LY_ERR ret = 0;
 3477|  81.6k|    char *buf, *word;
 3478|  81.6k|    size_t word_len;
 3479|  81.6k|    enum ly_stmt kw;
 3480|  81.6k|    struct lysp_node_container *cont;
 3481|       |
 3482|       |    /* create new container structure */
 3483|  81.6k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), siblings, cont, next, LY_EMEM);
  ------------------
  |  |  285|  81.6k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|  81.6k|    { \
  |  |  |  |  266|  81.6k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|  81.6k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 81.6k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|  81.6k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|  81.6k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  81.6k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 46.7k, False: 34.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|  46.7k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|  46.7k|    } else { \
  |  |  |  |  |  |  245|  34.9k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|  34.9k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|   220k|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 185k, False: 34.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|   185k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|   185k|        } \
  |  |  |  |  |  |  250|  34.9k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|  34.9k|    }
  |  |  |  |  ------------------
  |  |  |  |  273|  81.6k|    }
  |  |  ------------------
  ------------------
 3484|  81.6k|    cont->nodetype = LYS_CONTAINER;
  ------------------
  |  |  240|  81.6k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
 3485|  81.6k|    cont->parent = parent;
 3486|       |
 3487|       |    /* get name */
 3488|  81.6k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  81.6k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  81.6k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  81.6k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  81.6k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 32, False: 81.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3489|  81.6k|    INSERT_WORD_GOTO(ctx, buf, cont->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  81.6k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    138|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 69]
  |  |  |  |  |  Branch (202:40): [True: 69, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 69, False: 81.5k]
  |  |  ------------------
  |  |   51|  81.6k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   326k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 81.5k]
  |  |  |  |  |  Branch (202:40): [True: 81.5k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 81.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3490|       |
 3491|       |    /* parse substatements */
 3492|   280k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  81.6k|    ly_bool __loop_end = 0; \
  |  |   73|  81.6k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 7, False: 81.6k]
  |  |  ------------------
  |  |   74|      7|        goto ERR_LABEL; \
  |  |   75|      7|    } \
  |  |   76|  81.6k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 3.39k, False: 78.2k]
  |  |  ------------------
  |  |   77|  3.39k|        __loop_end = 1; \
  |  |   78|  78.2k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 7, False: 78.2k]
  |  |  ------------------
  |  |   79|      7|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      7|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     14|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 7, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      7|        RET = LY_EVALID; \
  |  |   81|      7|        goto ERR_LABEL; \
  |  |   82|  78.2k|    } else { \
  |  |   83|  78.2k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  78.2k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 31, False: 78.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|     31|        goto ERR_LABEL; \
  |  |  |  |  101|     31|    } \
  |  |  |  |  102|  78.2k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 25, False: 78.1k]
  |  |  |  |  ------------------
  |  |  |  |  103|     25|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 25]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|     25|        __loop_end = 1; \
  |  |  |  |  107|     25|    }
  |  |  ------------------
  |  |   84|  78.1k|    } \
  |  |   85|   355k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 280k, False: 74.9k]
  |  |  ------------------
  ------------------
 3493|   280k|        switch (kw) {
 3494|  42.3k|        case LY_STMT_CONFIG:
  ------------------
  |  Branch (3494:9): [True: 42.3k, False: 237k]
  ------------------
 3495|  42.3k|            LY_CHECK_RET(parse_config(ctx, &cont->flags, &cont->exts));
  ------------------
  |  |  206|  42.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  42.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  42.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  42.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 19, False: 42.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3496|  42.3k|            break;
 3497|  70.3k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (3497:9): [True: 70.3k, False: 209k]
  ------------------
 3498|  70.3k|            LY_CHECK_RET(parse_text_field(ctx, cont->dsc, LY_STMT_DESCRIPTION, 0, &cont->dsc, Y_STR_ARG, &cont->exts));
  ------------------
  |  |  206|  70.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  70.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  70.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  70.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 70.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3499|  70.3k|            break;
 3500|    162|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (3500:9): [True: 162, False: 280k]
  ------------------
 3501|    162|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &cont->iffeatures, Y_STR_ARG, &cont->exts));
  ------------------
  |  |  206|    162|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    162|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    162|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    162|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 160]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3502|    160|            break;
 3503|    205|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (3503:9): [True: 205, False: 279k]
  ------------------
 3504|    205|            LY_CHECK_RET(parse_text_field(ctx, cont->ref, LY_STMT_REFERENCE, 0, &cont->ref, Y_STR_ARG, &cont->exts));
  ------------------
  |  |  206|    205|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    205|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    205|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    205|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 202]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3505|    202|            break;
 3506|  14.1k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (3506:9): [True: 14.1k, False: 266k]
  ------------------
 3507|  14.1k|            LY_CHECK_RET(parse_status(ctx, &cont->flags, &cont->exts));
  ------------------
  |  |  206|  14.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3508|  14.0k|            break;
 3509|    113|        case LY_STMT_WHEN:
  ------------------
  |  Branch (3509:9): [True: 113, False: 280k]
  ------------------
 3510|    113|            LY_CHECK_RET(parse_when(ctx, &cont->when));
  ------------------
  |  |  206|    113|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    113|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    113|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    113|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 105]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3511|    105|            break;
 3512|  28.8k|        case LY_STMT_PRESENCE:
  ------------------
  |  Branch (3512:9): [True: 28.8k, False: 251k]
  ------------------
 3513|  28.8k|            LY_CHECK_RET(parse_text_field(ctx, cont->presence, LY_STMT_PRESENCE, 0, &cont->presence, Y_STR_ARG, &cont->exts));
  ------------------
  |  |  206|  28.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.8k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.8k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 28.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3514|  28.8k|            break;
 3515|       |
 3516|      1|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (3516:9): [True: 1, False: 280k]
  ------------------
 3517|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "anydata", "container");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3518|       |        /* fall through */
 3519|    308|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (3519:9): [True: 308, False: 279k]
  ------------------
 3520|    308|            LY_CHECK_RET(parse_any(ctx, kw, (struct lysp_node *)cont, &cont->child));
  ------------------
  |  |  206|    308|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    308|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    308|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    308|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 7, False: 301]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3521|    301|            break;
 3522|    293|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (3522:9): [True: 293, False: 279k]
  ------------------
 3523|    293|            LY_CHECK_RET(parse_choice(ctx, (struct lysp_node *)cont, &cont->child));
  ------------------
  |  |  206|    293|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    293|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    293|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    293|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 203, False: 90]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3524|     90|            break;
 3525|  7.12k|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (3525:9): [True: 7.12k, False: 273k]
  ------------------
 3526|  7.12k|            LY_CHECK_RET(parse_container(ctx, (struct lysp_node *)cont, &cont->child));
  ------------------
  |  |  206|  7.12k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  7.12k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  7.12k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  7.12k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5.06k, False: 2.06k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3527|  2.06k|            break;
 3528|  28.3k|        case LY_STMT_LEAF:
  ------------------
  |  Branch (3528:9): [True: 28.3k, False: 251k]
  ------------------
 3529|  28.3k|            LY_CHECK_RET(parse_leaf(ctx, (struct lysp_node *)cont, &cont->child));
  ------------------
  |  |  206|  28.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 6, False: 28.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3530|  28.3k|            break;
 3531|  14.9k|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (3531:9): [True: 14.9k, False: 265k]
  ------------------
 3532|  14.9k|            LY_CHECK_RET(parse_leaflist(ctx, (struct lysp_node *)cont, &cont->child));
  ------------------
  |  |  206|  14.9k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.9k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.9k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.9k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 14.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3533|  14.9k|            break;
 3534|  28.9k|        case LY_STMT_LIST:
  ------------------
  |  Branch (3534:9): [True: 28.9k, False: 251k]
  ------------------
 3535|  28.9k|            LY_CHECK_RET(parse_list(ctx, (struct lysp_node *)cont, &cont->child));
  ------------------
  |  |  206|  28.9k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.9k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.9k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.9k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 115, False: 28.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3536|  28.7k|            break;
 3537|  36.4k|        case LY_STMT_USES:
  ------------------
  |  Branch (3537:9): [True: 36.4k, False: 243k]
  ------------------
 3538|  36.4k|            LY_CHECK_RET(parse_uses(ctx, (struct lysp_node *)cont, &cont->child));
  ------------------
  |  |  206|  36.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  36.4k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  36.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  36.4k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 313, False: 36.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3539|  36.1k|            break;
 3540|       |
 3541|    222|        case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (3541:9): [True: 222, False: 279k]
  ------------------
 3542|    222|            LY_CHECK_RET(parse_typedef(ctx, (struct lysp_node *)cont, &cont->typedefs));
  ------------------
  |  |  206|    222|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    222|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    222|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    222|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 7, False: 215]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3543|    215|            break;
 3544|    494|        case LY_STMT_MUST:
  ------------------
  |  Branch (3544:9): [True: 494, False: 279k]
  ------------------
 3545|    494|            LY_CHECK_RET(parse_restrs(ctx, kw, &cont->musts));
  ------------------
  |  |  206|    494|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    494|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    494|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    494|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 486]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3546|    486|            break;
 3547|      1|        case LY_STMT_ACTION:
  ------------------
  |  Branch (3547:9): [True: 1, False: 280k]
  ------------------
 3548|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "action", "container");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3549|      0|            LY_CHECK_RET(parse_action(ctx, (struct lysp_node *)cont, &cont->actions));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3550|      0|            break;
 3551|    907|        case LY_STMT_GROUPING:
  ------------------
  |  Branch (3551:9): [True: 907, False: 279k]
  ------------------
 3552|    907|            LY_CHECK_RET(parse_grouping(ctx, (struct lysp_node *)cont, &cont->groupings));
  ------------------
  |  |  206|    907|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    907|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    907|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    907|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 696, False: 211]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3553|    211|            break;
 3554|      1|        case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (3554:9): [True: 1, False: 280k]
  ------------------
 3555|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "notification", "container");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3556|      0|            LY_CHECK_RET(parse_notif(ctx, (struct lysp_node *)cont, &cont->notifs));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3557|      0|            break;
 3558|  5.95k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3558:9): [True: 5.95k, False: 274k]
  ------------------
 3559|  5.95k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, cont, LY_STMT_CONTAINER, 0, &cont->exts));
  ------------------
  |  |  206|  5.95k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  5.95k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  5.95k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  5.95k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 5.95k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3560|  5.95k|            break;
 3561|     11|        default:
  ------------------
  |  Branch (3561:9): [True: 11, False: 280k]
  ------------------
 3562|     11|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "container");
  ------------------
  |  |  129|     11|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     22|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 11, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3563|     11|            return LY_EVALID;
 3564|   280k|        }
 3565|   547k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, cont->exts, ret, cleanup);
  ------------------
  |  |   99|   273k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 123, False: 273k]
  |  |  ------------------
  |  |  100|    123|        goto ERR_LABEL; \
  |  |  101|    123|    } \
  |  |  102|   273k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 71.5k, False: 202k]
  |  |  ------------------
  |  |  103|  71.5k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 552, False: 71.0k]
  |  |  |  Branch (103:21): [True: 0, False: 552]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  71.5k|        __loop_end = 1; \
  |  |  107|  71.5k|    }
  ------------------
 3566|   273k|    }
 3567|       |
 3568|  75.1k|cleanup:
 3569|  75.1k|    return ret;
 3570|   163k|}
parse_list:
 3581|   207k|{
 3582|   207k|    LY_ERR ret = LY_SUCCESS;
 3583|   207k|    char *buf, *word;
 3584|   207k|    size_t word_len;
 3585|   207k|    enum ly_stmt kw;
 3586|   207k|    struct lysp_node_list *list;
 3587|       |
 3588|       |    /* create new list structure */
 3589|   207k|    LY_LIST_NEW_RET(PARSER_CTX(ctx), siblings, list, next, LY_EMEM);
  ------------------
  |  |  285|   207k|    LY_LIST_NEW(CTX, LIST, NEW_ITEM, LINKER, return RETVAL)
  |  |  ------------------
  |  |  |  |  265|   207k|    { \
  |  |  |  |  266|   207k|        char *p__ = (char *)calloc(1, sizeof *NEW_ITEM); \
  |  |  |  |  267|   207k|        if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:13): [True: 0, False: 207k]
  |  |  |  |  ------------------
  |  |  |  |  268|      0|            LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  269|      0|            EACTION; \
  |  |  |  |  270|      0|        } \
  |  |  |  |  271|   207k|        memcpy(&(NEW_ITEM), &p__, sizeof p__); \
  |  |  |  |  272|   207k|        LY_LIST_INSERT(LIST, NEW_ITEM, LINKER); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   207k|    if (!(*LIST)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (242:9): [True: 57.5k, False: 149k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  243|  57.5k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  244|   149k|    } else { \
  |  |  |  |  |  |  245|   149k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  |  |  |  |  246|   149k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  |  |  |  |  247|  1.05M|        while (*iter__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (247:16): [True: 908k, False: 149k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  248|   908k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  |  |  |  |  249|   908k|        } \
  |  |  |  |  |  |  250|   149k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  |  |  |  |  251|   149k|    }
  |  |  |  |  ------------------
  |  |  |  |  273|   207k|    }
  |  |  ------------------
  ------------------
 3590|   207k|    list->nodetype = LYS_LIST;
  ------------------
  |  |  244|   207k|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
 3591|   207k|    list->parent = parent;
 3592|       |
 3593|       |    /* get name */
 3594|   207k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   207k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   207k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   207k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   207k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 76, False: 207k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3595|   207k|    INSERT_WORD_GOTO(ctx, buf, list->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|   207k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    520|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 260]
  |  |  |  |  |  Branch (202:40): [True: 260, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 260, False: 206k]
  |  |  ------------------
  |  |   51|   207k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   827k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 206k]
  |  |  |  |  |  Branch (202:40): [True: 206k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 206k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3596|       |
 3597|       |    /* parse substatements */
 3598|   958k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   207k|    ly_bool __loop_end = 0; \
  |  |   73|   207k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 24, False: 207k]
  |  |  ------------------
  |  |   74|     24|        goto ERR_LABEL; \
  |  |   75|     24|    } \
  |  |   76|   207k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 6.77k, False: 200k]
  |  |  ------------------
  |  |   77|  6.77k|        __loop_end = 1; \
  |  |   78|   200k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 4, False: 200k]
  |  |  ------------------
  |  |   79|      4|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      4|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      8|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 4, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      4|        RET = LY_EVALID; \
  |  |   81|      4|        goto ERR_LABEL; \
  |  |   82|   200k|    } else { \
  |  |   83|   200k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|   200k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 109, False: 200k]
  |  |  |  |  ------------------
  |  |  |  |  100|    109|        goto ERR_LABEL; \
  |  |  |  |  101|    109|    } \
  |  |  |  |  102|   200k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 3.86k, False: 196k]
  |  |  |  |  ------------------
  |  |  |  |  103|  3.86k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 3.86k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  3.86k|        __loop_end = 1; \
  |  |  |  |  107|  3.86k|    }
  |  |  ------------------
  |  |   84|   200k|    } \
  |  |   85|  1.14M|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 958k, False: 184k]
  |  |  ------------------
  ------------------
 3599|   958k|        switch (kw) {
 3600|    237|        case LY_STMT_CONFIG:
  ------------------
  |  Branch (3600:9): [True: 237, False: 957k]
  ------------------
 3601|    237|            LY_CHECK_RET(parse_config(ctx, &list->flags, &list->exts));
  ------------------
  |  |  206|    237|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    237|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    237|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    237|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 32, False: 205]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3602|    205|            break;
 3603|   168k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (3603:9): [True: 168k, False: 789k]
  ------------------
 3604|   168k|            LY_CHECK_RET(parse_text_field(ctx, list->dsc, LY_STMT_DESCRIPTION, 0, &list->dsc, Y_STR_ARG, &list->exts));
  ------------------
  |  |  206|   168k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   168k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   168k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   168k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 168k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3605|   168k|            break;
 3606|    249|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (3606:9): [True: 249, False: 957k]
  ------------------
 3607|    249|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &list->iffeatures, Y_STR_ARG, &list->exts));
  ------------------
  |  |  206|    249|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    249|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    249|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    249|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 244]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3608|    244|            break;
 3609|  14.7k|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (3609:9): [True: 14.7k, False: 943k]
  ------------------
 3610|  14.7k|            LY_CHECK_RET(parse_text_field(ctx, list->ref, LY_STMT_REFERENCE, 0, &list->ref, Y_STR_ARG, &list->exts));
  ------------------
  |  |  206|  14.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 14.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3611|  14.6k|            break;
 3612|  42.1k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (3612:9): [True: 42.1k, False: 916k]
  ------------------
 3613|  42.1k|            LY_CHECK_RET(parse_status(ctx, &list->flags, &list->exts));
  ------------------
  |  |  206|  42.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  42.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  42.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  42.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 42.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3614|  42.1k|            break;
 3615|    579|        case LY_STMT_WHEN:
  ------------------
  |  Branch (3615:9): [True: 579, False: 957k]
  ------------------
 3616|    579|            LY_CHECK_RET(parse_when(ctx, &list->when));
  ------------------
  |  |  206|    579|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    579|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    579|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    579|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 40, False: 539]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3617|    539|            break;
 3618|   168k|        case LY_STMT_KEY:
  ------------------
  |  Branch (3618:9): [True: 168k, False: 789k]
  ------------------
 3619|   168k|            LY_CHECK_RET(parse_text_field(ctx, list, LY_STMT_KEY, 0, &list->key, Y_STR_ARG, &list->exts));
  ------------------
  |  |  206|   168k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   168k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   168k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   168k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 168k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3620|   168k|            break;
 3621|  2.51k|        case LY_STMT_MAX_ELEMENTS:
  ------------------
  |  Branch (3621:9): [True: 2.51k, False: 955k]
  ------------------
 3622|  2.51k|            LY_CHECK_RET(parse_maxelements(ctx, &list->max, &list->flags, &list->exts));
  ------------------
  |  |  206|  2.51k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.51k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.51k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.51k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 126, False: 2.38k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3623|  2.38k|            break;
 3624|    214|        case LY_STMT_MIN_ELEMENTS:
  ------------------
  |  Branch (3624:9): [True: 214, False: 957k]
  ------------------
 3625|    214|            LY_CHECK_RET(parse_minelements(ctx, &list->min, &list->flags, &list->exts));
  ------------------
  |  |  206|    214|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    214|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    214|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    214|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 95, False: 119]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3626|    119|            break;
 3627|    420|        case LY_STMT_ORDERED_BY:
  ------------------
  |  Branch (3627:9): [True: 420, False: 957k]
  ------------------
 3628|    420|            LY_CHECK_RET(parse_orderedby(ctx, &list->node));
  ------------------
  |  |  206|    420|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    420|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    420|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    420|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 79, False: 341]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3629|    341|            break;
 3630|    320|        case LY_STMT_UNIQUE:
  ------------------
  |  Branch (3630:9): [True: 320, False: 957k]
  ------------------
 3631|    320|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_UNIQUE, &list->uniques, Y_STR_ARG, &list->exts));
  ------------------
  |  |  206|    320|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    320|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    320|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    320|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 19, False: 301]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3632|    301|            break;
 3633|       |
 3634|      1|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (3634:9): [True: 1, False: 958k]
  ------------------
 3635|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "anydata", "list");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3636|       |        /* fall through */
 3637|  4.34k|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (3637:9): [True: 4.34k, False: 953k]
  ------------------
 3638|  4.34k|            LY_CHECK_RET(parse_any(ctx, kw, (struct lysp_node *)list, &list->child));
  ------------------
  |  |  206|  4.34k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  4.34k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  4.34k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  4.34k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 39, False: 4.30k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3639|  4.30k|            break;
 3640|  17.4k|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (3640:9): [True: 17.4k, False: 940k]
  ------------------
 3641|  17.4k|            LY_CHECK_RET(parse_choice(ctx, (struct lysp_node *)list, &list->child));
  ------------------
  |  |  206|  17.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  17.4k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  17.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  17.4k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 939, False: 16.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3642|  16.4k|            break;
 3643|    182|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (3643:9): [True: 182, False: 958k]
  ------------------
 3644|    182|            LY_CHECK_RET(parse_container(ctx, (struct lysp_node *)list, &list->child));
  ------------------
  |  |  206|    182|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    182|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    182|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    182|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 93, False: 89]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3645|     89|            break;
 3646|   205k|        case LY_STMT_LEAF:
  ------------------
  |  Branch (3646:9): [True: 205k, False: 752k]
  ------------------
 3647|   205k|            LY_CHECK_RET(parse_leaf(ctx, (struct lysp_node *)list, &list->child));
  ------------------
  |  |  206|   205k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   205k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   205k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   205k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 21, False: 205k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3648|   205k|            break;
 3649|  30.2k|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (3649:9): [True: 30.2k, False: 927k]
  ------------------
 3650|  30.2k|            LY_CHECK_RET(parse_leaflist(ctx, (struct lysp_node *)list, &list->child));
  ------------------
  |  |  206|  30.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  30.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  30.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  30.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 11, False: 30.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3651|  30.2k|            break;
 3652|  83.4k|        case LY_STMT_LIST:
  ------------------
  |  Branch (3652:9): [True: 83.4k, False: 874k]
  ------------------
 3653|  83.4k|            LY_CHECK_RET(parse_list(ctx, (struct lysp_node *)list, &list->child));
  ------------------
  |  |  206|  83.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  83.4k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  83.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  83.4k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 19.4k, False: 64.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3654|  64.0k|            break;
 3655|   199k|        case LY_STMT_USES:
  ------------------
  |  Branch (3655:9): [True: 199k, False: 758k]
  ------------------
 3656|   199k|            LY_CHECK_RET(parse_uses(ctx, (struct lysp_node *)list, &list->child));
  ------------------
  |  |  206|   199k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   199k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   199k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   199k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 373, False: 199k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3657|   199k|            break;
 3658|       |
 3659|    560|        case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (3659:9): [True: 560, False: 957k]
  ------------------
 3660|    560|            LY_CHECK_RET(parse_typedef(ctx, (struct lysp_node *)list, &list->typedefs));
  ------------------
  |  |  206|    560|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    560|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    560|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    560|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 9, False: 551]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3661|    551|            break;
 3662|  1.57k|        case LY_STMT_MUST:
  ------------------
  |  Branch (3662:9): [True: 1.57k, False: 956k]
  ------------------
 3663|  1.57k|            LY_CHECK_RET(parse_restrs(ctx, kw, &list->musts));
  ------------------
  |  |  206|  1.57k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.57k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.57k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.57k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 15, False: 1.55k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3664|  1.55k|            break;
 3665|      1|        case LY_STMT_ACTION:
  ------------------
  |  Branch (3665:9): [True: 1, False: 958k]
  ------------------
 3666|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "action", "list");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3667|      0|            LY_CHECK_RET(parse_action(ctx, (struct lysp_node *)list, &list->actions));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3668|      0|            break;
 3669|    664|        case LY_STMT_GROUPING:
  ------------------
  |  Branch (3669:9): [True: 664, False: 957k]
  ------------------
 3670|    664|            LY_CHECK_RET(parse_grouping(ctx, (struct lysp_node *)list, &list->groupings));
  ------------------
  |  |  206|    664|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    664|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    664|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    664|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 574, False: 90]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3671|     90|            break;
 3672|      1|        case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (3672:9): [True: 1, False: 958k]
  ------------------
 3673|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "notification", "list");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3674|      0|            LY_CHECK_RET(parse_notif(ctx, (struct lysp_node *)list, &list->notifs));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3675|      0|            break;
 3676|  15.7k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3676:9): [True: 15.7k, False: 942k]
  ------------------
 3677|  15.7k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, list, LY_STMT_LIST, 0, &list->exts));
  ------------------
  |  |  206|  15.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  15.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  15.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  15.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 15.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3678|  15.7k|            break;
 3679|     19|        default:
  ------------------
  |  Branch (3679:9): [True: 19, False: 958k]
  ------------------
 3680|     19|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "list");
  ------------------
  |  |  129|     19|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     38|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 19, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3681|     19|            return LY_EVALID;
 3682|   958k|        }
 3683|  1.87M|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, list->exts, ret, cleanup);
  ------------------
  |  |   99|   936k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 172, False: 936k]
  |  |  ------------------
  |  |  100|    172|        goto ERR_LABEL; \
  |  |  101|    172|    } \
  |  |  102|   936k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 174k, False: 761k]
  |  |  ------------------
  |  |  103|   174k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 4.01k, False: 170k]
  |  |  |  Branch (103:21): [True: 0, False: 4.01k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|   174k|        __loop_end = 1; \
  |  |  107|   174k|    }
  ------------------
 3684|   936k|    }
 3685|       |
 3686|   185k|cleanup:
 3687|   185k|    return ret;
 3688|   414k|}
parse_deviate:
 3843|  4.10k|{
 3844|  4.10k|    LY_ERR ret = LY_SUCCESS;
 3845|  4.10k|    char *buf = NULL, *word;
 3846|  4.10k|    size_t word_len, dev_mod;
 3847|  4.10k|    enum ly_stmt kw;
 3848|  4.10k|    struct lysf_ctx fctx = {.ctx = PARSER_CTX(ctx)};
  ------------------
  |  |  128|  4.10k|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|  4.10k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 4.10k, False: 0]
  |  |  ------------------
  ------------------
 3849|  4.10k|    struct lysp_deviate *d = NULL;
 3850|  4.10k|    struct lysp_deviate_add *d_add = NULL;
 3851|  4.10k|    struct lysp_deviate_rpl *d_rpl = NULL;
 3852|  4.10k|    struct lysp_deviate_del *d_del = NULL;
 3853|  4.10k|    const char **d_units = NULL;
 3854|  4.10k|    struct lysp_qname **d_uniques = NULL, **d_dflts = NULL;
 3855|  4.10k|    struct lysp_restr **d_musts = NULL;
 3856|  4.10k|    uint16_t *d_flags = 0;
 3857|  4.10k|    uint32_t *d_min = 0, *d_max = 0;
 3858|       |
 3859|       |    /* get value */
 3860|  4.10k|    LY_CHECK_GOTO(ret = get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len), cleanup);
  ------------------
  |  |  202|  4.10k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 6, False: 4.10k]
  |  |  ------------------
  ------------------
 3861|       |
 3862|  4.10k|    if ((word_len == ly_strlen_const("not-supported")) && !strncmp(word, "not-supported", word_len)) {
  ------------------
  |  |  472|  4.10k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (3862:9): [True: 360, False: 3.74k]
  |  Branch (3862:59): [True: 325, False: 35]
  ------------------
 3863|    325|        dev_mod = LYS_DEV_NOT_SUPPORTED;
  ------------------
  |  |  470|    325|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
 3864|  3.77k|    } else if ((word_len == ly_strlen_const("add")) && !strncmp(word, "add", word_len)) {
  ------------------
  |  |  472|  3.77k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (3864:16): [True: 3.13k, False: 642]
  |  Branch (3864:56): [True: 3.12k, False: 10]
  ------------------
 3865|  3.12k|        dev_mod = LYS_DEV_ADD;
  ------------------
  |  |  471|  3.12k|#define LYS_DEV_ADD 2                /**< deviate type add */
  ------------------
 3866|  3.12k|    } else if ((word_len == ly_strlen_const("replace")) && !strncmp(word, "replace", word_len)) {
  ------------------
  |  |  472|    652|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (3866:16): [True: 426, False: 226]
  |  Branch (3866:60): [True: 397, False: 29]
  ------------------
 3867|    397|        dev_mod = LYS_DEV_REPLACE;
  ------------------
  |  |  473|    397|#define LYS_DEV_REPLACE 4            /**< deviate type replace */
  ------------------
 3868|    397|    } else if ((word_len == ly_strlen_const("delete")) && !strncmp(word, "delete", word_len)) {
  ------------------
  |  |  472|    255|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (3868:16): [True: 147, False: 108]
  |  Branch (3868:59): [True: 121, False: 26]
  ------------------
 3869|    121|        dev_mod = LYS_DEV_DELETE;
  ------------------
  |  |  472|    121|#define LYS_DEV_DELETE 3             /**< deviate type delete */
  ------------------
 3870|    134|    } else {
 3871|    134|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "deviate");
  ------------------
  |  |  129|    134|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    268|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 134, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3872|    134|        ret = LY_EVALID;
 3873|    134|        goto cleanup;
 3874|    134|    }
 3875|       |
 3876|       |    /* create structure */
 3877|  3.96k|    switch (dev_mod) {
 3878|    325|    case LYS_DEV_NOT_SUPPORTED:
  ------------------
  |  |  470|    325|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (3878:5): [True: 325, False: 3.64k]
  ------------------
 3879|    325|        d = calloc(1, sizeof *d);
 3880|    325|        LY_CHECK_ERR_GOTO(!d, LOGMEM(PARSER_CTX(ctx)); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|    325|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 325]
  |  |  |  Branch (203:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3881|    325|        break;
 3882|  3.12k|    case LYS_DEV_ADD:
  ------------------
  |  |  471|  3.12k|#define LYS_DEV_ADD 2                /**< deviate type add */
  ------------------
  |  Branch (3882:5): [True: 3.12k, False: 843]
  ------------------
 3883|  3.12k|        d_add = calloc(1, sizeof *d_add);
 3884|  3.12k|        LY_CHECK_ERR_GOTO(!d_add, LOGMEM(PARSER_CTX(ctx)); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|  3.12k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 3.12k]
  |  |  |  Branch (203:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3885|  3.12k|        d = (struct lysp_deviate *)d_add;
 3886|  3.12k|        d_units = &d_add->units;
 3887|  3.12k|        d_uniques = &d_add->uniques;
 3888|  3.12k|        d_dflts = &d_add->dflts;
 3889|  3.12k|        d_musts = &d_add->musts;
 3890|  3.12k|        d_flags = &d_add->flags;
 3891|  3.12k|        d_min = &d_add->min;
 3892|  3.12k|        d_max = &d_add->max;
 3893|  3.12k|        break;
 3894|    397|    case LYS_DEV_REPLACE:
  ------------------
  |  |  473|    397|#define LYS_DEV_REPLACE 4            /**< deviate type replace */
  ------------------
  |  Branch (3894:5): [True: 397, False: 3.57k]
  ------------------
 3895|    397|        d_rpl = calloc(1, sizeof *d_rpl);
 3896|    397|        LY_CHECK_ERR_GOTO(!d_rpl, LOGMEM(PARSER_CTX(ctx)); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|    397|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 397]
  |  |  |  Branch (203:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3897|    397|        d = (struct lysp_deviate *)d_rpl;
 3898|    397|        d_units = &d_rpl->units;
 3899|    397|        d_flags = &d_rpl->flags;
 3900|    397|        d_min = &d_rpl->min;
 3901|    397|        d_max = &d_rpl->max;
 3902|    397|        break;
 3903|    121|    case LYS_DEV_DELETE:
  ------------------
  |  |  472|    121|#define LYS_DEV_DELETE 3             /**< deviate type delete */
  ------------------
  |  Branch (3903:5): [True: 121, False: 3.84k]
  ------------------
 3904|    121|        d_del = calloc(1, sizeof *d_del);
 3905|    121|        LY_CHECK_ERR_GOTO(!d_del, LOGMEM(PARSER_CTX(ctx)); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|    121|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 121]
  |  |  |  Branch (203:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3906|    121|        d = (struct lysp_deviate *)d_del;
 3907|    121|        d_units = &d_del->units;
 3908|    121|        d_uniques = &d_del->uniques;
 3909|    121|        d_dflts = &d_del->dflts;
 3910|    121|        d_musts = &d_del->musts;
 3911|    121|        break;
 3912|      0|    default:
  ------------------
  |  Branch (3912:5): [True: 0, False: 3.96k]
  ------------------
 3913|      0|        assert(0);
 3914|      0|        LOGINT(PARSER_CTX(ctx));
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3915|      0|        ret = LY_EINT;
 3916|      0|        goto cleanup;
 3917|  3.96k|    }
 3918|  3.96k|    d->mod = dev_mod;
 3919|       |
 3920|  7.92k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  3.96k|    ly_bool __loop_end = 0; \
  |  |   73|  3.96k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 2, False: 3.96k]
  |  |  ------------------
  |  |   74|      2|        goto ERR_LABEL; \
  |  |   75|      2|    } \
  |  |   76|  3.96k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 1.61k, False: 2.35k]
  |  |  ------------------
  |  |   77|  1.61k|        __loop_end = 1; \
  |  |   78|  2.35k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 3, False: 2.35k]
  |  |  ------------------
  |  |   79|      3|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      3|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      6|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      3|        RET = LY_EVALID; \
  |  |   81|      3|        goto ERR_LABEL; \
  |  |   82|  2.35k|    } else { \
  |  |   83|  2.35k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  2.35k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 7, False: 2.34k]
  |  |  |  |  ------------------
  |  |  |  |  100|      7|        goto ERR_LABEL; \
  |  |  |  |  101|      7|    } \
  |  |  |  |  102|  2.35k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 113, False: 2.23k]
  |  |  |  |  ------------------
  |  |  |  |  103|    113|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 113]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    113|        __loop_end = 1; \
  |  |  |  |  107|    113|    }
  |  |  ------------------
  |  |   84|  2.34k|    } \
  |  |   85|  9.70k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 5.84k, False: 3.86k]
  |  |  ------------------
  ------------------
 3921|  5.84k|        switch (kw) {
 3922|  1.06k|        case LY_STMT_CONFIG:
  ------------------
  |  Branch (3922:9): [True: 1.06k, False: 4.78k]
  ------------------
 3923|  1.06k|            switch (dev_mod) {
 3924|      1|            case LYS_DEV_NOT_SUPPORTED:
  ------------------
  |  |  470|      1|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (3924:13): [True: 1, False: 1.06k]
  ------------------
 3925|      1|            case LYS_DEV_DELETE:
  ------------------
  |  |  472|      1|#define LYS_DEV_DELETE 3             /**< deviate type delete */
  ------------------
  |  Branch (3925:13): [True: 0, False: 1.06k]
  ------------------
 3926|      1|                LOGVAL_PARSER(ctx, LY_VCODE_INDEV, ly_devmod2str(dev_mod), lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3927|      1|                ret = LY_EVALID;
 3928|      1|                goto cleanup;
 3929|  1.06k|            default:
  ------------------
  |  Branch (3929:13): [True: 1.06k, False: 1]
  ------------------
 3930|  1.06k|                LY_CHECK_GOTO(ret = parse_config(ctx, d_flags, &d->exts), cleanup);
  ------------------
  |  |  202|  1.06k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 5, False: 1.06k]
  |  |  ------------------
  ------------------
 3931|  1.06k|                break;
 3932|  1.06k|            }
 3933|  1.06k|            break;
 3934|  1.06k|        case LY_STMT_DEFAULT:
  ------------------
  |  Branch (3934:9): [True: 340, False: 5.50k]
  ------------------
 3935|    340|            switch (dev_mod) {
 3936|      1|            case LYS_DEV_NOT_SUPPORTED:
  ------------------
  |  |  470|      1|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (3936:13): [True: 1, False: 339]
  ------------------
 3937|      1|                LOGVAL_PARSER(ctx, LY_VCODE_INDEV, ly_devmod2str(dev_mod), lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3938|      1|                ret = LY_EVALID;
 3939|      1|                goto cleanup;
 3940|    205|            case LYS_DEV_REPLACE:
  ------------------
  |  |  473|    205|#define LYS_DEV_REPLACE 4            /**< deviate type replace */
  ------------------
  |  Branch (3940:13): [True: 205, False: 135]
  ------------------
 3941|    205|                ret = parse_text_field(ctx, &d_rpl->dflt, LY_STMT_DEFAULT, 0, &d_rpl->dflt.str, Y_STR_ARG, &d->exts);
 3942|    205|                LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|    205|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 1, False: 204]
  |  |  ------------------
  ------------------
 3943|    204|                d_rpl->dflt.mod = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|    204|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 3944|    204|                break;
 3945|    134|            default:
  ------------------
  |  Branch (3945:13): [True: 134, False: 206]
  ------------------
 3946|    134|                LY_CHECK_GOTO(ret = parse_qnames(ctx, LY_STMT_DEFAULT, d_dflts, Y_STR_ARG, &d->exts), cleanup);
  ------------------
  |  |  202|    134|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 6, False: 128]
  |  |  ------------------
  ------------------
 3947|    128|                break;
 3948|    340|            }
 3949|    332|            break;
 3950|    332|        case LY_STMT_MANDATORY:
  ------------------
  |  Branch (3950:9): [True: 2, False: 5.84k]
  ------------------
 3951|      2|            switch (dev_mod) {
 3952|      0|            case LYS_DEV_NOT_SUPPORTED:
  ------------------
  |  |  470|      0|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (3952:13): [True: 0, False: 2]
  ------------------
 3953|      0|            case LYS_DEV_DELETE:
  ------------------
  |  |  472|      0|#define LYS_DEV_DELETE 3             /**< deviate type delete */
  ------------------
  |  Branch (3953:13): [True: 0, False: 2]
  ------------------
 3954|      0|                LOGVAL_PARSER(ctx, LY_VCODE_INDEV, ly_devmod2str(dev_mod), lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3955|      0|                ret = LY_EVALID;
 3956|      0|                goto cleanup;
 3957|      2|            default:
  ------------------
  |  Branch (3957:13): [True: 2, False: 0]
  ------------------
 3958|      2|                LY_CHECK_GOTO(ret = parse_mandatory(ctx, d_flags, &d->exts), cleanup);
  ------------------
  |  |  202|      2|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 1, False: 1]
  |  |  ------------------
  ------------------
 3959|      1|                break;
 3960|      2|            }
 3961|      1|            break;
 3962|     21|        case LY_STMT_MAX_ELEMENTS:
  ------------------
  |  Branch (3962:9): [True: 21, False: 5.82k]
  ------------------
 3963|     21|            switch (dev_mod) {
 3964|      0|            case LYS_DEV_NOT_SUPPORTED:
  ------------------
  |  |  470|      0|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (3964:13): [True: 0, False: 21]
  ------------------
 3965|      0|            case LYS_DEV_DELETE:
  ------------------
  |  |  472|      0|#define LYS_DEV_DELETE 3             /**< deviate type delete */
  ------------------
  |  Branch (3965:13): [True: 0, False: 21]
  ------------------
 3966|      0|                LOGVAL_PARSER(ctx, LY_VCODE_INDEV, ly_devmod2str(dev_mod), lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3967|      0|                ret = LY_EVALID;
 3968|      0|                goto cleanup;
 3969|     21|            default:
  ------------------
  |  Branch (3969:13): [True: 21, False: 0]
  ------------------
 3970|     21|                LY_CHECK_GOTO(ret = parse_maxelements(ctx, d_max, d_flags, &d->exts), cleanup);
  ------------------
  |  |  202|     21|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 2, False: 19]
  |  |  ------------------
  ------------------
 3971|     19|                break;
 3972|     21|            }
 3973|     19|            break;
 3974|     19|        case LY_STMT_MIN_ELEMENTS:
  ------------------
  |  Branch (3974:9): [True: 19, False: 5.83k]
  ------------------
 3975|     19|            switch (dev_mod) {
 3976|      0|            case LYS_DEV_NOT_SUPPORTED:
  ------------------
  |  |  470|      0|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (3976:13): [True: 0, False: 19]
  ------------------
 3977|      0|            case LYS_DEV_DELETE:
  ------------------
  |  |  472|      0|#define LYS_DEV_DELETE 3             /**< deviate type delete */
  ------------------
  |  Branch (3977:13): [True: 0, False: 19]
  ------------------
 3978|      0|                LOGVAL_PARSER(ctx, LY_VCODE_INDEV, ly_devmod2str(dev_mod), lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3979|      0|                ret = LY_EVALID;
 3980|      0|                goto cleanup;
 3981|     19|            default:
  ------------------
  |  Branch (3981:13): [True: 19, False: 0]
  ------------------
 3982|     19|                LY_CHECK_GOTO(ret = parse_minelements(ctx, d_min, d_flags, &d->exts), cleanup);
  ------------------
  |  |  202|     19|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 1, False: 18]
  |  |  ------------------
  ------------------
 3983|     18|                break;
 3984|     19|            }
 3985|     18|            break;
 3986|    662|        case LY_STMT_MUST:
  ------------------
  |  Branch (3986:9): [True: 662, False: 5.18k]
  ------------------
 3987|    662|            switch (dev_mod) {
 3988|      1|            case LYS_DEV_NOT_SUPPORTED:
  ------------------
  |  |  470|      1|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (3988:13): [True: 1, False: 661]
  ------------------
 3989|      2|            case LYS_DEV_REPLACE:
  ------------------
  |  |  473|      2|#define LYS_DEV_REPLACE 4            /**< deviate type replace */
  ------------------
  |  Branch (3989:13): [True: 1, False: 661]
  ------------------
 3990|      2|                LOGVAL_PARSER(ctx, LY_VCODE_INDEV, ly_devmod2str(dev_mod), lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3991|      2|                ret = LY_EVALID;
 3992|      2|                goto cleanup;
 3993|    660|            default:
  ------------------
  |  Branch (3993:13): [True: 660, False: 2]
  ------------------
 3994|    660|                LY_CHECK_GOTO(ret = parse_restrs(ctx, kw, d_musts), cleanup);
  ------------------
  |  |  202|    660|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 6, False: 654]
  |  |  ------------------
  ------------------
 3995|    654|                break;
 3996|    662|            }
 3997|    654|            break;
 3998|    654|        case LY_STMT_TYPE:
  ------------------
  |  Branch (3998:9): [True: 81, False: 5.76k]
  ------------------
 3999|     81|            switch (dev_mod) {
 4000|      0|            case LYS_DEV_NOT_SUPPORTED:
  ------------------
  |  |  470|      0|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (4000:13): [True: 0, False: 81]
  ------------------
 4001|      1|            case LYS_DEV_ADD:
  ------------------
  |  |  471|      1|#define LYS_DEV_ADD 2                /**< deviate type add */
  ------------------
  |  Branch (4001:13): [True: 1, False: 80]
  ------------------
 4002|      1|            case LYS_DEV_DELETE:
  ------------------
  |  |  472|      1|#define LYS_DEV_DELETE 3             /**< deviate type delete */
  ------------------
  |  Branch (4002:13): [True: 0, False: 81]
  ------------------
 4003|      1|                LOGVAL_PARSER(ctx, LY_VCODE_INDEV, ly_devmod2str(dev_mod), lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4004|      1|                ret = LY_EVALID;
 4005|      1|                goto cleanup;
 4006|     80|            default:
  ------------------
  |  Branch (4006:13): [True: 80, False: 1]
  ------------------
 4007|     80|                if (d_rpl->type) {
  ------------------
  |  Branch (4007:21): [True: 1, False: 79]
  ------------------
 4008|      1|                    LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4009|      1|                    ret = LY_EVALID;
 4010|      1|                    goto cleanup;
 4011|      1|                }
 4012|     79|                d_rpl->type = calloc(1, sizeof *d_rpl->type);
 4013|     79|                LY_CHECK_ERR_GOTO(!d_rpl->type, LOGMEM(PARSER_CTX(ctx)); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|     79|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 79]
  |  |  |  Branch (203:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4014|     79|                LY_CHECK_GOTO(ret = parse_type(ctx, d_rpl->type), cleanup);
  ------------------
  |  |  202|     79|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 2, False: 77]
  |  |  ------------------
  ------------------
 4015|     77|                break;
 4016|     81|            }
 4017|     77|            break;
 4018|    573|        case LY_STMT_UNIQUE:
  ------------------
  |  Branch (4018:9): [True: 573, False: 5.27k]
  ------------------
 4019|    573|            switch (dev_mod) {
 4020|      0|            case LYS_DEV_NOT_SUPPORTED:
  ------------------
  |  |  470|      0|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (4020:13): [True: 0, False: 573]
  ------------------
 4021|      0|            case LYS_DEV_REPLACE:
  ------------------
  |  |  473|      0|#define LYS_DEV_REPLACE 4            /**< deviate type replace */
  ------------------
  |  Branch (4021:13): [True: 0, False: 573]
  ------------------
 4022|      0|                LOGVAL_PARSER(ctx, LY_VCODE_INDEV, ly_devmod2str(dev_mod), lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4023|      0|                ret = LY_EVALID;
 4024|      0|                goto cleanup;
 4025|    573|            default:
  ------------------
  |  Branch (4025:13): [True: 573, False: 0]
  ------------------
 4026|    573|                LY_CHECK_GOTO(ret = parse_qnames(ctx, LY_STMT_UNIQUE, d_uniques, Y_STR_ARG, &d->exts), cleanup);
  ------------------
  |  |  202|    573|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 10, False: 563]
  |  |  ------------------
  ------------------
 4027|    563|                break;
 4028|    573|            }
 4029|    563|            break;
 4030|    563|        case LY_STMT_UNITS:
  ------------------
  |  Branch (4030:9): [True: 1, False: 5.84k]
  ------------------
 4031|      1|            switch (dev_mod) {
 4032|      0|            case LYS_DEV_NOT_SUPPORTED:
  ------------------
  |  |  470|      0|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (4032:13): [True: 0, False: 1]
  ------------------
 4033|      0|                LOGVAL_PARSER(ctx, LY_VCODE_INDEV, ly_devmod2str(dev_mod), lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4034|      0|                ret = LY_EVALID;
 4035|      0|                goto cleanup;
 4036|      1|            default:
  ------------------
  |  Branch (4036:13): [True: 1, False: 0]
  ------------------
 4037|      1|                LY_CHECK_GOTO(ret = parse_text_field(ctx, *d_units, LY_STMT_UNITS, 0, d_units, Y_STR_ARG, &d->exts), cleanup);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4038|      1|                break;
 4039|      1|            }
 4040|      1|            break;
 4041|  3.06k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (4041:9): [True: 3.06k, False: 2.78k]
  ------------------
 4042|  3.06k|            LY_CHECK_GOTO(ret = parse_ext(ctx, word, word_len, d, LY_STMT_DEVIATE, 0, &d->exts), cleanup);
  ------------------
  |  |  202|  3.06k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 4, False: 3.06k]
  |  |  ------------------
  ------------------
 4043|  3.06k|            break;
 4044|     17|        default:
  ------------------
  |  Branch (4044:9): [True: 17, False: 5.83k]
  ------------------
 4045|     17|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "deviate");
  ------------------
  |  |  129|     17|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     34|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 17, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4046|     17|            ret = LY_EVALID;
 4047|     17|            goto cleanup;
 4048|  5.84k|        }
 4049|  11.5k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, d->exts, ret, cleanup);
  ------------------
  |  |   99|  5.78k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 35, False: 5.75k]
  |  |  ------------------
  |  |  100|     35|        goto ERR_LABEL; \
  |  |  101|     35|    } \
  |  |  102|  5.78k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 2.13k, False: 3.61k]
  |  |  ------------------
  |  |  103|  2.13k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 1.78k, False: 353]
  |  |  |  Branch (103:21): [True: 0, False: 1.78k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  2.13k|        __loop_end = 1; \
  |  |  107|  2.13k|    }
  ------------------
 4050|  5.75k|    }
 4051|       |
 4052|  4.10k|cleanup:
 4053|  4.10k|    free(buf);
 4054|  4.10k|    if (ret) {
  ------------------
  |  Branch (4054:9): [True: 248, False: 3.86k]
  ------------------
 4055|    248|        lysp_deviate_free(&fctx, d);
 4056|    248|        free(d);
 4057|  3.86k|    } else {
 4058|       |        /* insert into siblings */
 4059|  3.86k|        LY_LIST_INSERT(deviates, d, next);
  ------------------
  |  |  242|  3.86k|    if (!(*LIST)) { \
  |  |  ------------------
  |  |  |  Branch (242:9): [True: 1.24k, False: 2.61k]
  |  |  ------------------
  |  |  243|  1.24k|        memcpy(LIST, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  244|  2.61k|    } else { \
  |  |  245|  2.61k|        size_t offset__ = (char *)&(*LIST)->LINKER - (char *)(*LIST); \
  |  |  246|  2.61k|        char **iter__ = (char **)((size_t)(*LIST) + offset__); \
  |  |  247|   155k|        while (*iter__) { \
  |  |  ------------------
  |  |  |  Branch (247:16): [True: 153k, False: 2.61k]
  |  |  ------------------
  |  |  248|   153k|            iter__ = (char **)((size_t)(*iter__) + offset__); \
  |  |  249|   153k|        } \
  |  |  250|  2.61k|        memcpy(iter__, &(NEW_ITEM), sizeof NEW_ITEM); \
  |  |  251|  2.61k|    }
  ------------------
 4060|  3.86k|    }
 4061|  4.10k|    return ret;
 4062|  7.92k|}
parse_deviation:
 4073|  1.51k|{
 4074|  1.51k|    LY_ERR ret = LY_SUCCESS;
 4075|  1.51k|    char *buf, *word;
 4076|  1.51k|    size_t word_len;
 4077|  1.51k|    enum ly_stmt kw;
 4078|  1.51k|    struct lysp_deviation *dev;
 4079|  1.51k|    struct lysf_ctx fctx = {.ctx = PARSER_CTX(ctx)};
  ------------------
  |  |  128|  1.51k|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|  1.51k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 1.51k, False: 0]
  |  |  ------------------
  ------------------
 4080|       |
 4081|  1.51k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *deviations, dev, LY_EMEM);
  ------------------
  |  |   96|  1.51k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  1.51k|    { \
  |  |  |  |   62|  1.51k|        char *p__; \
  |  |  |  |   63|  1.51k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 1.11k, False: 403]
  |  |  |  |  ------------------
  |  |  |  |   64|  1.11k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  1.11k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  1.11k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  1.11k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 1.11k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  1.11k|        } else { \
  |  |  |  |   73|    403|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|    403|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 403]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|    403|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|    403|        } \
  |  |  |  |   80|  1.51k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  1.51k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  1.51k|    }
  |  |  ------------------
  |  |   97|  1.51k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  1.51k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 4082|       |
 4083|       |    /* get value */
 4084|  1.51k|    LY_CHECK_GOTO(ret = get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len), cleanup);
  ------------------
  |  |  202|  1.51k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 5, False: 1.51k]
  |  |  ------------------
  ------------------
 4085|  1.51k|    CHECK_NONEMPTY(ctx, word_len, "deviation");
  ------------------
  |  |   96|  1.51k|    if (!VALUE_LEN) { \
  |  |  ------------------
  |  |  |  Branch (96:9): [True: 1, False: 1.51k]
  |  |  ------------------
  |  |   97|      1|        LOGWRN(PARSER_CTX(CTX), "Empty argument of %s statement does not make sense.", STMT); \
  |  |  ------------------
  |  |  |  |  155|      2|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (155:33): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|      1|    }
  ------------------
 4086|  1.51k|    INSERT_WORD_GOTO(ctx, buf, dev->nodeid, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  1.51k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|     26|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 13]
  |  |  |  |  |  Branch (202:40): [True: 13, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 13, False: 1.50k]
  |  |  ------------------
  |  |   51|  1.51k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  6.00k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 1.50k]
  |  |  |  |  |  Branch (202:40): [True: 1.50k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 1.50k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4087|       |
 4088|  6.36k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  1.51k|    ly_bool __loop_end = 0; \
  |  |   73|  1.51k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 15, False: 1.49k]
  |  |  ------------------
  |  |   74|     15|        goto ERR_LABEL; \
  |  |   75|     15|    } \
  |  |   76|  1.51k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 5, False: 1.49k]
  |  |  ------------------
  |  |   77|      5|        __loop_end = 1; \
  |  |   78|  1.49k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 6, False: 1.48k]
  |  |  ------------------
  |  |   79|      6|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      6|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     12|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 6, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      6|        RET = LY_EVALID; \
  |  |   81|      6|        goto ERR_LABEL; \
  |  |   82|  1.48k|    } else { \
  |  |   83|  1.48k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  1.48k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 9, False: 1.47k]
  |  |  |  |  ------------------
  |  |  |  |  100|      9|        goto ERR_LABEL; \
  |  |  |  |  101|      9|    } \
  |  |  |  |  102|  1.48k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 2, False: 1.47k]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 2]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|      2|        __loop_end = 1; \
  |  |  |  |  107|      2|    }
  |  |  ------------------
  |  |   84|  1.47k|    } \
  |  |   85|  7.51k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 6.36k, False: 1.14k]
  |  |  ------------------
  ------------------
 4089|  6.36k|        switch (kw) {
 4090|    287|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (4090:9): [True: 287, False: 6.08k]
  ------------------
 4091|    287|            LY_CHECK_GOTO(ret = parse_text_field(ctx, dev->dsc, LY_STMT_DESCRIPTION, 0, &dev->dsc, Y_STR_ARG, &dev->exts), cleanup);
  ------------------
  |  |  202|    287|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 2, False: 285]
  |  |  ------------------
  ------------------
 4092|    285|            break;
 4093|  4.10k|        case LY_STMT_DEVIATE:
  ------------------
  |  Branch (4093:9): [True: 4.10k, False: 2.26k]
  ------------------
 4094|  4.10k|            LY_CHECK_GOTO(ret = parse_deviate(ctx, &dev->deviates), cleanup);
  ------------------
  |  |  202|  4.10k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 248, False: 3.86k]
  |  |  ------------------
  ------------------
 4095|  3.86k|            break;
 4096|    367|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (4096:9): [True: 367, False: 6.00k]
  ------------------
 4097|    367|            LY_CHECK_GOTO(ret = parse_text_field(ctx, dev->ref, LY_STMT_REFERENCE, 0, &dev->ref, Y_STR_ARG, &dev->exts), cleanup);
  ------------------
  |  |  202|    367|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 1, False: 366]
  |  |  ------------------
  ------------------
 4098|    366|            break;
 4099|  1.58k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (4099:9): [True: 1.58k, False: 4.78k]
  ------------------
 4100|  1.58k|            LY_CHECK_GOTO(ret = parse_ext(ctx, word, word_len, dev, LY_STMT_DEVIATION, 0, &dev->exts), cleanup);
  ------------------
  |  |  202|  1.58k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 2, False: 1.58k]
  |  |  ------------------
  ------------------
 4101|  1.58k|            break;
 4102|     24|        default:
  ------------------
  |  Branch (4102:9): [True: 24, False: 6.34k]
  ------------------
 4103|     24|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "deviation");
  ------------------
  |  |  129|     24|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     48|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 24, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4104|     24|            ret = LY_EVALID;
 4105|     24|            goto cleanup;
 4106|  6.36k|        }
 4107|  12.1k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, dev->exts, ret, cleanup);
  ------------------
  |  |   99|  6.09k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 61, False: 6.03k]
  |  |  ------------------
  |  |  100|     61|        goto ERR_LABEL; \
  |  |  101|     61|    } \
  |  |  102|  6.09k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 1.13k, False: 4.89k]
  |  |  ------------------
  |  |  103|  1.13k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 664, False: 475]
  |  |  |  Branch (103:21): [True: 0, False: 664]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  1.13k|        __loop_end = 1; \
  |  |  107|  1.13k|    }
  ------------------
 4108|  6.03k|    }
 4109|       |
 4110|       |    /* mandatory substatements */
 4111|  1.14k|    if (!dev->deviates) {
  ------------------
  |  Branch (4111:9): [True: 15, False: 1.13k]
  ------------------
 4112|     15|        LOGVAL_PARSER(ctx, LY_VCODE_MISSTMT, "deviate", "deviation");
  ------------------
  |  |  129|     15|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     30|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 15, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4113|     15|        ret = LY_EVALID;
 4114|     15|        goto cleanup;
 4115|     15|    }
 4116|       |
 4117|  1.51k|cleanup:
 4118|  1.51k|    if (ret) {
  ------------------
  |  Branch (4118:9): [True: 388, False: 1.13k]
  ------------------
 4119|    388|        lysp_deviation_free(&fctx, dev);
 4120|    388|        LY_ARRAY_DECREMENT_FREE(*deviations);
  ------------------
  |  |  218|    388|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  219|    388|        if (!LY_ARRAY_COUNT(ARRAY)) { \
  |  |  ------------------
  |  |  |  |  148|    388|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 388, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (219:13): [True: 352, False: 36]
  |  |  ------------------
  |  |  220|    352|            LY_ARRAY_FREE(ARRAY); \
  |  |  ------------------
  |  |  |  |  232|    352|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 352, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  221|    352|            (ARRAY) = NULL; \
  |  |  222|    352|        }
  ------------------
 4121|    388|    }
 4122|  1.51k|    return ret;
 4123|  1.14k|}
parse_feature:
 4134|  1.23k|{
 4135|  1.23k|    LY_ERR ret = LY_SUCCESS;
 4136|  1.23k|    char *buf, *word;
 4137|  1.23k|    size_t word_len;
 4138|  1.23k|    enum ly_stmt kw;
 4139|  1.23k|    struct lysp_feature *feat;
 4140|       |
 4141|  1.23k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *features, feat, LY_EMEM);
  ------------------
  |  |   96|  1.23k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  1.23k|    { \
  |  |  |  |   62|  1.23k|        char *p__; \
  |  |  |  |   63|  1.23k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 1.10k, False: 137]
  |  |  |  |  ------------------
  |  |  |  |   64|  1.10k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  1.10k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  1.10k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  1.10k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 1.10k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  1.10k|        } else { \
  |  |  |  |   73|    137|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|    137|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 137]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|    137|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|    137|        } \
  |  |  |  |   80|  1.23k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  1.23k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  1.23k|    }
  |  |  ------------------
  |  |   97|  1.23k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  1.23k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 4142|       |
 4143|       |    /* get value */
 4144|  1.23k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  1.23k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.23k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.23k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.23k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 10, False: 1.22k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4145|  1.22k|    INSERT_WORD_GOTO(ctx, buf, feat->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  1.22k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    180|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 90]
  |  |  |  |  |  Branch (202:40): [True: 90, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 90, False: 1.13k]
  |  |  ------------------
  |  |   51|  1.22k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  4.54k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 1.13k]
  |  |  |  |  |  Branch (202:40): [True: 1.13k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 1.13k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4146|       |
 4147|  2.42k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  1.22k|    ly_bool __loop_end = 0; \
  |  |   73|  1.22k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 8, False: 1.21k]
  |  |  ------------------
  |  |   74|      8|        goto ERR_LABEL; \
  |  |   75|      8|    } \
  |  |   76|  1.22k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 545, False: 674]
  |  |  ------------------
  |  |   77|    545|        __loop_end = 1; \
  |  |   78|    674|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 7, False: 667]
  |  |  ------------------
  |  |   79|      7|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      7|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     14|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 7, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      7|        RET = LY_EVALID; \
  |  |   81|      7|        goto ERR_LABEL; \
  |  |   82|    667|    } else { \
  |  |   83|    667|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|    667|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 6, False: 661]
  |  |  |  |  ------------------
  |  |  |  |  100|      6|        goto ERR_LABEL; \
  |  |  |  |  101|      6|    } \
  |  |  |  |  102|    667|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 203, False: 458]
  |  |  |  |  ------------------
  |  |  |  |  103|    203|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 203]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    203|        __loop_end = 1; \
  |  |  |  |  107|    203|    }
  |  |  ------------------
  |  |   84|    661|    } \
  |  |   85|  2.19k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 1.04k, False: 1.14k]
  |  |  ------------------
  ------------------
 4148|  1.04k|        switch (kw) {
 4149|     68|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (4149:9): [True: 68, False: 980]
  ------------------
 4150|     68|            LY_CHECK_RET(parse_text_field(ctx, feat->dsc, LY_STMT_DESCRIPTION, 0, &feat->dsc, Y_STR_ARG, &feat->exts));
  ------------------
  |  |  206|     68|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     68|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     68|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     68|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 67]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4151|     67|            break;
 4152|    296|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (4152:9): [True: 296, False: 752]
  ------------------
 4153|    296|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &feat->iffeatures, Y_STR_ARG, &feat->exts));
  ------------------
  |  |  206|    296|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    296|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    296|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    296|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 6, False: 290]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4154|    290|            break;
 4155|     69|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (4155:9): [True: 69, False: 979]
  ------------------
 4156|     69|            LY_CHECK_RET(parse_text_field(ctx, feat->ref, LY_STMT_REFERENCE, 0, &feat->ref, Y_STR_ARG, &feat->exts));
  ------------------
  |  |  206|     69|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     69|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     69|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     69|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 68]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4157|     68|            break;
 4158|     25|        case LY_STMT_STATUS:
  ------------------
  |  Branch (4158:9): [True: 25, False: 1.02k]
  ------------------
 4159|     25|            LY_CHECK_RET(parse_status(ctx, &feat->flags, &feat->exts));
  ------------------
  |  |  206|     25|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     25|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     25|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     25|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 21]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4160|     21|            break;
 4161|    561|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (4161:9): [True: 561, False: 487]
  ------------------
 4162|    561|            LY_CHECK_RET(parse_ext(ctx, word, word_len, feat, LY_STMT_FEATURE, 0, &feat->exts));
  ------------------
  |  |  206|    561|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    561|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    561|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    561|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 556]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4163|    556|            break;
 4164|     29|        default:
  ------------------
  |  Branch (4164:9): [True: 29, False: 1.01k]
  ------------------
 4165|     29|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "feature");
  ------------------
  |  |  129|     29|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     58|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 29, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4166|     29|            return LY_EVALID;
 4167|  1.04k|        }
 4168|  1.98k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, feat->exts, ret, cleanup);
  ------------------
  |  |   99|  1.00k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 18, False: 984]
  |  |  ------------------
  |  |  100|     18|        goto ERR_LABEL; \
  |  |  101|     18|    } \
  |  |  102|  1.00k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 394, False: 590]
  |  |  ------------------
  |  |  103|    394|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 309, False: 85]
  |  |  |  Branch (103:21): [True: 0, False: 309]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|    394|        __loop_end = 1; \
  |  |  107|    394|    }
  ------------------
 4169|    984|    }
 4170|       |
 4171|  1.18k|cleanup:
 4172|  1.18k|    return ret;
 4173|  2.42k|}
parse_identity:
 4184|   120k|{
 4185|   120k|    LY_ERR ret = LY_SUCCESS;
 4186|   120k|    char *buf, *word;
 4187|   120k|    size_t word_len;
 4188|   120k|    enum ly_stmt kw;
 4189|   120k|    struct lysp_ident *ident;
 4190|       |
 4191|   120k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *identities, ident, LY_EMEM);
  ------------------
  |  |   96|   120k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|   120k|    { \
  |  |  |  |   62|   120k|        char *p__; \
  |  |  |  |   63|   120k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 106k, False: 14.1k]
  |  |  |  |  ------------------
  |  |  |  |   64|   106k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|   106k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|   106k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|   106k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 106k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|   106k|        } else { \
  |  |  |  |   73|  14.1k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  14.1k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 14.1k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  14.1k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  14.1k|        } \
  |  |  |  |   80|   120k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   120k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   120k|    }
  |  |  ------------------
  |  |   97|   120k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|   120k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 4192|       |
 4193|       |    /* get value */
 4194|   120k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   120k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   120k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   120k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   120k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 120k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4195|   120k|    INSERT_WORD_GOTO(ctx, buf, ident->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|   120k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|     22|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 11]
  |  |  |  |  |  Branch (202:40): [True: 11, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 11, False: 120k]
  |  |  ------------------
  |  |   51|   120k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   481k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 120k]
  |  |  |  |  |  Branch (202:40): [True: 120k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 120k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4196|       |
 4197|   240k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   120k|    ly_bool __loop_end = 0; \
  |  |   73|   120k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 5, False: 120k]
  |  |  ------------------
  |  |   74|      5|        goto ERR_LABEL; \
  |  |   75|      5|    } \
  |  |   76|   120k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 2.30k, False: 117k]
  |  |  ------------------
  |  |   77|  2.30k|        __loop_end = 1; \
  |  |   78|   117k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 4, False: 117k]
  |  |  ------------------
  |  |   79|      4|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      4|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      8|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 4, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      4|        RET = LY_EVALID; \
  |  |   81|      4|        goto ERR_LABEL; \
  |  |   82|   117k|    } else { \
  |  |   83|   117k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|   117k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 13, False: 117k]
  |  |  |  |  ------------------
  |  |  |  |  100|     13|        goto ERR_LABEL; \
  |  |  |  |  101|     13|    } \
  |  |  |  |  102|   117k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 865, False: 117k]
  |  |  |  |  ------------------
  |  |  |  |  103|    865|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 865]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    865|        __loop_end = 1; \
  |  |  |  |  107|    865|    }
  |  |  ------------------
  |  |   84|   117k|    } \
  |  |   85|   337k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 216k, False: 120k]
  |  |  ------------------
  ------------------
 4198|   216k|        switch (kw) {
 4199|   112k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (4199:9): [True: 112k, False: 104k]
  ------------------
 4200|   112k|            LY_CHECK_RET(parse_text_field(ctx, ident->dsc, LY_STMT_DESCRIPTION, 0, &ident->dsc, Y_STR_ARG, &ident->exts));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4201|   112k|            break;
 4202|      1|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (4202:9): [True: 1, False: 216k]
  ------------------
 4203|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "if-feature", "identity");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 4204|      0|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &ident->iffeatures, Y_STR_ARG, &ident->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4205|      0|            break;
 4206|  2.57k|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (4206:9): [True: 2.57k, False: 214k]
  ------------------
 4207|  2.57k|            LY_CHECK_RET(parse_text_field(ctx, ident->ref, LY_STMT_REFERENCE, 0, &ident->ref, Y_STR_ARG, &ident->exts));
  ------------------
  |  |  206|  2.57k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.57k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.57k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.57k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 2.57k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4208|  2.57k|            break;
 4209|  1.20k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (4209:9): [True: 1.20k, False: 215k]
  ------------------
 4210|  1.20k|            LY_CHECK_RET(parse_status(ctx, &ident->flags, &ident->exts));
  ------------------
  |  |  206|  1.20k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.20k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.20k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.20k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 11, False: 1.19k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4211|  1.19k|            break;
 4212|  98.4k|        case LY_STMT_BASE:
  ------------------
  |  Branch (4212:9): [True: 98.4k, False: 118k]
  ------------------
 4213|  98.4k|            if (ident->bases && (PARSER_CUR_PMOD(ctx)->version < LYS_VERSION_1_1)) {
  ------------------
  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
  |  Branch (4213:17): [True: 1, False: 98.4k]
  |  Branch (4213:33): [True: 1, False: 0]
  ------------------
 4214|      1|                LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Identity can be derived from multiple base identities only in YANG 1.1 modules");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4215|      1|                return LY_EVALID;
 4216|      1|            }
 4217|  98.4k|            LY_CHECK_RET(parse_text_fields(ctx, LY_STMT_BASE, &ident->bases, Y_PREF_IDENTIF_ARG, &ident->exts));
  ------------------
  |  |  206|  98.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  98.4k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  98.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  98.4k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 98.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4218|  98.4k|            break;
 4219|  2.31k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (4219:9): [True: 2.31k, False: 214k]
  ------------------
 4220|  2.31k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, ident, LY_STMT_IDENTITY, 0, &ident->exts));
  ------------------
  |  |  206|  2.31k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.31k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.31k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.31k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 2.31k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4221|  2.31k|            break;
 4222|     22|        default:
  ------------------
  |  Branch (4222:9): [True: 22, False: 216k]
  ------------------
 4223|     22|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "identity");
  ------------------
  |  |  129|     22|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     44|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 22, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4224|     22|            return LY_EVALID;
 4225|   216k|        }
 4226|   433k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, ident->exts, ret, cleanup);
  ------------------
  |  |   99|   216k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 12, False: 216k]
  |  |  ------------------
  |  |  100|     12|        goto ERR_LABEL; \
  |  |  101|     12|    } \
  |  |  102|   216k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 117k, False: 99.8k]
  |  |  ------------------
  |  |  103|   117k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 829, False: 116k]
  |  |  |  Branch (103:21): [True: 0, False: 829]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|   117k|        __loop_end = 1; \
  |  |  107|   117k|    }
  ------------------
 4227|   216k|    }
 4228|       |
 4229|   120k|cleanup:
 4230|   120k|    return ret;
 4231|   240k|}
parse_module:
 4242|   123k|{
 4243|   123k|    LY_ERR ret = 0;
 4244|   123k|    char *buf, *word;
 4245|   123k|    size_t word_len;
 4246|   123k|    enum ly_stmt kw, prev_kw = 0;
 4247|   123k|    enum yang_module_stmt mod_stmt = Y_MOD_MODULE_HEADER;
 4248|   123k|    const struct lysp_submodule *dup;
 4249|       |
 4250|   123k|    mod->is_submod = 0;
 4251|       |
 4252|       |    /* module name */
 4253|   123k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   123k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   123k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   123k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   123k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 186, False: 123k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4254|   123k|    INSERT_WORD_GOTO(ctx, buf, mod->mod->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|   123k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|      4|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 2]
  |  |  |  |  |  Branch (202:40): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 2, False: 123k]
  |  |  ------------------
  |  |   51|   123k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   494k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 123k]
  |  |  |  |  |  Branch (202:40): [True: 123k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 123k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4255|       |
 4256|  2.00M|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   123k|    ly_bool __loop_end = 0; \
  |  |   73|   123k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 91, False: 123k]
  |  |  ------------------
  |  |   74|     91|        goto ERR_LABEL; \
  |  |   75|     91|    } \
  |  |   76|   123k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 9, False: 123k]
  |  |  ------------------
  |  |   77|      9|        __loop_end = 1; \
  |  |   78|   123k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 12, False: 123k]
  |  |  ------------------
  |  |   79|     12|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|     12|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     24|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 12, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|     12|        RET = LY_EVALID; \
  |  |   81|     12|        goto ERR_LABEL; \
  |  |   82|   123k|    } else { \
  |  |   83|   123k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|   123k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 308, False: 123k]
  |  |  |  |  ------------------
  |  |  |  |  100|    308|        goto ERR_LABEL; \
  |  |  |  |  101|    308|    } \
  |  |  |  |  102|   123k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 1, False: 123k]
  |  |  |  |  ------------------
  |  |  |  |  103|      1|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 1]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|      1|        __loop_end = 1; \
  |  |  |  |  107|      1|    }
  |  |  ------------------
  |  |   84|   123k|    } \
  |  |   85|  2.11M|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 2.00M, False: 112k]
  |  |  ------------------
  ------------------
 4257|       |
 4258|  2.00M|#define CHECK_ORDER(SECTION) \
 4259|  2.00M|        if (mod_stmt > SECTION) {\
 4260|  2.00M|            LOGVAL_PARSER(ctx, LY_VCODE_INORD, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(prev_kw)); return LY_EVALID;\
 4261|  2.00M|        } mod_stmt = SECTION
 4262|       |
 4263|  2.00M|        switch (kw) {
 4264|       |        /* module header */
 4265|   112k|        case LY_STMT_NAMESPACE:
  ------------------
  |  Branch (4265:9): [True: 112k, False: 1.89M]
  ------------------
 4266|   225k|        case LY_STMT_PREFIX:
  ------------------
  |  Branch (4266:9): [True: 112k, False: 1.89M]
  ------------------
 4267|   225k|            CHECK_ORDER(Y_MOD_MODULE_HEADER);
  ------------------
  |  | 4259|   225k|        if (mod_stmt > SECTION) {\
  |  |  ------------------
  |  |  |  Branch (4259:13): [True: 1, False: 225k]
  |  |  ------------------
  |  | 4260|      1|            LOGVAL_PARSER(ctx, LY_VCODE_INORD, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(prev_kw)); return LY_EVALID;\
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4261|   225k|        } mod_stmt = SECTION
  ------------------
 4268|   225k|            break;
 4269|  70.3k|        case LY_STMT_YANG_VERSION:
  ------------------
  |  Branch (4269:9): [True: 70.3k, False: 1.93M]
  ------------------
 4270|  70.3k|            CHECK_ORDER(Y_MOD_MODULE_HEADER);
  ------------------
  |  | 4259|  70.3k|        if (mod_stmt > SECTION) {\
  |  |  ------------------
  |  |  |  Branch (4259:13): [True: 1, False: 70.3k]
  |  |  ------------------
  |  | 4260|      1|            LOGVAL_PARSER(ctx, LY_VCODE_INORD, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(prev_kw)); return LY_EVALID;\
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4261|  70.3k|        } mod_stmt = SECTION
  ------------------
 4271|  70.3k|            break;
 4272|       |        /* linkage */
 4273|  3.40k|        case LY_STMT_INCLUDE:
  ------------------
  |  Branch (4273:9): [True: 3.40k, False: 2.00M]
  ------------------
 4274|  88.1k|        case LY_STMT_IMPORT:
  ------------------
  |  Branch (4274:9): [True: 84.7k, False: 1.91M]
  ------------------
 4275|  88.1k|            CHECK_ORDER(Y_MOD_LINKAGE);
  ------------------
  |  | 4259|  88.1k|        if (mod_stmt > SECTION) {\
  |  |  ------------------
  |  |  |  Branch (4259:13): [True: 1, False: 88.1k]
  |  |  ------------------
  |  | 4260|      1|            LOGVAL_PARSER(ctx, LY_VCODE_INORD, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(prev_kw)); return LY_EVALID;\
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4261|  88.1k|        } mod_stmt = SECTION
  ------------------
 4276|  88.1k|            break;
 4277|       |        /* meta */
 4278|   112k|        case LY_STMT_ORGANIZATION:
  ------------------
  |  Branch (4278:9): [True: 112k, False: 1.89M]
  ------------------
 4279|   224k|        case LY_STMT_CONTACT:
  ------------------
  |  Branch (4279:9): [True: 112k, False: 1.89M]
  ------------------
 4280|   337k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (4280:9): [True: 112k, False: 1.89M]
  ------------------
 4281|   337k|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (4281:9): [True: 34, False: 2.00M]
  ------------------
 4282|   337k|            CHECK_ORDER(Y_MOD_META);
  ------------------
  |  | 4259|   337k|        if (mod_stmt > SECTION) {\
  |  |  ------------------
  |  |  |  Branch (4259:13): [True: 1, False: 337k]
  |  |  ------------------
  |  | 4260|      1|            LOGVAL_PARSER(ctx, LY_VCODE_INORD, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(prev_kw)); return LY_EVALID;\
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4261|   337k|        } mod_stmt = SECTION
  ------------------
 4283|   337k|            break;
 4284|       |
 4285|       |        /* revision */
 4286|   217k|        case LY_STMT_REVISION:
  ------------------
  |  Branch (4286:9): [True: 217k, False: 1.78M]
  ------------------
 4287|   217k|            CHECK_ORDER(Y_MOD_REVISION);
  ------------------
  |  | 4259|   217k|        if (mod_stmt > SECTION) {\
  |  |  ------------------
  |  |  |  Branch (4259:13): [True: 1, False: 217k]
  |  |  ------------------
  |  | 4260|      1|            LOGVAL_PARSER(ctx, LY_VCODE_INORD, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(prev_kw)); return LY_EVALID;\
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4261|   217k|        } mod_stmt = SECTION
  ------------------
 4288|   217k|            break;
 4289|       |        /* body */
 4290|      1|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (4290:9): [True: 1, False: 2.00M]
  ------------------
 4291|  1.80k|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (4291:9): [True: 1.79k, False: 2.00M]
  ------------------
 4292|  2.74k|        case LY_STMT_AUGMENT:
  ------------------
  |  Branch (4292:9): [True: 940, False: 2.00M]
  ------------------
 4293|  4.37k|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (4293:9): [True: 1.63k, False: 2.00M]
  ------------------
 4294|  47.2k|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (4294:9): [True: 42.8k, False: 1.96M]
  ------------------
 4295|  48.7k|        case LY_STMT_DEVIATION:
  ------------------
  |  Branch (4295:9): [True: 1.51k, False: 2.00M]
  ------------------
 4296|   112k|        case LY_STMT_EXTENSION:
  ------------------
  |  Branch (4296:9): [True: 63.2k, False: 1.94M]
  ------------------
 4297|   113k|        case LY_STMT_FEATURE:
  ------------------
  |  Branch (4297:9): [True: 1.23k, False: 2.00M]
  ------------------
 4298|   199k|        case LY_STMT_GROUPING:
  ------------------
  |  Branch (4298:9): [True: 86.7k, False: 1.91M]
  ------------------
 4299|   320k|        case LY_STMT_IDENTITY:
  ------------------
  |  Branch (4299:9): [True: 120k, False: 1.88M]
  ------------------
 4300|   328k|        case LY_STMT_LEAF:
  ------------------
  |  Branch (4300:9): [True: 7.79k, False: 1.99M]
  ------------------
 4301|   329k|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (4301:9): [True: 1.57k, False: 2.00M]
  ------------------
 4302|   332k|        case LY_STMT_LIST:
  ------------------
  |  Branch (4302:9): [True: 2.45k, False: 2.00M]
  ------------------
 4303|   362k|        case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (4303:9): [True: 30.8k, False: 1.97M]
  ------------------
 4304|   378k|        case LY_STMT_RPC:
  ------------------
  |  Branch (4304:9): [True: 15.5k, False: 1.98M]
  ------------------
 4305|   917k|        case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (4305:9): [True: 538k, False: 1.46M]
  ------------------
 4306|   919k|        case LY_STMT_USES:
  ------------------
  |  Branch (4306:9): [True: 2.01k, False: 2.00M]
  ------------------
 4307|   919k|            mod_stmt = Y_MOD_BODY;
 4308|   919k|            break;
 4309|   145k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (4309:9): [True: 145k, False: 1.85M]
  ------------------
 4310|       |            /* no place in the statement order defined */
 4311|   145k|            break;
 4312|     53|        default:
  ------------------
  |  Branch (4312:9): [True: 53, False: 2.00M]
  ------------------
 4313|       |            /* error handled in the next switch */
 4314|     53|            break;
 4315|  2.00M|        }
 4316|  2.00M|#undef CHECK_ORDER
 4317|       |
 4318|  2.00M|        prev_kw = kw;
 4319|  2.00M|        switch (kw) {
 4320|       |        /* module header */
 4321|  70.3k|        case LY_STMT_YANG_VERSION:
  ------------------
  |  Branch (4321:9): [True: 70.3k, False: 1.93M]
  ------------------
 4322|  70.3k|            LY_CHECK_RET(parse_yangversion(ctx, mod));
  ------------------
  |  |  206|  70.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  70.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  70.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  70.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 46, False: 70.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4323|  70.2k|            break;
 4324|   112k|        case LY_STMT_NAMESPACE:
  ------------------
  |  Branch (4324:9): [True: 112k, False: 1.89M]
  ------------------
 4325|   112k|            LY_CHECK_RET(parse_text_field(ctx, mod, LY_STMT_NAMESPACE, 0, &mod->mod->ns, Y_STR_ARG, &mod->exts));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4326|   112k|            break;
 4327|   112k|        case LY_STMT_PREFIX:
  ------------------
  |  Branch (4327:9): [True: 112k, False: 1.89M]
  ------------------
 4328|   112k|            LY_CHECK_RET(parse_text_field(ctx, mod->mod->prefix, LY_STMT_PREFIX, 0, &mod->mod->prefix, Y_IDENTIF_ARG, &mod->exts));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4329|   112k|            break;
 4330|       |
 4331|       |        /* linkage */
 4332|  3.40k|        case LY_STMT_INCLUDE:
  ------------------
  |  Branch (4332:9): [True: 3.40k, False: 2.00M]
  ------------------
 4333|  3.40k|            LY_CHECK_RET(parse_include(ctx, mod->mod->name, &mod->includes));
  ------------------
  |  |  206|  3.40k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  3.40k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.40k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  3.40k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 265, False: 3.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4334|  3.13k|            break;
 4335|  84.7k|        case LY_STMT_IMPORT:
  ------------------
  |  Branch (4335:9): [True: 84.7k, False: 1.91M]
  ------------------
 4336|  84.7k|            LY_CHECK_RET(parse_import(ctx, mod->mod->prefix, &mod->imports));
  ------------------
  |  |  206|  84.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  84.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  84.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 189, False: 84.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4337|  84.6k|            break;
 4338|       |
 4339|       |        /* meta */
 4340|   112k|        case LY_STMT_ORGANIZATION:
  ------------------
  |  Branch (4340:9): [True: 112k, False: 1.89M]
  ------------------
 4341|   112k|            LY_CHECK_RET(parse_text_field(ctx, mod, LY_STMT_ORGANIZATION, 0, &mod->mod->org, Y_STR_ARG, &mod->exts));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4342|   112k|            break;
 4343|   112k|        case LY_STMT_CONTACT:
  ------------------
  |  Branch (4343:9): [True: 112k, False: 1.89M]
  ------------------
 4344|   112k|            LY_CHECK_RET(parse_text_field(ctx, mod, LY_STMT_CONTACT, 0, &mod->mod->contact, Y_STR_ARG, &mod->exts));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4345|   112k|            break;
 4346|   112k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (4346:9): [True: 112k, False: 1.89M]
  ------------------
 4347|   112k|            LY_CHECK_RET(parse_text_field(ctx, mod->mod->dsc, LY_STMT_DESCRIPTION, 0, &mod->mod->dsc, Y_STR_ARG, &mod->exts));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4348|   112k|            break;
 4349|     33|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (4349:9): [True: 33, False: 2.00M]
  ------------------
 4350|     33|            LY_CHECK_RET(parse_text_field(ctx, mod->mod->ref, LY_STMT_REFERENCE, 0, &mod->mod->ref, Y_STR_ARG, &mod->exts));
  ------------------
  |  |  206|     33|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     33|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     33|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     33|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 6, False: 27]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4351|     27|            break;
 4352|       |
 4353|       |        /* revision */
 4354|   217k|        case LY_STMT_REVISION:
  ------------------
  |  Branch (4354:9): [True: 217k, False: 1.78M]
  ------------------
 4355|   217k|            LY_CHECK_RET(parse_revision(ctx, &mod->revs));
  ------------------
  |  |  206|   217k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   217k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   217k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   217k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 94, False: 217k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4356|   217k|            break;
 4357|       |
 4358|       |        /* body */
 4359|      1|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (4359:9): [True: 1, False: 2.00M]
  ------------------
 4360|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "anydata", "module");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 4361|       |        /* fall through */
 4362|  1.79k|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (4362:9): [True: 1.79k, False: 2.00M]
  ------------------
 4363|  1.79k|            LY_CHECK_RET(parse_any(ctx, kw, NULL, &mod->data));
  ------------------
  |  |  206|  1.79k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.79k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.79k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.79k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 180, False: 1.61k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4364|  1.61k|            break;
 4365|  1.63k|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (4365:9): [True: 1.63k, False: 2.00M]
  ------------------
 4366|  1.63k|            LY_CHECK_RET(parse_choice(ctx, NULL, &mod->data));
  ------------------
  |  |  206|  1.63k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.63k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.63k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.63k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 422, False: 1.21k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4367|  1.21k|            break;
 4368|  42.8k|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (4368:9): [True: 42.8k, False: 1.96M]
  ------------------
 4369|  42.8k|            LY_CHECK_RET(parse_container(ctx, NULL, &mod->data));
  ------------------
  |  |  206|  42.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  42.8k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  42.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  42.8k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 327, False: 42.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4370|  42.5k|            break;
 4371|  7.79k|        case LY_STMT_LEAF:
  ------------------
  |  Branch (4371:9): [True: 7.79k, False: 1.99M]
  ------------------
 4372|  7.79k|            LY_CHECK_RET(parse_leaf(ctx, NULL, &mod->data));
  ------------------
  |  |  206|  7.79k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  7.79k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  7.79k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  7.79k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3.61k, False: 4.18k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4373|  4.18k|            break;
 4374|  1.57k|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (4374:9): [True: 1.57k, False: 2.00M]
  ------------------
 4375|  1.57k|            LY_CHECK_RET(parse_leaflist(ctx, NULL, &mod->data));
  ------------------
  |  |  206|  1.57k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.57k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.57k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.57k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 177, False: 1.39k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4376|  1.39k|            break;
 4377|  2.45k|        case LY_STMT_LIST:
  ------------------
  |  Branch (4377:9): [True: 2.45k, False: 2.00M]
  ------------------
 4378|  2.45k|            LY_CHECK_RET(parse_list(ctx, NULL, &mod->data));
  ------------------
  |  |  206|  2.45k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.45k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.45k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.45k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 903, False: 1.55k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4379|  1.55k|            break;
 4380|  2.01k|        case LY_STMT_USES:
  ------------------
  |  Branch (4380:9): [True: 2.01k, False: 2.00M]
  ------------------
 4381|  2.01k|            LY_CHECK_RET(parse_uses(ctx, NULL, &mod->data));
  ------------------
  |  |  206|  2.01k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.01k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.01k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.01k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 383, False: 1.63k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4382|  1.63k|            break;
 4383|       |
 4384|    940|        case LY_STMT_AUGMENT:
  ------------------
  |  Branch (4384:9): [True: 940, False: 2.00M]
  ------------------
 4385|    940|            LY_CHECK_RET(parse_augment(ctx, NULL, &mod->augments));
  ------------------
  |  |  206|    940|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    940|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    940|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    940|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 260, False: 680]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4386|    680|            break;
 4387|  1.51k|        case LY_STMT_DEVIATION:
  ------------------
  |  Branch (4387:9): [True: 1.51k, False: 2.00M]
  ------------------
 4388|  1.51k|            LY_CHECK_RET(parse_deviation(ctx, &mod->deviations));
  ------------------
  |  |  206|  1.51k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.51k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.51k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.51k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 388, False: 1.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4389|  1.13k|            break;
 4390|  63.2k|        case LY_STMT_EXTENSION:
  ------------------
  |  Branch (4390:9): [True: 63.2k, False: 1.94M]
  ------------------
 4391|  63.2k|            LY_CHECK_RET(parse_extension(ctx, &mod->extensions));
  ------------------
  |  |  206|  63.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  63.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  63.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  63.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 232, False: 63.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4392|  63.0k|            break;
 4393|  1.23k|        case LY_STMT_FEATURE:
  ------------------
  |  Branch (4393:9): [True: 1.23k, False: 2.00M]
  ------------------
 4394|  1.23k|            LY_CHECK_RET(parse_feature(ctx, &mod->features));
  ------------------
  |  |  206|  1.23k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.23k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.23k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.23k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 95, False: 1.14k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4395|  1.14k|            break;
 4396|  86.7k|        case LY_STMT_GROUPING:
  ------------------
  |  Branch (4396:9): [True: 86.7k, False: 1.91M]
  ------------------
 4397|  86.7k|            LY_CHECK_RET(parse_grouping(ctx, NULL, &mod->groupings));
  ------------------
  |  |  206|  86.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  86.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  86.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  86.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 200, False: 86.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4398|  86.5k|            break;
 4399|   120k|        case LY_STMT_IDENTITY:
  ------------------
  |  Branch (4399:9): [True: 120k, False: 1.88M]
  ------------------
 4400|   120k|            LY_CHECK_RET(parse_identity(ctx, &mod->identities));
  ------------------
  |  |  206|   120k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   120k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   120k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   120k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 80, False: 120k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4401|   120k|            break;
 4402|  30.8k|        case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (4402:9): [True: 30.8k, False: 1.97M]
  ------------------
 4403|  30.8k|            LY_CHECK_RET(parse_notif(ctx, NULL, &mod->notifs));
  ------------------
  |  |  206|  30.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  30.8k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  30.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  30.8k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 197, False: 30.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4404|  30.6k|            break;
 4405|  15.5k|        case LY_STMT_RPC:
  ------------------
  |  Branch (4405:9): [True: 15.5k, False: 1.98M]
  ------------------
 4406|  15.5k|            LY_CHECK_RET(parse_action(ctx, NULL, &mod->rpcs));
  ------------------
  |  |  206|  15.5k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  15.5k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  15.5k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  15.5k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 406, False: 15.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4407|  15.0k|            break;
 4408|   538k|        case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (4408:9): [True: 538k, False: 1.46M]
  ------------------
 4409|   538k|            LY_CHECK_RET(parse_typedef(ctx, NULL, &mod->typedefs));
  ------------------
  |  |  206|   538k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   538k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   538k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   538k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 103, False: 538k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4410|   538k|            break;
 4411|   145k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (4411:9): [True: 145k, False: 1.85M]
  ------------------
 4412|   145k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, mod, LY_STMT_MODULE, 0, &mod->exts));
  ------------------
  |  |  206|   145k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   145k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   145k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   145k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1.41k, False: 144k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4413|   144k|            break;
 4414|       |
 4415|     53|        default:
  ------------------
  |  Branch (4415:9): [True: 53, False: 2.00M]
  ------------------
 4416|     53|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "module");
  ------------------
  |  |  129|     53|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    106|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 53, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4417|     53|            return LY_EVALID;
 4418|  2.00M|        }
 4419|  3.98M|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, mod->exts, ret, cleanup);
  ------------------
  |  |   99|  1.99M|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 769, False: 1.99M]
  |  |  ------------------
  |  |  100|    769|        goto ERR_LABEL; \
  |  |  101|    769|    } \
  |  |  102|  1.99M|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 112k, False: 1.88M]
  |  |  ------------------
  |  |  103|   112k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 14.0k, False: 98.4k]
  |  |  |  Branch (103:21): [True: 0, False: 14.0k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|   112k|        __loop_end = 1; \
  |  |  107|   112k|    }
  ------------------
 4420|  1.99M|    }
 4421|       |
 4422|       |    /* mandatory substatements */
 4423|   112k|    if (!mod->mod->ns) {
  ------------------
  |  Branch (4423:9): [True: 37, False: 112k]
  ------------------
 4424|     37|        LOGVAL_PARSER(ctx, LY_VCODE_MISSTMT, "namespace", "module");
  ------------------
  |  |  129|     37|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     74|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 37, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4425|     37|        return LY_EVALID;
 4426|   112k|    } else if (!mod->mod->prefix) {
  ------------------
  |  Branch (4426:16): [True: 1, False: 112k]
  ------------------
 4427|      1|        LOGVAL_PARSER(ctx, LY_VCODE_MISSTMT, "prefix", "module");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4428|      1|        return LY_EVALID;
 4429|      1|    }
 4430|       |
 4431|       |    /* submodules share the namespace with the module names, so there must not be
 4432|       |     * a submodule of the same name in the context, no need for revision matching */
 4433|   112k|    dup = ly_ctx_get_submodule_latest(PARSER_CTX(ctx), mod->mod->name);
  ------------------
  |  |  128|   112k|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|   112k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 112k, False: 0]
  |  |  ------------------
  ------------------
 4434|   112k|    if (dup) {
  ------------------
  |  Branch (4434:9): [True: 0, False: 112k]
  ------------------
 4435|      0|        LOGVAL_PARSER(ctx, LY_VCODE_NAME2_COL, "module", "submodule", mod->mod->name);
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4436|      0|        return LY_EVALID;
 4437|      0|    }
 4438|       |
 4439|   113k|cleanup:
 4440|   113k|    return ret;
 4441|   112k|}
yang_parse_module:
 4762|   126k|{
 4763|   126k|    LY_ERR ret = LY_SUCCESS;
 4764|   126k|    char *word;
 4765|   126k|    size_t word_len;
 4766|   126k|    enum ly_stmt kw;
 4767|   126k|    struct lysp_module *mod_p = NULL;
 4768|   126k|    struct lysf_ctx fctx = {.ctx = mod->ctx};
 4769|       |
 4770|       |    /* create context */
 4771|   126k|    *context = calloc(1, sizeof **context);
 4772|   126k|    LY_CHECK_ERR_RET(!(*context), LOGMEM(mod->ctx), LY_EMEM);
  ------------------
  |  |  207|   126k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
 4773|   126k|    (*context)->format = LYS_IN_YANG;
 4774|   126k|    LY_CHECK_ERR_RET(ly_set_new(&(*context)->parsed_mods), free(*context); LOGMEM(mod->ctx), LY_EMEM);
  ------------------
  |  |  207|   126k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
 4775|   126k|    (*context)->in = in;
 4776|   126k|    (*context)->main_ctx = (struct lysp_ctx *)(*context);
 4777|       |
 4778|   126k|    mod_p = calloc(1, sizeof *mod_p);
 4779|   126k|    LY_CHECK_ERR_GOTO(!mod_p, LOGMEM(mod->ctx), cleanup);
  ------------------
  |  |  203|   126k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
 4780|   126k|    mod_p->mod = mod;
 4781|   126k|    ly_set_add((*context)->parsed_mods, mod_p, 1, NULL);
 4782|       |
 4783|   126k|    LOG_LOCSET(NULL, NULL, NULL, in);
  ------------------
  |  |  141|   126k|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 4784|       |
 4785|       |    /* skip redundant but valid characters at the beginning */
 4786|   126k|    ret = skip_redundant_chars(*context);
 4787|   126k|    LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   126k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 73, False: 126k]
  |  |  ------------------
  ------------------
 4788|       |
 4789|       |    /* "module"/"submodule" */
 4790|   126k|    ret = get_keyword(*context, &kw, &word, &word_len);
 4791|   126k|    LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   126k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 2.47k, False: 123k]
  |  |  ------------------
  ------------------
 4792|       |
 4793|   123k|    if (kw == LY_STMT_SUBMODULE) {
  ------------------
  |  Branch (4793:9): [True: 1, False: 123k]
  ------------------
 4794|      1|        LOGERR(mod->ctx, LY_EDENIED, "Input data contains submodule which cannot be parsed directly without its main module.");
  ------------------
  |  |  154|      1|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  ------------------
 4795|      1|        ret = LY_EINVAL;
 4796|      1|        goto cleanup;
 4797|   123k|    } else if (kw != LY_STMT_MODULE) {
  ------------------
  |  Branch (4797:16): [True: 52, False: 123k]
  ------------------
 4798|     52|        LOGVAL_PARSER((*context), LY_VCODE_MOD_SUBOMD, lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|     52|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    104|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 52, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4799|     52|        ret = LY_EVALID;
 4800|     52|        goto cleanup;
 4801|     52|    }
 4802|       |
 4803|       |    /* substatements */
 4804|   123k|    ret = parse_module(*context, mod_p);
 4805|   123k|    LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   123k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 11.4k, False: 112k]
  |  |  ------------------
  ------------------
 4806|       |
 4807|       |    /* skip redundant but valid characters at the end */
 4808|   112k|    ret = skip_redundant_chars(*context);
 4809|   112k|    LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 4810|   112k|    if (in->current[0]) {
  ------------------
  |  Branch (4810:9): [True: 0, False: 112k]
  ------------------
 4811|      0|        LOGVAL_PARSER(*context, LY_VCODE_TRAILING_MOD, 15, in->current, strlen(in->current) > 15 ? "..." : "");
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4812|      0|        ret = LY_EVALID;
 4813|      0|        goto cleanup;
 4814|      0|    }
 4815|       |
 4816|   112k|    mod->parsed = mod_p;
 4817|       |
 4818|   126k|cleanup:
 4819|   126k|    LOG_LOCBACK(0, 0, 0, 1);
  ------------------
  |  |  152|   126k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 4820|   126k|    if (ret) {
  ------------------
  |  Branch (4820:9): [True: 14.0k, False: 112k]
  ------------------
 4821|  14.0k|        lysp_module_free(&fctx, mod_p);
 4822|  14.0k|        lysp_yang_ctx_free(*context);
 4823|  14.0k|        *context = NULL;
 4824|  14.0k|    }
 4825|       |
 4826|   126k|    return ret;
 4827|   112k|}
parser_yang.c:read_qstring:
  324|  3.93M|{
  325|       |    /* string parsing status: */
  326|  3.93M|#define STRING_ENDED 0 /* string ended */
  327|  3.93M|#define STRING_SINGLE_QUOTED 1 /* string with ' */
  328|  3.93M|#define STRING_DOUBLE_QUOTED 2 /* string with " */
  329|  3.93M|#define STRING_DOUBLE_QUOTED_ESCAPED 3 /* string with " with last character \ */
  330|  3.93M|#define STRING_PAUSED_NEXTSTRING     4 /* string finished, now skipping whitespaces looking for + */
  331|  3.93M|#define STRING_PAUSED_CONTINUE       5 /* string continues after +, skipping whitespaces */
  332|       |
  333|  3.93M|    uint8_t string;
  334|  3.93M|    uint64_t block_indent = 0, current_indent = 0;
  335|  3.93M|    ly_bool need_buf = 0;
  336|  3.93M|    uint8_t prefix = 0;
  337|  3.93M|    const char *c;
  338|  3.93M|    uint64_t trailing_ws = 0; /* current number of stored trailing whitespace characters */
  339|       |
  340|  3.93M|    if (ctx->in->current[0] == '\"') {
  ------------------
  |  Branch (340:9): [True: 3.65M, False: 286k]
  ------------------
  341|  3.65M|        string = STRING_DOUBLE_QUOTED;
  ------------------
  |  |  328|  3.65M|#define STRING_DOUBLE_QUOTED 2 /* string with " */
  ------------------
  342|  3.65M|        current_indent = block_indent = ctx->indent + 1;
  343|  3.65M|    } else {
  344|   286k|        assert(ctx->in->current[0] == '\'');
  345|   286k|        string = STRING_SINGLE_QUOTED;
  ------------------
  |  |  327|   286k|#define STRING_SINGLE_QUOTED 1 /* string with ' */
  ------------------
  346|   286k|    }
  347|  3.93M|    MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|  3.93M|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  348|       |
  349|   830M|    while (ctx->in->current[0] && string) {
  ------------------
  |  Branch (349:12): [True: 830M, False: 501]
  |  Branch (349:35): [True: 830M, False: 0]
  ------------------
  350|   830M|        switch (string) {
  351|  23.5M|        case STRING_SINGLE_QUOTED:
  ------------------
  |  |  327|  23.5M|#define STRING_SINGLE_QUOTED 1 /* string with ' */
  ------------------
  |  Branch (351:9): [True: 23.5M, False: 806M]
  ------------------
  352|  23.5M|            if (ctx->in->current[0] == '\'') {
  ------------------
  |  Branch (352:17): [True: 289k, False: 23.2M]
  ------------------
  353|       |                /* string may be finished, but check for + */
  354|   289k|                string = STRING_PAUSED_NEXTSTRING;
  ------------------
  |  |  330|   289k|#define STRING_PAUSED_NEXTSTRING     4 /* string finished, now skipping whitespaces looking for + */
  ------------------
  355|   289k|                MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|   289k|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  356|  23.2M|            } else {
  357|       |                /* check and store character */
  358|  23.2M|                LY_CHECK_RET(buf_store_char(ctx, arg, word_p, word_len, word_b, buf_len, need_buf, &prefix));
  ------------------
  |  |  206|  23.2M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  23.2M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  23.2M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  23.2M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 19, False: 23.2M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  359|  23.2M|            }
  360|  23.5M|            break;
  361|   802M|        case STRING_DOUBLE_QUOTED:
  ------------------
  |  |  328|   802M|#define STRING_DOUBLE_QUOTED 2 /* string with " */
  ------------------
  |  Branch (361:9): [True: 802M, False: 27.8M]
  ------------------
  362|   802M|            switch (ctx->in->current[0]) {
  363|  3.64M|            case '\"':
  ------------------
  |  Branch (363:13): [True: 3.64M, False: 798M]
  ------------------
  364|       |                /* string may be finished, but check for + */
  365|  3.64M|                string = STRING_PAUSED_NEXTSTRING;
  ------------------
  |  |  330|  3.64M|#define STRING_PAUSED_NEXTSTRING     4 /* string finished, now skipping whitespaces looking for + */
  ------------------
  366|  3.64M|                MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|  3.64M|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  367|  3.64M|                trailing_ws = 0;
  368|  3.64M|                break;
  369|   368k|            case '\\':
  ------------------
  |  Branch (369:13): [True: 368k, False: 802M]
  ------------------
  370|       |                /* special character following */
  371|   368k|                string = STRING_DOUBLE_QUOTED_ESCAPED;
  ------------------
  |  |  329|   368k|#define STRING_DOUBLE_QUOTED_ESCAPED 3 /* string with " with last character \ */
  ------------------
  372|       |
  373|       |                /* the backslash sequence is substituted, so we will need a buffer to store the result */
  374|   368k|                need_buf = 1;
  375|       |
  376|       |                /* move forward to the escaped character */
  377|   368k|                ++ctx->in->current;
  378|       |
  379|       |                /* note that the trailing whitespaces are supposed to be trimmed before substitution of
  380|       |                 * backslash-escaped characters (RFC 7950, 6.1.3), so we have to zero the trailing whitespaces counter */
  381|   368k|                trailing_ws = 0;
  382|       |
  383|       |                /* since the backslash-escaped character is handled as first non-whitespace character, stop eating indentation */
  384|   368k|                current_indent = block_indent;
  385|   368k|                break;
  386|   162M|            case ' ':
  ------------------
  |  Branch (386:13): [True: 162M, False: 640M]
  ------------------
  387|   162M|                if (current_indent < block_indent) {
  ------------------
  |  Branch (387:21): [True: 54.0M, False: 108M]
  ------------------
  388|  54.0M|                    ++current_indent;
  389|  54.0M|                    MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|  54.0M|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  390|   108M|                } else {
  391|       |                    /* check and store whitespace character */
  392|   108M|                    LY_CHECK_RET(buf_store_char(ctx, arg, word_p, word_len, word_b, buf_len, need_buf, &prefix));
  ------------------
  |  |  206|   108M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   108M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   108M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   108M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 108M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  393|   108M|                    trailing_ws++;
  394|   108M|                }
  395|   162M|                break;
  396|   162M|            case '\t':
  ------------------
  |  Branch (396:13): [True: 119k, False: 802M]
  ------------------
  397|   119k|                if (current_indent < block_indent) {
  ------------------
  |  Branch (397:21): [True: 111k, False: 7.86k]
  ------------------
  398|   111k|                    assert(need_buf);
  399|   111k|                    current_indent += Y_TAB_SPACES;
  ------------------
  |  |  103|   111k|#define Y_TAB_SPACES         8  /**< number of spaces instead of tab character */
  ------------------
  400|   111k|                    ctx->indent += Y_TAB_SPACES;
  ------------------
  |  |  103|   111k|#define Y_TAB_SPACES         8  /**< number of spaces instead of tab character */
  ------------------
  401|   890k|                    for ( ; current_indent > block_indent; --current_indent, --ctx->indent) {
  ------------------
  |  Branch (401:29): [True: 778k, False: 111k]
  ------------------
  402|       |                        /* store leftover spaces from the tab */
  403|   778k|                        c = ctx->in->current;
  404|   778k|                        ctx->in->current = " ";
  405|   778k|                        LY_CHECK_RET(buf_store_char(ctx, arg, word_p, word_len, word_b, buf_len, need_buf, &prefix));
  ------------------
  |  |  206|   778k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   778k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   778k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   778k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 778k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|   778k|                        ctx->in->current = c;
  407|   778k|                        trailing_ws++;
  408|   778k|                    }
  409|   111k|                    ++ctx->in->current;
  410|   111k|                } else {
  411|       |                    /* check and store whitespace character */
  412|  7.86k|                    LY_CHECK_RET(buf_store_char(ctx, arg, word_p, word_len, word_b, buf_len, need_buf, &prefix));
  ------------------
  |  |  206|  7.86k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  7.86k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  7.86k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  7.86k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 7.86k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  413|  7.86k|                    trailing_ws++;
  414|       |                    /* additional characters for indentation - only 1 was count in buf_store_char */
  415|  7.86k|                    ctx->indent += Y_TAB_SPACES - 1;
  ------------------
  |  |  103|  7.86k|#define Y_TAB_SPACES         8  /**< number of spaces instead of tab character */
  ------------------
  416|  7.86k|                }
  417|   119k|                break;
  418|   119k|            case '\r':
  ------------------
  |  Branch (418:13): [True: 4.21k, False: 802M]
  ------------------
  419|  4.21k|                if (ctx->in->current[1] != '\n') {
  ------------------
  |  Branch (419:21): [True: 10, False: 4.20k]
  ------------------
  420|     10|                    LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, ctx->in->current[0]);
  ------------------
  |  |  129|     10|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     20|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  421|     10|                    return LY_EVALID;
  422|     10|                }
  423|       |            /* fallthrough */
  424|  15.0M|            case '\n':
  ------------------
  |  Branch (424:13): [True: 15.0M, False: 787M]
  ------------------
  425|  15.0M|                if (block_indent) {
  ------------------
  |  Branch (425:21): [True: 15.0M, False: 396]
  ------------------
  426|       |                    /* we will be removing the indents so we need our own buffer */
  427|  15.0M|                    need_buf = 1;
  428|       |
  429|       |                    /* remove trailing tabs and spaces */
  430|  15.0M|                    (*word_len) = *word_len - trailing_ws;
  431|       |
  432|       |                    /* restart indentation */
  433|  15.0M|                    current_indent = 0;
  434|  15.0M|                }
  435|       |
  436|       |                /* check and store character */
  437|  15.0M|                LY_CHECK_RET(buf_store_char(ctx, arg, word_p, word_len, word_b, buf_len, need_buf, &prefix));
  ------------------
  |  |  206|  15.0M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  15.0M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  15.0M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  15.0M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 15.0M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  438|       |
  439|       |                /* reset context indentation counter for possible string after this one */
  440|  15.0M|                ctx->indent = 0;
  441|  15.0M|                trailing_ws = 0;
  442|  15.0M|                break;
  443|   621M|            default:
  ------------------
  |  Branch (443:13): [True: 621M, False: 181M]
  ------------------
  444|       |                /* first non-whitespace character, stop eating indentation */
  445|   621M|                current_indent = block_indent;
  446|       |
  447|       |                /* check and store character */
  448|   621M|                LY_CHECK_RET(buf_store_char(ctx, arg, word_p, word_len, word_b, buf_len, need_buf, &prefix));
  ------------------
  |  |  206|   621M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   621M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   621M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   621M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 54, False: 621M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  449|   621M|                trailing_ws = 0;
  450|   621M|                break;
  451|   802M|            }
  452|   802M|            break;
  453|   802M|        case STRING_DOUBLE_QUOTED_ESCAPED:
  ------------------
  |  |  329|   368k|#define STRING_DOUBLE_QUOTED_ESCAPED 3 /* string with " with last character \ */
  ------------------
  |  Branch (453:9): [True: 368k, False: 830M]
  ------------------
  454|       |            /* string encoded characters */
  455|   368k|            c = ctx->in->current;
  456|   368k|            switch (ctx->in->current[0]) {
  457|     88|            case 'n':
  ------------------
  |  Branch (457:13): [True: 88, False: 368k]
  ------------------
  458|     88|                ctx->in->current = "\n";
  459|       |                /* fix false newline count in buf_store_char() */
  460|     88|                ctx->in->line--;
  461|     88|                break;
  462|    216|            case 't':
  ------------------
  |  Branch (462:13): [True: 216, False: 368k]
  ------------------
  463|    216|                ctx->in->current = "\t";
  464|    216|                break;
  465|   366k|            case '\"':
  ------------------
  |  Branch (465:13): [True: 366k, False: 1.56k]
  ------------------
  466|   368k|            case '\\':
  ------------------
  |  Branch (466:13): [True: 1.25k, False: 367k]
  ------------------
  467|       |                /* ok as is */
  468|   368k|                break;
  469|      6|            default:
  ------------------
  |  Branch (469:13): [True: 6, False: 368k]
  ------------------
  470|      6|                LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Double-quoted string unknown special character '\\%c'.",
  ------------------
  |  |  129|      6|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     12|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  471|      6|                        ctx->in->current[0]);
  472|      6|                return LY_EVALID;
  473|   368k|            }
  474|       |
  475|       |            /* check and store character */
  476|   368k|            LY_CHECK_RET(buf_store_char(ctx, arg, word_p, word_len, word_b, buf_len, need_buf, &prefix));
  ------------------
  |  |  206|   368k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   368k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   368k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   368k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 368k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|   368k|            string = STRING_DOUBLE_QUOTED;
  ------------------
  |  |  328|   368k|#define STRING_DOUBLE_QUOTED 2 /* string with " */
  ------------------
  479|   368k|            ctx->in->current = c + 1;
  480|   368k|            break;
  481|  3.94M|        case STRING_PAUSED_NEXTSTRING:
  ------------------
  |  |  330|  3.94M|#define STRING_PAUSED_NEXTSTRING     4 /* string finished, now skipping whitespaces looking for + */
  ------------------
  |  Branch (481:9): [True: 3.94M, False: 826M]
  ------------------
  482|  3.94M|            switch (ctx->in->current[0]) {
  483|  4.06k|            case '+':
  ------------------
  |  Branch (483:13): [True: 4.06k, False: 3.93M]
  ------------------
  484|       |                /* string continues */
  485|  4.06k|                string = STRING_PAUSED_CONTINUE;
  ------------------
  |  |  331|  4.06k|#define STRING_PAUSED_CONTINUE       5 /* string continues after +, skipping whitespaces */
  ------------------
  486|  4.06k|                need_buf = 1;
  487|  4.06k|                break;
  488|    207|            case '\r':
  ------------------
  |  Branch (488:13): [True: 207, False: 3.94M]
  ------------------
  489|    207|                if (ctx->in->current[1] != '\n') {
  ------------------
  |  Branch (489:21): [True: 8, False: 199]
  ------------------
  490|      8|                    LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, ctx->in->current[0]);
  ------------------
  |  |  129|      8|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     16|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 8, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  491|      8|                    return LY_EVALID;
  492|      8|                }
  493|    199|                MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|    199|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  494|       |            /* fallthrough */
  495|    476|            case '\n':
  ------------------
  |  Branch (495:13): [True: 277, False: 3.94M]
  ------------------
  496|    476|                LY_IN_NEW_LINE(ctx->in);
  ------------------
  |  |   48|    476|    (IN)->line++
  ------------------
  497|       |            /* fall through */
  498|    734|            case ' ':
  ------------------
  |  Branch (498:13): [True: 258, False: 3.94M]
  ------------------
  499|    950|            case '\t':
  ------------------
  |  Branch (499:13): [True: 216, False: 3.94M]
  ------------------
  500|       |                /* just skip */
  501|    950|                break;
  502|  3.93M|            default:
  ------------------
  |  Branch (502:13): [True: 3.93M, False: 5.02k]
  ------------------
  503|       |                /* string is finished */
  504|  3.93M|                goto string_end;
  505|  3.94M|            }
  506|  5.01k|            MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|  5.01k|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  507|  5.01k|            break;
  508|  5.89k|        case STRING_PAUSED_CONTINUE:
  ------------------
  |  |  331|  5.89k|#define STRING_PAUSED_CONTINUE       5 /* string continues after +, skipping whitespaces */
  ------------------
  |  Branch (508:9): [True: 5.89k, False: 830M]
  ------------------
  509|  5.89k|            switch (ctx->in->current[0]) {
  510|    788|            case '\r':
  ------------------
  |  Branch (510:13): [True: 788, False: 5.10k]
  ------------------
  511|    788|                if (ctx->in->current[1] != '\n') {
  ------------------
  |  Branch (511:21): [True: 3, False: 785]
  ------------------
  512|      3|                    LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, ctx->in->current[0]);
  ------------------
  |  |  129|      3|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      6|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  513|      3|                    return LY_EVALID;
  514|      3|                }
  515|    785|                MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|    785|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  516|       |            /* fallthrough */
  517|  1.42k|            case '\n':
  ------------------
  |  Branch (517:13): [True: 643, False: 5.24k]
  ------------------
  518|  1.42k|                LY_IN_NEW_LINE(ctx->in);
  ------------------
  |  |   48|  1.42k|    (IN)->line++
  ------------------
  519|       |            /* fall through */
  520|  1.62k|            case ' ':
  ------------------
  |  Branch (520:13): [True: 197, False: 5.69k]
  ------------------
  521|  1.84k|            case '\t':
  ------------------
  |  Branch (521:13): [True: 218, False: 5.67k]
  ------------------
  522|       |                /* skip */
  523|  1.84k|                break;
  524|  3.93k|            case '\'':
  ------------------
  |  Branch (524:13): [True: 3.93k, False: 1.95k]
  ------------------
  525|  3.93k|                string = STRING_SINGLE_QUOTED;
  ------------------
  |  |  327|  3.93k|#define STRING_SINGLE_QUOTED 1 /* string with ' */
  ------------------
  526|  3.93k|                break;
  527|     94|            case '\"':
  ------------------
  |  Branch (527:13): [True: 94, False: 5.79k]
  ------------------
  528|     94|                string = STRING_DOUBLE_QUOTED;
  ------------------
  |  |  328|     94|#define STRING_DOUBLE_QUOTED 2 /* string with " */
  ------------------
  529|     94|                break;
  530|     19|            default:
  ------------------
  |  Branch (530:13): [True: 19, False: 5.87k]
  ------------------
  531|       |                /* it must be quoted again */
  532|     19|                LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Both string parts divided by '+' must be quoted.");
  ------------------
  |  |  129|     19|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     38|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 19, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  533|     19|                return LY_EVALID;
  534|  5.89k|            }
  535|  5.86k|            MOVE_INPUT(ctx, 1);
  ------------------
  |  |   59|  5.86k|#define MOVE_INPUT(CTX, COUNT) ly_in_skip((CTX)->in, COUNT);(CTX)->indent+=COUNT
  ------------------
  536|  5.86k|            break;
  537|      0|        default:
  ------------------
  |  Branch (537:9): [True: 0, False: 830M]
  ------------------
  538|      0|            return LY_EINT;
  539|   830M|        }
  540|   830M|    }
  541|       |
  542|  3.93M|string_end:
  543|  3.93M|    if ((arg <= Y_PREF_IDENTIF_ARG) && !(*word_len)) {
  ------------------
  |  Branch (543:9): [True: 32.7k, False: 3.90M]
  |  Branch (543:40): [True: 52, False: 32.7k]
  ------------------
  544|       |        /* empty identifier */
  545|     52|        LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Statement argument is required.");
  ------------------
  |  |  129|     52|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    104|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 52, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  546|     52|        return LY_EVALID;
  547|     52|    }
  548|  3.93M|    return LY_SUCCESS;
  549|       |
  550|  3.93M|#undef STRING_ENDED
  551|  3.93M|#undef STRING_SINGLE_QUOTED
  552|  3.93M|#undef STRING_DOUBLE_QUOTED
  553|  3.93M|#undef STRING_DOUBLE_QUOTED_ESCAPED
  554|  3.93M|#undef STRING_PAUSED_NEXTSTRING
  555|  3.93M|#undef STRING_PAUSED_CONTINUE
  556|  3.93M|}
parser_yang.c:parse_text_field:
  981|  3.43M|{
  982|  3.43M|    LY_ERR ret = LY_SUCCESS;
  983|  3.43M|    char *buf, *word;
  984|  3.43M|    size_t word_len;
  985|  3.43M|    enum ly_stmt kw;
  986|       |
  987|  3.43M|    if (*value) {
  ------------------
  |  Branch (987:9): [True: 4, False: 3.43M]
  ------------------
  988|      4|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyplg_ext_stmt2str(parent_stmt));
  ------------------
  |  |  129|      4|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      8|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 4, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  989|      4|        return LY_EVALID;
  990|      4|    }
  991|       |
  992|       |    /* get value */
  993|  3.43M|    LY_CHECK_RET(get_argument(ctx, arg, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  3.43M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  3.43M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.43M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  3.43M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 87, False: 3.43M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  994|       |
  995|       |    /* store value and spend buf if allocated */
  996|  3.43M|    INSERT_WORD_GOTO(ctx, buf, *value, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  3.43M|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|  3.59M|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 1.79M]
  |  |  |  |  |  Branch (202:40): [True: 1.79M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 1.79M, False: 1.63M]
  |  |  ------------------
  |  |   51|  3.43M|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  6.55M|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 1.63M]
  |  |  |  |  |  Branch (202:40): [True: 1.63M, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 1.63M, False: 215]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  997|       |
  998|  6.87M|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  3.43M|    ly_bool __loop_end = 0; \
  |  |   73|  3.43M|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 25, False: 3.43M]
  |  |  ------------------
  |  |   74|     25|        goto ERR_LABEL; \
  |  |   75|     25|    } \
  |  |   76|  3.43M|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 3.42M, False: 10.8k]
  |  |  ------------------
  |  |   77|  3.42M|        __loop_end = 1; \
  |  |   78|  3.42M|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 7, False: 10.8k]
  |  |  ------------------
  |  |   79|      7|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      7|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     14|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 7, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      7|        RET = LY_EVALID; \
  |  |   81|      7|        goto ERR_LABEL; \
  |  |   82|  10.8k|    } else { \
  |  |   83|  10.8k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  10.8k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 13, False: 10.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|     13|        goto ERR_LABEL; \
  |  |  |  |  101|     13|    } \
  |  |  |  |  102|  10.8k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 10.6k, False: 115]
  |  |  |  |  ------------------
  |  |  |  |  103|  10.6k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 10.6k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  10.6k|        __loop_end = 1; \
  |  |  |  |  107|  10.6k|    }
  |  |  ------------------
  |  |   84|  10.8k|    } \
  |  |   85|  3.43M|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 394, False: 3.43M]
  |  |  ------------------
  ------------------
  999|    394|        switch (kw) {
 1000|    363|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1000:9): [True: 363, False: 31]
  ------------------
 1001|    363|            LY_CHECK_RET(parse_ext(ctx, word, word_len, parent, parent_stmt, parent_stmt_index, exts));
  ------------------
  |  |  206|    363|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    363|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    363|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    363|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 19, False: 344]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1002|    344|            break;
 1003|     31|        default:
  ------------------
  |  Branch (1003:9): [True: 31, False: 363]
  ------------------
 1004|     31|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(parent_stmt));
  ------------------
  |  |  129|     31|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     62|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 31, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1005|     31|            return LY_EVALID;
 1006|    394|        }
 1007|    676|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    344|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 12, False: 332]
  |  |  ------------------
  |  |  100|     12|        goto ERR_LABEL; \
  |  |  101|     12|    } \
  |  |  102|    344|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 53, False: 279]
  |  |  ------------------
  |  |  103|     53|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 53]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|     53|        __loop_end = 1; \
  |  |  107|     53|    }
  ------------------
 1008|    332|    }
 1009|       |
 1010|  3.43M|cleanup:
 1011|  3.43M|    return ret;
 1012|  6.87M|}
parser_yang.c:parse_ext:
  925|   307k|{
  926|   307k|    LY_ERR ret = LY_SUCCESS;
  927|   307k|    char *buf, *word;
  928|   307k|    size_t word_len;
  929|   307k|    struct lysp_ext_instance *e;
  930|   307k|    enum ly_stmt kw;
  931|       |
  932|   307k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *exts, e, LY_EMEM);
  ------------------
  |  |   96|   307k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|   307k|    { \
  |  |  |  |   62|   307k|        char *p__; \
  |  |  |  |   63|   307k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 237k, False: 69.7k]
  |  |  |  |  ------------------
  |  |  |  |   64|   237k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|   237k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|   237k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|   237k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 237k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|   237k|        } else { \
  |  |  |  |   73|  69.7k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  69.7k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 69.7k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  69.7k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  69.7k|        } \
  |  |  |  |   80|   307k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   307k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   307k|    }
  |  |  ------------------
  |  |   97|   307k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|   307k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
  933|       |
  934|   307k|    if (!ly_strnchr(ext_name, ':', ext_name_len)) {
  ------------------
  |  Branch (934:9): [True: 0, False: 307k]
  ------------------
  935|      0|        LOGVAL_PARSER(ctx, LYVE_SYNTAX, "Extension instance \"%*.s\" without the mandatory prefix.", ext_name_len, ext_name);
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  936|      0|        return LY_EVALID;
  937|      0|    }
  938|       |
  939|       |    /* store name */
  940|   307k|    LY_CHECK_RET(lydict_insert(PARSER_CTX(ctx), ext_name, ext_name_len, &e->name));
  ------------------
  |  |  206|   307k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   307k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   307k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   614k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 307k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 307k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  941|       |
  942|       |    /* get optional argument */
  943|   307k|    LY_CHECK_RET(get_argument(ctx, Y_MAYBE_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   307k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   307k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   307k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   307k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 307, False: 307k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  944|   307k|    if (word) {
  ------------------
  |  Branch (944:9): [True: 149k, False: 157k]
  ------------------
  945|   149k|        INSERT_WORD_GOTO(ctx, buf, e->argument, word, word_len, ret, cleanup);
  ------------------
  |  |   50|   149k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|  3.89k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 1.94k]
  |  |  |  |  |  Branch (202:40): [True: 1.94k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 1.94k, False: 147k]
  |  |  ------------------
  |  |   51|   149k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   589k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 147k]
  |  |  |  |  |  Branch (202:40): [True: 147k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 143k, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  946|   149k|    }
  947|       |
  948|       |    /* store the rest of information */
  949|   307k|    e->format = LY_VALUE_SCHEMA;
  950|   307k|    e->parsed = NULL;
  951|   307k|    e->prefix_data = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|   307k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
  952|   307k|    e->parent = (void *)parent;
  953|   307k|    e->parent_stmt = parent_stmt;
  954|   307k|    e->parent_stmt_index = parent_stmt_index;
  955|       |
  956|   613k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   307k|    ly_bool __loop_end = 0; \
  |  |   73|   307k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 224, False: 306k]
  |  |  ------------------
  |  |   74|    224|        goto ERR_LABEL; \
  |  |   75|    224|    } \
  |  |   76|   307k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 153k, False: 153k]
  |  |  ------------------
  |  |   77|   153k|        __loop_end = 1; \
  |  |   78|   153k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 8, False: 153k]
  |  |  ------------------
  |  |   79|      8|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      8|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     16|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 8, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      8|        RET = LY_EVALID; \
  |  |   81|      8|        goto ERR_LABEL; \
  |  |   82|   153k|    } else { \
  |  |   83|   153k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|   153k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 108, False: 153k]
  |  |  |  |  ------------------
  |  |  |  |  100|    108|        goto ERR_LABEL; \
  |  |  |  |  101|    108|    } \
  |  |  |  |  102|   153k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 18.3k, False: 134k]
  |  |  |  |  ------------------
  |  |  |  |  103|  18.3k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 18.3k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  18.3k|        __loop_end = 1; \
  |  |  |  |  107|  18.3k|    }
  |  |  ------------------
  |  |   84|   153k|    } \
  |  |   85|   642k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 337k, False: 305k]
  |  |  ------------------
  ------------------
  957|   337k|        LY_CHECK_GOTO(ret = parse_ext_substmt(ctx, kw, word, word_len, &e->child), cleanup)
  ------------------
  |  |  202|   337k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 963, False: 336k]
  |  |  ------------------
  ------------------
  958|   672k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|   336k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 73, False: 336k]
  |  |  ------------------
  |  |  100|     73|        goto ERR_LABEL; \
  |  |  101|     73|    } \
  |  |  102|   336k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 133k, False: 202k]
  |  |  ------------------
  |  |  103|   133k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 133k]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|   133k|        __loop_end = 1; \
  |  |  107|   133k|    }
  ------------------
  959|   336k|    }
  960|       |
  961|   307k|cleanup:
  962|   307k|    return ret;
  963|   613k|}
parser_yang.c:parse_ext_substmt:
  871|   745k|{
  872|   745k|    char *buf;
  873|   745k|    LY_ERR ret = LY_SUCCESS;
  874|   745k|    enum ly_stmt child_kw;
  875|   745k|    struct lysp_stmt *stmt, *par_child;
  876|       |
  877|   745k|    stmt = calloc(1, sizeof *stmt);
  878|   745k|    LY_CHECK_ERR_RET(!stmt, LOGMEM(NULL), LY_EMEM);
  ------------------
  |  |  207|   745k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 745k]
  |  |  ------------------
  ------------------
  879|       |
  880|       |    /* insert into parent statements */
  881|   745k|    if (!*child) {
  ------------------
  |  Branch (881:9): [True: 387k, False: 357k]
  ------------------
  882|   387k|        *child = stmt;
  883|   387k|    } else {
  884|  2.32M|        for (par_child = *child; par_child->next; par_child = par_child->next) {}
  ------------------
  |  Branch (884:34): [True: 1.96M, False: 357k]
  ------------------
  885|   357k|        par_child->next = stmt;
  886|   357k|    }
  887|       |
  888|       |    /* statement */
  889|   745k|    LY_CHECK_RET(lydict_insert(PARSER_CTX(ctx), word, word_len, &stmt->stmt));
  ------------------
  |  |  206|   745k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   745k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   745k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.49M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 745k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 745k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  890|       |
  891|       |    /* get optional argument */
  892|   745k|    LY_CHECK_RET(get_argument(ctx, Y_MAYBE_STR_ARG, &stmt->flags, &word, &buf, &word_len));
  ------------------
  |  |  206|   745k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   745k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   745k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   745k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 204, False: 745k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  893|   745k|    if (word) {
  ------------------
  |  Branch (893:9): [True: 658k, False: 86.2k]
  ------------------
  894|   658k|        INSERT_WORD_GOTO(ctx, buf, stmt->arg, word, word_len, ret, cleanup);
  ------------------
  |  |   50|   658k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|   344k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 172k]
  |  |  |  |  |  Branch (202:40): [True: 172k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 172k, False: 486k]
  |  |  ------------------
  |  |   51|   658k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  1.94M|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 486k]
  |  |  |  |  |  Branch (202:40): [True: 486k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 484k, False: 1.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  895|   658k|    }
  896|       |
  897|   745k|    stmt->format = LY_VALUE_SCHEMA;
  898|   745k|    stmt->prefix_data = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|   745k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
  899|   745k|    stmt->kw = kw;
  900|       |
  901|  1.48M|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, child_kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   745k|    ly_bool __loop_end = 0; \
  |  |   73|   745k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 74, False: 745k]
  |  |  ------------------
  |  |   74|     74|        goto ERR_LABEL; \
  |  |   75|     74|    } \
  |  |   76|   745k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 484k, False: 260k]
  |  |  ------------------
  |  |   77|   484k|        __loop_end = 1; \
  |  |   78|   484k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 17, False: 260k]
  |  |  ------------------
  |  |   79|     17|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|     17|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     34|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 17, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|     17|        RET = LY_EVALID; \
  |  |   81|     17|        goto ERR_LABEL; \
  |  |   82|   260k|    } else { \
  |  |   83|   260k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|   260k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 600, False: 260k]
  |  |  |  |  ------------------
  |  |  |  |  100|    600|        goto ERR_LABEL; \
  |  |  |  |  101|    600|    } \
  |  |  |  |  102|   260k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 7.27k, False: 252k]
  |  |  |  |  ------------------
  |  |  |  |  103|  7.27k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 7.27k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  7.27k|        __loop_end = 1; \
  |  |  |  |  107|  7.27k|    }
  |  |  ------------------
  |  |   84|   260k|    } \
  |  |   85|  1.07M|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 408k, False: 663k]
  |  |  ------------------
  ------------------
  902|   408k|        LY_CHECK_GOTO(ret = parse_ext_substmt(ctx, child_kw, word, word_len, &stmt->child), cleanup)
  ------------------
  |  |  202|   408k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 80.9k, False: 327k]
  |  |  ------------------
  ------------------
  903|   654k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, child_kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|   327k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 68, False: 327k]
  |  |  ------------------
  |  |  100|     68|        goto ERR_LABEL; \
  |  |  101|     68|    } \
  |  |  102|   327k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 171k, False: 155k]
  |  |  ------------------
  |  |  103|   171k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 171k]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|   171k|        __loop_end = 1; \
  |  |  107|   171k|    }
  ------------------
  904|   327k|    }
  905|       |
  906|   745k|cleanup:
  907|   745k|    return ret;
  908|  1.48M|}
parser_yang.c:parse_config:
 1434|  44.2k|{
 1435|  44.2k|    LY_ERR ret = LY_SUCCESS;
 1436|  44.2k|    char *buf, *word;
 1437|  44.2k|    size_t word_len;
 1438|  44.2k|    enum ly_stmt kw;
 1439|       |
 1440|  44.2k|    if (*flags & LYS_CONFIG_MASK) {
  ------------------
  |  |  653|  44.2k|#define LYS_CONFIG_MASK  0x03        /**< mask for config value */
  ------------------
  |  Branch (1440:9): [True: 2, False: 44.2k]
  ------------------
 1441|      2|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "config");
  ------------------
  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1442|      2|        return LY_EVALID;
 1443|      2|    }
 1444|       |
 1445|       |    /* get value */
 1446|  44.2k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  44.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  44.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  44.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  44.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 10, False: 44.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1447|       |
 1448|  44.2k|    if ((word_len == ly_strlen_const("true")) && !strncmp(word, "true", word_len)) {
  ------------------
  |  |  472|  44.2k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (1448:9): [True: 145, False: 44.0k]
  |  Branch (1448:50): [True: 126, False: 19]
  ------------------
 1449|    126|        *flags |= LYS_CONFIG_W;
  ------------------
  |  |  651|    126|#define LYS_CONFIG_W     0x01        /**< config true; */
  ------------------
 1450|  44.0k|    } else if ((word_len == ly_strlen_const("false")) && !strncmp(word, "false", word_len)) {
  ------------------
  |  |  472|  44.0k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (1450:16): [True: 44.0k, False: 27]
  |  Branch (1450:58): [True: 44.0k, False: 29]
  ------------------
 1451|  44.0k|        *flags |= LYS_CONFIG_R;
  ------------------
  |  |  652|  44.0k|#define LYS_CONFIG_R     0x02        /**< config false; */
  ------------------
 1452|  44.0k|    } else {
 1453|     56|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "config");
  ------------------
  |  |  129|     56|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    112|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 56, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1454|     56|        free(buf);
 1455|     56|        return LY_EVALID;
 1456|     56|    }
 1457|  44.1k|    free(buf);
 1458|       |
 1459|  88.2k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  44.1k|    ly_bool __loop_end = 0; \
  |  |   73|  44.1k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 1, False: 44.1k]
  |  |  ------------------
  |  |   74|      1|        goto ERR_LABEL; \
  |  |   75|      1|    } \
  |  |   76|  44.1k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 43.5k, False: 546]
  |  |  ------------------
  |  |   77|  43.5k|        __loop_end = 1; \
  |  |   78|  43.5k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 4, False: 542]
  |  |  ------------------
  |  |   79|      4|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      4|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      8|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 4, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      4|        RET = LY_EVALID; \
  |  |   81|      4|        goto ERR_LABEL; \
  |  |   82|    542|    } else { \
  |  |   83|    542|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|    542|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 1, False: 541]
  |  |  |  |  ------------------
  |  |  |  |  100|      1|        goto ERR_LABEL; \
  |  |  |  |  101|      1|    } \
  |  |  |  |  102|    542|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 434, False: 107]
  |  |  |  |  ------------------
  |  |  |  |  103|    434|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 434]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    434|        __loop_end = 1; \
  |  |  |  |  107|    434|    }
  |  |  ------------------
  |  |   84|    541|    } \
  |  |   85|  44.3k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 192, False: 44.1k]
  |  |  ------------------
  ------------------
 1460|    192|        switch (kw) {
 1461|    186|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1461:9): [True: 186, False: 6]
  ------------------
 1462|    186|            LY_CHECK_RET(parse_ext(ctx, word, word_len, flags, LY_STMT_CONFIG, 0, exts));
  ------------------
  |  |  206|    186|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    186|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    186|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    186|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 184]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1463|    184|            break;
 1464|      6|        default:
  ------------------
  |  Branch (1464:9): [True: 6, False: 186]
  ------------------
 1465|      6|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "config");
  ------------------
  |  |  129|      6|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     12|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1466|      6|            return LY_EVALID;
 1467|    192|        }
 1468|    361|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    184|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 7, False: 177]
  |  |  ------------------
  |  |  100|      7|        goto ERR_LABEL; \
  |  |  101|      7|    } \
  |  |  102|    184|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 92, False: 85]
  |  |  ------------------
  |  |  103|     92|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 92]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|     92|        __loop_end = 1; \
  |  |  107|     92|    }
  ------------------
 1469|    177|    }
 1470|       |
 1471|  44.1k|cleanup:
 1472|  44.1k|    return ret;
 1473|  88.2k|}
parser_yang.c:parse_qnames:
 1393|  13.8k|{
 1394|  13.8k|    LY_ERR ret = LY_SUCCESS;
 1395|  13.8k|    char *buf, *word;
 1396|  13.8k|    struct lysp_qname *item;
 1397|  13.8k|    size_t word_len;
 1398|  13.8k|    enum ly_stmt kw;
 1399|       |
 1400|       |    /* allocate new pointer */
 1401|  13.8k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *qnames, item, LY_EMEM);
  ------------------
  |  |   96|  13.8k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  13.8k|    { \
  |  |  |  |   62|  13.8k|        char *p__; \
  |  |  |  |   63|  13.8k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 12.0k, False: 1.82k]
  |  |  |  |  ------------------
  |  |  |  |   64|  12.0k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  12.0k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  12.0k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  12.0k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 12.0k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  12.0k|        } else { \
  |  |  |  |   73|  1.82k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  1.82k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 1.82k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  1.82k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  1.82k|        } \
  |  |  |  |   80|  13.8k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  13.8k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  13.8k|    }
  |  |  ------------------
  |  |   97|  13.8k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  13.8k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1402|       |
 1403|       |    /* get value */
 1404|  13.8k|    LY_CHECK_RET(get_argument(ctx, arg, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  13.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  13.8k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  13.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  13.8k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 44, False: 13.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1405|       |
 1406|  13.8k|    INSERT_WORD_GOTO(ctx, buf, item->str, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  13.8k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|  19.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 9.53k]
  |  |  |  |  |  Branch (202:40): [True: 9.53k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 9.53k, False: 4.27k]
  |  |  ------------------
  |  |   51|  13.8k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  17.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 4.27k]
  |  |  |  |  |  Branch (202:40): [True: 4.27k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 4.22k, False: 48]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1407|  13.8k|    item->mod = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|  13.8k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 1408|  27.5k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  13.8k|    ly_bool __loop_end = 0; \
  |  |   73|  13.8k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 24, False: 13.7k]
  |  |  ------------------
  |  |   74|     24|        goto ERR_LABEL; \
  |  |   75|     24|    } \
  |  |   76|  13.8k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 12.9k, False: 846]
  |  |  ------------------
  |  |   77|  12.9k|        __loop_end = 1; \
  |  |   78|  12.9k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 6, False: 840]
  |  |  ------------------
  |  |   79|      6|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      6|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     12|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 6, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      6|        RET = LY_EVALID; \
  |  |   81|      6|        goto ERR_LABEL; \
  |  |   82|    840|    } else { \
  |  |   83|    840|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|    840|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 6, False: 834]
  |  |  |  |  ------------------
  |  |  |  |  100|      6|        goto ERR_LABEL; \
  |  |  |  |  101|      6|    } \
  |  |  |  |  102|    840|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 651, False: 183]
  |  |  |  |  ------------------
  |  |  |  |  103|    651|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 651]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    651|        __loop_end = 1; \
  |  |  |  |  107|    651|    }
  |  |  ------------------
  |  |   84|    834|    } \
  |  |   85|  14.0k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 275, False: 13.7k]
  |  |  ------------------
  ------------------
 1409|    275|        switch (kw) {
 1410|    262|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1410:9): [True: 262, False: 13]
  ------------------
 1411|    262|            LY_CHECK_RET(parse_ext(ctx, word, word_len, *qnames, parent_stmt, LY_ARRAY_COUNT(*qnames) - 1, exts));
  ------------------
  |  |  206|    262|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    262|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    262|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    524|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 262, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 259]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1412|    259|            break;
 1413|     13|        default:
  ------------------
  |  Branch (1413:9): [True: 13, False: 262]
  ------------------
 1414|     13|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(parent_stmt));
  ------------------
  |  |  129|     13|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     26|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 13, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1415|     13|            return LY_EVALID;
 1416|    275|        }
 1417|    511|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    259|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 7, False: 252]
  |  |  ------------------
  |  |  100|      7|        goto ERR_LABEL; \
  |  |  101|      7|    } \
  |  |  102|    259|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 160, False: 92]
  |  |  ------------------
  |  |  103|    160|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 160]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|    160|        __loop_end = 1; \
  |  |  107|    160|    }
  ------------------
 1418|    252|    }
 1419|       |
 1420|  13.7k|cleanup:
 1421|  13.7k|    return ret;
 1422|  27.5k|}
parser_yang.c:parse_mandatory:
 1485|   158k|{
 1486|   158k|    LY_ERR ret = LY_SUCCESS;
 1487|   158k|    char *buf, *word;
 1488|   158k|    size_t word_len;
 1489|   158k|    enum ly_stmt kw;
 1490|       |
 1491|   158k|    if (*flags & LYS_MAND_MASK) {
  ------------------
  |  |  666|   158k|#define LYS_MAND_MASK    0x60        /**< mask for mandatory values */
  ------------------
  |  Branch (1491:9): [True: 1, False: 158k]
  ------------------
 1492|      1|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "mandatory");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1493|      1|        return LY_EVALID;
 1494|      1|    }
 1495|       |
 1496|       |    /* get value */
 1497|   158k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   158k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   158k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   158k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   158k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 158k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1498|       |
 1499|   158k|    if ((word_len == ly_strlen_const("true")) && !strncmp(word, "true", word_len)) {
  ------------------
  |  |  472|   158k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (1499:9): [True: 157k, False: 1.80k]
  |  Branch (1499:50): [True: 157k, False: 6]
  ------------------
 1500|   157k|        *flags |= LYS_MAND_TRUE;
  ------------------
  |  |  658|   157k|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
 1501|   157k|    } else if ((word_len == ly_strlen_const("false")) && !strncmp(word, "false", word_len)) {
  ------------------
  |  |  472|  1.81k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (1501:16): [True: 1.78k, False: 24]
  |  Branch (1501:58): [True: 1.76k, False: 24]
  ------------------
 1502|  1.76k|        *flags |= LYS_MAND_FALSE;
  ------------------
  |  |  663|  1.76k|#define LYS_MAND_FALSE   0x40        /**< mandatory false; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
 1503|  1.76k|    } else {
 1504|     48|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "mandatory");
  ------------------
  |  |  129|     48|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     96|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 48, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1505|     48|        free(buf);
 1506|     48|        return LY_EVALID;
 1507|     48|    }
 1508|   158k|    free(buf);
 1509|       |
 1510|   317k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   158k|    ly_bool __loop_end = 0; \
  |  |   73|   158k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 1, False: 158k]
  |  |  ------------------
  |  |   74|      1|        goto ERR_LABEL; \
  |  |   75|      1|    } \
  |  |   76|   158k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 156k, False: 2.48k]
  |  |  ------------------
  |  |   77|   156k|        __loop_end = 1; \
  |  |   78|   156k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 1, False: 2.48k]
  |  |  ------------------
  |  |   79|      1|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      1|        RET = LY_EVALID; \
  |  |   81|      1|        goto ERR_LABEL; \
  |  |   82|  2.48k|    } else { \
  |  |   83|  2.48k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  2.48k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 2, False: 2.48k]
  |  |  |  |  ------------------
  |  |  |  |  100|      2|        goto ERR_LABEL; \
  |  |  |  |  101|      2|    } \
  |  |  |  |  102|  2.48k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 103, False: 2.37k]
  |  |  |  |  ------------------
  |  |  |  |  103|    103|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 103]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    103|        __loop_end = 1; \
  |  |  |  |  107|    103|    }
  |  |  ------------------
  |  |   84|  2.48k|    } \
  |  |   85|   165k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 7.08k, False: 158k]
  |  |  ------------------
  ------------------
 1511|  7.08k|        switch (kw) {
 1512|  7.07k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1512:9): [True: 7.07k, False: 13]
  ------------------
 1513|  7.07k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, flags, LY_STMT_MANDATORY, 0, exts));
  ------------------
  |  |  206|  7.07k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  7.07k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  7.07k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  7.07k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 7.07k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1514|  7.07k|            break;
 1515|     13|        default:
  ------------------
  |  Branch (1515:9): [True: 13, False: 7.07k]
  ------------------
 1516|     13|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "mandatory");
  ------------------
  |  |  129|     13|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     26|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 13, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1517|     13|            return LY_EVALID;
 1518|  7.08k|        }
 1519|  14.1k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|  7.07k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 9, False: 7.06k]
  |  |  ------------------
  |  |  100|      9|        goto ERR_LABEL; \
  |  |  101|      9|    } \
  |  |  102|  7.07k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 2.35k, False: 4.71k]
  |  |  ------------------
  |  |  103|  2.35k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 2.35k]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  2.35k|        __loop_end = 1; \
  |  |  107|  2.35k|    }
  ------------------
 1520|  7.06k|    }
 1521|       |
 1522|   158k|cleanup:
 1523|   158k|    return ret;
 1524|   317k|}
parser_yang.c:parse_restrs:
 1587|  10.4k|{
 1588|  10.4k|    struct lysp_restr *restr;
 1589|       |
 1590|  10.4k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *restrs, restr, LY_EMEM);
  ------------------
  |  |   96|  10.4k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  10.4k|    { \
  |  |  |  |   62|  10.4k|        char *p__; \
  |  |  |  |   63|  10.4k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 8.50k, False: 1.91k]
  |  |  |  |  ------------------
  |  |  |  |   64|  8.50k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  8.50k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  8.50k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  8.50k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 8.50k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  8.50k|        } else { \
  |  |  |  |   73|  1.91k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  1.91k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 1.91k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  1.91k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  1.91k|        } \
  |  |  |  |   80|  10.4k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  10.4k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  10.4k|    }
  |  |  ------------------
  |  |   97|  10.4k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  10.4k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1591|  10.4k|    return parse_restr(ctx, restr_kw, restr);
 1592|  10.4k|}
parser_yang.c:parse_restr:
 1536|   108k|{
 1537|   108k|    LY_ERR ret = LY_SUCCESS;
 1538|   108k|    char *buf, *word;
 1539|   108k|    size_t word_len;
 1540|   108k|    enum ly_stmt kw;
 1541|       |
 1542|       |    /* get value */
 1543|   108k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   108k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   108k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   108k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   108k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 26, False: 108k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1544|       |
 1545|   108k|    CHECK_NONEMPTY(ctx, word_len, lyplg_ext_stmt2str(restr_kw));
  ------------------
  |  |   96|   108k|    if (!VALUE_LEN) { \
  |  |  ------------------
  |  |  |  Branch (96:9): [True: 355, False: 108k]
  |  |  ------------------
  |  |   97|    355|        LOGWRN(PARSER_CTX(CTX), "Empty argument of %s statement does not make sense.", STMT); \
  |  |  ------------------
  |  |  |  |  155|    710|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (155:33): [True: 355, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|    355|    }
  ------------------
 1546|   108k|    INSERT_WORD_GOTO(ctx, buf, restr->arg.str, word, word_len, ret, cleanup);
  ------------------
  |  |   50|   108k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    320|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 160]
  |  |  |  |  |  Branch (202:40): [True: 160, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 160, False: 108k]
  |  |  ------------------
  |  |   51|   108k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   434k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 108k]
  |  |  |  |  |  Branch (202:40): [True: 108k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 108k, False: 355]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1547|   108k|    restr->arg.mod = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|   108k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 1548|   217k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   108k|    ly_bool __loop_end = 0; \
  |  |   73|   108k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 25, False: 108k]
  |  |  ------------------
  |  |   74|     25|        goto ERR_LABEL; \
  |  |   75|     25|    } \
  |  |   76|   108k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 105k, False: 2.99k]
  |  |  ------------------
  |  |   77|   105k|        __loop_end = 1; \
  |  |   78|   105k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 7, False: 2.98k]
  |  |  ------------------
  |  |   79|      7|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      7|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     14|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 7, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      7|        RET = LY_EVALID; \
  |  |   81|      7|        goto ERR_LABEL; \
  |  |   82|  2.98k|    } else { \
  |  |   83|  2.98k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  2.98k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 20, False: 2.96k]
  |  |  |  |  ------------------
  |  |  |  |  100|     20|        goto ERR_LABEL; \
  |  |  |  |  101|     20|    } \
  |  |  |  |  102|  2.98k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 2.46k, False: 507]
  |  |  |  |  ------------------
  |  |  |  |  103|  2.46k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 2.46k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  2.46k|        __loop_end = 1; \
  |  |  |  |  107|  2.46k|    }
  |  |  ------------------
  |  |   84|  2.96k|    } \
  |  |   85|   109k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 731, False: 108k]
  |  |  ------------------
  ------------------
 1549|    731|        switch (kw) {
 1550|    306|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (1550:9): [True: 306, False: 425]
  ------------------
 1551|    306|            LY_CHECK_RET(parse_text_field(ctx, restr->dsc, LY_STMT_DESCRIPTION, 0, &restr->dsc, Y_STR_ARG, &restr->exts));
  ------------------
  |  |  206|    306|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    306|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    306|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    306|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 303]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1552|    303|            break;
 1553|     40|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (1553:9): [True: 40, False: 691]
  ------------------
 1554|     40|            LY_CHECK_RET(parse_text_field(ctx, restr->ref, LY_STMT_REFERENCE, 0, &restr->ref, Y_STR_ARG, &restr->exts));
  ------------------
  |  |  206|     40|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     40|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     40|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     40|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 39]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1555|     39|            break;
 1556|      3|        case LY_STMT_ERROR_APP_TAG:
  ------------------
  |  Branch (1556:9): [True: 3, False: 728]
  ------------------
 1557|      3|            LY_CHECK_RET(parse_text_field(ctx, restr, LY_STMT_ERROR_APP_TAG, 0, &restr->eapptag, Y_STR_ARG,
  ------------------
  |  |  206|      3|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      3|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      3|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      3|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1558|      1|                    &restr->exts));
 1559|      1|            break;
 1560|      3|        case LY_STMT_ERROR_MESSAGE:
  ------------------
  |  Branch (1560:9): [True: 3, False: 728]
  ------------------
 1561|      3|            LY_CHECK_RET(parse_text_field(ctx, restr, LY_STMT_ERROR_MESSAGE, 0, &restr->emsg, Y_STR_ARG, &restr->exts));
  ------------------
  |  |  206|      3|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      3|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      3|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      3|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1562|      1|            break;
 1563|    358|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1563:9): [True: 358, False: 373]
  ------------------
 1564|    358|            LY_CHECK_RET(parse_ext(ctx, word, word_len, restr, restr_kw, 0, &restr->exts));
  ------------------
  |  |  206|    358|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    358|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    358|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    358|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 357]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1565|    357|            break;
 1566|     21|        default:
  ------------------
  |  Branch (1566:9): [True: 21, False: 710]
  ------------------
 1567|     21|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(restr_kw));
  ------------------
  |  |  129|     21|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     42|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 21, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1568|     21|            return LY_EVALID;
 1569|    731|        }
 1570|  1.38k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, restr->exts, ret, cleanup);
  ------------------
  |  |   99|    701|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 16, False: 685]
  |  |  ------------------
  |  |  100|     16|        goto ERR_LABEL; \
  |  |  101|     16|    } \
  |  |  102|    701|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 461, False: 224]
  |  |  ------------------
  |  |  103|    461|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 123, False: 338]
  |  |  |  Branch (103:21): [True: 0, False: 123]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|    461|        __loop_end = 1; \
  |  |  107|    461|    }
  ------------------
 1571|    685|    }
 1572|       |
 1573|   108k|cleanup:
 1574|   108k|    return ret;
 1575|   217k|}
parser_yang.c:parse_status:
 1604|   306k|{
 1605|   306k|    LY_ERR ret = LY_SUCCESS;
 1606|   306k|    char *buf, *word;
 1607|   306k|    size_t word_len;
 1608|   306k|    enum ly_stmt kw;
 1609|       |
 1610|   306k|    if (*flags & LYS_STATUS_MASK) {
  ------------------
  |  |  657|   306k|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
  |  Branch (1610:9): [True: 2, False: 306k]
  ------------------
 1611|      2|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "status");
  ------------------
  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1612|      2|        return LY_EVALID;
 1613|      2|    }
 1614|       |
 1615|       |    /* get value */
 1616|   306k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   306k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   306k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   306k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   306k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 32, False: 306k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1617|       |
 1618|   306k|    if ((word_len == ly_strlen_const("current")) && !strncmp(word, "current", word_len)) {
  ------------------
  |  |  472|   306k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (1618:9): [True: 31, False: 306k]
  |  Branch (1618:53): [True: 1, False: 30]
  ------------------
 1619|      1|        *flags |= LYS_STATUS_CURR;
  ------------------
  |  |  654|      1|#define LYS_STATUS_CURR  0x04        /**< status current; */
  ------------------
 1620|   306k|    } else if ((word_len == ly_strlen_const("deprecated")) && !strncmp(word, "deprecated", word_len)) {
  ------------------
  |  |  472|   306k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (1620:16): [True: 301k, False: 4.64k]
  |  Branch (1620:63): [True: 301k, False: 56]
  ------------------
 1621|   301k|        *flags |= LYS_STATUS_DEPRC;
  ------------------
  |  |  655|   301k|#define LYS_STATUS_DEPRC 0x08        /**< status deprecated; */
  ------------------
 1622|   301k|    } else if ((word_len == ly_strlen_const("obsolete")) && !strncmp(word, "obsolete", word_len)) {
  ------------------
  |  |  472|  4.70k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (1622:16): [True: 4.59k, False: 109]
  |  Branch (1622:61): [True: 4.56k, False: 31]
  ------------------
 1623|  4.56k|        *flags |= LYS_STATUS_OBSLT;
  ------------------
  |  |  656|  4.56k|#define LYS_STATUS_OBSLT 0x10        /**< status obsolete; */
  ------------------
 1624|  4.56k|    } else {
 1625|    140|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "status");
  ------------------
  |  |  129|    140|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    280|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 140, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1626|    140|        free(buf);
 1627|    140|        return LY_EVALID;
 1628|    140|    }
 1629|   306k|    free(buf);
 1630|       |
 1631|   612k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   306k|    ly_bool __loop_end = 0; \
  |  |   73|   306k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 5, False: 306k]
  |  |  ------------------
  |  |   74|      5|        goto ERR_LABEL; \
  |  |   75|      5|    } \
  |  |   76|   306k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 298k, False: 8.21k]
  |  |  ------------------
  |  |   77|   298k|        __loop_end = 1; \
  |  |   78|   298k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 5, False: 8.21k]
  |  |  ------------------
  |  |   79|      5|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      5|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     10|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 5, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      5|        RET = LY_EVALID; \
  |  |   81|      5|        goto ERR_LABEL; \
  |  |   82|  8.21k|    } else { \
  |  |   83|  8.21k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  8.21k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 3, False: 8.21k]
  |  |  |  |  ------------------
  |  |  |  |  100|      3|        goto ERR_LABEL; \
  |  |  |  |  101|      3|    } \
  |  |  |  |  102|  8.21k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 7.64k, False: 568]
  |  |  |  |  ------------------
  |  |  |  |  103|  7.64k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 7.64k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  7.64k|        __loop_end = 1; \
  |  |  |  |  107|  7.64k|    }
  |  |  ------------------
  |  |   84|  8.21k|    } \
  |  |   85|   307k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 773, False: 306k]
  |  |  ------------------
  ------------------
 1632|    773|        switch (kw) {
 1633|    764|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1633:9): [True: 764, False: 9]
  ------------------
 1634|    764|            LY_CHECK_RET(parse_ext(ctx, word, word_len, flags, LY_STMT_STATUS, 0, exts));
  ------------------
  |  |  206|    764|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    764|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    764|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    764|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 763]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1635|    763|            break;
 1636|      9|        default:
  ------------------
  |  Branch (1636:9): [True: 9, False: 764]
  ------------------
 1637|      9|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "status");
  ------------------
  |  |  129|      9|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     18|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 9, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1638|      9|            return LY_EVALID;
 1639|    773|        }
 1640|  1.52k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    763|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 6, False: 757]
  |  |  ------------------
  |  |  100|      6|        goto ERR_LABEL; \
  |  |  101|      6|    } \
  |  |  102|    763|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 552, False: 205]
  |  |  ------------------
  |  |  103|    552|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 552]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|    552|        __loop_end = 1; \
  |  |  107|    552|    }
  ------------------
 1641|    757|    }
 1642|       |
 1643|   306k|cleanup:
 1644|   306k|    return ret;
 1645|   612k|}
parser_yang.c:parse_type:
 2181|  1.20M|{
 2182|  1.20M|    LY_ERR ret = LY_SUCCESS;
 2183|  1.20M|    char *buf, *word;
 2184|  1.20M|    const char *str_path = NULL;
 2185|  1.20M|    size_t word_len;
 2186|  1.20M|    enum ly_stmt kw;
 2187|  1.20M|    struct lysp_type *nest_type;
 2188|       |
 2189|  1.20M|    if (type->name) {
  ------------------
  |  Branch (2189:9): [True: 3, False: 1.20M]
  ------------------
 2190|      3|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "type");
  ------------------
  |  |  129|      3|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      6|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2191|      3|        return LY_EVALID;
 2192|      3|    }
 2193|       |
 2194|       |    /* get value */
 2195|  1.20M|    LY_CHECK_RET(get_argument(ctx, Y_PREF_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  1.20M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.20M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.20M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.20M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 98, False: 1.20M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2196|  1.20M|    INSERT_WORD_GOTO(ctx, buf, type->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  1.20M|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|  2.55k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 1.27k]
  |  |  |  |  |  Branch (202:40): [True: 1.27k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 1.27k, False: 1.20M]
  |  |  ------------------
  |  |   51|  1.20M|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  4.80M|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 1.20M]
  |  |  |  |  |  Branch (202:40): [True: 1.20M, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 1.20M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2197|       |
 2198|       |    /* set module */
 2199|  1.20M|    type->pmod = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|  1.20M|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 2200|       |
 2201|  2.40M|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  1.20M|    ly_bool __loop_end = 0; \
  |  |   73|  1.20M|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 26, False: 1.20M]
  |  |  ------------------
  |  |   74|     26|        goto ERR_LABEL; \
  |  |   75|     26|    } \
  |  |   76|  1.20M|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 629k, False: 573k]
  |  |  ------------------
  |  |   77|   629k|        __loop_end = 1; \
  |  |   78|   629k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 9, False: 573k]
  |  |  ------------------
  |  |   79|      9|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      9|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     18|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 9, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      9|        RET = LY_EVALID; \
  |  |   81|      9|        goto ERR_LABEL; \
  |  |   82|   573k|    } else { \
  |  |   83|   573k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|   573k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 109, False: 573k]
  |  |  |  |  ------------------
  |  |  |  |  100|    109|        goto ERR_LABEL; \
  |  |  |  |  101|    109|    } \
  |  |  |  |  102|   573k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 34.7k, False: 538k]
  |  |  |  |  ------------------
  |  |  |  |  103|  34.7k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 34.7k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  34.7k|        __loop_end = 1; \
  |  |  |  |  107|  34.7k|    }
  |  |  ------------------
  |  |   84|   573k|    } \
  |  |   85|  1.96M|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 784k, False: 1.17M]
  |  |  ------------------
  ------------------
 2202|   784k|        switch (kw) {
 2203|  20.0k|        case LY_STMT_BASE:
  ------------------
  |  Branch (2203:9): [True: 20.0k, False: 764k]
  ------------------
 2204|  20.0k|            LY_CHECK_RET(parse_text_fields(ctx, LY_STMT_BASE, &type->bases, Y_PREF_IDENTIF_ARG, &type->exts));
  ------------------
  |  |  206|  20.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  20.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  20.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  20.0k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 46, False: 19.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2205|  19.9k|            type->flags |= LYS_SET_BASE;
  ------------------
  |  |  690|  19.9k|#define LYS_SET_BASE     0x0001      /**< type's flag for present base substatement */
  ------------------
 2206|  19.9k|            break;
 2207|  6.36k|        case LY_STMT_BIT:
  ------------------
  |  Branch (2207:9): [True: 6.36k, False: 777k]
  ------------------
 2208|  6.36k|            LY_CHECK_RET(parse_type_enum(ctx, kw, &type->bits));
  ------------------
  |  |  206|  6.36k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  6.36k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  6.36k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  6.36k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 168, False: 6.19k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2209|  6.19k|            type->flags |= LYS_SET_BIT;
  ------------------
  |  |  691|  6.19k|#define LYS_SET_BIT      0x0002      /**< type's flag for present bit substatement */
  ------------------
 2210|  6.19k|            break;
 2211|  78.5k|        case LY_STMT_ENUM:
  ------------------
  |  Branch (2211:9): [True: 78.5k, False: 705k]
  ------------------
 2212|  78.5k|            LY_CHECK_RET(parse_type_enum(ctx, kw, &type->enums));
  ------------------
  |  |  206|  78.5k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  78.5k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  78.5k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  78.5k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 340, False: 78.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2213|  78.1k|            type->flags |= LYS_SET_ENUM;
  ------------------
  |  |  692|  78.1k|#define LYS_SET_ENUM     0x0004      /**< type's flag for present enum substatement */
  ------------------
 2214|  78.1k|            break;
 2215|  1.91k|        case LY_STMT_FRACTION_DIGITS:
  ------------------
  |  Branch (2215:9): [True: 1.91k, False: 782k]
  ------------------
 2216|  1.91k|            LY_CHECK_RET(parse_type_fracdigits(ctx, type));
  ------------------
  |  |  206|  1.91k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.91k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.91k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.91k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 107, False: 1.80k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2217|  1.80k|            type->flags |= LYS_SET_FRDIGITS;
  ------------------
  |  |  693|  1.80k|#define LYS_SET_FRDIGITS 0x0008      /**< type's flag for present fraction-digits substatement */
  ------------------
 2218|  1.80k|            break;
 2219|  56.2k|        case LY_STMT_LENGTH:
  ------------------
  |  Branch (2219:9): [True: 56.2k, False: 728k]
  ------------------
 2220|  56.2k|            if (type->length) {
  ------------------
  |  Branch (2220:17): [True: 0, False: 56.2k]
  ------------------
 2221|      0|                LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2222|      0|                return LY_EVALID;
 2223|      0|            }
 2224|  56.2k|            type->length = calloc(1, sizeof *type->length);
 2225|  56.2k|            LY_CHECK_ERR_RET(!type->length, LOGMEM(PARSER_CTX(ctx)), LY_EMEM);
  ------------------
  |  |  207|  56.2k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 56.2k]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2226|       |
 2227|  56.2k|            LY_CHECK_RET(parse_restr(ctx, kw, type->length));
  ------------------
  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  56.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  56.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2228|  56.2k|            type->flags |= LYS_SET_LENGTH;
  ------------------
  |  |  694|  56.2k|#define LYS_SET_LENGTH   0x0010      /**< type's flag for present length substatement */
  ------------------
 2229|  56.2k|            break;
 2230|  74.5k|        case LY_STMT_PATH:
  ------------------
  |  Branch (2230:9): [True: 74.5k, False: 709k]
  ------------------
 2231|  74.5k|            if (type->path) {
  ------------------
  |  Branch (2231:17): [True: 1, False: 74.5k]
  ------------------
 2232|      1|                LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyplg_ext_stmt2str(LY_STMT_PATH));
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2233|      1|                return LY_EVALID;
 2234|      1|            }
 2235|       |
 2236|       |            /* Usually, in the parser_yang.c, the result of the parsing is stored directly in the
 2237|       |             * corresponding structure, so in case of failure, the lysp_module_free function will take
 2238|       |             * care of removing the parsed value from the dictionary. But in this case, it is not possible
 2239|       |             * to rely on lysp_module_free because the result of the parsing is stored in a local variable.
 2240|       |             */
 2241|  74.5k|            LY_CHECK_ERR_RET(ret = parse_text_field(ctx, type, LY_STMT_PATH, 0, &str_path, Y_STR_ARG, &type->exts),
  ------------------
  |  |  207|  74.5k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 72, False: 74.4k]
  |  |  |  Branch (207:58): [True: 72, False: 0]
  |  |  ------------------
  ------------------
 2242|  74.5k|                    lydict_remove(PARSER_CTX(ctx), str_path), ret);
 2243|  74.4k|            ret = ly_path_parse(PARSER_CTX(ctx), NULL, str_path, 0, 1, LY_PATH_BEGIN_EITHER,
  ------------------
  |  |  128|  74.4k|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|  74.4k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 74.4k, False: 0]
  |  |  ------------------
  ------------------
                          ret = ly_path_parse(PARSER_CTX(ctx), NULL, str_path, 0, 1, LY_PATH_BEGIN_EITHER,
  ------------------
  |  |   72|  74.4k|#define LY_PATH_BEGIN_EITHER    0x02    /**< path be be either absolute or relative */
  ------------------
 2244|  74.4k|                    LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, &type->path);
  ------------------
  |  |   79|  74.4k|#define LY_PATH_PREFIX_OPTIONAL     0x10    /**< prefixes in the path are optional (XML path) */
  ------------------
                                  LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, &type->path);
  ------------------
  |  |   92|  74.4k|#define LY_PATH_PRED_LEAFREF    0x0400  /** expected predicates only leafref - [node=current()/../../../node/node];
  ------------------
 2245|       |            /* Moreover, even if successful, the string is removed from the dictionary. */
 2246|  74.4k|            lydict_remove(PARSER_CTX(ctx), str_path);
  ------------------
  |  |  128|  74.4k|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|  74.4k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 74.4k, False: 0]
  |  |  ------------------
  ------------------
 2247|  74.4k|            LY_CHECK_RET(ret);
  ------------------
  |  |  206|  74.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  74.4k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  74.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  74.4k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1.73k, False: 72.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2248|  72.7k|            type->flags |= LYS_SET_PATH;
  ------------------
  |  |  695|  72.7k|#define LYS_SET_PATH     0x0020      /**< type's flag for present path substatement */
  ------------------
 2249|  72.7k|            break;
 2250|   289k|        case LY_STMT_PATTERN:
  ------------------
  |  Branch (2250:9): [True: 289k, False: 495k]
  ------------------
 2251|   289k|            LY_CHECK_RET(parse_type_pattern(ctx, &type->patterns));
  ------------------
  |  |  206|   289k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   289k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   289k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   289k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 60, False: 288k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2252|   288k|            type->flags |= LYS_SET_PATTERN;
  ------------------
  |  |  696|   288k|#define LYS_SET_PATTERN  0x0040      /**< type's flag for present pattern substatement */
  ------------------
 2253|   288k|            break;
 2254|  42.1k|        case LY_STMT_RANGE:
  ------------------
  |  Branch (2254:9): [True: 42.1k, False: 742k]
  ------------------
 2255|  42.1k|            if (type->range) {
  ------------------
  |  Branch (2255:17): [True: 0, False: 42.1k]
  ------------------
 2256|      0|                LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyplg_ext_stmt2str(kw));
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2257|      0|                return LY_EVALID;
 2258|      0|            }
 2259|  42.1k|            type->range = calloc(1, sizeof *type->range);
 2260|  42.1k|            LY_CHECK_ERR_RET(!type->range, LOGMEM(PARSER_CTX(ctx)), LY_EMEM);
  ------------------
  |  |  207|  42.1k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 42.1k]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2261|       |
 2262|  42.1k|            LY_CHECK_RET(parse_restr(ctx, kw, type->range));
  ------------------
  |  |  206|  42.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  42.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  42.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  42.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 42.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2263|  42.1k|            type->flags |= LYS_SET_RANGE;
  ------------------
  |  |  697|  42.1k|#define LYS_SET_RANGE    0x0080      /**< type's flag for present range substatement */
  ------------------
 2264|  42.1k|            break;
 2265|    393|        case LY_STMT_REQUIRE_INSTANCE:
  ------------------
  |  Branch (2265:9): [True: 393, False: 783k]
  ------------------
 2266|    393|            LY_CHECK_RET(parse_type_reqinstance(ctx, type));
  ------------------
  |  |  206|    393|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    393|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    393|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    393|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 80, False: 313]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2267|       |            /* LYS_SET_REQINST checked and set inside parse_type_reqinstance() */
 2268|    313|            break;
 2269|   207k|        case LY_STMT_TYPE:
  ------------------
  |  Branch (2269:9): [True: 207k, False: 577k]
  ------------------
 2270|   207k|            LY_ARRAY_NEW_RET(PARSER_CTX(ctx), type->types, nest_type, LY_EMEM);
  ------------------
  |  |   96|   207k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|   207k|    { \
  |  |  |  |   62|   207k|        char *p__; \
  |  |  |  |   63|   207k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 96.4k, False: 110k]
  |  |  |  |  ------------------
  |  |  |  |   64|  96.4k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  96.4k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  96.4k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  96.4k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 96.4k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|   110k|        } else { \
  |  |  |  |   73|   110k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|   110k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 110k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|   110k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|   110k|        } \
  |  |  |  |   80|   207k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   207k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   207k|    }
  |  |  ------------------
  |  |   97|   207k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|   207k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 2271|   207k|            LY_CHECK_RET(parse_type(ctx, nest_type));
  ------------------
  |  |  206|   207k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   207k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   207k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   207k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 24.3k, False: 182k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2272|   182k|            type->flags |= LYS_SET_TYPE;
  ------------------
  |  |  698|   182k|#define LYS_SET_TYPE     0x0100      /**< type's flag for present type substatement */
  ------------------
 2273|   182k|            break;
 2274|  7.96k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2274:9): [True: 7.96k, False: 776k]
  ------------------
 2275|  7.96k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, type, LY_STMT_TYPE, 0, &type->exts));
  ------------------
  |  |  206|  7.96k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  7.96k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  7.96k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  7.96k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 13, False: 7.95k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2276|  7.95k|            break;
 2277|     41|        default:
  ------------------
  |  Branch (2277:9): [True: 41, False: 784k]
  ------------------
 2278|     41|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "type");
  ------------------
  |  |  129|     41|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     82|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 41, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2279|     41|            return LY_EVALID;
 2280|   784k|        }
 2281|  1.51M|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, type->exts, ret, cleanup);
  ------------------
  |  |   99|   757k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 456, False: 756k]
  |  |  ------------------
  |  |  100|    456|        goto ERR_LABEL; \
  |  |  101|    456|    } \
  |  |  102|   757k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 511k, False: 245k]
  |  |  ------------------
  |  |  103|   511k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 1.23k, False: 510k]
  |  |  |  Branch (103:21): [True: 0, False: 1.23k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|   511k|        __loop_end = 1; \
  |  |  107|   511k|    }
  ------------------
 2282|   756k|    }
 2283|       |
 2284|  1.17M|cleanup:
 2285|  1.17M|    return ret;
 2286|  2.40M|}
parser_yang.c:parse_type_enum:
 1873|  84.8k|{
 1874|  84.8k|    LY_ERR ret = LY_SUCCESS;
 1875|  84.8k|    char *buf, *word;
 1876|  84.8k|    size_t word_len;
 1877|  84.8k|    enum ly_stmt kw;
 1878|  84.8k|    struct lysp_type_enum *enm;
 1879|       |
 1880|  84.8k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *enums, enm, LY_EMEM);
  ------------------
  |  |   96|  84.8k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  84.8k|    { \
  |  |  |  |   62|  84.8k|        char *p__; \
  |  |  |  |   63|  84.8k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 46.0k, False: 38.8k]
  |  |  |  |  ------------------
  |  |  |  |   64|  46.0k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  46.0k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  46.0k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  46.0k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 46.0k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  46.0k|        } else { \
  |  |  |  |   73|  38.8k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  38.8k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 38.8k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  38.8k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  38.8k|        } \
  |  |  |  |   80|  84.8k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  84.8k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  84.8k|    }
  |  |  ------------------
  |  |   97|  84.8k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  84.8k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1881|       |
 1882|       |    /* get value */
 1883|  84.8k|    LY_CHECK_RET(get_argument(ctx, enum_kw == LY_STMT_ENUM ? Y_STR_ARG : Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  84.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  84.8k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   169k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 78.5k, False: 6.36k]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 17, False: 84.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1884|  84.8k|    if (enum_kw == LY_STMT_ENUM) {
  ------------------
  |  Branch (1884:9): [True: 78.4k, False: 6.35k]
  ------------------
 1885|  78.4k|        ret = lysp_check_enum_name((struct lysp_ctx *)ctx, (const char *)word, word_len);
 1886|  78.4k|        LY_CHECK_ERR_RET(ret, free(buf), ret);
  ------------------
  |  |  207|  78.4k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 3, False: 78.4k]
  |  |  ------------------
  ------------------
 1887|  78.4k|    } /* else nothing specific for YANG_BIT */
 1888|       |
 1889|  84.8k|    INSERT_WORD_GOTO(ctx, buf, enm->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  84.8k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    346|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 173]
  |  |  |  |  |  Branch (202:40): [True: 173, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 173, False: 84.6k]
  |  |  ------------------
  |  |   51|  84.8k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   338k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 84.6k]
  |  |  |  |  |  Branch (202:40): [True: 84.6k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 84.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1890|  84.8k|    CHECK_UNIQUENESS(ctx, *enums, name, lyplg_ext_stmt2str(enum_kw), enm->name);
  ------------------
  |  |   86|  84.8k|    if (ARRAY) { \
  |  |  ------------------
  |  |  |  Branch (86:9): [True: 84.8k, False: 0]
  |  |  ------------------
  |  |   87|   150k|        for (LY_ARRAY_COUNT_TYPE u_ = 0; u_ < LY_ARRAY_COUNT(ARRAY) - 1; ++u_) { \
  |  |  ------------------
  |  |  |  |  104|  84.8k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       for (LY_ARRAY_COUNT_TYPE u_ = 0; u_ < LY_ARRAY_COUNT(ARRAY) - 1; ++u_) { \
  |  |  ------------------
  |  |  |  |  148|   150k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 150k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (87:42): [True: 65.5k, False: 84.8k]
  |  |  ------------------
  |  |   88|  65.5k|            if (!strcmp((ARRAY)[u_].MEMBER, IDENT)) { \
  |  |  ------------------
  |  |  |  Branch (88:17): [True: 9, False: 65.5k]
  |  |  ------------------
  |  |   89|      9|                LOGVAL_PARSER(CTX, LY_VCODE_DUPIDENT, IDENT, STMT); \
  |  |  ------------------
  |  |  |  |  129|      9|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     18|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 9, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|      9|                return LY_EVALID; \
  |  |   91|      9|            } \
  |  |   92|  65.5k|        } \
  |  |   93|  84.8k|    }
  ------------------
 1891|       |
 1892|   169k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  84.8k|    ly_bool __loop_end = 0; \
  |  |   73|  84.8k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 110, False: 84.7k]
  |  |  ------------------
  |  |   74|    110|        goto ERR_LABEL; \
  |  |   75|    110|    } \
  |  |   76|  84.8k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 6.98k, False: 77.7k]
  |  |  ------------------
  |  |   77|  6.98k|        __loop_end = 1; \
  |  |   78|  77.7k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 9, False: 77.7k]
  |  |  ------------------
  |  |   79|      9|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      9|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     18|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 9, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      9|        RET = LY_EVALID; \
  |  |   81|      9|        goto ERR_LABEL; \
  |  |   82|  77.7k|    } else { \
  |  |   83|  77.7k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  77.7k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 49, False: 77.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|     49|        goto ERR_LABEL; \
  |  |  |  |  101|     49|    } \
  |  |  |  |  102|  77.7k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 326, False: 77.3k]
  |  |  |  |  ------------------
  |  |  |  |  103|    326|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 326]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    326|        __loop_end = 1; \
  |  |  |  |  107|    326|    }
  |  |  ------------------
  |  |   84|  77.6k|    } \
  |  |   85|   204k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 120k, False: 84.3k]
  |  |  ------------------
  ------------------
 1893|   120k|        switch (kw) {
 1894|  70.3k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (1894:9): [True: 70.3k, False: 50.1k]
  ------------------
 1895|  70.3k|            LY_CHECK_RET(parse_text_field(ctx, enm->dsc, LY_STMT_DESCRIPTION, 0, &enm->dsc, Y_STR_ARG, &enm->exts));
  ------------------
  |  |  206|  70.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  70.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  70.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  70.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 70.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1896|  70.3k|            break;
 1897|      1|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (1897:9): [True: 1, False: 120k]
  ------------------
 1898|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "if-feature", lyplg_ext_stmt2str(enum_kw));
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1899|      0|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &enm->iffeatures, Y_STR_ARG, &enm->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1900|      0|            break;
 1901|     76|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (1901:9): [True: 76, False: 120k]
  ------------------
 1902|     76|            LY_CHECK_RET(parse_text_field(ctx, enm->ref, LY_STMT_REFERENCE, 0, &enm->ref, Y_STR_ARG, &enm->exts));
  ------------------
  |  |  206|     76|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     76|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     76|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     76|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 75]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1903|     75|            break;
 1904|     77|        case LY_STMT_STATUS:
  ------------------
  |  Branch (1904:9): [True: 77, False: 120k]
  ------------------
 1905|     77|            LY_CHECK_RET(parse_status(ctx, &enm->flags, &enm->exts));
  ------------------
  |  |  206|     77|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     77|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     77|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     77|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 74]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1906|     74|            break;
 1907|  44.7k|        case LY_STMT_VALUE:
  ------------------
  |  Branch (1907:9): [True: 44.7k, False: 75.8k]
  ------------------
 1908|  44.7k|            LY_CHECK_ERR_RET(enum_kw == LY_STMT_BIT, LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw),
  ------------------
  |  |  207|  44.7k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 1, False: 44.7k]
  |  |  |  Branch (207:58): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1909|  44.7k|                    lyplg_ext_stmt2str(enum_kw)), LY_EVALID);
 1910|  44.7k|            LY_CHECK_RET(parse_type_enum_value_pos(ctx, kw, enm));
  ------------------
  |  |  206|  44.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  44.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  44.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  44.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 89, False: 44.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1911|  44.6k|            break;
 1912|  4.06k|        case LY_STMT_POSITION:
  ------------------
  |  Branch (1912:9): [True: 4.06k, False: 116k]
  ------------------
 1913|  4.06k|            LY_CHECK_ERR_RET(enum_kw == LY_STMT_ENUM, LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw),
  ------------------
  |  |  207|  4.06k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 1, False: 4.06k]
  |  |  |  Branch (207:58): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1914|  4.06k|                    lyplg_ext_stmt2str(enum_kw)), LY_EVALID);
 1915|  4.06k|            LY_CHECK_RET(parse_type_enum_value_pos(ctx, kw, enm));
  ------------------
  |  |  206|  4.06k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  4.06k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  4.06k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  4.06k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 109, False: 3.95k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1916|  3.95k|            break;
 1917|  1.21k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1917:9): [True: 1.21k, False: 119k]
  ------------------
 1918|  1.21k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, enm, enum_kw, 0, &enm->exts));
  ------------------
  |  |  206|  1.21k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.21k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.21k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.21k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 1.20k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1919|  1.20k|            break;
 1920|     43|        default:
  ------------------
  |  Branch (1920:9): [True: 43, False: 120k]
  ------------------
 1921|     43|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(enum_kw));
  ------------------
  |  |  129|     43|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     86|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 43, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1922|     43|            return LY_EVALID;
 1923|   120k|        }
 1924|   240k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, enm->exts, ret, cleanup);
  ------------------
  |  |   99|   120k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 58, False: 120k]
  |  |  ------------------
  |  |  100|     58|        goto ERR_LABEL; \
  |  |  101|     58|    } \
  |  |  102|   120k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 77.0k, False: 43.2k]
  |  |  ------------------
  |  |  103|  77.0k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 3.97k, False: 73.0k]
  |  |  |  Branch (103:21): [True: 0, False: 3.97k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  77.0k|        __loop_end = 1; \
  |  |  107|  77.0k|    }
  ------------------
 1925|   120k|    }
 1926|       |
 1927|  84.5k|cleanup:
 1928|  84.5k|    return ret;
 1929|   169k|}
parser_yang.c:parse_type_fracdigits:
 1940|  1.91k|{
 1941|  1.91k|    LY_ERR ret = LY_SUCCESS;
 1942|  1.91k|    char *buf = NULL, *word, *ptr;
 1943|  1.91k|    size_t word_len;
 1944|  1.91k|    unsigned long long num;
 1945|  1.91k|    enum ly_stmt kw;
 1946|       |
 1947|  1.91k|    if (type->fraction_digits) {
  ------------------
  |  Branch (1947:9): [True: 1, False: 1.91k]
  ------------------
 1948|      1|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "fraction-digits");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1949|      1|        return LY_EVALID;
 1950|      1|    }
 1951|       |
 1952|       |    /* get value */
 1953|  1.91k|    LY_CHECK_GOTO(ret = get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len), cleanup);
  ------------------
  |  |  202|  1.91k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 3, False: 1.91k]
  |  |  ------------------
  ------------------
 1954|       |
 1955|  1.91k|    if (!word_len || (word[0] == '0') || !isdigit(word[0])) {
  ------------------
  |  Branch (1955:9): [True: 1, False: 1.91k]
  |  Branch (1955:22): [True: 2, False: 1.90k]
  |  Branch (1955:42): [True: 5, False: 1.90k]
  ------------------
 1956|      8|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "fraction-digits");
  ------------------
  |  |  129|      8|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     16|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 8, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1957|      8|        ret = LY_EVALID;
 1958|      8|        goto cleanup;
 1959|      8|    }
 1960|       |
 1961|  1.90k|    errno = 0;
 1962|  1.90k|    num = strtoull(word, &ptr, LY_BASE_DEC);
  ------------------
  |  |  495|  1.90k|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
 1963|       |    /* we have not parsed the whole argument */
 1964|  1.90k|    if ((size_t)(ptr - word) != word_len) {
  ------------------
  |  Branch (1964:9): [True: 8, False: 1.89k]
  ------------------
 1965|      8|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "fraction-digits");
  ------------------
  |  |  129|      8|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     16|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 8, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1966|      8|        ret = LY_EVALID;
 1967|      8|        goto cleanup;
 1968|      8|    }
 1969|  1.89k|    if ((errno == ERANGE) || (num > LY_TYPE_DEC64_FD_MAX)) {
  ------------------
  |  |  104|  1.89k|#define LY_TYPE_DEC64_FD_MAX 18 /**< Maximal value of decimal64's fraction-digits */
  ------------------
  |  Branch (1969:9): [True: 1, False: 1.89k]
  |  Branch (1969:30): [True: 60, False: 1.83k]
  ------------------
 1970|     61|        LOGVAL_PARSER(ctx, LY_VCODE_OOB, word_len, word, "fraction-digits");
  ------------------
  |  |  129|     61|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    122|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 61, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1971|     61|        ret = LY_EVALID;
 1972|     61|        goto cleanup;
 1973|     61|    }
 1974|  1.83k|    type->fraction_digits = num;
 1975|       |
 1976|  3.65k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  1.83k|    ly_bool __loop_end = 0; \
  |  |   73|  1.83k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 2, False: 1.83k]
  |  |  ------------------
  |  |   74|      2|        goto ERR_LABEL; \
  |  |   75|      2|    } \
  |  |   76|  1.83k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 13, False: 1.81k]
  |  |  ------------------
  |  |   77|     13|        __loop_end = 1; \
  |  |   78|  1.81k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 2, False: 1.81k]
  |  |  ------------------
  |  |   79|      2|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      2|        RET = LY_EVALID; \
  |  |   81|      2|        goto ERR_LABEL; \
  |  |   82|  1.81k|    } else { \
  |  |   83|  1.81k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  1.81k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 3, False: 1.81k]
  |  |  |  |  ------------------
  |  |  |  |  100|      3|        goto ERR_LABEL; \
  |  |  |  |  101|      3|    } \
  |  |  |  |  102|  1.81k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 1.05k, False: 761]
  |  |  |  |  ------------------
  |  |  |  |  103|  1.05k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 1.05k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  1.05k|        __loop_end = 1; \
  |  |  |  |  107|  1.05k|    }
  |  |  ------------------
  |  |   84|  1.81k|    } \
  |  |   85|  2.80k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 1.00k, False: 1.80k]
  |  |  ------------------
  ------------------
 1977|  1.00k|        switch (kw) {
 1978|    991|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1978:9): [True: 991, False: 10]
  ------------------
 1979|    991|            LY_CHECK_GOTO(ret = parse_ext(ctx, word, word_len, type, LY_STMT_FRACTION_DIGITS, 0, &type->exts), cleanup);
  ------------------
  |  |  202|    991|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 2, False: 989]
  |  |  ------------------
  ------------------
 1980|    989|            break;
 1981|     10|        default:
  ------------------
  |  Branch (1981:9): [True: 10, False: 991]
  ------------------
 1982|     10|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "fraction-digits");
  ------------------
  |  |  129|     10|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     20|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1983|     10|            ret = LY_EVALID;
 1984|     10|            goto cleanup;
 1985|  1.00k|        }
 1986|  1.97k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    989|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 7, False: 982]
  |  |  ------------------
  |  |  100|      7|        goto ERR_LABEL; \
  |  |  101|      7|    } \
  |  |  102|    989|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 742, False: 240]
  |  |  ------------------
  |  |  103|    742|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 742]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|    742|        __loop_end = 1; \
  |  |  107|    742|    }
  ------------------
 1987|    982|    }
 1988|       |
 1989|  1.91k|cleanup:
 1990|  1.91k|    free(buf);
 1991|  1.91k|    return ret;
 1992|  3.65k|}
parser_yang.c:parse_type_pattern:
 2112|   289k|{
 2113|   289k|    LY_ERR ret = LY_SUCCESS;
 2114|   289k|    char *buf, *word;
 2115|   289k|    size_t word_len;
 2116|   289k|    enum ly_stmt kw;
 2117|   289k|    struct lysp_restr *restr;
 2118|       |
 2119|   289k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *patterns, restr, LY_EMEM);
  ------------------
  |  |   96|   289k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|   289k|    { \
  |  |  |  |   62|   289k|        char *p__; \
  |  |  |  |   63|   289k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 48.3k, False: 240k]
  |  |  |  |  ------------------
  |  |  |  |   64|  48.3k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  48.3k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  48.3k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  48.3k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 48.3k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|   240k|        } else { \
  |  |  |  |   73|   240k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|   240k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 240k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|   240k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|   240k|        } \
  |  |  |  |   80|   289k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   289k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   289k|    }
  |  |  ------------------
  |  |   97|   289k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|   289k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 2120|       |
 2121|       |    /* get value */
 2122|   289k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   289k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   289k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   289k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   289k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 289k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2123|       |
 2124|       |    /* add special meaning first byte */
 2125|   289k|    if (buf) {
  ------------------
  |  Branch (2125:9): [True: 103, False: 288k]
  ------------------
 2126|    103|        buf = ly_realloc(buf, word_len + 2);
 2127|    103|        word = buf;
 2128|   288k|    } else {
 2129|   288k|        buf = malloc(word_len + 2);
 2130|   288k|    }
 2131|   289k|    LY_CHECK_ERR_RET(!buf, LOGMEM(PARSER_CTX(ctx)), LY_EMEM);
  ------------------
  |  |  207|   289k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 289k]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2132|   289k|    if (word_len) {
  ------------------
  |  Branch (2132:9): [True: 288k, False: 51]
  ------------------
 2133|   288k|        memmove(buf + 1, word, word_len);
 2134|   288k|    }
 2135|   289k|    buf[0] = LYSP_RESTR_PATTERN_ACK; /* pattern's default regular-match flag */
  ------------------
  |  |  360|   289k|#define LYSP_RESTR_PATTERN_ACK   0x06
  ------------------
 2136|   289k|    buf[word_len + 1] = '\0'; /* terminating NULL byte */
 2137|   289k|    LY_CHECK_RET(lydict_insert_zc(PARSER_CTX(ctx), buf, &restr->arg.str));
  ------------------
  |  |  206|   289k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   289k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   289k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   578k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 289k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 289k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2138|   289k|    restr->arg.mod = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|   289k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 2139|       |
 2140|   578k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   289k|    ly_bool __loop_end = 0; \
  |  |   73|   289k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 9, False: 289k]
  |  |  ------------------
  |  |   74|      9|        goto ERR_LABEL; \
  |  |   75|      9|    } \
  |  |   76|   289k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 287k, False: 1.63k]
  |  |  ------------------
  |  |   77|   287k|        __loop_end = 1; \
  |  |   78|   287k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 6, False: 1.63k]
  |  |  ------------------
  |  |   79|      6|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      6|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     12|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 6, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      6|        RET = LY_EVALID; \
  |  |   81|      6|        goto ERR_LABEL; \
  |  |   82|  1.63k|    } else { \
  |  |   83|  1.63k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  1.63k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 7, False: 1.62k]
  |  |  |  |  ------------------
  |  |  |  |  100|      7|        goto ERR_LABEL; \
  |  |  |  |  101|      7|    } \
  |  |  |  |  102|  1.63k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 226, False: 1.39k]
  |  |  |  |  ------------------
  |  |  |  |  103|    226|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 226]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    226|        __loop_end = 1; \
  |  |  |  |  107|    226|    }
  |  |  ------------------
  |  |   84|  1.62k|    } \
  |  |   85|   290k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 1.69k, False: 288k]
  |  |  ------------------
  ------------------
 2141|  1.69k|        switch (kw) {
 2142|     80|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (2142:9): [True: 80, False: 1.61k]
  ------------------
 2143|     80|            LY_CHECK_RET(parse_text_field(ctx, restr->dsc, LY_STMT_DESCRIPTION, 0, &restr->dsc, Y_STR_ARG, &restr->exts));
  ------------------
  |  |  206|     80|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     80|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     80|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     80|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 79]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2144|     79|            break;
 2145|     73|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (2145:9): [True: 73, False: 1.62k]
  ------------------
 2146|     73|            LY_CHECK_RET(parse_text_field(ctx, restr->ref, LY_STMT_REFERENCE, 0, &restr->ref, Y_STR_ARG, &restr->exts));
  ------------------
  |  |  206|     73|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     73|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     73|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     73|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 72]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2147|     72|            break;
 2148|      0|        case LY_STMT_ERROR_APP_TAG:
  ------------------
  |  Branch (2148:9): [True: 0, False: 1.69k]
  ------------------
 2149|      0|            LY_CHECK_RET(parse_text_field(ctx, restr, LY_STMT_ERROR_APP_TAG, 0, &restr->eapptag, Y_STR_ARG, &restr->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2150|      0|            break;
 2151|      0|        case LY_STMT_ERROR_MESSAGE:
  ------------------
  |  Branch (2151:9): [True: 0, False: 1.69k]
  ------------------
 2152|      0|            LY_CHECK_RET(parse_text_field(ctx, restr, LY_STMT_ERROR_MESSAGE, 0, &restr->emsg, Y_STR_ARG, &restr->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2153|      0|            break;
 2154|      0|        case LY_STMT_MODIFIER:
  ------------------
  |  Branch (2154:9): [True: 0, False: 1.69k]
  ------------------
 2155|      0|            PARSER_CHECK_STMTVER2_RET(ctx, "modifier", "pattern");
  ------------------
  |  |   56|      0|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2156|      0|            LY_CHECK_RET(parse_type_pattern_modifier(ctx, restr));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2157|      0|            break;
 2158|  1.52k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2158:9): [True: 1.52k, False: 173]
  ------------------
 2159|  1.52k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, restr, LY_STMT_PATTERN, 0, &restr->exts));
  ------------------
  |  |  206|  1.52k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.52k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.52k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.52k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 1.51k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2160|  1.51k|            break;
 2161|     20|        default:
  ------------------
  |  Branch (2161:9): [True: 20, False: 1.67k]
  ------------------
 2162|     20|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "pattern");
  ------------------
  |  |  129|     20|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     40|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 20, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2163|     20|            return LY_EVALID;
 2164|  1.69k|        }
 2165|  3.32k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, restr->exts, ret, cleanup);
  ------------------
  |  |   99|  1.66k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 6, False: 1.66k]
  |  |  ------------------
  |  |  100|      6|        goto ERR_LABEL; \
  |  |  101|      6|    } \
  |  |  102|  1.66k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 1.36k, False: 294]
  |  |  ------------------
  |  |  103|  1.36k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 1.21k, False: 150]
  |  |  |  Branch (103:21): [True: 0, False: 1.21k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  1.36k|        __loop_end = 1; \
  |  |  107|  1.36k|    }
  ------------------
 2166|  1.66k|    }
 2167|       |
 2168|   289k|cleanup:
 2169|   289k|    return ret;
 2170|   578k|}
parser_yang.c:parse_type_reqinstance:
 2003|    393|{
 2004|    393|    LY_ERR ret = LY_SUCCESS;
 2005|    393|    char *buf = NULL, *word;
 2006|    393|    size_t word_len;
 2007|    393|    enum ly_stmt kw;
 2008|       |
 2009|    393|    if (type->flags & LYS_SET_REQINST) {
  ------------------
  |  |  699|    393|#define LYS_SET_REQINST  0x0200      /**< type's flag for present require-instance substatement */
  ------------------
  |  Branch (2009:9): [True: 1, False: 392]
  ------------------
 2010|      1|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "require-instance");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2011|      1|        return LY_EVALID;
 2012|      1|    }
 2013|    392|    type->flags |= LYS_SET_REQINST;
  ------------------
  |  |  699|    392|#define LYS_SET_REQINST  0x0200      /**< type's flag for present require-instance substatement */
  ------------------
 2014|       |
 2015|       |    /* get value */
 2016|    392|    LY_CHECK_GOTO(ret = get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len), cleanup);
  ------------------
  |  |  202|    392|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 3, False: 389]
  |  |  ------------------
  ------------------
 2017|       |
 2018|    389|    if ((word_len == ly_strlen_const("true")) && !strncmp(word, "true", word_len)) {
  ------------------
  |  |  472|    389|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (2018:9): [True: 169, False: 220]
  |  Branch (2018:50): [True: 148, False: 21]
  ------------------
 2019|    148|        type->require_instance = 1;
 2020|    241|    } else if ((word_len != ly_strlen_const("false")) || strncmp(word, "false", word_len)) {
  ------------------
  |  |  472|    241|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (2020:16): [True: 32, False: 209]
  |  Branch (2020:58): [True: 23, False: 186]
  ------------------
 2021|     55|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "require-instance");
  ------------------
  |  |  129|     55|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    110|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 55, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2022|     55|        ret = LY_EVALID;
 2023|     55|        goto cleanup;
 2024|     55|    }
 2025|       |
 2026|    993|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|    334|    ly_bool __loop_end = 0; \
  |  |   73|    334|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 1, False: 333]
  |  |  ------------------
  |  |   74|      1|        goto ERR_LABEL; \
  |  |   75|      1|    } \
  |  |   76|    334|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 147, False: 186]
  |  |  ------------------
  |  |   77|    147|        __loop_end = 1; \
  |  |   78|    186|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 3, False: 183]
  |  |  ------------------
  |  |   79|      3|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      3|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      6|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      3|        RET = LY_EVALID; \
  |  |   81|      3|        goto ERR_LABEL; \
  |  |   82|    183|    } else { \
  |  |   83|    183|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|    183|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 4, False: 179]
  |  |  |  |  ------------------
  |  |  |  |  100|      4|        goto ERR_LABEL; \
  |  |  |  |  101|      4|    } \
  |  |  |  |  102|    183|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 19, False: 160]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 19]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|     19|        __loop_end = 1; \
  |  |  |  |  107|     19|    }
  |  |  ------------------
  |  |   84|    179|    } \
  |  |   85|    670|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 357, False: 313]
  |  |  ------------------
  ------------------
 2027|    357|        switch (kw) {
 2028|    351|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2028:9): [True: 351, False: 6]
  ------------------
 2029|    351|            LY_CHECK_GOTO(ret = parse_ext(ctx, word, word_len, type, LY_STMT_REQUIRE_INSTANCE, 0, &type->exts), cleanup);
  ------------------
  |  |  202|    351|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 1, False: 350]
  |  |  ------------------
  ------------------
 2030|    350|            break;
 2031|      6|        default:
  ------------------
  |  Branch (2031:9): [True: 6, False: 351]
  ------------------
 2032|      6|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "require-instance");
  ------------------
  |  |  129|      6|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     12|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2033|      6|            ret = LY_EVALID;
 2034|      6|            goto cleanup;
 2035|    357|        }
 2036|    694|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    350|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 6, False: 344]
  |  |  ------------------
  |  |  100|      6|        goto ERR_LABEL; \
  |  |  101|      6|    } \
  |  |  102|    350|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 147, False: 197]
  |  |  ------------------
  |  |  103|    147|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 147]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|    147|        __loop_end = 1; \
  |  |  107|    147|    }
  ------------------
 2037|    344|    }
 2038|       |
 2039|    392|cleanup:
 2040|    392|    free(buf);
 2041|    392|    return ret;
 2042|    993|}
parser_yang.c:parse_orderedby:
 2517|    506|{
 2518|    506|    LY_ERR ret = LY_SUCCESS;
 2519|    506|    char *buf = NULL, *word;
 2520|    506|    size_t word_len;
 2521|    506|    enum ly_stmt kw;
 2522|       |
 2523|    506|    if (llist->flags & LYS_ORDBY_MASK) {
  ------------------
  |  |  680|    506|#define LYS_ORDBY_MASK   0x60        /**< mask for ordered-by values */
  ------------------
  |  Branch (2523:9): [True: 1, False: 505]
  ------------------
 2524|      1|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "ordered-by");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2525|      1|        return LY_EVALID;
 2526|      1|    }
 2527|       |
 2528|       |    /* get value */
 2529|    505|    LY_CHECK_GOTO(ret = get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len), cleanup);
  ------------------
  |  |  202|    505|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 4, False: 501]
  |  |  ------------------
  ------------------
 2530|       |
 2531|    501|    if ((word_len == ly_strlen_const("system")) && !strncmp(word, "system", word_len)) {
  ------------------
  |  |  472|    501|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (2531:9): [True: 182, False: 319]
  |  Branch (2531:52): [True: 160, False: 22]
  ------------------
 2532|    160|        llist->flags |= LYS_ORDBY_SYSTEM;
  ------------------
  |  |  675|    160|#define LYS_ORDBY_SYSTEM 0x80        /**< ordered-by system configuration lists, applicable only to
  ------------------
 2533|    341|    } else if ((word_len == ly_strlen_const("user")) && !strncmp(word, "user", word_len)) {
  ------------------
  |  |  472|    341|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (2533:16): [True: 301, False: 40]
  |  Branch (2533:57): [True: 280, False: 21]
  ------------------
 2534|    280|        llist->flags |= LYS_ORDBY_USER;
  ------------------
  |  |  677|    280|#define LYS_ORDBY_USER   0x40        /**< ordered-by user configuration lists, applicable only to
  ------------------
 2535|    280|    } else {
 2536|     61|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "ordered-by");
  ------------------
  |  |  129|     61|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    122|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 61, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2537|     61|        ret = LY_EVALID;
 2538|     61|        goto cleanup;
 2539|     61|    }
 2540|       |
 2541|  1.31k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|    440|    ly_bool __loop_end = 0; \
  |  |   73|    440|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 2, False: 438]
  |  |  ------------------
  |  |   74|      2|        goto ERR_LABEL; \
  |  |   75|      2|    } \
  |  |   76|    440|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 160, False: 278]
  |  |  ------------------
  |  |   77|    160|        __loop_end = 1; \
  |  |   78|    278|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 1, False: 277]
  |  |  ------------------
  |  |   79|      1|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      1|        RET = LY_EVALID; \
  |  |   81|      1|        goto ERR_LABEL; \
  |  |   82|    277|    } else { \
  |  |   83|    277|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|    277|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 2, False: 275]
  |  |  |  |  ------------------
  |  |  |  |  100|      2|        goto ERR_LABEL; \
  |  |  |  |  101|      2|    } \
  |  |  |  |  102|    277|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 43, False: 232]
  |  |  |  |  ------------------
  |  |  |  |  103|     43|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 43]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|     43|        __loop_end = 1; \
  |  |  |  |  107|     43|    }
  |  |  ------------------
  |  |   84|    275|    } \
  |  |   85|    811|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 392, False: 419]
  |  |  ------------------
  ------------------
 2542|    392|        switch (kw) {
 2543|    383|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2543:9): [True: 383, False: 9]
  ------------------
 2544|    383|            LY_CHECK_GOTO(ret = parse_ext(ctx, word, word_len, llist, LY_STMT_ORDERED_BY, 0, &llist->exts), cleanup);
  ------------------
  |  |  202|    383|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 5, False: 378]
  |  |  ------------------
  ------------------
 2545|    378|            break;
 2546|      9|        default:
  ------------------
  |  Branch (2546:9): [True: 9, False: 383]
  ------------------
 2547|      9|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "ordered-by");
  ------------------
  |  |  129|      9|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     18|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 9, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2548|      9|            ret = LY_EVALID;
 2549|      9|            goto cleanup;
 2550|    392|        }
 2551|    754|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    378|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 2, False: 376]
  |  |  ------------------
  |  |  100|      2|        goto ERR_LABEL; \
  |  |  101|      2|    } \
  |  |  102|    378|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 216, False: 160]
  |  |  ------------------
  |  |  103|    216|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 216]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|    216|        __loop_end = 1; \
  |  |  107|    216|    }
  ------------------
 2552|    376|    }
 2553|       |
 2554|    505|cleanup:
 2555|    505|    free(buf);
 2556|    505|    return ret;
 2557|  1.31k|}
parser_yang.c:parse_inout:
 2799|  3.94k|{
 2800|  3.94k|    LY_ERR ret = LY_SUCCESS;
 2801|  3.94k|    char *word;
 2802|  3.94k|    size_t word_len;
 2803|  3.94k|    enum ly_stmt kw;
 2804|  3.94k|    ly_bool input = &((struct lysp_node_action *)parent)->input == inout_p ? 1 : 0;
  ------------------
  |  Branch (2804:21): [True: 3.92k, False: 21]
  ------------------
 2805|       |
 2806|  3.94k|    if (inout_p->nodetype) {
  ------------------
  |  Branch (2806:9): [True: 1, False: 3.94k]
  ------------------
 2807|      1|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyplg_ext_stmt2str(inout_kw));
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2808|      1|        return LY_EVALID;
 2809|      1|    }
 2810|       |
 2811|       |    /* initiate structure */
 2812|  3.94k|    LY_CHECK_RET(lydict_insert(PARSER_CTX(ctx), input ? "input" : "output", 0, &inout_p->name));
  ------------------
  |  |  206|  3.94k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  3.94k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.94k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  15.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 3.94k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 3.92k, False: 20]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 3.94k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2813|  3.94k|    inout_p->nodetype = input ? LYS_INPUT : LYS_OUTPUT;
  ------------------
  |  |  254|  3.92k|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
                  inout_p->nodetype = input ? LYS_INPUT : LYS_OUTPUT;
  ------------------
  |  |  255|  3.96k|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (2813:25): [True: 3.92k, False: 20]
  ------------------
 2814|  3.94k|    inout_p->parent = parent;
 2815|       |
 2816|       |    /* parse substatements */
 2817|  81.8k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  3.94k|    ly_bool __loop_end = 0; \
  |  |   73|  3.94k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 4, False: 3.94k]
  |  |  ------------------
  |  |   74|      4|        goto ERR_LABEL; \
  |  |   75|      4|    } \
  |  |   76|  3.94k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 1, False: 3.94k]
  |  |  ------------------
  |  |   77|      1|        __loop_end = 1; \
  |  |   78|  3.94k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 2, False: 3.94k]
  |  |  ------------------
  |  |   79|      2|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      2|        RET = LY_EVALID; \
  |  |   81|      2|        goto ERR_LABEL; \
  |  |   82|  3.94k|    } else { \
  |  |   83|  3.94k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  3.94k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 5, False: 3.93k]
  |  |  |  |  ------------------
  |  |  |  |  100|      5|        goto ERR_LABEL; \
  |  |  |  |  101|      5|    } \
  |  |  |  |  102|  3.94k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 1, False: 3.93k]
  |  |  |  |  ------------------
  |  |  |  |  103|      1|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 1]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|      1|        __loop_end = 1; \
  |  |  |  |  107|      1|    }
  |  |  ------------------
  |  |   84|  3.93k|    } \
  |  |   85|  85.6k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 81.8k, False: 3.78k]
  |  |  ------------------
  ------------------
 2818|  81.8k|        switch (kw) {
 2819|      1|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (2819:9): [True: 1, False: 81.8k]
  ------------------
 2820|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "anydata", lyplg_ext_stmt2str(inout_kw));
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 2821|       |        /* fall through */
 2822|     79|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (2822:9): [True: 79, False: 81.7k]
  ------------------
 2823|     79|            LY_CHECK_RET(parse_any(ctx, kw, (struct lysp_node *)inout_p, &inout_p->child));
  ------------------
  |  |  206|     79|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     79|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     79|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     79|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 77]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2824|     77|            break;
 2825|  7.90k|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (2825:9): [True: 7.90k, False: 73.9k]
  ------------------
 2826|  7.90k|            LY_CHECK_RET(parse_choice(ctx, (struct lysp_node *)inout_p, &inout_p->child));
  ------------------
  |  |  206|  7.90k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  7.90k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  7.90k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  7.90k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 7.90k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2827|  7.90k|            break;
 2828|     69|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (2828:9): [True: 69, False: 81.7k]
  ------------------
 2829|     69|            LY_CHECK_RET(parse_container(ctx, (struct lysp_node *)inout_p, &inout_p->child));
  ------------------
  |  |  206|     69|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     69|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     69|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     69|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 68]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2830|     68|            break;
 2831|    335|        case LY_STMT_LEAF:
  ------------------
  |  Branch (2831:9): [True: 335, False: 81.5k]
  ------------------
 2832|    335|            LY_CHECK_RET(parse_leaf(ctx, (struct lysp_node *)inout_p, &inout_p->child));
  ------------------
  |  |  206|    335|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    335|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    335|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    335|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 331]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2833|    331|            break;
 2834|    274|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (2834:9): [True: 274, False: 81.5k]
  ------------------
 2835|    274|            LY_CHECK_RET(parse_leaflist(ctx, (struct lysp_node *)inout_p, &inout_p->child));
  ------------------
  |  |  206|    274|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    274|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    274|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    274|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 271]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2836|    271|            break;
 2837|    262|        case LY_STMT_LIST:
  ------------------
  |  Branch (2837:9): [True: 262, False: 81.5k]
  ------------------
 2838|    262|            LY_CHECK_RET(parse_list(ctx, (struct lysp_node *)inout_p, &inout_p->child));
  ------------------
  |  |  206|    262|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    262|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    262|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    262|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 257]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2839|    257|            break;
 2840|    209|        case LY_STMT_USES:
  ------------------
  |  Branch (2840:9): [True: 209, False: 81.6k]
  ------------------
 2841|    209|            LY_CHECK_RET(parse_uses(ctx, (struct lysp_node *)inout_p, &inout_p->child));
  ------------------
  |  |  206|    209|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    209|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    209|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    209|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 206]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2842|    206|            break;
 2843|  5.44k|        case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (2843:9): [True: 5.44k, False: 76.4k]
  ------------------
 2844|  5.44k|            LY_CHECK_RET(parse_typedef(ctx, (struct lysp_node *)inout_p, &inout_p->typedefs));
  ------------------
  |  |  206|  5.44k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  5.44k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  5.44k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  5.44k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 12, False: 5.43k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2845|  5.43k|            break;
 2846|      1|        case LY_STMT_MUST:
  ------------------
  |  Branch (2846:9): [True: 1, False: 81.8k]
  ------------------
 2847|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "must", lyplg_ext_stmt2str(inout_kw));
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 2848|      0|            LY_CHECK_RET(parse_restrs(ctx, kw, &inout_p->musts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2849|      0|            break;
 2850|  5.50k|        case LY_STMT_GROUPING:
  ------------------
  |  Branch (2850:9): [True: 5.50k, False: 76.3k]
  ------------------
 2851|  5.50k|            LY_CHECK_RET(parse_grouping(ctx, (struct lysp_node *)inout_p, &inout_p->groupings));
  ------------------
  |  |  206|  5.50k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  5.50k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  5.50k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  5.50k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 11, False: 5.49k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2852|  5.49k|            break;
 2853|  61.7k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2853:9): [True: 61.7k, False: 20.0k]
  ------------------
 2854|  61.7k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, inout_p, inout_kw, 0, &inout_p->exts));
  ------------------
  |  |  206|  61.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  61.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  61.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  61.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 16, False: 61.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2855|  61.7k|            break;
 2856|     12|        default:
  ------------------
  |  Branch (2856:9): [True: 12, False: 81.8k]
  ------------------
 2857|     12|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(inout_kw));
  ------------------
  |  |  129|     12|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     24|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 12, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2858|     12|            return LY_EVALID;
 2859|  81.8k|        }
 2860|   163k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, inout_p->exts, ret, cleanup);
  ------------------
  |  |   99|  81.7k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 76, False: 81.7k]
  |  |  ------------------
  |  |  100|     76|        goto ERR_LABEL; \
  |  |  101|     76|    } \
  |  |  102|  81.7k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 3.78k, False: 77.9k]
  |  |  ------------------
  |  |  103|  3.78k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 3.77k, False: 9]
  |  |  |  Branch (103:21): [True: 0, False: 3.77k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  3.78k|        __loop_end = 1; \
  |  |  107|  3.78k|    }
  ------------------
 2861|  81.7k|    }
 2862|       |
 2863|  3.78k|    if (!inout_p->child) {
  ------------------
  |  Branch (2863:9): [True: 4, False: 3.78k]
  ------------------
 2864|      4|        LOGVAL_PARSER(ctx, LY_VCODE_MISSTMT, "data-def-stmt", lyplg_ext_stmt2str(inout_kw));
  ------------------
  |  |  129|      4|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      8|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 4, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2865|      4|        return LY_EVALID;
 2866|      4|    }
 2867|       |
 2868|  3.87k|cleanup:
 2869|  3.87k|    return ret;
 2870|  3.78k|}
parser_yang.c:parse_typedef:
 2727|   545k|{
 2728|   545k|    LY_ERR ret = LY_SUCCESS;
 2729|   545k|    char *buf, *word;
 2730|   545k|    size_t word_len;
 2731|   545k|    enum ly_stmt kw;
 2732|   545k|    struct lysp_tpdf *tpdf;
 2733|       |
 2734|   545k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *typedefs, tpdf, LY_EMEM);
  ------------------
  |  |   96|   545k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|   545k|    { \
  |  |  |  |   62|   545k|        char *p__; \
  |  |  |  |   63|   545k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 471k, False: 74.3k]
  |  |  |  |  ------------------
  |  |  |  |   64|   471k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|   471k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|   471k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|   471k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 471k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|   471k|        } else { \
  |  |  |  |   73|  74.3k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  74.3k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 74.3k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  74.3k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  74.3k|        } \
  |  |  |  |   80|   545k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   545k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   545k|    }
  |  |  ------------------
  |  |   97|   545k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|   545k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 2735|       |
 2736|       |    /* get value */
 2737|   545k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   545k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   545k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   545k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   545k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 37, False: 545k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2738|   545k|    INSERT_WORD_GOTO(ctx, buf, tpdf->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|   545k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|     38|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 19]
  |  |  |  |  |  Branch (202:40): [True: 19, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 19, False: 545k]
  |  |  ------------------
  |  |   51|   545k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  2.18M|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 545k]
  |  |  |  |  |  Branch (202:40): [True: 545k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 545k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2739|       |
 2740|       |    /* parse substatements */
 2741|  1.51M|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   545k|    ly_bool __loop_end = 0; \
  |  |   73|   545k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 14, False: 545k]
  |  |  ------------------
  |  |   74|     14|        goto ERR_LABEL; \
  |  |   75|     14|    } \
  |  |   76|   545k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 3, False: 545k]
  |  |  ------------------
  |  |   77|      3|        __loop_end = 1; \
  |  |   78|   545k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 4, False: 545k]
  |  |  ------------------
  |  |   79|      4|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      4|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      8|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 4, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      4|        RET = LY_EVALID; \
  |  |   81|      4|        goto ERR_LABEL; \
  |  |   82|   545k|    } else { \
  |  |   83|   545k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|   545k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 23, False: 545k]
  |  |  |  |  ------------------
  |  |  |  |  100|     23|        goto ERR_LABEL; \
  |  |  |  |  101|     23|    } \
  |  |  |  |  102|   545k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 2, False: 545k]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 2]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|      2|        __loop_end = 1; \
  |  |  |  |  107|      2|    }
  |  |  ------------------
  |  |   84|   545k|    } \
  |  |   85|  2.06M|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 1.51M, False: 545k]
  |  |  ------------------
  ------------------
 2742|  1.51M|        switch (kw) {
 2743|  28.1k|        case LY_STMT_DEFAULT:
  ------------------
  |  Branch (2743:9): [True: 28.1k, False: 1.49M]
  ------------------
 2744|  28.1k|            LY_CHECK_RET(parse_text_field(ctx, &tpdf->dflt, LY_STMT_DEFAULT, 0, &tpdf->dflt.str, Y_STR_ARG, &tpdf->exts));
  ------------------
  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2745|  28.1k|            tpdf->dflt.mod = PARSER_CUR_PMOD(ctx);
  ------------------
  |  |  127|  28.1k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 2746|  28.1k|            break;
 2747|   534k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (2747:9): [True: 534k, False: 983k]
  ------------------
 2748|   534k|            LY_CHECK_RET(parse_text_field(ctx, tpdf->dsc, LY_STMT_DESCRIPTION, 0, &tpdf->dsc, Y_STR_ARG, &tpdf->exts));
  ------------------
  |  |  206|   534k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   534k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   534k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   534k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 534k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2749|   534k|            break;
 2750|   407k|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (2750:9): [True: 407k, False: 1.11M]
  ------------------
 2751|   407k|            LY_CHECK_RET(parse_text_field(ctx, tpdf->ref, LY_STMT_REFERENCE, 0, &tpdf->ref, Y_STR_ARG, &tpdf->exts));
  ------------------
  |  |  206|   407k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   407k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   407k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   407k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 407k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2752|   407k|            break;
 2753|    124|        case LY_STMT_STATUS:
  ------------------
  |  Branch (2753:9): [True: 124, False: 1.51M]
  ------------------
 2754|    124|            LY_CHECK_RET(parse_status(ctx, &tpdf->flags, &tpdf->exts));
  ------------------
  |  |  206|    124|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    124|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    124|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    124|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 116]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2755|    116|            break;
 2756|   545k|        case LY_STMT_TYPE:
  ------------------
  |  Branch (2756:9): [True: 545k, False: 972k]
  ------------------
 2757|   545k|            LY_CHECK_RET(parse_type(ctx, &tpdf->type));
  ------------------
  |  |  206|   545k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   545k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   545k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   545k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 13, False: 545k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2758|   545k|            break;
 2759|    348|        case LY_STMT_UNITS:
  ------------------
  |  Branch (2759:9): [True: 348, False: 1.51M]
  ------------------
 2760|    348|            LY_CHECK_RET(parse_text_field(ctx, tpdf->units, LY_STMT_UNITS, 0, &tpdf->units, Y_STR_ARG, &tpdf->exts));
  ------------------
  |  |  206|    348|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    348|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    348|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    348|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 345]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2761|    345|            break;
 2762|  1.99k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2762:9): [True: 1.99k, False: 1.51M]
  ------------------
 2763|  1.99k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, tpdf, LY_STMT_TYPEDEF, 0, &tpdf->exts));
  ------------------
  |  |  206|  1.99k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.99k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.99k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.99k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 1.99k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2764|  1.99k|            break;
 2765|     21|        default:
  ------------------
  |  Branch (2765:9): [True: 21, False: 1.51M]
  ------------------
 2766|     21|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "typedef");
  ------------------
  |  |  129|     21|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     42|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 21, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2767|     21|            return LY_EVALID;
 2768|  1.51M|        }
 2769|  3.03M|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, tpdf->exts, ret, cleanup);
  ------------------
  |  |   99|  1.51M|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 18, False: 1.51M]
  |  |  ------------------
  |  |  100|     18|        goto ERR_LABEL; \
  |  |  101|     18|    } \
  |  |  102|  1.51M|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 545k, False: 972k]
  |  |  ------------------
  |  |  103|   545k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 21, False: 545k]
  |  |  |  Branch (103:21): [True: 0, False: 21]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|   545k|        __loop_end = 1; \
  |  |  107|   545k|    }
  ------------------
 2770|  1.51M|    }
 2771|       |
 2772|       |    /* mandatory substatements */
 2773|   545k|    if (!tpdf->type.name) {
  ------------------
  |  Branch (2773:9): [True: 13, False: 545k]
  ------------------
 2774|     13|        LOGVAL_PARSER(ctx, LY_VCODE_MISSTMT, "type", "typedef");
  ------------------
  |  |  129|     13|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     26|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 13, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2775|     13|        return LY_EVALID;
 2776|     13|    }
 2777|       |
 2778|       |    /* store data for collision check */
 2779|   545k|    if (parent) {
  ------------------
  |  Branch (2779:9): [True: 6.83k, False: 538k]
  ------------------
 2780|  6.83k|        assert(ctx->main_ctx);
 2781|  6.83k|        LY_CHECK_RET(ly_set_add(&ctx->main_ctx->tpdfs_nodes, parent, 0, NULL));
  ------------------
  |  |  206|  6.83k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  6.83k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  6.83k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  6.83k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 6.83k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2782|  6.83k|    }
 2783|       |
 2784|   545k|cleanup:
 2785|   545k|    return ret;
 2786|   545k|}
parser_yang.c:parse_refine:
 2657|  3.88k|{
 2658|  3.88k|    LY_ERR ret = LY_SUCCESS;
 2659|  3.88k|    char *buf, *word;
 2660|  3.88k|    size_t word_len;
 2661|  3.88k|    enum ly_stmt kw;
 2662|  3.88k|    struct lysp_refine *rf;
 2663|       |
 2664|  3.88k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *refines, rf, LY_EMEM);
  ------------------
  |  |   96|  3.88k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  3.88k|    { \
  |  |  |  |   62|  3.88k|        char *p__; \
  |  |  |  |   63|  3.88k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 3.54k, False: 332]
  |  |  |  |  ------------------
  |  |  |  |   64|  3.54k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  3.54k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  3.54k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  3.54k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 3.54k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  3.54k|        } else { \
  |  |  |  |   73|    332|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|    332|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 332]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|    332|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|    332|        } \
  |  |  |  |   80|  3.88k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  3.88k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  3.88k|    }
  |  |  ------------------
  |  |   97|  3.88k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  3.88k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 2665|       |
 2666|       |    /* get value */
 2667|  3.88k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  3.88k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  3.88k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.88k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  3.88k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 3.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2668|  3.87k|    CHECK_NONEMPTY(ctx, word_len, "refine");
  ------------------
  |  |   96|  3.87k|    if (!VALUE_LEN) { \
  |  |  ------------------
  |  |  |  Branch (96:9): [True: 123, False: 3.75k]
  |  |  ------------------
  |  |   97|    123|        LOGWRN(PARSER_CTX(CTX), "Empty argument of %s statement does not make sense.", STMT); \
  |  |  ------------------
  |  |  |  |  155|    246|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (155:33): [True: 123, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|    123|    }
  ------------------
 2669|  3.87k|    INSERT_WORD_GOTO(ctx, buf, rf->nodeid, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  3.87k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    426|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 213]
  |  |  |  |  |  Branch (202:40): [True: 213, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 213, False: 3.66k]
  |  |  ------------------
  |  |   51|  3.87k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  14.6k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 3.66k]
  |  |  |  |  |  Branch (202:40): [True: 3.66k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 3.53k, False: 123]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2670|       |
 2671|  7.68k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  3.87k|    ly_bool __loop_end = 0; \
  |  |   73|  3.87k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 19, False: 3.85k]
  |  |  ------------------
  |  |   74|     19|        goto ERR_LABEL; \
  |  |   75|     19|    } \
  |  |   76|  3.87k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 321, False: 3.53k]
  |  |  ------------------
  |  |   77|    321|        __loop_end = 1; \
  |  |   78|  3.53k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 3, False: 3.53k]
  |  |  ------------------
  |  |   79|      3|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      3|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      6|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      3|        RET = LY_EVALID; \
  |  |   81|      3|        goto ERR_LABEL; \
  |  |   82|  3.53k|    } else { \
  |  |   83|  3.53k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  3.53k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 19, False: 3.51k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|        goto ERR_LABEL; \
  |  |  |  |  101|     19|    } \
  |  |  |  |  102|  3.53k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 207, False: 3.30k]
  |  |  |  |  ------------------
  |  |  |  |  103|    207|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 207]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    207|        __loop_end = 1; \
  |  |  |  |  107|    207|    }
  |  |  ------------------
  |  |   84|  3.51k|    } \
  |  |   85|  11.2k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 7.57k, False: 3.66k]
  |  |  ------------------
  ------------------
 2672|  7.57k|        switch (kw) {
 2673|      3|        case LY_STMT_CONFIG:
  ------------------
  |  Branch (2673:9): [True: 3, False: 7.56k]
  ------------------
 2674|      3|            LY_CHECK_RET(parse_config(ctx, &rf->flags, &rf->exts));
  ------------------
  |  |  206|      3|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      3|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      3|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      3|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2675|      1|            break;
 2676|    683|        case LY_STMT_DEFAULT:
  ------------------
  |  Branch (2676:9): [True: 683, False: 6.88k]
  ------------------
 2677|    683|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_DEFAULT, &rf->dflts, Y_STR_ARG, &rf->exts));
  ------------------
  |  |  206|    683|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    683|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    683|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    683|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 11, False: 672]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2678|    672|            break;
 2679|     82|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (2679:9): [True: 82, False: 7.48k]
  ------------------
 2680|     82|            LY_CHECK_RET(parse_text_field(ctx, rf->dsc, LY_STMT_DESCRIPTION, 0, &rf->dsc, Y_STR_ARG, &rf->exts));
  ------------------
  |  |  206|     82|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     82|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     82|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     82|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 79]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2681|     79|            break;
 2682|      1|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (2682:9): [True: 1, False: 7.56k]
  ------------------
 2683|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "if-feature", "refine");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 2684|      0|            LY_CHECK_RET(parse_qnames(ctx, LY_STMT_IF_FEATURE, &rf->iffeatures, Y_STR_ARG, &rf->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2685|      0|            break;
 2686|     13|        case LY_STMT_MAX_ELEMENTS:
  ------------------
  |  Branch (2686:9): [True: 13, False: 7.55k]
  ------------------
 2687|     13|            LY_CHECK_RET(parse_maxelements(ctx, &rf->max, &rf->flags, &rf->exts));
  ------------------
  |  |  206|     13|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     13|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     13|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     13|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 8]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2688|      8|            break;
 2689|    146|        case LY_STMT_MIN_ELEMENTS:
  ------------------
  |  Branch (2689:9): [True: 146, False: 7.42k]
  ------------------
 2690|    146|            LY_CHECK_RET(parse_minelements(ctx, &rf->min, &rf->flags, &rf->exts));
  ------------------
  |  |  206|    146|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    146|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    146|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    146|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 138]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2691|    138|            break;
 2692|  1.52k|        case LY_STMT_MUST:
  ------------------
  |  Branch (2692:9): [True: 1.52k, False: 6.04k]
  ------------------
 2693|  1.52k|            LY_CHECK_RET(parse_restrs(ctx, kw, &rf->musts));
  ------------------
  |  |  206|  1.52k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.52k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.52k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.52k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 10, False: 1.51k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2694|  1.51k|            break;
 2695|  1.92k|        case LY_STMT_MANDATORY:
  ------------------
  |  Branch (2695:9): [True: 1.92k, False: 5.64k]
  ------------------
 2696|  1.92k|            LY_CHECK_RET(parse_mandatory(ctx, &rf->flags, &rf->exts));
  ------------------
  |  |  206|  1.92k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.92k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.92k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.92k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 34, False: 1.88k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2697|  1.88k|            break;
 2698|     11|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (2698:9): [True: 11, False: 7.55k]
  ------------------
 2699|     11|            LY_CHECK_RET(parse_text_field(ctx, rf->ref, LY_STMT_REFERENCE, 0, &rf->ref, Y_STR_ARG, &rf->exts));
  ------------------
  |  |  206|     11|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     11|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     11|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     11|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 10]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2700|     10|            break;
 2701|    265|        case LY_STMT_PRESENCE:
  ------------------
  |  Branch (2701:9): [True: 265, False: 7.30k]
  ------------------
 2702|    265|            LY_CHECK_RET(parse_text_field(ctx, rf->presence, LY_STMT_PRESENCE, 0, &rf->presence, Y_STR_ARG, &rf->exts));
  ------------------
  |  |  206|    265|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    265|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    265|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    265|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 5, False: 260]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2703|    260|            break;
 2704|  2.89k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2704:9): [True: 2.89k, False: 4.67k]
  ------------------
 2705|  2.89k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, rf, LY_STMT_REFINE, 0, &rf->exts));
  ------------------
  |  |  206|  2.89k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.89k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.89k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.89k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 17, False: 2.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2706|  2.87k|            break;
 2707|     24|        default:
  ------------------
  |  Branch (2707:9): [True: 24, False: 7.54k]
  ------------------
 2708|     24|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "refine");
  ------------------
  |  |  129|     24|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     48|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 24, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2709|     24|            return LY_EVALID;
 2710|  7.57k|        }
 2711|  14.8k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, rf->exts, ret, cleanup);
  ------------------
  |  |   99|  7.44k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 48, False: 7.40k]
  |  |  ------------------
  |  |  100|     48|        goto ERR_LABEL; \
  |  |  101|     48|    } \
  |  |  102|  7.44k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 3.13k, False: 4.26k]
  |  |  ------------------
  |  |  103|  3.13k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 2.45k, False: 681]
  |  |  |  Branch (103:21): [True: 0, False: 2.45k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  3.13k|        __loop_end = 1; \
  |  |  107|  3.13k|    }
  ------------------
 2712|  7.40k|    }
 2713|       |
 2714|  3.75k|cleanup:
 2715|  3.75k|    return ret;
 2716|  7.68k|}
parser_yang.c:parse_text_fields:
 1350|   118k|{
 1351|   118k|    LY_ERR ret = LY_SUCCESS;
 1352|   118k|    char *buf, *word;
 1353|   118k|    const char **item;
 1354|   118k|    size_t word_len;
 1355|   118k|    enum ly_stmt kw;
 1356|       |
 1357|       |    /* allocate new pointer */
 1358|   118k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *texts, item, LY_EMEM);
  ------------------
  |  |   96|   118k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|   118k|    { \
  |  |  |  |   62|   118k|        char *p__; \
  |  |  |  |   63|   118k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 2.52k, False: 115k]
  |  |  |  |  ------------------
  |  |  |  |   64|  2.52k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  2.52k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  2.52k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  2.52k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|   115k|        } else { \
  |  |  |  |   73|   115k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|   115k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 115k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|   115k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|   115k|        } \
  |  |  |  |   80|   118k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   118k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   118k|    }
  |  |  ------------------
  |  |   97|   118k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|   118k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1359|       |
 1360|       |    /* get value */
 1361|   118k|    LY_CHECK_RET(get_argument(ctx, arg, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   118k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   118k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   118k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   118k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 13, False: 118k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1362|       |
 1363|   118k|    INSERT_WORD_GOTO(ctx, buf, *item, word, word_len, ret, cleanup);
  ------------------
  |  |   50|   118k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    412|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 206]
  |  |  |  |  |  Branch (202:40): [True: 206, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 206, False: 118k]
  |  |  ------------------
  |  |   51|   118k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   472k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 118k]
  |  |  |  |  |  Branch (202:40): [True: 118k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 118k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1364|   236k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   118k|    ly_bool __loop_end = 0; \
  |  |   73|   118k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 8, False: 118k]
  |  |  ------------------
  |  |   74|      8|        goto ERR_LABEL; \
  |  |   75|      8|    } \
  |  |   76|   118k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 117k, False: 1.34k]
  |  |  ------------------
  |  |   77|   117k|        __loop_end = 1; \
  |  |   78|   117k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 2, False: 1.34k]
  |  |  ------------------
  |  |   79|      2|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      2|        RET = LY_EVALID; \
  |  |   81|      2|        goto ERR_LABEL; \
  |  |   82|  1.34k|    } else { \
  |  |   83|  1.34k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  1.34k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 4, False: 1.34k]
  |  |  |  |  ------------------
  |  |  |  |  100|      4|        goto ERR_LABEL; \
  |  |  |  |  101|      4|    } \
  |  |  |  |  102|  1.34k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 73, False: 1.27k]
  |  |  |  |  ------------------
  |  |  |  |  103|     73|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 73]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|     73|        __loop_end = 1; \
  |  |  |  |  107|     73|    }
  |  |  ------------------
  |  |   84|  1.34k|    } \
  |  |   85|   120k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 2.59k, False: 118k]
  |  |  ------------------
  ------------------
 1365|  2.59k|        switch (kw) {
 1366|  2.58k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1366:9): [True: 2.58k, False: 11]
  ------------------
 1367|  2.58k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, *texts, parent_stmt, LY_ARRAY_COUNT(*texts) - 1, exts));
  ------------------
  |  |  206|  2.58k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.58k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.58k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  5.16k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 2.58k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 2.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1368|  2.58k|            break;
 1369|     11|        default:
  ------------------
  |  Branch (1369:9): [True: 11, False: 2.58k]
  ------------------
 1370|     11|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), lyplg_ext_stmt2str(parent_stmt));
  ------------------
  |  |  129|     11|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     22|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 11, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1371|     11|            return LY_EVALID;
 1372|  2.59k|        }
 1373|  5.15k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|  2.58k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 9, False: 2.57k]
  |  |  ------------------
  |  |  100|      9|        goto ERR_LABEL; \
  |  |  101|      9|    } \
  |  |  102|  2.58k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 1.24k, False: 1.32k]
  |  |  ------------------
  |  |  103|  1.24k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 1.24k]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  1.24k|        __loop_end = 1; \
  |  |  107|  1.24k|    }
  ------------------
 1374|  2.57k|    }
 1375|       |
 1376|   118k|cleanup:
 1377|   118k|    return ret;
 1378|   236k|}
parser_yang.c:parse_yangversion:
 1023|  70.3k|{
 1024|  70.3k|    LY_ERR ret = LY_SUCCESS;
 1025|  70.3k|    char *buf, *word;
 1026|  70.3k|    size_t word_len;
 1027|  70.3k|    enum ly_stmt kw;
 1028|       |
 1029|  70.3k|    if (mod->version) {
  ------------------
  |  Branch (1029:9): [True: 1, False: 70.3k]
  ------------------
 1030|      1|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "yang-version");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1031|      1|        return LY_EVALID;
 1032|      1|    }
 1033|       |
 1034|       |    /* get value */
 1035|  70.3k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  70.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  70.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  70.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  70.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 70.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1036|       |
 1037|  70.3k|    if ((word_len == 1) && !strncmp(word, "1", word_len)) {
  ------------------
  |  Branch (1037:9): [True: 25, False: 70.3k]
  |  Branch (1037:28): [True: 24, False: 1]
  ------------------
 1038|     24|        mod->version = LYS_VERSION_1_0;
 1039|  70.3k|    } else if ((word_len == ly_strlen_const("1.1")) && !strncmp(word, "1.1", word_len)) {
  ------------------
  |  |  472|  70.3k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (1039:16): [True: 70.3k, False: 9]
  |  Branch (1039:56): [True: 70.2k, False: 14]
  ------------------
 1040|  70.2k|        mod->version = LYS_VERSION_1_1;
 1041|  70.2k|    } else {
 1042|     23|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "yang-version");
  ------------------
  |  |  129|     23|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     46|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 23, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1043|     23|        free(buf);
 1044|     23|        return LY_EVALID;
 1045|     23|    }
 1046|  70.3k|    free(buf);
 1047|       |
 1048|   140k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  70.3k|    ly_bool __loop_end = 0; \
  |  |   73|  70.3k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 1, False: 70.3k]
  |  |  ------------------
  |  |   74|      1|        goto ERR_LABEL; \
  |  |   75|      1|    } \
  |  |   76|  70.3k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 70.2k, False: 23]
  |  |  ------------------
  |  |   77|  70.2k|        __loop_end = 1; \
  |  |   78|  70.2k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 1, False: 22]
  |  |  ------------------
  |  |   79|      1|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      1|        RET = LY_EVALID; \
  |  |   81|      1|        goto ERR_LABEL; \
  |  |   82|     22|    } else { \
  |  |   83|     22|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|     22|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 1, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  100|      1|        goto ERR_LABEL; \
  |  |  |  |  101|      1|    } \
  |  |  |  |  102|     22|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 2, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 2]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|      2|        __loop_end = 1; \
  |  |  |  |  107|      2|    }
  |  |  ------------------
  |  |   84|     21|    } \
  |  |   85|  70.5k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 287, False: 70.2k]
  |  |  ------------------
  ------------------
 1049|    287|        switch (kw) {
 1050|    277|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1050:9): [True: 277, False: 10]
  ------------------
 1051|    277|            LY_CHECK_RET(parse_ext(ctx, word, word_len, mod, LY_STMT_YANG_VERSION, 0, &mod->exts));
  ------------------
  |  |  206|    277|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    277|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    277|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    277|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 275]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1052|    275|            break;
 1053|     10|        default:
  ------------------
  |  Branch (1053:9): [True: 10, False: 277]
  ------------------
 1054|     10|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "yang-version");
  ------------------
  |  |  129|     10|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     20|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1055|     10|            return LY_EVALID;
 1056|    287|        }
 1057|    544|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    275|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 6, False: 269]
  |  |  ------------------
  |  |  100|      6|        goto ERR_LABEL; \
  |  |  101|      6|    } \
  |  |  102|    275|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 1, False: 268]
  |  |  ------------------
  |  |  103|      1|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 1]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|      1|        __loop_end = 1; \
  |  |  107|      1|    }
  ------------------
 1058|    269|    }
 1059|       |
 1060|  70.3k|cleanup:
 1061|  70.3k|    return ret;
 1062|   140k|}
parser_yang.c:parse_include:
 1179|  3.40k|{
 1180|  3.40k|    LY_ERR ret = LY_SUCCESS;
 1181|  3.40k|    char *buf, *word;
 1182|  3.40k|    size_t word_len;
 1183|  3.40k|    enum ly_stmt kw;
 1184|  3.40k|    struct lysp_include *inc;
 1185|       |
 1186|  3.40k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *includes, inc, LY_EMEM);
  ------------------
  |  |   96|  3.40k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  3.40k|    { \
  |  |  |  |   62|  3.40k|        char *p__; \
  |  |  |  |   63|  3.40k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 3.08k, False: 320]
  |  |  |  |  ------------------
  |  |  |  |   64|  3.08k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  3.08k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  3.08k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  3.08k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 3.08k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  3.08k|        } else { \
  |  |  |  |   73|    320|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|    320|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 320]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|    320|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|    320|        } \
  |  |  |  |   80|  3.40k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  3.40k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  3.40k|    }
  |  |  ------------------
  |  |   97|  3.40k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  3.40k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1187|       |
 1188|       |    /* get value */
 1189|  3.40k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  3.40k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  3.40k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.40k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  3.40k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 7, False: 3.39k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1190|       |
 1191|  3.39k|    INSERT_WORD_GOTO(ctx, buf, inc->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  3.39k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    170|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 85]
  |  |  |  |  |  Branch (202:40): [True: 85, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 85, False: 3.30k]
  |  |  ------------------
  |  |   51|  3.39k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|  13.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 3.30k]
  |  |  |  |  |  Branch (202:40): [True: 3.30k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 3.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1192|       |
 1193|       |    /* submodules share the namespace with the module names, so there must not be
 1194|       |     * a module of the same name in the context, no need for revision matching */
 1195|  3.39k|    if (!strcmp(module_name, inc->name) || ly_ctx_get_module_latest(PARSER_CTX(ctx), inc->name)) {
  ------------------
  |  |  128|  3.39k|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|  3.39k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 3.39k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1195:9): [True: 1, False: 3.39k]
  |  Branch (1195:44): [True: 1, False: 3.39k]
  ------------------
 1196|      2|        LOGVAL_PARSER(ctx, LY_VCODE_NAME2_COL, "module", "submodule", inc->name);
  ------------------
  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1197|      2|        return LY_EVALID;
 1198|      2|    }
 1199|       |
 1200|  9.84k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  3.39k|    ly_bool __loop_end = 0; \
  |  |   73|  3.39k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 143, False: 3.24k]
  |  |  ------------------
  |  |   74|    143|        goto ERR_LABEL; \
  |  |   75|    143|    } \
  |  |   76|  3.39k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 2.47k, False: 772]
  |  |  ------------------
  |  |   77|  2.47k|        __loop_end = 1; \
  |  |   78|  2.47k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 5, False: 767]
  |  |  ------------------
  |  |   79|      5|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      5|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     10|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 5, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      5|        RET = LY_EVALID; \
  |  |   81|      5|        goto ERR_LABEL; \
  |  |   82|    767|    } else { \
  |  |   83|    767|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|    767|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 36, False: 731]
  |  |  |  |  ------------------
  |  |  |  |  100|     36|        goto ERR_LABEL; \
  |  |  |  |  101|     36|    } \
  |  |  |  |  102|    767|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 231, False: 500]
  |  |  |  |  ------------------
  |  |  |  |  103|    231|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 231]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|    231|        __loop_end = 1; \
  |  |  |  |  107|    231|    }
  |  |  ------------------
  |  |   84|    731|    } \
  |  |   85|  4.01k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 877, False: 3.13k]
  |  |  ------------------
  ------------------
 1201|    877|        switch (kw) {
 1202|      1|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (1202:9): [True: 1, False: 876]
  ------------------
 1203|      1|            PARSER_CHECK_STMTVER2_RET(ctx, "description", "include");
  ------------------
  |  |   56|      1|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      1|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1204|      0|            LY_CHECK_RET(parse_text_field(ctx, inc->dsc, LY_STMT_DESCRIPTION, 0, &inc->dsc, Y_STR_ARG, &inc->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1205|      0|            break;
 1206|      0|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (1206:9): [True: 0, False: 877]
  ------------------
 1207|      0|            PARSER_CHECK_STMTVER2_RET(ctx, "reference", "include");
  ------------------
  |  |   56|      0|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1208|      0|            LY_CHECK_RET(parse_text_field(ctx, inc->ref, LY_STMT_REFERENCE, 0, &inc->ref, Y_STR_ARG, &inc->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1209|      0|            break;
 1210|    196|        case LY_STMT_REVISION_DATE:
  ------------------
  |  Branch (1210:9): [True: 196, False: 681]
  ------------------
 1211|    196|            LY_CHECK_RET(parse_revisiondate(ctx, inc->rev, &inc->exts));
  ------------------
  |  |  206|    196|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    196|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    196|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    196|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 27, False: 169]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1212|    169|            break;
 1213|    658|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1213:9): [True: 658, False: 219]
  ------------------
 1214|    658|            LY_CHECK_RET(parse_ext(ctx, word, word_len, inc, LY_STMT_INCLUDE, 0, &inc->exts));
  ------------------
  |  |  206|    658|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    658|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    658|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    658|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 654]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1215|    654|            break;
 1216|     22|        default:
  ------------------
  |  Branch (1216:9): [True: 22, False: 855]
  ------------------
 1217|     22|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "include");
  ------------------
  |  |  129|     22|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     44|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 22, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1218|     22|            return LY_EVALID;
 1219|    877|        }
 1220|  1.62k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, inc->exts, ret, cleanup);
  ------------------
  |  |   99|    823|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 18, False: 805]
  |  |  ------------------
  |  |  100|     18|        goto ERR_LABEL; \
  |  |  101|     18|    } \
  |  |  102|    823|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 428, False: 377]
  |  |  ------------------
  |  |  103|    428|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 275, False: 153]
  |  |  |  Branch (103:21): [True: 0, False: 275]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|    428|        __loop_end = 1; \
  |  |  107|    428|    }
  ------------------
 1221|    805|    }
 1222|       |
 1223|  3.33k|cleanup:
 1224|  3.33k|    return ret;
 1225|  9.84k|}
parser_yang.c:parse_revisiondate:
 1129|  14.2k|{
 1130|  14.2k|    LY_ERR ret = LY_SUCCESS;
 1131|  14.2k|    char *buf, *word;
 1132|  14.2k|    size_t word_len;
 1133|  14.2k|    enum ly_stmt kw;
 1134|       |
 1135|  14.2k|    if (rev[0]) {
  ------------------
  |  Branch (1135:9): [True: 1, False: 14.2k]
  ------------------
 1136|      1|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "revision-date");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1137|      1|        return LY_EVALID;
 1138|      1|    }
 1139|       |
 1140|       |    /* get value */
 1141|  14.2k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  14.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 14.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1142|       |
 1143|       |    /* check value */
 1144|  14.2k|    if (lysp_check_date((struct lysp_ctx *)ctx, word, word_len, "revision-date")) {
  ------------------
  |  Branch (1144:9): [True: 2, False: 14.2k]
  ------------------
 1145|      2|        free(buf);
 1146|      2|        return LY_EVALID;
 1147|      2|    }
 1148|       |
 1149|       |    /* store value and spend buf if allocated */
 1150|  14.2k|    strncpy(rev, word, word_len);
 1151|  14.2k|    free(buf);
 1152|       |
 1153|  28.4k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  14.2k|    ly_bool __loop_end = 0; \
  |  |   73|  14.2k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 1, False: 14.2k]
  |  |  ------------------
  |  |   74|      1|        goto ERR_LABEL; \
  |  |   75|      1|    } \
  |  |   76|  14.2k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 14.2k, False: 33]
  |  |  ------------------
  |  |   77|  14.2k|        __loop_end = 1; \
  |  |   78|  14.2k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 1, False: 32]
  |  |  ------------------
  |  |   79|      1|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      1|        RET = LY_EVALID; \
  |  |   81|      1|        goto ERR_LABEL; \
  |  |   82|     32|    } else { \
  |  |   83|     32|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|     32|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 1, False: 31]
  |  |  |  |  ------------------
  |  |  |  |  100|      1|        goto ERR_LABEL; \
  |  |  |  |  101|      1|    } \
  |  |  |  |  102|     32|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 1, False: 30]
  |  |  |  |  ------------------
  |  |  |  |  103|      1|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 1]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|      1|        __loop_end = 1; \
  |  |  |  |  107|      1|    }
  |  |  ------------------
  |  |   84|     31|    } \
  |  |   85|  14.5k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 361, False: 14.2k]
  |  |  ------------------
  ------------------
 1154|    361|        switch (kw) {
 1155|    354|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1155:9): [True: 354, False: 7]
  ------------------
 1156|    354|            LY_CHECK_RET(parse_ext(ctx, word, word_len, rev, LY_STMT_REVISION_DATE, 0, exts));
  ------------------
  |  |  206|    354|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    354|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    354|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    354|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 353]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1157|    353|            break;
 1158|      7|        default:
  ------------------
  |  Branch (1158:9): [True: 7, False: 354]
  ------------------
 1159|      7|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "revision-date");
  ------------------
  |  |  129|      7|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     14|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 7, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1160|      7|            return LY_EVALID;
 1161|    361|        }
 1162|    695|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    353|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 11, False: 342]
  |  |  ------------------
  |  |  100|     11|        goto ERR_LABEL; \
  |  |  101|     11|    } \
  |  |  102|    353|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 11, False: 331]
  |  |  ------------------
  |  |  103|     11|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 11]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|     11|        __loop_end = 1; \
  |  |  107|     11|    }
  ------------------
 1163|    342|    }
 1164|       |
 1165|  14.2k|cleanup:
 1166|  14.2k|    return ret;
 1167|  28.4k|}
parser_yang.c:parse_import:
 1237|  84.7k|{
 1238|  84.7k|    LY_ERR ret = LY_SUCCESS;
 1239|  84.7k|    char *buf, *word;
 1240|  84.7k|    size_t word_len;
 1241|  84.7k|    enum ly_stmt kw;
 1242|  84.7k|    struct lysp_import *imp;
 1243|       |
 1244|  84.7k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *imports, imp, LY_EVALID);
  ------------------
  |  |   96|  84.7k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  84.7k|    { \
  |  |  |  |   62|  84.7k|        char *p__; \
  |  |  |  |   63|  84.7k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 42.3k, False: 42.4k]
  |  |  |  |  ------------------
  |  |  |  |   64|  42.3k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  42.3k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  42.3k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  42.3k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 42.3k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  42.4k|        } else { \
  |  |  |  |   73|  42.4k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  42.4k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 42.4k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  42.4k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  42.4k|        } \
  |  |  |  |   80|  84.7k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  84.7k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  84.7k|    }
  |  |  ------------------
  |  |   97|  84.7k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  84.7k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1245|       |
 1246|       |    /* get value */
 1247|  84.7k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  84.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  84.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  84.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 84.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1248|  84.7k|    INSERT_WORD_GOTO(ctx, buf, imp->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  84.7k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|      2|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  |  |  |  Branch (202:40): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 1, False: 84.7k]
  |  |  ------------------
  |  |   51|  84.7k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   339k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 84.7k]
  |  |  |  |  |  Branch (202:40): [True: 84.7k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 84.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1249|       |
 1250|   170k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  84.7k|    ly_bool __loop_end = 0; \
  |  |   73|  84.7k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 2, False: 84.7k]
  |  |  ------------------
  |  |   74|      2|        goto ERR_LABEL; \
  |  |   75|      2|    } \
  |  |   76|  84.7k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 3, False: 84.7k]
  |  |  ------------------
  |  |   77|      3|        __loop_end = 1; \
  |  |   78|  84.7k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 9, False: 84.7k]
  |  |  ------------------
  |  |   79|      9|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      9|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     18|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 9, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      9|        RET = LY_EVALID; \
  |  |   81|      9|        goto ERR_LABEL; \
  |  |   82|  84.7k|    } else { \
  |  |   83|  84.7k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  84.7k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 14, False: 84.7k]
  |  |  |  |  ------------------
  |  |  |  |  100|     14|        goto ERR_LABEL; \
  |  |  |  |  101|     14|    } \
  |  |  |  |  102|  84.7k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 1, False: 84.7k]
  |  |  |  |  ------------------
  |  |  |  |  103|      1|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 1]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|      1|        __loop_end = 1; \
  |  |  |  |  107|      1|    }
  |  |  ------------------
  |  |   84|  84.7k|    } \
  |  |   85|   255k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 170k, False: 84.6k]
  |  |  ------------------
  ------------------
 1251|   170k|        switch (kw) {
 1252|  84.7k|        case LY_STMT_PREFIX:
  ------------------
  |  Branch (1252:9): [True: 84.7k, False: 85.7k]
  ------------------
 1253|  84.7k|            LY_CHECK_RET(parse_text_field(ctx, imp->prefix, LY_STMT_PREFIX, 0, &imp->prefix, Y_IDENTIF_ARG, &imp->exts));
  ------------------
  |  |  206|  84.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  84.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  84.7k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 84.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1254|  84.7k|            LY_CHECK_RET(lysp_check_prefix((struct lysp_ctx *)ctx, *imports, module_prefix, &imp->prefix), LY_EVALID);
  ------------------
  |  |  206|  84.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  84.7k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.7k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|  84.7k|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:41): [True: 2, False: 84.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1255|  84.7k|            break;
 1256|      0|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (1256:9): [True: 0, False: 170k]
  ------------------
 1257|      0|            PARSER_CHECK_STMTVER2_RET(ctx, "description", "import");
  ------------------
  |  |   56|      0|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1258|      0|            LY_CHECK_RET(parse_text_field(ctx, imp->dsc, LY_STMT_DESCRIPTION, 0, &imp->dsc, Y_STR_ARG, &imp->exts));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1259|      0|            break;
 1260|  70.2k|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (1260:9): [True: 70.2k, False: 100k]
  ------------------
 1261|  70.2k|            PARSER_CHECK_STMTVER2_RET(ctx, "reference", "import");
  ------------------
  |  |   56|  70.2k|    if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  127|  70.2k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |                   if (PARSER_CUR_PMOD(CTX)->version < LYS_VERSION_1_1) {LOGVAL_PARSER((CTX), LY_VCODE_INCHILDSTMT2, KW, PARENT); return LY_EVALID;}
  |  |  ------------------
  |  |  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:9): [True: 1, False: 70.2k]
  |  |  ------------------
  ------------------
 1262|  70.2k|            LY_CHECK_RET(parse_text_field(ctx, imp->ref, LY_STMT_REFERENCE, 0, &imp->ref, Y_STR_ARG, &imp->exts));
  ------------------
  |  |  206|  70.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  70.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  70.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  70.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1263|  70.2k|            break;
 1264|  14.0k|        case LY_STMT_REVISION_DATE:
  ------------------
  |  Branch (1264:9): [True: 14.0k, False: 156k]
  ------------------
 1265|  14.0k|            LY_CHECK_RET(parse_revisiondate(ctx, imp->rev, &imp->exts));
  ------------------
  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.0k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1266|  14.0k|            break;
 1267|  1.37k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1267:9): [True: 1.37k, False: 169k]
  ------------------
 1268|  1.37k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, imp, LY_STMT_IMPORT, 0, &imp->exts));
  ------------------
  |  |  206|  1.37k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.37k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.37k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.37k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 7, False: 1.36k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1269|  1.36k|            break;
 1270|     21|        default:
  ------------------
  |  Branch (1270:9): [True: 21, False: 170k]
  ------------------
 1271|     21|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "import");
  ------------------
  |  |  129|     21|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     42|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 21, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1272|     21|            return LY_EVALID;
 1273|   170k|        }
 1274|   340k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, imp->exts, ret, cleanup);
  ------------------
  |  |   99|   170k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 121, False: 170k]
  |  |  ------------------
  |  |  100|    121|        goto ERR_LABEL; \
  |  |  101|    121|    } \
  |  |  102|   170k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 84.6k, False: 85.7k]
  |  |  ------------------
  |  |  103|  84.6k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 22, False: 84.5k]
  |  |  |  Branch (103:21): [True: 0, False: 22]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  84.6k|        __loop_end = 1; \
  |  |  107|  84.6k|    }
  ------------------
 1275|   170k|    }
 1276|       |
 1277|       |    /* mandatory substatements */
 1278|  84.6k|    LY_CHECK_ERR_RET(!imp->prefix, LOGVAL_PARSER(ctx, LY_VCODE_MISSTMT, "prefix", "import"), LY_EVALID);
  ------------------
  |  |  207|  84.6k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 6, False: 84.6k]
  |  |  |  Branch (207:58): [True: 6, False: 0]
  |  |  ------------------
  ------------------
 1279|       |
 1280|  84.7k|cleanup:
 1281|  84.7k|    return ret;
 1282|  84.6k|}
parser_yang.c:parse_revision:
 1293|   217k|{
 1294|   217k|    LY_ERR ret = LY_SUCCESS;
 1295|   217k|    char *buf, *word;
 1296|   217k|    size_t word_len;
 1297|   217k|    enum ly_stmt kw;
 1298|   217k|    struct lysp_revision *rev;
 1299|       |
 1300|   217k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *revs, rev, LY_EMEM);
  ------------------
  |  |   96|   217k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|   217k|    { \
  |  |  |  |   62|   217k|        char *p__; \
  |  |  |  |   63|   217k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 104k, False: 112k]
  |  |  |  |  ------------------
  |  |  |  |   64|   104k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|   104k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|   104k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|   104k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|   112k|        } else { \
  |  |  |  |   73|   112k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|   112k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 112k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|   112k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|   112k|        } \
  |  |  |  |   80|   217k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   217k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   217k|    }
  |  |  ------------------
  |  |   97|   217k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|   217k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1301|       |
 1302|       |    /* get value */
 1303|   217k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|   217k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   217k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   217k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   217k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 13, False: 217k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1304|       |
 1305|       |    /* check value */
 1306|   217k|    if (lysp_check_date((struct lysp_ctx *)ctx, word, word_len, "revision")) {
  ------------------
  |  Branch (1306:9): [True: 51, False: 217k]
  ------------------
 1307|     51|        free(buf);
 1308|     51|        return LY_EVALID;
 1309|     51|    }
 1310|       |
 1311|   217k|    strncpy(rev->date, word, word_len);
 1312|   217k|    free(buf);
 1313|       |
 1314|   434k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|   217k|    ly_bool __loop_end = 0; \
  |  |   73|   217k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 1, False: 217k]
  |  |  ------------------
  |  |   74|      1|        goto ERR_LABEL; \
  |  |   75|      1|    } \
  |  |   76|   217k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 5.20k, False: 212k]
  |  |  ------------------
  |  |   77|  5.20k|        __loop_end = 1; \
  |  |   78|   212k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 2, False: 212k]
  |  |  ------------------
  |  |   79|      2|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      2|        RET = LY_EVALID; \
  |  |   81|      2|        goto ERR_LABEL; \
  |  |   82|   212k|    } else { \
  |  |   83|   212k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|   212k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 1, False: 212k]
  |  |  |  |  ------------------
  |  |  |  |  100|      1|        goto ERR_LABEL; \
  |  |  |  |  101|      1|    } \
  |  |  |  |  102|   212k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 20, False: 212k]
  |  |  |  |  ------------------
  |  |  |  |  103|     20|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 20]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|     20|        __loop_end = 1; \
  |  |  |  |  107|     20|    }
  |  |  ------------------
  |  |   84|   212k|    } \
  |  |   85|   599k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 382k, False: 217k]
  |  |  ------------------
  ------------------
 1315|   382k|        switch (kw) {
 1316|   210k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (1316:9): [True: 210k, False: 171k]
  ------------------
 1317|   210k|            LY_CHECK_RET(parse_text_field(ctx, rev->dsc, LY_STMT_DESCRIPTION, 0, &rev->dsc, Y_STR_ARG, &rev->exts));
  ------------------
  |  |  206|   210k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   210k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   210k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   210k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 210k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1318|   210k|            break;
 1319|   168k|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (1319:9): [True: 168k, False: 213k]
  ------------------
 1320|   168k|            LY_CHECK_RET(parse_text_field(ctx, rev->ref, LY_STMT_REFERENCE, 0, &rev->ref, Y_STR_ARG, &rev->exts));
  ------------------
  |  |  206|   168k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   168k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   168k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   168k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 168k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1321|   168k|            break;
 1322|  2.78k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1322:9): [True: 2.78k, False: 379k]
  ------------------
 1323|  2.78k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, rev, LY_STMT_REVISION, 0, &rev->exts));
  ------------------
  |  |  206|  2.78k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.78k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.78k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.78k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 2, False: 2.78k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1324|  2.78k|            break;
 1325|     10|        default:
  ------------------
  |  Branch (1325:9): [True: 10, False: 382k]
  ------------------
 1326|     10|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "revision");
  ------------------
  |  |  129|     10|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     20|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1327|     10|            return LY_EVALID;
 1328|   382k|        }
 1329|   764k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, rev->exts, ret, cleanup);
  ------------------
  |  |   99|   382k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 12, False: 382k]
  |  |  ------------------
  |  |  100|     12|        goto ERR_LABEL; \
  |  |  101|     12|    } \
  |  |  102|   382k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 212k, False: 170k]
  |  |  ------------------
  |  |  103|   212k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 1.20k, False: 210k]
  |  |  |  Branch (103:21): [True: 0, False: 1.20k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|   212k|        __loop_end = 1; \
  |  |  107|   212k|    }
  ------------------
 1330|   382k|    }
 1331|       |
 1332|   217k|cleanup:
 1333|   217k|    return ret;
 1334|   434k|}
parser_yang.c:parse_extension:
 3793|  63.2k|{
 3794|  63.2k|    LY_ERR ret = LY_SUCCESS;
 3795|  63.2k|    char *buf, *word;
 3796|  63.2k|    size_t word_len;
 3797|  63.2k|    enum ly_stmt kw;
 3798|  63.2k|    struct lysp_ext *ex;
 3799|       |
 3800|  63.2k|    LY_ARRAY_NEW_RET(PARSER_CTX(ctx), *extensions, ex, LY_EMEM);
  ------------------
  |  |   96|  63.2k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  63.2k|    { \
  |  |  |  |   62|  63.2k|        char *p__; \
  |  |  |  |   63|  63.2k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 20.7k, False: 42.4k]
  |  |  |  |  ------------------
  |  |  |  |   64|  20.7k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  20.7k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  20.7k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  20.7k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 20.7k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  42.4k|        } else { \
  |  |  |  |   73|  42.4k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  42.4k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 42.4k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  42.4k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  42.4k|        } \
  |  |  |  |   80|  63.2k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  63.2k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  63.2k|    }
  |  |  ------------------
  |  |   97|  63.2k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  63.2k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 3801|       |
 3802|       |    /* get value */
 3803|  63.2k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  63.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  63.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  63.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  63.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 8, False: 63.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3804|  63.2k|    INSERT_WORD_GOTO(ctx, buf, ex->name, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  63.2k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|    406|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 203]
  |  |  |  |  |  Branch (202:40): [True: 203, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 203, False: 63.0k]
  |  |  ------------------
  |  |   51|  63.2k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   252k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 63.0k]
  |  |  |  |  |  Branch (202:40): [True: 63.0k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 63.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3805|       |
 3806|   126k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  63.2k|    ly_bool __loop_end = 0; \
  |  |   73|  63.2k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 7, False: 63.2k]
  |  |  ------------------
  |  |   74|      7|        goto ERR_LABEL; \
  |  |   75|      7|    } \
  |  |   76|  63.2k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 2.32k, False: 60.9k]
  |  |  ------------------
  |  |   77|  2.32k|        __loop_end = 1; \
  |  |   78|  60.9k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 6, False: 60.8k]
  |  |  ------------------
  |  |   79|      6|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      6|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     12|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 6, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      6|        RET = LY_EVALID; \
  |  |   81|      6|        goto ERR_LABEL; \
  |  |   82|  60.8k|    } else { \
  |  |   83|  60.8k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  60.8k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 28, False: 60.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|     28|        goto ERR_LABEL; \
  |  |  |  |  101|     28|    } \
  |  |  |  |  102|  60.8k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 89, False: 60.7k]
  |  |  |  |  ------------------
  |  |  |  |  103|     89|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 89]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|     89|        __loop_end = 1; \
  |  |  |  |  107|     89|    }
  |  |  ------------------
  |  |   84|  60.8k|    } \
  |  |   85|   181k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 118k, False: 63.0k]
  |  |  ------------------
  ------------------
 3807|   118k|        switch (kw) {
 3808|  56.2k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (3808:9): [True: 56.2k, False: 62.5k]
  ------------------
 3809|  56.2k|            LY_CHECK_RET(parse_text_field(ctx, ex->dsc, LY_STMT_DESCRIPTION, 0, &ex->dsc, Y_STR_ARG, &ex->exts));
  ------------------
  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  56.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  56.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3810|  56.2k|            break;
 3811|      6|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (3811:9): [True: 6, False: 118k]
  ------------------
 3812|      6|            LY_CHECK_RET(parse_text_field(ctx, ex->ref, LY_STMT_REFERENCE, 0, &ex->ref, Y_STR_ARG, &ex->exts));
  ------------------
  |  |  206|      6|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      6|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      6|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      6|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 5]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3813|      5|            break;
 3814|  2.85k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (3814:9): [True: 2.85k, False: 115k]
  ------------------
 3815|  2.85k|            LY_CHECK_RET(parse_status(ctx, &ex->flags, &ex->exts));
  ------------------
  |  |  206|  2.85k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  2.85k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.85k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  2.85k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 32, False: 2.82k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3816|  2.82k|            break;
 3817|  57.8k|        case LY_STMT_ARGUMENT:
  ------------------
  |  Branch (3817:9): [True: 57.8k, False: 60.8k]
  ------------------
 3818|  57.8k|            LY_CHECK_RET(parse_argument(ctx, ex));
  ------------------
  |  |  206|  57.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  57.8k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  57.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  57.8k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 102, False: 57.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3819|  57.7k|            break;
 3820|  1.75k|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3820:9): [True: 1.75k, False: 116k]
  ------------------
 3821|  1.75k|            LY_CHECK_RET(parse_ext(ctx, word, word_len, ex, LY_STMT_EXTENSION, 0, &ex->exts));
  ------------------
  |  |  206|  1.75k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.75k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.75k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.75k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 1.75k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3822|  1.75k|            break;
 3823|     26|        default:
  ------------------
  |  Branch (3823:9): [True: 26, False: 118k]
  ------------------
 3824|     26|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "extension");
  ------------------
  |  |  129|     26|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     52|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 26, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3825|     26|            return LY_EVALID;
 3826|   118k|        }
 3827|   237k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, ex->exts, ret, cleanup);
  ------------------
  |  |   99|   118k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 18, False: 118k]
  |  |  ------------------
  |  |  100|     18|        goto ERR_LABEL; \
  |  |  101|     18|    } \
  |  |  102|   118k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 60.5k, False: 57.9k]
  |  |  ------------------
  |  |  103|  60.5k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 1.31k, False: 59.2k]
  |  |  |  Branch (103:21): [True: 0, False: 1.31k]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  60.5k|        __loop_end = 1; \
  |  |  107|  60.5k|    }
  ------------------
 3828|   118k|    }
 3829|       |
 3830|  63.0k|cleanup:
 3831|  63.0k|    return ret;
 3832|   126k|}
parser_yang.c:parse_argument:
 3750|  57.8k|{
 3751|  57.8k|    LY_ERR ret = LY_SUCCESS;
 3752|  57.8k|    char *buf, *word;
 3753|  57.8k|    size_t word_len;
 3754|  57.8k|    enum ly_stmt kw;
 3755|       |
 3756|  57.8k|    if (ext->argname) {
  ------------------
  |  Branch (3756:9): [True: 1, False: 57.8k]
  ------------------
 3757|      1|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "argument");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3758|      1|        return LY_EVALID;
 3759|      1|    }
 3760|       |
 3761|       |    /* get value */
 3762|  57.8k|    LY_CHECK_RET(get_argument(ctx, Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  57.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  57.8k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  57.8k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  57.8k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 4, False: 57.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3763|  57.8k|    INSERT_WORD_GOTO(ctx, buf, ext->argname, word, word_len, ret, cleanup);
  ------------------
  |  |   50|  57.8k|    if (BUF) {LY_CHECK_GOTO(RET = lydict_insert_zc(PARSER_CTX(CTX), WORD, &(TARGET)), LABEL);}\
  |  |  ------------------
  |  |  |  |  202|     38|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 19]
  |  |  |  |  |  Branch (202:40): [True: 19, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (50:9): [True: 19, False: 57.8k]
  |  |  ------------------
  |  |   51|  57.8k|    else {LY_CHECK_GOTO(RET = lydict_insert(PARSER_CTX(CTX), LEN ? WORD : "", LEN, &(TARGET)), LABEL);}
  |  |  ------------------
  |  |  |  |  202|   231k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 57.8k]
  |  |  |  |  |  Branch (202:40): [True: 57.8k, False: 0]
  |  |  |  |  |  Branch (202:40): [True: 57.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3764|       |
 3765|   115k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  57.8k|    ly_bool __loop_end = 0; \
  |  |   73|  57.8k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 6, False: 57.8k]
  |  |  ------------------
  |  |   74|      6|        goto ERR_LABEL; \
  |  |   75|      6|    } \
  |  |   76|  57.8k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 28.3k, False: 29.4k]
  |  |  ------------------
  |  |   77|  28.3k|        __loop_end = 1; \
  |  |   78|  29.4k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 3, False: 29.4k]
  |  |  ------------------
  |  |   79|      3|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      3|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|      6|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      3|        RET = LY_EVALID; \
  |  |   81|      3|        goto ERR_LABEL; \
  |  |   82|  29.4k|    } else { \
  |  |   83|  29.4k|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|  29.4k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 1, False: 29.4k]
  |  |  |  |  ------------------
  |  |  |  |  100|      1|        goto ERR_LABEL; \
  |  |  |  |  101|      1|    } \
  |  |  |  |  102|  29.4k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 1.27k, False: 28.2k]
  |  |  |  |  ------------------
  |  |  |  |  103|  1.27k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 1.27k]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|  1.27k|        __loop_end = 1; \
  |  |  |  |  107|  1.27k|    }
  |  |  ------------------
  |  |   84|  29.4k|    } \
  |  |   85|  86.2k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 28.5k, False: 57.7k]
  |  |  ------------------
  ------------------
 3766|  28.5k|        switch (kw) {
 3767|  28.1k|        case LY_STMT_YIN_ELEMENT:
  ------------------
  |  Branch (3767:9): [True: 28.1k, False: 355]
  ------------------
 3768|  28.1k|            LY_CHECK_RET(parse_yinelement(ctx, ext));
  ------------------
  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 59, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3769|  28.1k|            break;
 3770|    340|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3770:9): [True: 340, False: 28.1k]
  ------------------
 3771|    340|            LY_CHECK_RET(parse_ext(ctx, word, word_len, ext, LY_STMT_ARGUMENT, 0, &ext->exts));
  ------------------
  |  |  206|    340|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    340|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    340|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    340|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 3, False: 337]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3772|    337|            break;
 3773|     15|        default:
  ------------------
  |  Branch (3773:9): [True: 15, False: 28.5k]
  ------------------
 3774|     15|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "argument");
  ------------------
  |  |  129|     15|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     30|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 15, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3775|     15|            return LY_EVALID;
 3776|  28.5k|        }
 3777|  56.9k|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|  28.4k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 10, False: 28.4k]
  |  |  ------------------
  |  |  100|     10|        goto ERR_LABEL; \
  |  |  101|     10|    } \
  |  |  102|  28.4k|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 28.1k, False: 329]
  |  |  ------------------
  |  |  103|  28.1k|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 28.1k]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|  28.1k|        __loop_end = 1; \
  |  |  107|  28.1k|    }
  ------------------
 3778|  28.4k|    }
 3779|       |
 3780|  57.7k|cleanup:
 3781|  57.7k|    return ret;
 3782|   115k|}
parser_yang.c:parse_yinelement:
 3699|  28.1k|{
 3700|  28.1k|    LY_ERR ret = LY_SUCCESS;
 3701|  28.1k|    char *buf, *word;
 3702|  28.1k|    size_t word_len;
 3703|  28.1k|    enum ly_stmt kw;
 3704|       |
 3705|  28.1k|    if (ext->flags & LYS_YINELEM_MASK) {
  ------------------
  |  |  683|  28.1k|#define LYS_YINELEM_MASK 0x0180      /**< mask for yin-element value */
  ------------------
  |  Branch (3705:9): [True: 0, False: 28.1k]
  ------------------
 3706|      0|        LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, "yin-element");
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3707|      0|        return LY_EVALID;
 3708|      0|    }
 3709|       |
 3710|       |    /* get value */
 3711|  28.1k|    LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
  ------------------
  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3712|       |
 3713|  28.1k|    if ((word_len == ly_strlen_const("true")) && !strncmp(word, "true", word_len)) {
  ------------------
  |  |  472|  28.1k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (3713:9): [True: 28.1k, False: 44]
  |  Branch (3713:50): [True: 28.1k, False: 17]
  ------------------
 3714|  28.1k|        ext->flags |= LYS_YINELEM_TRUE;
  ------------------
  |  |  681|  28.1k|#define LYS_YINELEM_TRUE 0x80        /**< yin-element true for extension's argument */
  ------------------
 3715|  28.1k|    } else if ((word_len == ly_strlen_const("false")) && !strncmp(word, "false", word_len)) {
  ------------------
  |  |  472|     61|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (3715:16): [True: 29, False: 32]
  |  Branch (3715:58): [True: 23, False: 6]
  ------------------
 3716|     23|        ext->flags |= LYS_YINELEM_FALSE;
  ------------------
  |  |  682|     23|#define LYS_YINELEM_FALSE 0x0100     /**< yin-element false for extension's argument */
  ------------------
 3717|     38|    } else {
 3718|     38|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, word_len, word, "yin-element");
  ------------------
  |  |  129|     38|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     76|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 38, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3719|     38|        free(buf);
 3720|     38|        return LY_EVALID;
 3721|     38|    }
 3722|  28.1k|    free(buf);
 3723|       |
 3724|  56.2k|    YANG_READ_SUBSTMT_FOR_GOTO(ctx, kw, word, word_len, ret, cleanup) {
  ------------------
  |  |   72|  28.1k|    ly_bool __loop_end = 0; \
  |  |   73|  28.1k|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (73:9): [True: 1, False: 28.1k]
  |  |  ------------------
  |  |   74|      1|        goto ERR_LABEL; \
  |  |   75|      1|    } \
  |  |   76|  28.1k|    if (KW == LY_STMT_SYNTAX_SEMICOLON) { \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 28.1k, False: 21]
  |  |  ------------------
  |  |   77|  28.1k|        __loop_end = 1; \
  |  |   78|  28.1k|    } else if (KW != LY_STMT_SYNTAX_LEFT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (78:16): [True: 5, False: 16]
  |  |  ------------------
  |  |   79|      5|        LOGVAL_PARSER(CTX, LYVE_SYNTAX_YANG, "Invalid keyword \"%s\", expected \";\" or \"{\".", lyplg_ext_stmt2str(KW)); \
  |  |  ------------------
  |  |  |  |  129|      5|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|     10|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (178:34): [True: 5, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      5|        RET = LY_EVALID; \
  |  |   81|      5|        goto ERR_LABEL; \
  |  |   82|     16|    } else { \
  |  |   83|     16|        YANG_READ_SUBSTMT_NEXT_ITER(CTX, KW, WORD, WORD_LEN, NULL, RET, ERR_LABEL); \
  |  |  ------------------
  |  |  |  |   99|     16|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:9): [True: 1, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  100|      1|        goto ERR_LABEL; \
  |  |  |  |  101|      1|    } \
  |  |  |  |  102|     16|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:9): [True: 1, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  103|      1|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:13): [True: 0, False: 1]
  |  |  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  104|      0|            goto ERR_LABEL; \
  |  |  |  |  105|      0|        } \
  |  |  |  |  106|      1|        __loop_end = 1; \
  |  |  |  |  107|      1|    }
  |  |  ------------------
  |  |   84|     15|    } \
  |  |   85|  28.3k|    while (!__loop_end)
  |  |  ------------------
  |  |  |  Branch (85:12): [True: 215, False: 28.1k]
  |  |  ------------------
  ------------------
 3725|    215|        switch (kw) {
 3726|    207|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (3726:9): [True: 207, False: 8]
  ------------------
 3727|    207|            LY_CHECK_RET(parse_ext(ctx, word, word_len, ext, LY_STMT_YIN_ELEMENT, 0, &ext->exts));
  ------------------
  |  |  206|    207|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    207|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    207|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    207|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 1, False: 206]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3728|    206|            LY_CHECK_RET(ret);
  ------------------
  |  |  206|    206|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    206|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    206|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    206|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 206]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3729|    206|            break;
 3730|      8|        default:
  ------------------
  |  Branch (3730:9): [True: 8, False: 207]
  ------------------
 3731|      8|            LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, lyplg_ext_stmt2str(kw), "yin-element");
  ------------------
  |  |  129|      8|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     16|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 8, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3732|      8|            return LY_EVALID;
 3733|    215|        }
 3734|    408|        YANG_READ_SUBSTMT_NEXT_ITER(ctx, kw, word, word_len, NULL, ret, cleanup);
  ------------------
  |  |   99|    206|    if ((RET = get_keyword(CTX, &KW, &WORD, &WORD_LEN))) { \
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 4, False: 202]
  |  |  ------------------
  |  |  100|      4|        goto ERR_LABEL; \
  |  |  101|      4|    } \
  |  |  102|    206|    if (KW == LY_STMT_SYNTAX_RIGHT_BRACE) { \
  |  |  ------------------
  |  |  |  Branch (102:9): [True: 1, False: 201]
  |  |  ------------------
  |  |  103|      1|        if (EXTS && (RET = ly_set_add(&(CTX)->main_ctx->ext_inst, (EXTS), 1, NULL))) { \
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 1]
  |  |  |  Branch (103:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|            goto ERR_LABEL; \
  |  |  105|      0|        } \
  |  |  106|      1|        __loop_end = 1; \
  |  |  107|      1|    }
  ------------------
 3735|    202|    }
 3736|       |
 3737|  28.1k|cleanup:
 3738|  28.1k|    return ret;
 3739|  56.2k|}
parser_yang.c:skip_redundant_chars:
 4659|   238k|{
 4660|       |    /* read some trailing spaces, new lines, or comments */
 4661|   358k|    while (ctx->in->current[0]) {
  ------------------
  |  Branch (4661:12): [True: 246k, False: 112k]
  ------------------
 4662|   246k|        if (!strncmp(ctx->in->current, "//", 2)) {
  ------------------
  |  Branch (4662:13): [True: 659, False: 245k]
  ------------------
 4663|       |            /* one-line comment */
 4664|    659|            ly_in_skip(ctx->in, 2);
 4665|    659|            LY_CHECK_RET(skip_comment(ctx, 1));
  ------------------
  |  |  206|    659|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    659|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    659|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    659|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 659]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4666|   245k|        } else if (!strncmp(ctx->in->current, "/*", 2)) {
  ------------------
  |  Branch (4666:20): [True: 557, False: 244k]
  ------------------
 4667|       |            /* block comment */
 4668|    557|            ly_in_skip(ctx->in, 2);
 4669|    557|            LY_CHECK_RET(skip_comment(ctx, 2));
  ------------------
  |  |  206|    557|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|    557|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    557|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|    557|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 73, False: 484]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4670|   244k|        } else if (isspace(ctx->in->current[0])) {
 4671|       |            /* whitespace */
 4672|   118k|            if (ctx->in->current[0] == '\n') {
  ------------------
  |  Branch (4672:17): [True: 72.0k, False: 46.3k]
  ------------------
 4673|  72.0k|                LY_IN_NEW_LINE(ctx->in);
  ------------------
  |  |   48|  72.0k|    (IN)->line++
  ------------------
 4674|  72.0k|            }
 4675|   118k|            ly_in_skip(ctx->in, 1);
 4676|   126k|        } else {
 4677|   126k|            break;
 4678|   126k|        }
 4679|   246k|    }
 4680|       |
 4681|   238k|    return LY_SUCCESS;
 4682|   238k|}

ly_path_parse:
  324|  74.4k|{
  325|  74.4k|    LY_ERR ret = LY_SUCCESS;
  326|  74.4k|    struct lyxp_expr *exp = NULL;
  327|  74.4k|    uint32_t tok_idx, cur_len;
  328|  74.4k|    const char *cur_node, *prev_prefix = NULL, *ptr;
  329|  74.4k|    ly_bool is_abs;
  330|       |
  331|  74.4k|    assert((begin == LY_PATH_BEGIN_ABSOLUTE) || (begin == LY_PATH_BEGIN_EITHER));
  332|      0|    assert((prefix == LY_PATH_PREFIX_OPTIONAL) || (prefix == LY_PATH_PREFIX_MANDATORY) ||
  333|  74.4k|            (prefix == LY_PATH_PREFIX_FIRST) || (prefix == LY_PATH_PREFIX_STRICT_INHERIT));
  334|      0|    assert((pred == LY_PATH_PRED_KEYS) || (pred == LY_PATH_PRED_SIMPLE) || (pred == LY_PATH_PRED_LEAFREF));
  335|       |
  336|  74.4k|    LOG_LOCSET(ctx_node, NULL, NULL, NULL);
  ------------------
  |  |  141|  74.4k|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
  337|       |
  338|       |    /* parse as a generic XPath expression, reparse is performed manually */
  339|  74.4k|    LY_CHECK_GOTO(ret = lyxp_expr_parse(ctx, str_path, path_len, 0, &exp), error);
  ------------------
  |  |  202|  74.4k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 1.02k, False: 73.4k]
  |  |  ------------------
  ------------------
  340|  73.4k|    tok_idx = 0;
  341|       |
  342|       |    /* alloc empty repeat (only '=', filled manually) */
  343|  73.4k|    exp->repeat = calloc(exp->size, sizeof *exp->repeat);
  344|  73.4k|    LY_CHECK_ERR_GOTO(!exp->repeat, LOGMEM(ctx); ret = LY_EMEM, error);
  ------------------
  |  |  203|  73.4k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 73.4k]
  |  |  ------------------
  ------------------
  345|       |
  346|  73.4k|    if (begin == LY_PATH_BEGIN_EITHER) {
  ------------------
  |  |   72|  73.4k|#define LY_PATH_BEGIN_EITHER    0x02    /**< path be be either absolute or relative */
  ------------------
  |  Branch (346:9): [True: 73.4k, False: 0]
  ------------------
  347|       |        /* is the path relative? */
  348|  73.4k|        if (lyxp_next_token(NULL, exp, &tok_idx, LYXP_TOKEN_OPER_PATH)) {
  ------------------
  |  Branch (348:13): [True: 42.7k, False: 30.6k]
  ------------------
  349|       |            /* relative path check specific to leafref */
  350|  42.7k|            if (lref) {
  ------------------
  |  Branch (350:17): [True: 42.7k, False: 0]
  ------------------
  351|       |                /* optional function 'deref..' */
  352|  42.7k|                if ((ly_ctx_get_options(ctx) & LY_CTX_LEAFREF_EXTENDED) &&
  ------------------
  |  |  200|  42.7k|#define LY_CTX_LEAFREF_EXTENDED 0x0200 /**< By default, path attribute of leafref accepts only path as defined in RFC 7950.
  ------------------
  |  Branch (352:21): [True: 0, False: 42.7k]
  ------------------
  353|  42.7k|                        !lyxp_check_token(NULL, exp, tok_idx, LYXP_TOKEN_FUNCNAME)) {
  ------------------
  |  Branch (353:25): [True: 0, False: 0]
  ------------------
  354|      0|                    LY_CHECK_ERR_GOTO(ly_path_parse_deref(ctx, ctx_node, exp, &tok_idx), ret = LY_EVALID, error);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  355|       |
  356|       |                    /* '/' */
  357|      0|                    LY_CHECK_ERR_GOTO(lyxp_next_token(ctx, exp, &tok_idx, LYXP_TOKEN_OPER_PATH), ret = LY_EVALID,
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  358|      0|                            error);
  359|      0|                }
  360|       |
  361|       |                /* mandatory '..' */
  362|  42.7k|                LY_CHECK_ERR_GOTO(lyxp_next_token(ctx, exp, &tok_idx, LYXP_TOKEN_DDOT), ret = LY_EVALID, error);
  ------------------
  |  |  203|  42.7k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 584, False: 42.1k]
  |  |  ------------------
  ------------------
  363|       |
  364|  84.3k|                do {
  365|       |                    /* '/' */
  366|  84.3k|                    LY_CHECK_ERR_GOTO(lyxp_next_token(ctx, exp, &tok_idx, LYXP_TOKEN_OPER_PATH), ret = LY_EVALID,
  ------------------
  |  |  203|  84.3k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 3, False: 84.3k]
  |  |  ------------------
  ------------------
  367|  84.3k|                            error);
  368|       |
  369|       |                    /* optional '..' */
  370|  84.3k|                } while (!lyxp_next_token(NULL, exp, &tok_idx, LYXP_TOKEN_DDOT));
  ------------------
  |  Branch (370:26): [True: 42.1k, False: 42.1k]
  ------------------
  371|  42.1k|            }
  372|       |
  373|  42.1k|            is_abs = 0;
  374|  42.1k|        } else {
  375|  30.6k|            is_abs = 1;
  376|  30.6k|        }
  377|  73.4k|    } else {
  378|       |        /* '/' */
  379|      0|        LY_CHECK_ERR_GOTO(lyxp_next_token(ctx, exp, &tok_idx, LYXP_TOKEN_OPER_PATH), ret = LY_EVALID, error);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  380|       |
  381|      0|        is_abs = 1;
  382|      0|    }
  383|       |
  384|   171k|    do {
  385|       |        /* NameTest */
  386|   171k|        LY_CHECK_ERR_GOTO(lyxp_check_token(ctx, exp, tok_idx, LYXP_TOKEN_NAMETEST), ret = LY_EVALID, error);
  ------------------
  |  |  203|   171k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 35, False: 171k]
  |  |  ------------------
  ------------------
  387|       |
  388|       |        /* check prefix based on the options */
  389|   171k|        cur_node = exp->expr + exp->tok_pos[tok_idx];
  390|   171k|        cur_len = exp->tok_len[tok_idx];
  391|   171k|        if (prefix == LY_PATH_PREFIX_MANDATORY) {
  ------------------
  |  |   80|   171k|#define LY_PATH_PREFIX_MANDATORY    0x20    /**< prefixes in the path are mandatory (XML instance-identifier) */
  ------------------
  |  Branch (391:13): [True: 0, False: 171k]
  ------------------
  392|      0|            if (!strnstr(cur_node, ":", cur_len)) {
  ------------------
  |  Branch (392:17): [True: 0, False: 0]
  ------------------
  393|      0|                LOGVAL(ctx, LYVE_XPATH, "Prefix missing for \"%.*s\" in path.", cur_len, cur_node);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  394|      0|                ret = LY_EVALID;
  395|      0|                goto error;
  396|      0|            }
  397|   171k|        } else if ((prefix == LY_PATH_PREFIX_FIRST) || (prefix == LY_PATH_PREFIX_STRICT_INHERIT)) {
  ------------------
  |  |   81|   171k|#define LY_PATH_PREFIX_FIRST        0x40    /**< prefixes in the path are mandatory only in the first node of absolute path (JSON path) */
  ------------------
                      } else if ((prefix == LY_PATH_PREFIX_FIRST) || (prefix == LY_PATH_PREFIX_STRICT_INHERIT)) {
  ------------------
  |  |   82|   171k|#define LY_PATH_PREFIX_STRICT_INHERIT 0x80  /**< prefixes in the path are mandatory in case they differ from the
  ------------------
  |  Branch (397:20): [True: 0, False: 171k]
  |  Branch (397:56): [True: 0, False: 171k]
  ------------------
  398|      0|            if (!prev_prefix && is_abs) {
  ------------------
  |  Branch (398:17): [True: 0, False: 0]
  |  Branch (398:33): [True: 0, False: 0]
  ------------------
  399|       |                /* the first node must have a prefix */
  400|      0|                if (!strnstr(cur_node, ":", cur_len)) {
  ------------------
  |  Branch (400:21): [True: 0, False: 0]
  ------------------
  401|      0|                    LOGVAL(ctx, LYVE_XPATH, "Prefix missing for \"%.*s\" in path.", cur_len, cur_node);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  402|      0|                    ret = LY_EVALID;
  403|      0|                    goto error;
  404|      0|                }
  405|       |
  406|       |                /* remember the first prefix */
  407|      0|                prev_prefix = cur_node;
  408|      0|            } else if (prev_prefix && (prefix == LY_PATH_PREFIX_STRICT_INHERIT)) {
  ------------------
  |  |   82|      0|#define LY_PATH_PREFIX_STRICT_INHERIT 0x80  /**< prefixes in the path are mandatory in case they differ from the
  ------------------
  |  Branch (408:24): [True: 0, False: 0]
  |  Branch (408:39): [True: 0, False: 0]
  ------------------
  409|       |                /* the prefix must be different, if any */
  410|      0|                ptr = strnstr(cur_node, ":", cur_len);
  411|      0|                if (ptr) {
  ------------------
  |  Branch (411:21): [True: 0, False: 0]
  ------------------
  412|      0|                    if (!strncmp(prev_prefix, cur_node, ptr - cur_node) && (prev_prefix[ptr - cur_node] == ':')) {
  ------------------
  |  Branch (412:25): [True: 0, False: 0]
  |  Branch (412:76): [True: 0, False: 0]
  ------------------
  413|      0|                        LOGVAL(ctx, LYVE_XPATH, "Duplicate prefix for \"%.*s\" in path.", cur_len, cur_node);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  414|      0|                        ret = LY_EVALID;
  415|      0|                        goto error;
  416|      0|                    }
  417|       |
  418|       |                    /* remember this next prefix */
  419|      0|                    prev_prefix = cur_node;
  420|      0|                }
  421|      0|            }
  422|      0|        }
  423|       |
  424|   171k|        ++tok_idx;
  425|       |
  426|       |        /* Predicate* */
  427|   171k|        LY_CHECK_GOTO(ret = ly_path_check_predicate(ctx, ctx_node, exp, &tok_idx, prefix, pred), error);
  ------------------
  |  |  202|   171k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 32, False: 171k]
  |  |  ------------------
  ------------------
  428|       |
  429|       |        /* '/' */
  430|   171k|    } while (!lyxp_next_token(NULL, exp, &tok_idx, LYXP_TOKEN_OPER_PATH));
  ------------------
  |  Branch (430:14): [True: 98.6k, False: 72.7k]
  ------------------
  431|       |
  432|       |    /* trailing token check */
  433|  72.7k|    if (exp->used > tok_idx) {
  ------------------
  |  Branch (433:9): [True: 63, False: 72.7k]
  ------------------
  434|     63|        LOGVAL(ctx, LYVE_XPATH, "Unparsed characters \"%s\" left at the end of path.", exp->expr + exp->tok_pos[tok_idx]);
  ------------------
  |  |  178|     63|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  435|     63|        ret = LY_EVALID;
  436|     63|        goto error;
  437|     63|    }
  438|       |
  439|  72.7k|    *expr = exp;
  440|       |
  441|  72.7k|    LOG_LOCBACK(ctx_node ? 1 : 0, 0, 0, 0);
  ------------------
  |  |  152|   145k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  |  |  ------------------
  |  |  |  Branch (152:28): [True: 0, False: 72.7k]
  |  |  ------------------
  ------------------
  442|  72.7k|    return LY_SUCCESS;
  443|       |
  444|  1.73k|error:
  445|  1.73k|    lyxp_expr_free(ctx, exp);
  446|  1.73k|    LOG_LOCBACK(ctx_node ? 1 : 0, 0, 0, 0);
  ------------------
  |  |  152|  3.47k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  |  |  ------------------
  |  |  |  Branch (152:28): [True: 0, False: 1.73k]
  |  |  ------------------
  ------------------
  447|  1.73k|    return ret;
  448|  72.7k|}
ly_path_compile_leafref:
 1283|   140k|{
 1284|   140k|    return _ly_path_compile(ctx, ctx_node->module, ctx_node, top_ext, expr, 1, oper, target, 1, format, prefix_data, path);
 1285|   140k|}
ly_path_predicates_free:
 1433|   281k|{
 1434|   281k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   281k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1435|   281k|    struct lysf_ctx fctx = {.ctx = (struct ly_ctx *)ctx};
 1436|       |
 1437|   281k|    if (!predicates) {
  ------------------
  |  Branch (1437:9): [True: 281k, False: 0]
  ------------------
 1438|   281k|        return;
 1439|   281k|    }
 1440|       |
 1441|      0|    LY_ARRAY_FOR(predicates, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1442|      0|        switch (predicates[u].type) {
  ------------------
  |  Branch (1442:17): [True: 0, False: 0]
  ------------------
 1443|      0|        case LY_PATH_PREDTYPE_POSITION:
  ------------------
  |  Branch (1443:9): [True: 0, False: 0]
  ------------------
 1444|       |            /* nothing to free */
 1445|      0|            break;
 1446|      0|        case LY_PATH_PREDTYPE_LIST:
  ------------------
  |  Branch (1446:9): [True: 0, False: 0]
  ------------------
 1447|      0|        case LY_PATH_PREDTYPE_LEAFLIST:
  ------------------
  |  Branch (1447:9): [True: 0, False: 0]
  ------------------
 1448|      0|            if (predicates[u].value.realtype) {
  ------------------
  |  Branch (1448:17): [True: 0, False: 0]
  ------------------
 1449|      0|                predicates[u].value.realtype->plugin->free(ctx, &predicates[u].value);
 1450|      0|                lysc_type_free(&fctx, (struct lysc_type *)predicates[u].value.realtype);
 1451|      0|            }
 1452|      0|            break;
 1453|      0|        case LY_PATH_PREDTYPE_LIST_VAR:
  ------------------
  |  Branch (1453:9): [True: 0, False: 0]
  ------------------
 1454|      0|            free(predicates[u].variable);
 1455|      0|            break;
 1456|      0|        }
 1457|      0|    }
 1458|      0|    LY_ARRAY_FREE(predicates);
  ------------------
  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1459|      0|}
ly_path_free:
 1463|   140k|{
 1464|   140k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   140k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1465|       |
 1466|   140k|    if (!path) {
  ------------------
  |  Branch (1466:9): [True: 0, False: 140k]
  ------------------
 1467|      0|        return;
 1468|      0|    }
 1469|       |
 1470|   281k|    LY_ARRAY_FOR(path, u) {
  ------------------
  |  |  167|   140k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   140k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   140k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   140k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   421k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   421k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 421k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 281k, False: 140k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   281k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1471|   281k|        ly_path_predicates_free(ctx, path[u].predicates);
 1472|   281k|    }
 1473|   140k|    LY_ARRAY_FREE(path);
  ------------------
  |  |  232|   140k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 140k, False: 0]
  |  |  ------------------
  ------------------
 1474|   140k|}
path.c:ly_path_check_predicate:
   52|   171k|{
   53|   171k|    LY_ERR ret = LY_SUCCESS;
   54|   171k|    struct ly_set *set = NULL;
   55|   171k|    uint32_t i;
   56|   171k|    const char *name;
   57|   171k|    size_t name_len;
   58|       |
   59|   171k|    LOG_LOCSET(cur_node, NULL, NULL, NULL);
  ------------------
  |  |  141|   171k|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
   60|       |
   61|   171k|    if (!lyxp_next_token(NULL, exp, tok_idx, LYXP_TOKEN_BRACK1)) {
  ------------------
  |  Branch (61:9): [True: 32, False: 171k]
  ------------------
   62|       |        /* '[' */
   63|       |
   64|     32|        if (((pred == LY_PATH_PRED_SIMPLE) || (pred == LY_PATH_PRED_KEYS)) &&
  ------------------
  |  |   91|     32|#define LY_PATH_PRED_SIMPLE     0x0200  /** expected predicates - ( [node='value'] | [node=$VAR] )*; [.='value']; [1] */
  ------------------
                      if (((pred == LY_PATH_PRED_SIMPLE) || (pred == LY_PATH_PRED_KEYS)) &&
  ------------------
  |  |   90|     32|#define LY_PATH_PRED_KEYS       0x0100  /** expected predicate only - [node='value']* */
  ------------------
  |  Branch (64:14): [True: 0, False: 32]
  |  Branch (64:47): [True: 0, False: 32]
  ------------------
   65|     32|                !lyxp_check_token(NULL, exp, *tok_idx, LYXP_TOKEN_NAMETEST)) {
  ------------------
  |  Branch (65:17): [True: 0, False: 0]
  ------------------
   66|      0|            ret = ly_set_new(&set);
   67|      0|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   68|       |
   69|      0|            do {
   70|       |                /* NameTest is always expected here */
   71|      0|                LY_CHECK_GOTO(lyxp_check_token(ctx, exp, *tok_idx, LYXP_TOKEN_NAMETEST), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   72|       |
   73|       |                /* check prefix based on the options */
   74|      0|                name = strnstr(exp->expr + exp->tok_pos[*tok_idx], ":", exp->tok_len[*tok_idx]);
   75|      0|                if ((prefix == LY_PATH_PREFIX_MANDATORY) && !name) {
  ------------------
  |  |   80|      0|#define LY_PATH_PREFIX_MANDATORY    0x20    /**< prefixes in the path are mandatory (XML instance-identifier) */
  ------------------
  |  Branch (75:21): [True: 0, False: 0]
  |  Branch (75:61): [True: 0, False: 0]
  ------------------
   76|      0|                    LOGVAL(ctx, LYVE_XPATH, "Prefix missing for \"%.*s\" in path.", exp->tok_len[*tok_idx],
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
   77|      0|                            exp->expr + exp->tok_pos[*tok_idx]);
   78|      0|                    goto token_error;
   79|      0|                } else if ((prefix == LY_PATH_PREFIX_STRICT_INHERIT) && name) {
  ------------------
  |  |   82|      0|#define LY_PATH_PREFIX_STRICT_INHERIT 0x80  /**< prefixes in the path are mandatory in case they differ from the
  ------------------
  |  Branch (79:28): [True: 0, False: 0]
  |  Branch (79:73): [True: 0, False: 0]
  ------------------
   80|      0|                    LOGVAL(ctx, LYVE_XPATH, "Redundant prefix for \"%.*s\" in path.", exp->tok_len[*tok_idx],
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
   81|      0|                            exp->expr + exp->tok_pos[*tok_idx]);
   82|      0|                    goto token_error;
   83|      0|                }
   84|      0|                if (!name) {
  ------------------
  |  Branch (84:21): [True: 0, False: 0]
  ------------------
   85|      0|                    name = exp->expr + exp->tok_pos[*tok_idx];
   86|      0|                    name_len = exp->tok_len[*tok_idx];
   87|      0|                } else {
   88|      0|                    ++name;
   89|      0|                    name_len = exp->tok_len[*tok_idx] - (name - (exp->expr + exp->tok_pos[*tok_idx]));
   90|      0|                }
   91|       |
   92|       |                /* check whether it was not already specified */
   93|      0|                for (i = 0; i < set->count; ++i) {
  ------------------
  |  Branch (93:29): [True: 0, False: 0]
  ------------------
   94|       |                    /* all the keys must be from the same module so this comparison should be fine */
   95|      0|                    if (!strncmp(set->objs[i], name, name_len) &&
  ------------------
  |  Branch (95:25): [True: 0, False: 0]
  ------------------
   96|      0|                            lysp_check_identifierchar(NULL, ((char *)set->objs[i])[name_len], 0, NULL)) {
  ------------------
  |  Branch (96:29): [True: 0, False: 0]
  ------------------
   97|      0|                        LOGVAL(ctx, LYVE_XPATH, "Duplicate predicate key \"%.*s\" in path.", (int)name_len, name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
   98|      0|                        goto token_error;
   99|      0|                    }
  100|      0|                }
  101|       |
  102|       |                /* add it into the set */
  103|      0|                ret = ly_set_add(set, (void *)name, 1, NULL);
  104|      0|                LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  105|       |
  106|       |                /* NameTest */
  107|      0|                ++(*tok_idx);
  108|       |
  109|       |                /* '=' */
  110|      0|                LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_OPER_EQUAL), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  111|       |
  112|       |                /* fill repeat */
  113|      0|                exp->repeat[*tok_idx - 2] = calloc(2, sizeof *exp->repeat[*tok_idx]);
  114|      0|                LY_CHECK_ERR_GOTO(!exp->repeat[*tok_idx - 2], LOGMEM(NULL); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  115|      0|                exp->repeat[*tok_idx - 2][0] = LYXP_EXPR_EQUALITY;
  116|       |
  117|       |                /* Literal, Number, or VariableReference */
  118|      0|                if (lyxp_next_token(NULL, exp, tok_idx, LYXP_TOKEN_LITERAL) &&
  ------------------
  |  Branch (118:21): [True: 0, False: 0]
  ------------------
  119|      0|                        lyxp_next_token(NULL, exp, tok_idx, LYXP_TOKEN_NUMBER) &&
  ------------------
  |  Branch (119:25): [True: 0, False: 0]
  ------------------
  120|      0|                        lyxp_next_token(NULL, exp, tok_idx, LYXP_TOKEN_VARREF)) {
  ------------------
  |  Branch (120:25): [True: 0, False: 0]
  ------------------
  121|       |                    /* error */
  122|      0|                    lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_LITERAL);
  123|      0|                    goto token_error;
  124|      0|                }
  125|       |
  126|       |                /* ']' */
  127|      0|                LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_BRACK2), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  128|       |
  129|       |                /* '[' */
  130|      0|            } while (!lyxp_next_token(NULL, exp, tok_idx, LYXP_TOKEN_BRACK1));
  ------------------
  |  Branch (130:22): [True: 0, False: 0]
  ------------------
  131|       |
  132|     32|        } else if ((pred == LY_PATH_PRED_SIMPLE) && !lyxp_next_token(NULL, exp, tok_idx, LYXP_TOKEN_DOT)) {
  ------------------
  |  |   91|     32|#define LY_PATH_PRED_SIMPLE     0x0200  /** expected predicates - ( [node='value'] | [node=$VAR] )*; [.='value']; [1] */
  ------------------
  |  Branch (132:20): [True: 0, False: 32]
  |  Branch (132:53): [True: 0, False: 0]
  ------------------
  133|       |            /* '.' */
  134|       |
  135|       |            /* '=' */
  136|      0|            LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_OPER_EQUAL), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  137|       |
  138|       |            /* fill repeat */
  139|      0|            exp->repeat[*tok_idx - 2] = calloc(2, sizeof *exp->repeat[*tok_idx]);
  140|      0|            LY_CHECK_ERR_GOTO(!exp->repeat[*tok_idx - 2], LOGMEM(NULL); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  141|      0|            exp->repeat[*tok_idx - 2][0] = LYXP_EXPR_EQUALITY;
  142|       |
  143|       |            /* Literal or Number */
  144|      0|            LY_CHECK_GOTO(lyxp_next_token2(ctx, exp, tok_idx, LYXP_TOKEN_LITERAL, LYXP_TOKEN_NUMBER), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  145|       |
  146|       |            /* ']' */
  147|      0|            LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_BRACK2), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  148|       |
  149|     32|        } else if ((pred == LY_PATH_PRED_SIMPLE) && !lyxp_next_token(NULL, exp, tok_idx, LYXP_TOKEN_NUMBER)) {
  ------------------
  |  |   91|     32|#define LY_PATH_PRED_SIMPLE     0x0200  /** expected predicates - ( [node='value'] | [node=$VAR] )*; [.='value']; [1] */
  ------------------
  |  Branch (149:20): [True: 0, False: 32]
  |  Branch (149:53): [True: 0, False: 0]
  ------------------
  150|       |            /* Number */
  151|       |
  152|       |            /* check for index 0 */
  153|      0|            if (!atoi(exp->expr + exp->tok_pos[*tok_idx - 1])) {
  ------------------
  |  Branch (153:17): [True: 0, False: 0]
  ------------------
  154|      0|                LOGVAL(ctx, LYVE_XPATH, "Invalid positional predicate \"%.*s\".", (int)exp->tok_len[*tok_idx - 1],
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  155|      0|                        exp->expr + exp->tok_pos[*tok_idx - 1]);
  156|      0|                goto token_error;
  157|      0|            }
  158|       |
  159|       |            /* ']' */
  160|      0|            LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_BRACK2), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  161|       |
  162|     32|        } else if ((pred == LY_PATH_PRED_LEAFREF) && !lyxp_check_token(NULL, exp, *tok_idx, LYXP_TOKEN_NAMETEST)) {
  ------------------
  |  |   92|     32|#define LY_PATH_PRED_LEAFREF    0x0400  /** expected predicates only leafref - [node=current()/../../../node/node];
  ------------------
  |  Branch (162:20): [True: 32, False: 0]
  |  Branch (162:54): [True: 26, False: 6]
  ------------------
  163|     26|            assert(prefix == LY_PATH_PREFIX_OPTIONAL);
  164|      0|            ret = ly_set_new(&set);
  165|     26|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|     26|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 26]
  |  |  ------------------
  ------------------
  166|       |
  167|     26|            do {
  168|       |                /* NameTest is always expected here */
  169|     26|                LY_CHECK_GOTO(lyxp_check_token(ctx, exp, *tok_idx, LYXP_TOKEN_NAMETEST), token_error);
  ------------------
  |  |  202|     26|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 26]
  |  |  ------------------
  ------------------
  170|       |
  171|     26|                name = strnstr(exp->expr + exp->tok_pos[*tok_idx], ":", exp->tok_len[*tok_idx]);
  172|     26|                if (!name) {
  ------------------
  |  Branch (172:21): [True: 18, False: 8]
  ------------------
  173|     18|                    name = exp->expr + exp->tok_pos[*tok_idx];
  174|     18|                    name_len = exp->tok_len[*tok_idx];
  175|     18|                } else {
  176|      8|                    ++name;
  177|      8|                    name_len = exp->tok_len[*tok_idx] - (name - (exp->expr + exp->tok_pos[*tok_idx]));
  178|      8|                }
  179|       |
  180|       |                /* check whether it was not already specified */
  181|     26|                for (i = 0; i < set->count; ++i) {
  ------------------
  |  Branch (181:29): [True: 0, False: 26]
  ------------------
  182|       |                    /* all the keys must be from the same module so this comparison should be fine */
  183|      0|                    if (!strncmp(set->objs[i], name, name_len) &&
  ------------------
  |  Branch (183:25): [True: 0, False: 0]
  ------------------
  184|      0|                            lysp_check_identifierchar(NULL, ((char *)set->objs[i])[name_len], 0, NULL)) {
  ------------------
  |  Branch (184:29): [True: 0, False: 0]
  ------------------
  185|      0|                        LOGVAL(ctx, LYVE_XPATH, "Duplicate predicate key \"%.*s\" in path.", (int)name_len, name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  186|      0|                        goto token_error;
  187|      0|                    }
  188|      0|                }
  189|       |
  190|       |                /* add it into the set */
  191|     26|                ret = ly_set_add(set, (void *)name, 1, NULL);
  192|     26|                LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|     26|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 26]
  |  |  ------------------
  ------------------
  193|       |
  194|       |                /* NameTest */
  195|     26|                ++(*tok_idx);
  196|       |
  197|       |                /* '=' */
  198|     26|                LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_OPER_EQUAL), token_error);
  ------------------
  |  |  202|     26|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 20, False: 6]
  |  |  ------------------
  ------------------
  199|       |
  200|       |                /* fill repeat */
  201|      6|                exp->repeat[*tok_idx - 2] = calloc(2, sizeof *exp->repeat[*tok_idx]);
  202|      6|                LY_CHECK_ERR_GOTO(!exp->repeat[*tok_idx - 2], LOGMEM(NULL); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|      6|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 6]
  |  |  ------------------
  ------------------
  203|      6|                exp->repeat[*tok_idx - 2][0] = LYXP_EXPR_EQUALITY;
  204|       |
  205|       |                /* FuncName */
  206|      6|                LY_CHECK_GOTO(lyxp_check_token(ctx, exp, *tok_idx, LYXP_TOKEN_FUNCNAME), token_error);
  ------------------
  |  |  202|      6|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 4, False: 2]
  |  |  ------------------
  ------------------
  207|      2|                if ((exp->tok_len[*tok_idx] != ly_strlen_const("current")) ||
  ------------------
  |  |  472|      2|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (207:21): [True: 1, False: 1]
  ------------------
  208|      2|                        strncmp(exp->expr + exp->tok_pos[*tok_idx], "current", ly_strlen_const("current"))) {
  ------------------
  |  |  472|      1|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (208:25): [True: 1, False: 0]
  ------------------
  209|      2|                    LOGVAL(ctx, LYVE_XPATH, "Invalid function \"%.*s\" invocation in path.",
  ------------------
  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  210|      2|                            exp->tok_len[*tok_idx], exp->expr + exp->tok_pos[*tok_idx]);
  211|      2|                    goto token_error;
  212|      2|                }
  213|      0|                ++(*tok_idx);
  214|       |
  215|       |                /* '(' */
  216|      0|                LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_PAR1), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  217|       |
  218|       |                /* ')' */
  219|      0|                LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_PAR2), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  220|       |
  221|       |                /* '/' */
  222|      0|                LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_OPER_PATH), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  223|       |
  224|       |                /* '..' */
  225|      0|                LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_DDOT), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  226|      0|                do {
  227|       |                    /* '/' */
  228|      0|                    LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_OPER_PATH), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  229|      0|                } while (!lyxp_next_token(NULL, exp, tok_idx, LYXP_TOKEN_DDOT));
  ------------------
  |  Branch (229:26): [True: 0, False: 0]
  ------------------
  230|       |
  231|       |                /* NameTest */
  232|      0|                LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_NAMETEST), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  233|       |
  234|       |                /* '/' */
  235|      0|                while (!lyxp_next_token(NULL, exp, tok_idx, LYXP_TOKEN_OPER_PATH)) {
  ------------------
  |  Branch (235:24): [True: 0, False: 0]
  ------------------
  236|       |                    /* NameTest */
  237|      0|                    LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_NAMETEST), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  238|      0|                }
  239|       |
  240|       |                /* ']' */
  241|      0|                LY_CHECK_GOTO(lyxp_next_token(ctx, exp, tok_idx, LYXP_TOKEN_BRACK2), token_error);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  242|       |
  243|       |                /* '[' */
  244|      0|            } while (!lyxp_next_token(NULL, exp, tok_idx, LYXP_TOKEN_BRACK1));
  ------------------
  |  Branch (244:22): [True: 0, False: 0]
  ------------------
  245|       |
  246|     26|        } else if (lyxp_check_token(ctx, exp, *tok_idx, 0)) {
  ------------------
  |  Branch (246:20): [True: 3, False: 3]
  ------------------
  247|       |            /* unexpected EOF */
  248|      3|            goto token_error;
  249|      3|        } else {
  250|       |            /* invalid token */
  251|      3|            LOGVAL(ctx, LY_VCODE_XP_INTOK, lyxp_token2str(exp->tokens[*tok_idx]), exp->expr + exp->tok_pos[*tok_idx]);
  ------------------
  |  |  178|      3|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  252|      3|            goto token_error;
  253|      3|        }
  254|     32|    }
  255|       |
  256|   171k|cleanup:
  257|   171k|    LOG_LOCBACK(cur_node ? 1 : 0, 0, 0, 0);
  ------------------
  |  |  152|   342k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  |  |  ------------------
  |  |  |  Branch (152:28): [True: 0, False: 171k]
  |  |  ------------------
  ------------------
  258|   171k|    ly_set_free(set, NULL);
  259|   171k|    return ret;
  260|       |
  261|     32|token_error:
  262|     32|    LOG_LOCBACK(cur_node ? 1 : 0, 0, 0, 0);
  ------------------
  |  |  152|     64|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  |  |  ------------------
  |  |  |  Branch (152:28): [True: 0, False: 32]
  |  |  ------------------
  ------------------
  263|     32|    ly_set_free(set, NULL);
  264|     32|    return LY_EVALID;
  265|   171k|}
path.c:ly_path_compile_snode:
  515|   281k|{
  516|   281k|    LY_ERR ret;
  517|   281k|    const struct lys_module *mod = NULL;
  518|   281k|    struct lysc_ext_instance *e = NULL;
  519|   281k|    const char *pref, *name;
  520|   281k|    size_t len, name_len;
  521|       |
  522|   281k|    assert(expr->tokens[tok_idx] == LYXP_TOKEN_NAMETEST);
  523|       |
  524|      0|    *snode = NULL;
  525|   281k|    if (ext) {
  ------------------
  |  Branch (525:9): [True: 281k, False: 0]
  ------------------
  526|   281k|        *ext = NULL;
  527|   281k|    }
  528|       |
  529|       |    /* get prefix */
  530|   281k|    if ((pref = strnstr(expr->expr + expr->tok_pos[tok_idx], ":", expr->tok_len[tok_idx]))) {
  ------------------
  |  Branch (530:9): [True: 112k, False: 168k]
  ------------------
  531|   112k|        len = pref - (expr->expr + expr->tok_pos[tok_idx]);
  532|   112k|        pref = expr->expr + expr->tok_pos[tok_idx];
  533|   168k|    } else {
  534|   168k|        len = 0;
  535|   168k|    }
  536|       |
  537|       |    /* set name */
  538|   281k|    if (pref) {
  ------------------
  |  Branch (538:9): [True: 112k, False: 168k]
  ------------------
  539|   112k|        name = pref + len + 1;
  540|   112k|        name_len = expr->tok_len[tok_idx] - len - 1;
  541|   168k|    } else {
  542|   168k|        name = expr->expr + expr->tok_pos[tok_idx];
  543|   168k|        name_len = expr->tok_len[tok_idx];
  544|   168k|    }
  545|       |
  546|       |    /* find node module */
  547|   281k|    if (pref) {
  ------------------
  |  Branch (547:9): [True: 112k, False: 168k]
  ------------------
  548|   112k|        LOG_LOCSET(cur_node, NULL, NULL, NULL);
  ------------------
  |  |  141|   112k|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
  549|       |
  550|   112k|        mod = ly_resolve_prefix(prev_ctx_node ? prev_ctx_node->module->ctx : ctx, pref, len, format, prefix_data);
  ------------------
  |  Branch (550:33): [True: 56.2k, False: 56.2k]
  ------------------
  551|   112k|        if ((!mod || !mod->implemented) && prev_ctx_node) {
  ------------------
  |  Branch (551:14): [True: 0, False: 112k]
  |  Branch (551:22): [True: 0, False: 112k]
  |  Branch (551:44): [True: 0, False: 0]
  ------------------
  552|       |            /* check for nested ext data */
  553|      0|            ret = ly_nested_ext_schema(NULL, prev_ctx_node, pref, len, format, prefix_data, name, name_len, snode, &e);
  554|      0|            if (!ret) {
  ------------------
  |  Branch (554:17): [True: 0, False: 0]
  ------------------
  555|      0|                goto success;
  556|      0|            } else if (ret != LY_ENOT) {
  ------------------
  |  Branch (556:24): [True: 0, False: 0]
  ------------------
  557|      0|                goto error;
  558|      0|            }
  559|      0|        }
  560|       |
  561|   112k|        if (!mod) {
  ------------------
  |  Branch (561:13): [True: 0, False: 112k]
  ------------------
  562|      0|            LOGVAL(ctx, LYVE_XPATH, "No module connected with the prefix \"%.*s\" found (prefix format %s).",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  563|      0|                    (int)len, pref, ly_format2str(format));
  564|      0|            ret = LY_EVALID;
  565|      0|            goto error;
  566|   112k|        } else if (!mod->implemented) {
  ------------------
  |  Branch (566:20): [True: 0, False: 112k]
  ------------------
  567|      0|            LOGVAL(ctx, LYVE_XPATH, "Not implemented module \"%s\" in path.", mod->name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  568|      0|            ret = LY_EVALID;
  569|      0|            goto error;
  570|      0|        }
  571|       |
  572|   112k|        LOG_LOCBACK(cur_node ? 1 : 0, 0, 0, 0);
  ------------------
  |  |  152|   224k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  |  |  ------------------
  |  |  |  Branch (152:28): [True: 112k, False: 0]
  |  |  ------------------
  ------------------
  573|   168k|    } else {
  574|   168k|        switch (format) {
  ------------------
  |  Branch (574:17): [True: 0, False: 168k]
  ------------------
  575|      0|        case LY_VALUE_SCHEMA:
  ------------------
  |  Branch (575:9): [True: 0, False: 168k]
  ------------------
  576|   168k|        case LY_VALUE_SCHEMA_RESOLVED:
  ------------------
  |  Branch (576:9): [True: 168k, False: 0]
  ------------------
  577|   168k|            if (!cur_mod) {
  ------------------
  |  Branch (577:17): [True: 0, False: 168k]
  ------------------
  578|      0|                LOGINT_RET(ctx);
  ------------------
  |  |  196|      0|#define LOGINT_RET(CTX) LOGINT(CTX); return LY_EINT
  |  |  ------------------
  |  |  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|      0|            }
  580|       |            /* use current module */
  581|   168k|            mod = cur_mod;
  582|   168k|            break;
  583|      0|        case LY_VALUE_JSON:
  ------------------
  |  Branch (583:9): [True: 0, False: 168k]
  ------------------
  584|      0|        case LY_VALUE_LYB:
  ------------------
  |  Branch (584:9): [True: 0, False: 168k]
  ------------------
  585|      0|            if (!prev_ctx_node) {
  ------------------
  |  Branch (585:17): [True: 0, False: 0]
  ------------------
  586|      0|                LOGINT_RET(ctx);
  ------------------
  |  |  196|      0|#define LOGINT_RET(CTX) LOGINT(CTX); return LY_EINT
  |  |  ------------------
  |  |  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  587|      0|            }
  588|       |            /* inherit module of the previous node */
  589|      0|            mod = prev_ctx_node->module;
  590|      0|            break;
  591|      0|        case LY_VALUE_CANON:
  ------------------
  |  Branch (591:9): [True: 0, False: 168k]
  ------------------
  592|      0|        case LY_VALUE_XML:
  ------------------
  |  Branch (592:9): [True: 0, False: 168k]
  ------------------
  593|      0|        case LY_VALUE_STR_NS:
  ------------------
  |  Branch (593:9): [True: 0, False: 168k]
  ------------------
  594|       |            /* not really defined or accepted */
  595|      0|            LOGINT_RET(ctx);
  ------------------
  |  |  196|      0|#define LOGINT_RET(CTX) LOGINT(CTX); return LY_EINT
  |  |  ------------------
  |  |  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  596|   168k|        }
  597|   168k|    }
  598|       |
  599|       |    /* find schema node */
  600|   281k|    if (!prev_ctx_node && top_ext) {
  ------------------
  |  Branch (600:9): [True: 56.2k, False: 224k]
  |  Branch (600:27): [True: 0, False: 56.2k]
  ------------------
  601|      0|        *snode = lysc_ext_find_node(top_ext, mod, name, name_len, 0, getnext_opts);
  602|   281k|    } else {
  603|   281k|        *snode = lys_find_child(prev_ctx_node, mod, name, name_len, 0, getnext_opts);
  604|   281k|        if (!(*snode) && prev_ctx_node) {
  ------------------
  |  Branch (604:13): [True: 0, False: 281k]
  |  Branch (604:26): [True: 0, False: 0]
  ------------------
  605|      0|            ret = ly_nested_ext_schema(NULL, prev_ctx_node, pref, len, format, prefix_data, name, name_len, snode, &e);
  606|      0|            LY_CHECK_RET(ret && (ret != LY_ENOT), ret);
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|      0|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:42): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (205:42): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  607|      0|        }
  608|   281k|    }
  609|   281k|    if (!(*snode)) {
  ------------------
  |  Branch (609:9): [True: 0, False: 281k]
  ------------------
  610|      0|        LOGVAL(ctx, LYVE_XPATH, "Not found node \"%.*s\" in path.", (int)name_len, name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  611|      0|        return LY_ENOTFOUND;
  612|      0|    }
  613|       |
  614|   281k|success:
  615|   281k|    if (ext) {
  ------------------
  |  Branch (615:9): [True: 281k, False: 0]
  ------------------
  616|   281k|        *ext = e;
  617|   281k|    }
  618|   281k|    return LY_SUCCESS;
  619|       |
  620|      0|error:
  621|      0|    LOG_LOCBACK(cur_node ? 1 : 0, 0, 0, 0);
  ------------------
  |  |  152|      0|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  |  |  ------------------
  |  |  |  Branch (152:28): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  622|      0|    return ret;
  623|   281k|}
path.c:_ly_path_compile:
 1140|   140k|{
 1141|   140k|    LY_ERR ret = LY_SUCCESS;
 1142|   140k|    uint32_t tok_idx = 0, getnext_opts;
 1143|   140k|    const struct lysc_node *node2, *cur_node, *op;
 1144|   140k|    struct ly_path *p = NULL;
 1145|   140k|    struct lysc_ext_instance *ext = NULL;
 1146|       |
 1147|   140k|    assert(ctx);
 1148|      0|    assert(!lref || ctx_node);
 1149|      0|    assert((oper == LY_PATH_OPER_INPUT) || (oper == LY_PATH_OPER_OUTPUT));
 1150|      0|    assert((target == LY_PATH_TARGET_SINGLE) || (target == LY_PATH_TARGET_MANY));
 1151|       |
 1152|   140k|    if (!limit_access_tree) {
  ------------------
  |  Branch (1152:9): [True: 0, False: 140k]
  ------------------
 1153|      0|        op = NULL;
 1154|   140k|    } else {
 1155|       |        /* find operation, if we are in any */
 1156|   477k|        for (op = ctx_node; op && !(op->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)); op = op->parent) {}
  ------------------
  |  |  249|   393k|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
                      for (op = ctx_node; op && !(op->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)); op = op->parent) {}
  ------------------
  |  |  250|   393k|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
                      for (op = ctx_node; op && !(op->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)); op = op->parent) {}
  ------------------
  |  |  251|   393k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (1156:29): [True: 393k, False: 84.3k]
  |  Branch (1156:35): [True: 337k, False: 56.2k]
  ------------------
 1157|   140k|    }
 1158|       |
 1159|   140k|    *path = NULL;
 1160|       |
 1161|       |    /* remember original context node */
 1162|   140k|    cur_node = ctx_node;
 1163|   140k|    LOG_LOCSET(cur_node, NULL, NULL, NULL);
  ------------------
  |  |  141|   140k|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 1164|       |
 1165|   140k|    if (oper == LY_PATH_OPER_OUTPUT) {
  ------------------
  |  |  133|   140k|#define LY_PATH_OPER_OUTPUT 0x02    /**< if any RPC/action is traversed, its output nodes are used */
  ------------------
  |  Branch (1165:9): [True: 0, False: 140k]
  ------------------
 1166|      0|        getnext_opts = LYS_GETNEXT_OUTPUT;
  ------------------
  |  | 2192|      0|#define LYS_GETNEXT_OUTPUT       0x10 /**< ::lys_getnext() option to provide RPC's/action's output schema nodes instead of input schema nodes
  ------------------
 1167|   140k|    } else {
 1168|   140k|        getnext_opts = 0;
 1169|   140k|    }
 1170|       |
 1171|   140k|    if (lref && (ly_ctx_get_options(ctx) & LY_CTX_LEAFREF_EXTENDED) &&
  ------------------
  |  |  200|   140k|#define LY_CTX_LEAFREF_EXTENDED 0x0200 /**< By default, path attribute of leafref accepts only path as defined in RFC 7950.
  ------------------
  |  Branch (1171:9): [True: 140k, False: 0]
  |  Branch (1171:17): [True: 0, False: 140k]
  ------------------
 1172|   140k|            (expr->tokens[tok_idx] == LYXP_TOKEN_FUNCNAME)) {
  ------------------
  |  Branch (1172:13): [True: 0, False: 0]
  ------------------
 1173|       |        /* deref function */
 1174|      0|        ret = ly_path_compile_deref(ctx, ctx_node, top_ext, expr, oper, target, format, prefix_data, &tok_idx, path);
 1175|      0|        ctx_node = (*path)[LY_ARRAY_COUNT(*path) - 1].node;
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1176|      0|        goto cleanup;
 1177|   140k|    } else if (expr->tokens[tok_idx] == LYXP_TOKEN_OPER_PATH) {
  ------------------
  |  Branch (1177:16): [True: 56.2k, False: 84.3k]
  ------------------
 1178|       |        /* absolute path */
 1179|  56.2k|        ctx_node = NULL;
 1180|       |
 1181|  56.2k|        ++tok_idx;
 1182|  84.3k|    } else {
 1183|       |        /* relative path */
 1184|  84.3k|        if (!ctx_node) {
  ------------------
  |  Branch (1184:13): [True: 0, False: 84.3k]
  ------------------
 1185|      0|            LOGVAL(ctx, LYVE_XPATH, "No initial schema parent for a relative path.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1186|      0|            ret = LY_EVALID;
 1187|      0|            goto cleanup;
 1188|      0|        }
 1189|       |
 1190|       |        /* go up the parents for leafref */
 1191|   253k|        while (lref && (expr->tokens[tok_idx] == LYXP_TOKEN_DDOT)) {
  ------------------
  |  Branch (1191:16): [True: 253k, False: 0]
  |  Branch (1191:24): [True: 168k, False: 84.3k]
  ------------------
 1192|   168k|            if (!ctx_node) {
  ------------------
  |  Branch (1192:17): [True: 0, False: 168k]
  ------------------
 1193|      0|                LOGVAL(ctx, LYVE_XPATH, "Too many parent references in path.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1194|      0|                ret = LY_EVALID;
 1195|      0|                goto cleanup;
 1196|      0|            }
 1197|       |
 1198|       |            /* get parent */
 1199|   168k|            ctx_node = lysc_data_parent(ctx_node);
  ------------------
  |  | 1780|   168k|#define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
  |  |  ------------------
  |  |  |  Branch (1780:49): [True: 168k, False: 0]
  |  |  ------------------
  ------------------
 1200|       |
 1201|   168k|            ++tok_idx;
 1202|       |
 1203|   168k|            assert(expr->tokens[tok_idx] == LYXP_TOKEN_OPER_PATH);
 1204|      0|            ++tok_idx;
 1205|   168k|        }
 1206|  84.3k|    }
 1207|       |
 1208|   281k|    do {
 1209|       |        /* check last compiled inner node, whether it is uniquely identified (even key-less list) */
 1210|   281k|        if (p && !lref && (target == LY_PATH_TARGET_SINGLE) && (p->node->nodetype == LYS_LIST) && !p->predicates) {
  ------------------
  |  |  142|      0|#define LY_PATH_TARGET_SINGLE  0x10    /**< last (target) node must identify an exact instance */
  ------------------
                      if (p && !lref && (target == LY_PATH_TARGET_SINGLE) && (p->node->nodetype == LYS_LIST) && !p->predicates) {
  ------------------
  |  |  244|      0|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (1210:13): [True: 140k, False: 140k]
  |  Branch (1210:18): [True: 0, False: 140k]
  |  Branch (1210:27): [True: 0, False: 0]
  |  Branch (1210:64): [True: 0, False: 0]
  |  Branch (1210:99): [True: 0, False: 0]
  ------------------
 1211|      0|            LOGVAL(ctx, LYVE_XPATH, "Predicate missing for %s \"%s\" in path.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1212|      0|                    lys_nodetype2str(p->node->nodetype), p->node->name);
 1213|      0|            ret = LY_EVALID;
 1214|      0|            goto cleanup;
 1215|      0|        }
 1216|       |
 1217|       |        /* NameTest */
 1218|   281k|        LY_CHECK_ERR_GOTO(lyxp_check_token(ctx, expr, tok_idx, LYXP_TOKEN_NAMETEST), ret = LY_EVALID, cleanup);
  ------------------
  |  |  203|   281k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 281k]
  |  |  ------------------
  ------------------
 1219|       |
 1220|       |        /* get schema node */
 1221|   281k|        LY_CHECK_GOTO(ret = ly_path_compile_snode(ctx, cur_node, cur_mod, ctx_node, expr, tok_idx, format, prefix_data,
  ------------------
  |  |  202|   281k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 281k]
  |  |  ------------------
  ------------------
 1222|   281k|                top_ext, getnext_opts, &node2, &ext), cleanup);
 1223|   281k|        ++tok_idx;
 1224|   281k|        if ((op && (node2->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)) && (node2 != op))) {
  ------------------
  |  |  249|   112k|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
                      if ((op && (node2->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)) && (node2 != op))) {
  ------------------
  |  |  250|   112k|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
                      if ((op && (node2->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)) && (node2 != op))) {
  ------------------
  |  |  251|   112k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (1224:14): [True: 112k, False: 168k]
  |  Branch (1224:20): [True: 0, False: 112k]
  |  Branch (1224:78): [True: 0, False: 0]
  ------------------
 1225|      0|            LOGVAL(ctx, LYVE_XPATH, "Not found node \"%s\" in path.", node2->name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1226|      0|            ret = LY_EVALID;
 1227|      0|            goto cleanup;
 1228|      0|        }
 1229|   281k|        ctx_node = node2;
 1230|       |
 1231|       |        /* new path segment */
 1232|   281k|        LY_ARRAY_NEW_GOTO(ctx, *path, p, ret, cleanup);
  ------------------
  |  |  113|   281k|    LY_ARRAY_NEW(CTX, ARRAY, RET = LY_EMEM; goto GOTO); \
  |  |  ------------------
  |  |  |  |   61|   281k|    { \
  |  |  |  |   62|   281k|        char *p__; \
  |  |  |  |   63|   281k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 140k, False: 140k]
  |  |  |  |  ------------------
  |  |  |  |   64|   140k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|   140k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|   140k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|   140k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 140k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|   140k|        } else { \
  |  |  |  |   73|   140k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|   140k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 140k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|   140k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|   140k|        } \
  |  |  |  |   80|   281k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   281k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   281k|    }
  |  |  ------------------
  |  |  114|   281k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |  115|   281k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1233|   281k|        p->node = ctx_node;
 1234|   281k|        p->ext = ext;
 1235|       |
 1236|       |        /* compile any predicates */
 1237|   281k|        if (lref) {
  ------------------
  |  Branch (1237:13): [True: 281k, False: 0]
  ------------------
 1238|   281k|            ret = ly_path_compile_predicate_leafref(ctx_node, cur_node, expr, &tok_idx, format, prefix_data);
 1239|   281k|        } else {
 1240|      0|            ret = ly_path_compile_predicate(ctx, cur_node, cur_mod, ctx_node, expr, &tok_idx, format, prefix_data,
 1241|      0|                    &p->predicates);
 1242|      0|        }
 1243|   281k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   281k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 281k]
  |  |  ------------------
  ------------------
 1244|   281k|    } while (!lyxp_next_token(NULL, expr, &tok_idx, LYXP_TOKEN_OPER_PATH));
  ------------------
  |  Branch (1244:14): [True: 140k, False: 140k]
  ------------------
 1245|       |
 1246|       |    /* check leftover tokens */
 1247|   140k|    if (tok_idx < expr->used) {
  ------------------
  |  Branch (1247:9): [True: 0, False: 140k]
  ------------------
 1248|      0|        LOGVAL(ctx, LY_VCODE_XP_INTOK, lyxp_token2str(expr->tokens[tok_idx]), &expr->expr[expr->tok_pos[tok_idx]]);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1249|      0|        ret = LY_EVALID;
 1250|      0|        goto cleanup;
 1251|      0|    }
 1252|       |
 1253|       |    /* check last compiled node */
 1254|   140k|    if (!lref && (target == LY_PATH_TARGET_SINGLE) && (p->node->nodetype & (LYS_LIST | LYS_LEAFLIST)) && !p->predicates) {
  ------------------
  |  |  142|      0|#define LY_PATH_TARGET_SINGLE  0x10    /**< last (target) node must identify an exact instance */
  ------------------
                  if (!lref && (target == LY_PATH_TARGET_SINGLE) && (p->node->nodetype & (LYS_LIST | LYS_LEAFLIST)) && !p->predicates) {
  ------------------
  |  |  244|      0|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
                  if (!lref && (target == LY_PATH_TARGET_SINGLE) && (p->node->nodetype & (LYS_LIST | LYS_LEAFLIST)) && !p->predicates) {
  ------------------
  |  |  243|      0|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (1254:9): [True: 0, False: 140k]
  |  Branch (1254:18): [True: 0, False: 0]
  |  Branch (1254:55): [True: 0, False: 0]
  |  Branch (1254:106): [True: 0, False: 0]
  ------------------
 1255|      0|        LOGVAL(ctx, LYVE_XPATH, "Predicate missing for %s \"%s\" in path.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1256|      0|                lys_nodetype2str(p->node->nodetype), p->node->name);
 1257|      0|        ret = LY_EVALID;
 1258|      0|        goto cleanup;
 1259|      0|    }
 1260|       |
 1261|   140k|cleanup:
 1262|   140k|    if (ret) {
  ------------------
  |  Branch (1262:9): [True: 0, False: 140k]
  ------------------
 1263|      0|        ly_path_free(ctx, *path);
 1264|      0|        *path = NULL;
 1265|      0|    }
 1266|   140k|    LOG_LOCBACK(1, 0, 0, 0);
  ------------------
  |  |  152|   140k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1267|   140k|    return (ret == LY_ENOTFOUND) ? LY_EVALID : ret;
  ------------------
  |  Branch (1267:12): [True: 0, False: 140k]
  ------------------
 1268|   140k|}
path.c:ly_path_compile_predicate_leafref:
  823|   281k|{
  824|   281k|    LY_ERR ret = LY_SUCCESS;
  825|   281k|    const struct lysc_node *key, *node, *node2;
  826|   281k|    struct ly_ctx *ctx = cur_node->module->ctx;
  827|       |
  828|   281k|    if (lyxp_next_token(NULL, expr, tok_idx, LYXP_TOKEN_BRACK1)) {
  ------------------
  |  Branch (828:9): [True: 281k, False: 0]
  ------------------
  829|       |        /* '[', no predicate */
  830|   281k|        goto cleanup; /* LY_SUCCESS */
  831|   281k|    }
  832|       |
  833|      0|    if (ctx_node->nodetype != LYS_LIST) {
  ------------------
  |  |  244|      0|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (833:9): [True: 0, False: 0]
  ------------------
  834|      0|        LOGVAL(ctx, LYVE_XPATH, "List predicate defined for %s \"%s\" in path.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  835|      0|                lys_nodetype2str(ctx_node->nodetype), ctx_node->name);
  836|      0|        ret = LY_EVALID;
  837|      0|        goto cleanup;
  838|      0|    } else if (ctx_node->flags & LYS_KEYLESS) {
  ------------------
  |  |  672|      0|#define LYS_KEYLESS      0x0200      /**< flag for list without any key, applicable only to ::lysc_node_list */
  ------------------
  |  Branch (838:16): [True: 0, False: 0]
  ------------------
  839|      0|        LOGVAL(ctx, LYVE_XPATH, "List predicate defined for keyless %s \"%s\" in path.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  840|      0|                lys_nodetype2str(ctx_node->nodetype), ctx_node->name);
  841|      0|        ret = LY_EVALID;
  842|      0|        goto cleanup;
  843|      0|    }
  844|       |
  845|      0|    do {
  846|       |        /* NameTest, find the key */
  847|      0|        ret = ly_path_compile_snode(ctx, cur_node, cur_node->module, ctx_node, expr, *tok_idx, format, prefix_data,
  848|      0|                NULL, 0, &key, NULL);
  849|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  850|      0|        if ((key->nodetype != LYS_LEAF) || !(key->flags & LYS_KEY)) {
  ------------------
  |  |  242|      0|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
                      if ((key->nodetype != LYS_LEAF) || !(key->flags & LYS_KEY)) {
  ------------------
  |  |  671|      0|#define LYS_KEY          0x0100      /**< flag for leafs being a key of a list, applicable only to ::lysc_node_leaf */
  ------------------
  |  Branch (850:13): [True: 0, False: 0]
  |  Branch (850:44): [True: 0, False: 0]
  ------------------
  851|      0|            LOGVAL(ctx, LYVE_XPATH, "Key expected instead of %s \"%s\" in path.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  852|      0|                    lys_nodetype2str(key->nodetype), key->name);
  853|      0|            ret = LY_EVALID;
  854|      0|            goto cleanup;
  855|      0|        }
  856|      0|        ++(*tok_idx);
  857|       |
  858|       |        /* we are not actually compiling, throw the key away */
  859|      0|        (void)key;
  860|       |
  861|       |        /* '=' */
  862|      0|        assert(expr->tokens[*tok_idx] == LYXP_TOKEN_OPER_EQUAL);
  863|      0|        ++(*tok_idx);
  864|       |
  865|       |        /* FuncName */
  866|      0|        assert(expr->tokens[*tok_idx] == LYXP_TOKEN_FUNCNAME);
  867|      0|        ++(*tok_idx);
  868|       |
  869|       |        /* evaluating from the "current()" node */
  870|      0|        node = cur_node;
  871|       |
  872|       |        /* '(' */
  873|      0|        assert(expr->tokens[*tok_idx] == LYXP_TOKEN_PAR1);
  874|      0|        ++(*tok_idx);
  875|       |
  876|       |        /* ')' */
  877|      0|        assert(expr->tokens[*tok_idx] == LYXP_TOKEN_PAR2);
  878|      0|        ++(*tok_idx);
  879|       |
  880|      0|        do {
  881|       |            /* '/' */
  882|      0|            assert(expr->tokens[*tok_idx] == LYXP_TOKEN_OPER_PATH);
  883|      0|            ++(*tok_idx);
  884|       |
  885|       |            /* go to parent */
  886|      0|            if (!node) {
  ------------------
  |  Branch (886:17): [True: 0, False: 0]
  ------------------
  887|      0|                LOGVAL(ctx, LYVE_XPATH, "Too many parent references in path.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  888|      0|                ret = LY_EVALID;
  889|      0|                goto cleanup;
  890|      0|            }
  891|      0|            node = lysc_data_parent(node);
  ------------------
  |  | 1780|      0|#define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
  |  |  ------------------
  |  |  |  Branch (1780:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  892|       |
  893|       |            /* '..' */
  894|      0|            assert(expr->tokens[*tok_idx] == LYXP_TOKEN_DDOT);
  895|      0|            ++(*tok_idx);
  896|      0|        } while (expr->tokens[*tok_idx + 1] == LYXP_TOKEN_DDOT);
  ------------------
  |  Branch (896:18): [True: 0, False: 0]
  ------------------
  897|       |
  898|      0|        do {
  899|       |            /* '/' */
  900|      0|            assert(expr->tokens[*tok_idx] == LYXP_TOKEN_OPER_PATH);
  901|      0|            ++(*tok_idx);
  902|       |
  903|       |            /* NameTest */
  904|      0|            assert(expr->tokens[*tok_idx] == LYXP_TOKEN_NAMETEST);
  905|      0|            LY_CHECK_RET(ly_path_compile_snode(ctx, cur_node, cur_node->module, node, expr, *tok_idx, format,
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  906|      0|                    prefix_data, NULL, 0, &node2, NULL));
  907|      0|            node = node2;
  908|      0|            ++(*tok_idx);
  909|      0|        } while ((*tok_idx + 1 < expr->used) && (expr->tokens[*tok_idx + 1] == LYXP_TOKEN_NAMETEST));
  ------------------
  |  Branch (909:18): [True: 0, False: 0]
  |  Branch (909:49): [True: 0, False: 0]
  ------------------
  910|       |
  911|       |        /* check the last target node */
  912|      0|        if (node->nodetype != LYS_LEAF) {
  ------------------
  |  |  242|      0|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
  |  Branch (912:13): [True: 0, False: 0]
  ------------------
  913|      0|            LOGVAL(ctx, LYVE_XPATH, "Leaf expected instead of %s \"%s\" in leafref predicate in path.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  914|      0|                    lys_nodetype2str(node->nodetype), node->name);
  915|      0|            ret = LY_EVALID;
  916|      0|            goto cleanup;
  917|      0|        }
  918|       |
  919|       |        /* we are not actually compiling, throw the rightside node away */
  920|      0|        (void)node;
  921|       |
  922|       |        /* ']' */
  923|      0|        assert(expr->tokens[*tok_idx] == LYXP_TOKEN_BRACK2);
  924|      0|        ++(*tok_idx);
  925|       |
  926|       |        /* another predicate follows? */
  927|      0|    } while (!lyxp_next_token(NULL, expr, tok_idx, LYXP_TOKEN_BRACK1));
  ------------------
  |  Branch (927:14): [True: 0, False: 0]
  ------------------
  928|       |
  929|   281k|cleanup:
  930|   281k|    return (ret == LY_ENOTFOUND) ? LY_EVALID : ret;
  ------------------
  |  Branch (930:12): [True: 0, False: 281k]
  ------------------
  931|      0|}

lyplg_type_plugin_find:
  176|   618k|{
  177|   618k|    struct lyplg_record *record;
  178|       |
  179|   618k|    record = lyplg_record_find(LYPLG_TYPE, module, revision, name);
  180|   618k|    return record ? &((struct lyplg_type_record *)record)->plugin : NULL;
  ------------------
  |  Branch (180:12): [True: 562k, False: 56.2k]
  ------------------
  181|   618k|}
lyplg_ext_record_find:
  185|   126k|{
  186|   126k|    return lyplg_record_find(LYPLG_EXTENSION, module, revision, name);
  187|   126k|}
lyplg_clean:
  247|  14.0k|{
  248|       |#ifndef STATIC
  249|       |    pthread_mutex_lock(&plugins_guard);
  250|       |    lyplg_clean_();
  251|       |    pthread_mutex_unlock(&plugins_guard);
  252|       |#endif
  253|  14.0k|}
lyplg_init:
  440|  14.0k|{
  441|  14.0k|    LY_ERR ret;
  442|       |
  443|  14.0k|    pthread_mutex_lock(&plugins_guard);
  444|       |    /* let only the first context to initiate plugins, but let others wait for finishing the initiation */
  445|  14.0k|    if (context_refcount++) {
  ------------------
  |  Branch (445:9): [True: 14.0k, False: 1]
  ------------------
  446|       |        /* already initiated */
  447|  14.0k|        pthread_mutex_unlock(&plugins_guard);
  448|  14.0k|        return LY_SUCCESS;
  449|  14.0k|    }
  450|       |
  451|       |    /* internal types */
  452|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_binary), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  453|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_bits), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  454|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_boolean), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  455|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_decimal64), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  456|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_empty), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  457|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_enumeration), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  458|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_identityref), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  459|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_instanceid), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  460|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_integer), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  461|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_leafref), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  462|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_string), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  463|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_union), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  464|       |
  465|       |    /* yang */
  466|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_instanceid_keys), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  467|       |
  468|       |    /* ietf-inet-types */
  469|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_ipv4_address), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  470|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_ipv4_address_no_zone), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  471|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_ipv6_address), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  472|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_ipv6_address_no_zone), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  473|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_ipv4_prefix), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  474|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_ipv6_prefix), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  475|       |
  476|       |    /* ietf-yang-types */
  477|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_date_and_time), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  478|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_xpath10), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  479|       |
  480|       |    /* ietf-netconf-acm */
  481|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_TYPE, plugins_node_instanceid), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  482|       |
  483|       |    /* internal extensions */
  484|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_EXTENSION, plugins_metadata), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  485|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_EXTENSION, plugins_nacm), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  486|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_EXTENSION, plugins_yangdata), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  487|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_EXTENSION, plugins_schema_mount), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  488|      1|    LY_CHECK_GOTO(ret = plugins_insert(LYPLG_EXTENSION, plugins_structure), error);
  ------------------
  |  |  202|      1|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  489|       |
  490|       |#ifndef STATIC
  491|       |    /* external types */
  492|       |    LY_CHECK_GOTO(ret = plugins_insert_dir(LYPLG_TYPE), error);
  493|       |
  494|       |    /* external extensions */
  495|       |    LY_CHECK_GOTO(ret = plugins_insert_dir(LYPLG_EXTENSION), error);
  496|       |#endif
  497|       |
  498|       |    /* initiation done, wake-up possibly waiting threads creating another contexts */
  499|      1|    pthread_mutex_unlock(&plugins_guard);
  500|       |
  501|      1|    return LY_SUCCESS;
  502|       |
  503|      0|error:
  504|       |    /* initiation was not successful - cleanup (and let others to try) */
  505|       |#ifndef STATIC
  506|       |    lyplg_clean_();
  507|       |#endif
  508|      0|    pthread_mutex_unlock(&plugins_guard);
  509|       |
  510|      0|    if (ret == LY_EINVAL) {
  ------------------
  |  Branch (510:9): [True: 0, False: 0]
  ------------------
  511|       |        /* all the plugins here are internal, invalid record actually means an internal libyang error */
  512|      0|        ret = LY_EINT;
  513|      0|    }
  514|      0|    return ret;
  515|      1|}
plugins.c:lyplg_record_find:
  152|   745k|{
  153|   745k|    uint32_t i = 0;
  154|   745k|    struct lyplg_record *item;
  155|       |
  156|   745k|    assert(module);
  157|      0|    assert(name);
  158|       |
  159|  10.1M|    while ((item = plugins_iter(type, &i)) != NULL) {
  ------------------
  |  Branch (159:12): [True: 10.1M, False: 56.2k]
  ------------------
  160|  10.1M|        if (!strcmp(item->module, module) && !strcmp(item->name, name)) {
  ------------------
  |  Branch (160:13): [True: 7.92M, False: 2.20M]
  |  Branch (160:46): [True: 688k, False: 7.23M]
  ------------------
  161|   688k|            if (item->revision && revision && strcmp(item->revision, revision)) {
  ------------------
  |  Branch (161:17): [True: 140k, False: 548k]
  |  Branch (161:35): [True: 140k, False: 0]
  |  Branch (161:47): [True: 0, False: 140k]
  ------------------
  162|      0|                continue;
  163|   688k|            } else if (!revision && item->revision) {
  ------------------
  |  Branch (163:24): [True: 534k, False: 154k]
  |  Branch (163:37): [True: 0, False: 534k]
  ------------------
  164|      0|                continue;
  165|      0|            }
  166|       |
  167|   688k|            return item;
  168|   688k|        }
  169|  10.1M|    }
  170|       |
  171|  56.2k|    return NULL;
  172|   745k|}
plugins.c:plugins_iter:
  131|  10.1M|{
  132|  10.1M|    struct ly_set *plugins;
  133|       |
  134|  10.1M|    assert(index);
  135|       |
  136|  10.1M|    if (type == LYPLG_EXTENSION) {
  ------------------
  |  Branch (136:9): [True: 126k, False: 10.0M]
  ------------------
  137|   126k|        plugins = &plugins_extensions;
  138|  10.0M|    } else {
  139|  10.0M|        plugins = &plugins_types;
  140|  10.0M|    }
  141|       |
  142|  10.1M|    if (*index == plugins->count) {
  ------------------
  |  Branch (142:9): [True: 56.2k, False: 10.1M]
  ------------------
  143|  56.2k|        return NULL;
  144|  56.2k|    }
  145|       |
  146|  10.1M|    *index += 1;
  147|  10.1M|    return plugins->objs[*index - 1];
  148|  10.1M|}
plugins.c:plugins_insert:
  200|     27|{
  201|     27|    if (!recs) {
  ------------------
  |  Branch (201:9): [True: 0, False: 27]
  ------------------
  202|      0|        return LY_SUCCESS;
  203|      0|    }
  204|       |
  205|     27|    if (type == LYPLG_EXTENSION) {
  ------------------
  |  Branch (205:9): [True: 5, False: 22]
  ------------------
  206|      5|        const struct lyplg_ext_record *rec = (const struct lyplg_ext_record *)recs;
  207|       |
  208|     14|        for (uint32_t i = 0; rec[i].name; i++) {
  ------------------
  |  Branch (208:30): [True: 9, False: 5]
  ------------------
  209|      9|            LY_CHECK_RET(ly_set_add(&plugins_extensions, (void *)&rec[i], 0, NULL));
  ------------------
  |  |  206|      9|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      9|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      9|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      9|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 9]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|      9|        }
  211|     22|    } else { /* LYPLG_TYPE */
  212|     22|        const struct lyplg_type_record *rec = (const struct lyplg_type_record *)recs;
  213|       |
  214|     52|        for (uint32_t i = 0; rec[i].name; i++) {
  ------------------
  |  Branch (214:30): [True: 30, False: 22]
  ------------------
  215|     30|            LY_CHECK_RET(ly_set_add(&plugins_types, (void *)&rec[i], 0, NULL));
  ------------------
  |  |  206|     30|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|     30|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     30|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|     30|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 30]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  216|     30|        }
  217|     22|    }
  218|       |
  219|     27|    return LY_SUCCESS;
  220|     27|}

lyplg_ext_parse_extension_instance:
   40|   126k|{
   41|   126k|    LY_ERR rc = LY_SUCCESS;
   42|   126k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
   43|   126k|    struct lysp_stmt *stmt;
   44|       |
   45|       |    /* check for invalid substatements */
   46|   309k|    LY_LIST_FOR(ext->child, stmt) {
  ------------------
  |  |  181|   126k|    for ((ELEM) = (START); \
  |  |  182|   435k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 309k, False: 126k]
  |  |  ------------------
  |  |  183|   309k|         (ELEM) = (ELEM)->next)
  ------------------
   47|   309k|        if (stmt->flags & (LYS_YIN_ATTR | LYS_YIN_ARGUMENT)) {
  ------------------
  |  |  711|   309k|#define LYS_YIN_ATTR     0x0400      /**< flag to identify YIN attribute parsed as extension's substatement, only when the source is YIN */
  ------------------
                      if (stmt->flags & (LYS_YIN_ATTR | LYS_YIN_ARGUMENT)) {
  ------------------
  |  |  712|   309k|#define LYS_YIN_ARGUMENT 0x0800      /**< flag to identify statement representing extension's argument, only when the source is YIN */
  ------------------
  |  Branch (47:13): [True: 0, False: 309k]
  ------------------
   48|      0|            continue;
   49|      0|        }
   50|  1.47M|        LY_ARRAY_FOR(ext->substmts, u) {
  ------------------
  |  |  167|   309k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   309k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   309k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   309k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  1.47M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  1.47M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 1.47M, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 1.47M, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  1.16M|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   51|  1.47M|            if (ext->substmts[u].stmt == stmt->kw) {
  ------------------
  |  Branch (51:17): [True: 309k, False: 1.16M]
  ------------------
   52|   309k|                break;
   53|   309k|            }
   54|  1.47M|        }
   55|   309k|        if (u == LY_ARRAY_COUNT(ext->substmts)) {
  ------------------
  |  |  148|   309k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 309k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (55:13): [True: 0, False: 309k]
  ------------------
   56|      0|            LOGVAL(PARSER_CTX(pctx), LYVE_SYNTAX_YANG, "Invalid keyword \"%s\" as a child of \"%s%s%s\" extension instance.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   57|      0|                    stmt->stmt, ext->name, ext->argument ? " " : "", ext->argument ? ext->argument : "");
   58|      0|            rc = LY_EVALID;
   59|      0|            goto cleanup;
   60|      0|        }
   61|   309k|    }
   62|       |
   63|       |    /* parse all the known statements */
   64|   759k|    LY_ARRAY_FOR(ext->substmts, u) {
  ------------------
  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   885k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   885k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 885k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 759k, False: 126k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   759k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   65|  1.85M|        LY_LIST_FOR(ext->child, stmt) {
  ------------------
  |  |  181|   759k|    for ((ELEM) = (START); \
  |  |  182|  2.61M|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 1.85M, False: 759k]
  |  |  ------------------
  |  |  183|  1.85M|         (ELEM) = (ELEM)->next)
  ------------------
   66|  1.85M|            if (ext->substmts[u].stmt != stmt->kw) {
  ------------------
  |  Branch (66:17): [True: 1.54M, False: 309k]
  ------------------
   67|  1.54M|                continue;
   68|  1.54M|            }
   69|       |
   70|   309k|            if ((rc = lys_parse_ext_instance_stmt(pctx, &ext->substmts[u], stmt))) {
  ------------------
  |  Branch (70:17): [True: 0, False: 309k]
  ------------------
   71|      0|                goto cleanup;
   72|      0|            }
   73|   309k|        }
   74|   759k|    }
   75|       |
   76|   126k|cleanup:
   77|   126k|    return rc;
   78|   126k|}
lyplg_ext_compile_extension_instance:
  325|   126k|{
  326|   126k|    LY_ERR rc = LY_SUCCESS;
  327|   126k|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  328|   126k|    enum ly_stmt stmtp;
  329|   126k|    const void *storagep;
  330|   126k|    struct ly_set storagep_compiled = {0};
  331|       |
  332|   253k|    LY_CHECK_ARG_RET(ctx ? ctx->ctx : NULL, ctx, extp, ext, LY_EINVAL);
  ------------------
  |  |  226|   126k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   126k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   126k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  219|   126k|#define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  218|   126k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|   126k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|   126k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   126k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   126k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  333|       |
  334|       |    /* note into the compile context that we are processing extension now */
  335|   126k|    ctx->ext = ext;
  336|       |
  337|   759k|    LY_ARRAY_FOR(extp->substmts, u) {
  ------------------
  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   885k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   885k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 885k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 759k, False: 126k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   759k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  338|   759k|        stmtp = extp->substmts[u].stmt;
  339|   759k|        storagep = *(void **)extp->substmts[u].storage;
  340|       |
  341|   759k|        if (!storagep || ly_set_contains(&storagep_compiled, storagep, NULL)) {
  ------------------
  |  Branch (341:13): [True: 449k, False: 309k]
  |  Branch (341:26): [True: 0, False: 309k]
  ------------------
  342|       |            /* nothing parsed or already compiled (for example, if it is a linked list of parsed nodes) */
  343|   449k|            continue;
  344|   449k|        }
  345|       |
  346|  1.47M|        LY_ARRAY_FOR(ext->substmts, v) {
  ------------------
  |  |  167|   309k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   309k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   309k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   309k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  1.47M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  1.47M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 1.47M, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 1.47M, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  1.16M|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  347|  1.47M|            if (stmtp != ext->substmts[v].stmt) {
  ------------------
  |  Branch (347:17): [True: 1.16M, False: 309k]
  ------------------
  348|  1.16M|                continue;
  349|  1.16M|            }
  350|       |
  351|   309k|            if ((rc = lys_compile_ext_instance_stmt(ctx, storagep, ext, &ext->substmts[v]))) {
  ------------------
  |  Branch (351:17): [True: 0, False: 309k]
  ------------------
  352|      0|                goto cleanup;
  353|      0|            }
  354|       |
  355|       |            /* parsed substatement compiled */
  356|   309k|            break;
  357|   309k|        }
  358|       |
  359|       |        /* compiled */
  360|   309k|        ly_set_add(&storagep_compiled, storagep, 1, NULL);
  361|   309k|    }
  362|       |
  363|   126k|cleanup:
  364|   126k|    ctx->ext = NULL;
  365|   126k|    ly_set_erase(&storagep_compiled, NULL);
  366|   126k|    return rc;
  367|   126k|}
lyplg_ext_stmt2str:
  540|  1.84k|{
  541|  1.84k|    if (stmt == LY_STMT_EXTENSION_INSTANCE) {
  ------------------
  |  Branch (541:9): [True: 50, False: 1.79k]
  ------------------
  542|     50|        return "extension instance";
  543|  1.79k|    } else {
  544|  1.79k|        return lys_stmt_str(stmt);
  545|  1.79k|    }
  546|  1.84k|}
lyplg_ext_get_storage_p:
  587|   253k|{
  588|   253k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   253k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  589|   253k|    enum ly_stmt match = 0;
  590|       |
  591|   253k|    *storage_p = NULL;
  592|       |
  593|   253k|    if (!(stmt & LY_STMT_NODE_MASK)) {
  ------------------
  |  |  135|   253k|#define LY_STMT_NODE_MASK 0xFFFF
  ------------------
  |  Branch (593:9): [True: 253k, False: 0]
  ------------------
  594|       |        /* matching a non-node statement */
  595|   253k|        match = stmt;
  596|   253k|    }
  597|       |
  598|   632k|    LY_ARRAY_FOR(ext->substmts, u) {
  ------------------
  |  |  167|   253k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   253k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   253k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   253k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   632k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   632k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 632k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 632k, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   379k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  599|   632k|        if ((match && (ext->substmts[u].stmt == match)) || (!match && (ext->substmts[u].stmt & stmt))) {
  ------------------
  |  Branch (599:14): [True: 632k, False: 0]
  |  Branch (599:23): [True: 253k, False: 379k]
  |  Branch (599:61): [True: 0, False: 379k]
  |  Branch (599:71): [True: 0, False: 0]
  ------------------
  600|   253k|            *storage_p = ext->substmts[u].storage;
  601|   253k|            return LY_SUCCESS;
  602|   253k|        }
  603|   632k|    }
  604|       |
  605|      0|    return LY_ENOT;
  606|   253k|}
lyplg_ext_get_storage:
  610|   253k|{
  611|   253k|    LY_ERR rc = LY_SUCCESS;
  612|   253k|    const void **s;
  613|       |
  614|       |    /* get pointer to the storage, is set even on error */
  615|   253k|    rc = lyplg_ext_get_storage_p(ext, stmt, &s);
  616|       |
  617|       |    /* assign */
  618|   253k|    if (s) {
  ------------------
  |  Branch (618:9): [True: 253k, False: 0]
  ------------------
  619|   253k|        memcpy(storage, s, storage_size);
  620|   253k|    } else {
  621|      0|        memset(storage, 0, storage_size);
  622|      0|    }
  623|       |
  624|   253k|    return rc;
  625|   253k|}
lyplg_ext_parsed_get_storage:
  629|  28.1k|{
  630|  28.1k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|  28.1k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  631|  28.1k|    const struct lysp_ext_instance *extp = NULL;
  632|  28.1k|    enum ly_stmt match = 0;
  633|  28.1k|    const void **s = NULL;
  634|       |
  635|       |    /* find the parsed ext instance */
  636|  28.1k|    LY_ARRAY_FOR(ext->module->parsed->exts, u) {
  ------------------
  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  28.1k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  28.1k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  28.1k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  28.1k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 28.1k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 28.1k, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  28.1k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  637|  28.1k|        extp = &ext->module->parsed->exts[u];
  638|       |
  639|  28.1k|        if (ext->def == extp->def->compiled) {
  ------------------
  |  Branch (639:13): [True: 28.1k, False: 0]
  ------------------
  640|  28.1k|            break;
  641|  28.1k|        }
  642|      0|        extp = NULL;
  643|      0|    }
  644|  28.1k|    assert(extp);
  645|       |
  646|  28.1k|    if (!(stmt & LY_STMT_NODE_MASK)) {
  ------------------
  |  |  135|  28.1k|#define LY_STMT_NODE_MASK 0xFFFF
  ------------------
  |  Branch (646:9): [True: 28.1k, False: 0]
  ------------------
  647|       |        /* matching a non-node statement */
  648|  28.1k|        match = stmt;
  649|  28.1k|    }
  650|       |
  651|       |    /* get the substatement */
  652|   168k|    LY_ARRAY_FOR(extp->substmts, u) {
  ------------------
  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  28.1k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  28.1k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   196k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   196k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 196k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 168k, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   168k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  653|   168k|        if ((match && (extp->substmts[u].stmt == match)) || (!match && (extp->substmts[u].stmt & stmt))) {
  ------------------
  |  Branch (653:14): [True: 168k, False: 0]
  |  Branch (653:23): [True: 0, False: 168k]
  |  Branch (653:62): [True: 0, False: 168k]
  |  Branch (653:72): [True: 0, False: 0]
  ------------------
  654|      0|            s = extp->substmts[u].storage;
  655|      0|            break;
  656|      0|        }
  657|   168k|    }
  658|       |
  659|       |    /* assign */
  660|  28.1k|    if (s) {
  ------------------
  |  Branch (660:9): [True: 0, False: 28.1k]
  ------------------
  661|      0|        memcpy(storage, s, storage_size);
  662|  28.1k|    } else {
  663|  28.1k|        memset(storage, 0, storage_size);
  664|  28.1k|    }
  665|       |
  666|  28.1k|    return LY_SUCCESS;
  667|  28.1k|}
plugins_exts.c:lys_compile_ext_instance_stmt:
   92|   309k|{
   93|   309k|    LY_ERR rc = LY_SUCCESS;
   94|   309k|    ly_bool length_restr = 0;
   95|   309k|    LY_DATA_TYPE basetype;
   96|       |
   97|   309k|    assert(parsed);
   98|       |
   99|       |    /* compilation wthout any storage */
  100|   309k|    if (substmt->stmt == LY_STMT_IF_FEATURE) {
  ------------------
  |  Branch (100:9): [True: 0, False: 309k]
  ------------------
  101|      0|        ly_bool enabled;
  102|       |
  103|       |        /* evaluate */
  104|      0|        LY_CHECK_GOTO(rc = lys_eval_iffeatures(ctx->ctx, parsed, &enabled), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  105|      0|        if (!enabled) {
  ------------------
  |  Branch (105:13): [True: 0, False: 0]
  ------------------
  106|       |            /* it is disabled, remove the whole extension instance */
  107|      0|            rc = LY_ENOT;
  108|      0|        }
  109|      0|    }
  110|       |
  111|   309k|    if (!substmt->storage) {
  ------------------
  |  Branch (111:9): [True: 0, False: 309k]
  ------------------
  112|       |        /* nothing to store */
  113|      0|        goto cleanup;
  114|      0|    }
  115|       |
  116|   309k|    switch (substmt->stmt) {
  117|      0|    case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (117:5): [True: 0, False: 309k]
  ------------------
  118|      0|    case LY_STMT_INPUT:
  ------------------
  |  Branch (118:5): [True: 0, False: 309k]
  ------------------
  119|      0|    case LY_STMT_OUTPUT:
  ------------------
  |  Branch (119:5): [True: 0, False: 309k]
  ------------------
  120|      0|    case LY_STMT_ACTION:
  ------------------
  |  Branch (120:5): [True: 0, False: 309k]
  ------------------
  121|      0|    case LY_STMT_RPC:
  ------------------
  |  Branch (121:5): [True: 0, False: 309k]
  ------------------
  122|      0|    case LY_STMT_ANYDATA:
  ------------------
  |  Branch (122:5): [True: 0, False: 309k]
  ------------------
  123|      0|    case LY_STMT_ANYXML:
  ------------------
  |  Branch (123:5): [True: 0, False: 309k]
  ------------------
  124|      0|    case LY_STMT_CASE:
  ------------------
  |  Branch (124:5): [True: 0, False: 309k]
  ------------------
  125|      0|    case LY_STMT_CHOICE:
  ------------------
  |  Branch (125:5): [True: 0, False: 309k]
  ------------------
  126|      0|    case LY_STMT_CONTAINER:
  ------------------
  |  Branch (126:5): [True: 0, False: 309k]
  ------------------
  127|      0|    case LY_STMT_LEAF:
  ------------------
  |  Branch (127:5): [True: 0, False: 309k]
  ------------------
  128|      0|    case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (128:5): [True: 0, False: 309k]
  ------------------
  129|      0|    case LY_STMT_LIST:
  ------------------
  |  Branch (129:5): [True: 0, False: 309k]
  ------------------
  130|      0|    case LY_STMT_USES: {
  ------------------
  |  Branch (130:5): [True: 0, False: 309k]
  ------------------
  131|      0|        const uint16_t flags;
  132|      0|        struct lysp_node *pnodes, *pnode;
  133|      0|        struct lysc_node *node;
  134|       |
  135|      0|        lyplg_ext_get_storage(ext, LY_STMT_STATUS, sizeof flags, (const void **)&flags);
  136|      0|        pnodes = (struct lysp_node *)parsed;
  137|       |
  138|       |        /* compile nodes */
  139|      0|        LY_LIST_FOR(pnodes, pnode) {
  ------------------
  |  |  181|      0|    for ((ELEM) = (START); \
  |  |  182|      0|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  183|      0|         (ELEM) = (ELEM)->next)
  ------------------
  140|      0|            if (pnode->nodetype & (LYS_INPUT | LYS_OUTPUT)) {
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
                          if (pnode->nodetype & (LYS_INPUT | LYS_OUTPUT)) {
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (140:17): [True: 0, False: 0]
  ------------------
  141|       |                /* manual compile */
  142|      0|                node = calloc(1, sizeof(struct lysc_node_action_inout));
  143|      0|                LY_CHECK_ERR_GOTO(!node, LOGMEM(ctx->ctx); rc = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  144|      0|                LY_CHECK_GOTO(rc = lys_compile_node_action_inout(ctx, pnode, node), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  145|      0|                LY_CHECK_GOTO(rc = lys_compile_node_connect(ctx, NULL, node), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  146|      0|            } else {
  147|       |                /* ctx->ext substatement storage is used as the document root */
  148|      0|                LY_CHECK_GOTO(rc = lys_compile_node(ctx, pnode, NULL, flags, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  149|      0|            }
  150|      0|        }
  151|      0|        break;
  152|      0|    }
  153|      0|    case LY_STMT_ARGUMENT:
  ------------------
  |  Branch (153:5): [True: 0, False: 309k]
  ------------------
  154|      0|    case LY_STMT_CONTACT:
  ------------------
  |  Branch (154:5): [True: 0, False: 309k]
  ------------------
  155|   126k|    case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (155:5): [True: 126k, False: 182k]
  ------------------
  156|   126k|    case LY_STMT_ERROR_APP_TAG:
  ------------------
  |  Branch (156:5): [True: 0, False: 309k]
  ------------------
  157|   126k|    case LY_STMT_ERROR_MESSAGE:
  ------------------
  |  Branch (157:5): [True: 0, False: 309k]
  ------------------
  158|   126k|    case LY_STMT_KEY:
  ------------------
  |  Branch (158:5): [True: 0, False: 309k]
  ------------------
  159|   126k|    case LY_STMT_MODIFIER:
  ------------------
  |  Branch (159:5): [True: 0, False: 309k]
  ------------------
  160|   126k|    case LY_STMT_NAMESPACE:
  ------------------
  |  Branch (160:5): [True: 0, False: 309k]
  ------------------
  161|   126k|    case LY_STMT_ORGANIZATION:
  ------------------
  |  Branch (161:5): [True: 0, False: 309k]
  ------------------
  162|   126k|    case LY_STMT_PRESENCE:
  ------------------
  |  Branch (162:5): [True: 0, False: 309k]
  ------------------
  163|   182k|    case LY_STMT_REFERENCE:
  ------------------
  |  Branch (163:5): [True: 56.2k, False: 253k]
  ------------------
  164|   182k|    case LY_STMT_UNITS:
  ------------------
  |  Branch (164:5): [True: 0, False: 309k]
  ------------------
  165|       |        /* just make a copy */
  166|   182k|        LY_CHECK_GOTO(rc = lydict_insert(ctx->ctx, parsed, 0, substmt->storage), cleanup);
  ------------------
  |  |  202|   182k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 182k]
  |  |  ------------------
  ------------------
  167|   182k|        break;
  168|       |
  169|      0|    case LY_STMT_BIT:
  ------------------
  |  Branch (169:5): [True: 0, False: 309k]
  ------------------
  170|      0|        basetype = LY_TYPE_BITS;
  171|       |    /* fallthrough */
  172|      0|    case LY_STMT_ENUM:
  ------------------
  |  Branch (172:5): [True: 0, False: 309k]
  ------------------
  173|      0|        if (substmt->stmt == LY_STMT_ENUM) {
  ------------------
  |  Branch (173:13): [True: 0, False: 0]
  ------------------
  174|      0|            basetype = LY_TYPE_ENUM;
  175|      0|        }
  176|       |
  177|       |        /* compile */
  178|      0|        LY_CHECK_GOTO(rc = lys_compile_type_enums(ctx, parsed, basetype, NULL, substmt->storage), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  179|      0|        break;
  180|       |
  181|      0|    case LY_STMT_CONFIG: {
  ------------------
  |  Branch (181:5): [True: 0, False: 309k]
  ------------------
  182|      0|        uint16_t flags;
  183|       |
  184|      0|        if (!(ctx->compile_opts & LYS_COMPILE_NO_CONFIG)) {
  ------------------
  |  |  545|      0|#define LYS_COMPILE_NO_CONFIG       0x04            /**< ignore config statements, neither inherit config value */
  ------------------
  |  Branch (184:13): [True: 0, False: 0]
  ------------------
  185|      0|            memcpy(&flags, &parsed, 2);
  186|      0|            if (flags & LYS_CONFIG_MASK) {
  ------------------
  |  |  653|      0|#define LYS_CONFIG_MASK  0x03        /**< mask for config value */
  ------------------
  |  Branch (186:17): [True: 0, False: 0]
  ------------------
  187|       |                /* explicitly set */
  188|      0|                flags |= LYS_SET_CONFIG;
  ------------------
  |  |  706|      0|#define LYS_SET_CONFIG   0x0800      /**< flag to know if the config property was set explicitly (flag set) or it is inherited. */
  ------------------
  189|      0|            } else if (ext->parent_stmt & LY_STMT_DATA_NODE_MASK) {
  ------------------
  |  |  126|      0|#define LY_STMT_DATA_NODE_MASK (LY_STMT_ANYDATA | LY_STMT_ANYXML | LY_STMT_CASE | LY_STMT_CHOICE | LY_STMT_CONTAINER |\
  |  |  127|      0|        LY_STMT_LEAF | LY_STMT_LEAF_LIST | LY_STMT_LIST)
  ------------------
  |  Branch (189:24): [True: 0, False: 0]
  ------------------
  190|       |                /* inherit */
  191|      0|                flags = ((struct lysc_node *)ext->parent)->flags & LYS_CONFIG_MASK;
  ------------------
  |  |  653|      0|#define LYS_CONFIG_MASK  0x03        /**< mask for config value */
  ------------------
  192|      0|            } else {
  193|       |                /* default config */
  194|      0|                flags = LYS_CONFIG_W;
  ------------------
  |  |  651|      0|#define LYS_CONFIG_W     0x01        /**< config true; */
  ------------------
  195|      0|            }
  196|      0|            memcpy(substmt->storage, &flags, 2);
  197|      0|        } /* else leave zero */
  198|      0|        break;
  199|      0|    }
  200|      0|    case LY_STMT_MUST: {
  ------------------
  |  Branch (200:5): [True: 0, False: 309k]
  ------------------
  201|      0|        const struct lysp_restr *restrs = parsed;
  202|       |
  203|       |        /* sized array */
  204|      0|        COMPILE_ARRAY_GOTO(ctx, restrs, *(struct lysc_must **)substmt->storage, lys_compile_must, rc, cleanup);
  ------------------
  |  |  219|      0|    if (ARRAY_P) { \
  |  |  ------------------
  |  |  |  Branch (219:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  220|      0|        LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (220:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  221|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, ARRAY_C, __u + LY_ARRAY_COUNT(ARRAY_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  222|      0|        LY_ARRAY_FOR(ARRAY_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  223|      0|            LY_ARRAY_INCREMENT(ARRAY_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  224|      0|            RET = FUNC(CTX, &(ARRAY_P)[__u], &(ARRAY_C)[LY_ARRAY_COUNT(ARRAY_C) - 1]); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  225|      0|            LY_CHECK_GOTO(RET, GOTO); \
  |  |  ------------------
  |  |  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  226|      0|        } \
  |  |  227|      0|    }
  ------------------
  205|      0|        break;
  206|      0|    }
  207|      0|    case LY_STMT_WHEN: {
  ------------------
  |  Branch (207:5): [True: 0, False: 309k]
  ------------------
  208|      0|        const uint16_t flags;
  209|      0|        const struct lysp_when *when = parsed;
  210|       |
  211|       |        /* read compiled status */
  212|      0|        lyplg_ext_get_storage(ext, LY_STMT_STATUS, sizeof flags, (const void **)&flags);
  213|       |
  214|       |        /* compile */
  215|      0|        LY_CHECK_GOTO(rc = lys_compile_when(ctx, when, flags, NULL, NULL, NULL, substmt->storage), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  216|      0|        break;
  217|      0|    }
  218|      0|    case LY_STMT_FRACTION_DIGITS:
  ------------------
  |  Branch (218:5): [True: 0, False: 309k]
  ------------------
  219|      0|    case LY_STMT_REQUIRE_INSTANCE:
  ------------------
  |  Branch (219:5): [True: 0, False: 309k]
  ------------------
  220|       |        /* just make a copy */
  221|      0|        memcpy(substmt->storage, &parsed, 1);
  222|      0|        break;
  223|       |
  224|      0|    case LY_STMT_MANDATORY:
  ------------------
  |  Branch (224:5): [True: 0, False: 309k]
  ------------------
  225|      0|    case LY_STMT_ORDERED_BY:
  ------------------
  |  Branch (225:5): [True: 0, False: 309k]
  ------------------
  226|      0|    case LY_STMT_STATUS:
  ------------------
  |  Branch (226:5): [True: 0, False: 309k]
  ------------------
  227|       |        /* just make a copy */
  228|      0|        memcpy(substmt->storage, &parsed, 2);
  229|      0|        break;
  230|       |
  231|      0|    case LY_STMT_MAX_ELEMENTS:
  ------------------
  |  Branch (231:5): [True: 0, False: 309k]
  ------------------
  232|      0|    case LY_STMT_MIN_ELEMENTS:
  ------------------
  |  Branch (232:5): [True: 0, False: 309k]
  ------------------
  233|       |        /* just make a copy */
  234|      0|        memcpy(substmt->storage, &parsed, 4);
  235|      0|        break;
  236|       |
  237|      0|    case LY_STMT_POSITION:
  ------------------
  |  Branch (237:5): [True: 0, False: 309k]
  ------------------
  238|      0|    case LY_STMT_VALUE:
  ------------------
  |  Branch (238:5): [True: 0, False: 309k]
  ------------------
  239|       |        /* just make a copy */
  240|      0|        memcpy(substmt->storage, &parsed, 8);
  241|      0|        break;
  242|       |
  243|      0|    case LY_STMT_IDENTITY:
  ------------------
  |  Branch (243:5): [True: 0, False: 309k]
  ------------------
  244|       |        /* compile */
  245|      0|        LY_CHECK_GOTO(rc = lys_identity_precompile(ctx, NULL, NULL, parsed, substmt->storage), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  246|      0|        break;
  247|       |
  248|      0|    case LY_STMT_LENGTH:
  ------------------
  |  Branch (248:5): [True: 0, False: 309k]
  ------------------
  249|      0|        length_restr = 1;
  250|       |    /* fallthrough */
  251|      0|    case LY_STMT_RANGE:
  ------------------
  |  Branch (251:5): [True: 0, False: 309k]
  ------------------
  252|       |        /* compile, use uint64 default range */
  253|      0|        LY_CHECK_GOTO(rc = lys_compile_type_range(ctx, parsed, LY_TYPE_UINT64, length_restr, 0, NULL, substmt->storage),
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  254|      0|                cleanup);
  255|      0|        break;
  256|       |
  257|      0|    case LY_STMT_PATTERN:
  ------------------
  |  Branch (257:5): [True: 0, False: 309k]
  ------------------
  258|       |        /* compile */
  259|      0|        LY_CHECK_GOTO(rc = lys_compile_type_patterns(ctx, parsed, NULL, substmt->storage), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  260|      0|        break;
  261|       |
  262|   126k|    case LY_STMT_TYPE: {
  ------------------
  |  Branch (262:5): [True: 126k, False: 182k]
  ------------------
  263|   126k|        const uint16_t flags;
  264|   126k|        const char *units;
  265|   126k|        const struct lysp_type *ptype = parsed;
  266|       |
  267|       |        /* read compiled info */
  268|   126k|        lyplg_ext_get_storage(ext, LY_STMT_STATUS, sizeof flags, (const void **)&flags);
  269|   126k|        lyplg_ext_get_storage(ext, LY_STMT_UNITS, sizeof units, (const void **)&units);
  270|       |
  271|       |        /* compile */
  272|   126k|        LY_CHECK_GOTO(rc = lys_compile_type(ctx, NULL, flags, ext->def->name, ptype, substmt->storage, &units, NULL), cleanup);
  ------------------
  |  |  202|   126k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
  273|   126k|        LY_ATOMIC_INC_BARRIER((*(struct lysc_type **)substmt->storage)->refcount);
  ------------------
  |  |   35|   126k|# define LY_ATOMIC_INC_BARRIER(var) __sync_fetch_and_add(&(var), 1)
  ------------------
  274|   126k|        break;
  275|   126k|    }
  276|      0|    case LY_STMT_EXTENSION_INSTANCE: {
  ------------------
  |  Branch (276:5): [True: 0, False: 309k]
  ------------------
  277|      0|        struct lysp_ext_instance *extps = (struct lysp_ext_instance *)parsed;
  278|       |
  279|       |        /* compile sized array */
  280|      0|        COMPILE_EXTS_GOTO(ctx, extps, *(struct lysc_ext_instance **)substmt->storage, ext, rc, cleanup);
  ------------------
  |  |  230|      0|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
  281|      0|        break;
  282|      0|    }
  283|      0|    case LY_STMT_AUGMENT:
  ------------------
  |  Branch (283:5): [True: 0, False: 309k]
  ------------------
  284|      0|    case LY_STMT_GROUPING:
  ------------------
  |  Branch (284:5): [True: 0, False: 309k]
  ------------------
  285|      0|    case LY_STMT_BASE:
  ------------------
  |  Branch (285:5): [True: 0, False: 309k]
  ------------------
  286|      0|    case LY_STMT_BELONGS_TO:
  ------------------
  |  Branch (286:5): [True: 0, False: 309k]
  ------------------
  287|      0|    case LY_STMT_DEFAULT:
  ------------------
  |  Branch (287:5): [True: 0, False: 309k]
  ------------------
  288|      0|    case LY_STMT_DEVIATE:
  ------------------
  |  Branch (288:5): [True: 0, False: 309k]
  ------------------
  289|      0|    case LY_STMT_DEVIATION:
  ------------------
  |  Branch (289:5): [True: 0, False: 309k]
  ------------------
  290|      0|    case LY_STMT_EXTENSION:
  ------------------
  |  Branch (290:5): [True: 0, False: 309k]
  ------------------
  291|      0|    case LY_STMT_FEATURE:
  ------------------
  |  Branch (291:5): [True: 0, False: 309k]
  ------------------
  292|      0|    case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (292:5): [True: 0, False: 309k]
  ------------------
  293|      0|    case LY_STMT_IMPORT:
  ------------------
  |  Branch (293:5): [True: 0, False: 309k]
  ------------------
  294|      0|    case LY_STMT_INCLUDE:
  ------------------
  |  Branch (294:5): [True: 0, False: 309k]
  ------------------
  295|      0|    case LY_STMT_MODULE:
  ------------------
  |  Branch (295:5): [True: 0, False: 309k]
  ------------------
  296|      0|    case LY_STMT_PATH:
  ------------------
  |  Branch (296:5): [True: 0, False: 309k]
  ------------------
  297|      0|    case LY_STMT_PREFIX:
  ------------------
  |  Branch (297:5): [True: 0, False: 309k]
  ------------------
  298|      0|    case LY_STMT_REFINE:
  ------------------
  |  Branch (298:5): [True: 0, False: 309k]
  ------------------
  299|      0|    case LY_STMT_REVISION:
  ------------------
  |  Branch (299:5): [True: 0, False: 309k]
  ------------------
  300|      0|    case LY_STMT_REVISION_DATE:
  ------------------
  |  Branch (300:5): [True: 0, False: 309k]
  ------------------
  301|      0|    case LY_STMT_SUBMODULE:
  ------------------
  |  Branch (301:5): [True: 0, False: 309k]
  ------------------
  302|      0|    case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (302:5): [True: 0, False: 309k]
  ------------------
  303|      0|    case LY_STMT_UNIQUE:
  ------------------
  |  Branch (303:5): [True: 0, False: 309k]
  ------------------
  304|      0|    case LY_STMT_YANG_VERSION:
  ------------------
  |  Branch (304:5): [True: 0, False: 309k]
  ------------------
  305|      0|    case LY_STMT_YIN_ELEMENT:
  ------------------
  |  Branch (305:5): [True: 0, False: 309k]
  ------------------
  306|      0|        LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG, "Statement \"%s\" compilation is not supported.", lyplg_ext_stmt2str(substmt->stmt));
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  307|      0|        rc = LY_EVALID;
  308|      0|        goto cleanup;
  309|       |
  310|      0|    default:
  ------------------
  |  Branch (310:5): [True: 0, False: 309k]
  ------------------
  311|      0|        LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG, "Statement \"%s\" is not supported as an extension "
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  312|      0|                "(found in \"%s%s%s\") substatement.", lyplg_ext_stmt2str(substmt->stmt), ext->def->name,
  313|      0|                ext->argument ? " " : "", ext->argument ? ext->argument : "");
  314|      0|        rc = LY_EVALID;
  315|      0|        goto cleanup;
  316|   309k|    }
  317|       |
  318|   309k|cleanup:
  319|   309k|    return rc;
  320|   309k|}

metadata.c:annotation_parse:
   49|   126k|{
   50|   126k|    LY_ERR r;
   51|   126k|    struct lysp_ext_metadata *ann_pdata;
   52|   126k|    struct lysp_module *pmod;
   53|   126k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
   54|       |
   55|       |    /* annotations can appear only at the top level of a YANG module or submodule */
   56|   126k|    if ((ext->parent_stmt != LY_STMT_MODULE) && (ext->parent_stmt != LY_STMT_SUBMODULE)) {
  ------------------
  |  Branch (56:9): [True: 0, False: 126k]
  |  Branch (56:49): [True: 0, False: 0]
  ------------------
   57|      0|        lyplg_ext_parse_log(pctx, ext, LY_LLERR, LY_EVALID, "Extension %s is allowed only at the top level of a YANG module or "
   58|      0|                "submodule, but it is placed in \"%s\" statement.", ext->name, lyplg_ext_stmt2str(ext->parent_stmt));
   59|      0|        return LY_EVALID;
   60|      0|    }
   61|       |
   62|   126k|    pmod = ext->parent;
   63|       |
   64|       |    /* check for duplication */
   65|  1.13M|    LY_ARRAY_FOR(pmod->exts, u) {
  ------------------
  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  1.26M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  1.26M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 1.26M, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 1.13M, False: 126k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  1.13M|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   66|  1.13M|        if ((&pmod->exts[u] != ext) && (pmod->exts[u].name == ext->name) && !strcmp(pmod->exts[u].argument, ext->argument)) {
  ------------------
  |  Branch (66:13): [True: 1.01M, False: 126k]
  |  Branch (66:40): [True: 1.01M, False: 0]
  |  Branch (66:77): [True: 0, False: 1.01M]
  ------------------
   67|       |            /* duplication of the same annotation extension in a single module */
   68|      0|            lyplg_ext_parse_log(pctx, ext, LY_LLERR, LY_EVALID, "Extension %s is instantiated multiple times.", ext->name);
   69|      0|            return LY_EVALID;
   70|      0|        }
   71|  1.13M|    }
   72|       |
   73|       |    /* parse annotation substatements */
   74|   126k|    ext->parsed = ann_pdata = calloc(1, sizeof *ann_pdata);
   75|   126k|    if (!ann_pdata) {
  ------------------
  |  Branch (75:9): [True: 0, False: 126k]
  ------------------
   76|      0|        goto emem;
   77|      0|    }
   78|   253k|    LY_ARRAY_CREATE_GOTO(lyplg_ext_parse_get_cur_pmod(pctx)->mod->ctx, ext->substmts, 6, r, emem);
  ------------------
  |  |  187|   126k|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  ------------------
  |  |  |  |  133|   126k|    { \
  |  |  |  |  134|   126k|        char *p__; \
  |  |  |  |  135|   126k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:13): [True: 0, False: 126k]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  141|      0|            } \
  |  |  |  |  142|   126k|        } else { \
  |  |  |  |  143|   126k|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  144|   126k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (144:17): [True: 0, False: 126k]
  |  |  |  |  ------------------
  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  147|      0|            } \
  |  |  |  |  148|   126k|        } \
  |  |  |  |  149|   126k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  150|   126k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  151|   126k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (151:13): [True: 126k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  152|   126k|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  153|   126k|        } \
  |  |  |  |  154|   126k|    }
  |  |  ------------------
  ------------------
   79|       |
   80|   253k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
   81|   253k|    ext->substmts[0].stmt = LY_STMT_IF_FEATURE;
   82|   253k|    ext->substmts[0].storage = &ann_pdata->iffeatures;
   83|       |
   84|   253k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
   85|   253k|    ext->substmts[1].stmt = LY_STMT_UNITS;
   86|   253k|    ext->substmts[1].storage = &ann_pdata->units;
   87|       |
   88|   253k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
   89|   253k|    ext->substmts[2].stmt = LY_STMT_STATUS;
   90|   253k|    ext->substmts[2].storage = &ann_pdata->flags;
   91|       |
   92|   253k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
   93|   253k|    ext->substmts[3].stmt = LY_STMT_TYPE;
   94|   253k|    ext->substmts[3].storage = &ann_pdata->type;
   95|       |
   96|   253k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
   97|   253k|    ext->substmts[4].stmt = LY_STMT_DESCRIPTION;
   98|   253k|    ext->substmts[4].storage = &ann_pdata->dsc;
   99|       |
  100|   253k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
  101|   253k|    ext->substmts[5].stmt = LY_STMT_REFERENCE;
  102|   253k|    ext->substmts[5].storage = &ann_pdata->ref;
  103|       |
  104|   253k|    if ((r = lyplg_ext_parse_extension_instance(pctx, ext))) {
  ------------------
  |  Branch (104:9): [True: 0, False: 126k]
  ------------------
  105|      0|        return r;
  106|      0|    }
  107|       |
  108|       |    /* check for mandatory substatements */
  109|   126k|    if (!ann_pdata->type) {
  ------------------
  |  Branch (109:9): [True: 0, False: 126k]
  ------------------
  110|      0|        lyplg_ext_parse_log(pctx, ext, LY_LLERR, LY_EVALID, "Missing mandatory keyword \"type\" as a child of \"%s %s\".",
  111|      0|                ext->name, ext->argument);
  112|      0|        return LY_EVALID;
  113|      0|    }
  114|       |
  115|   126k|    return LY_SUCCESS;
  116|       |
  117|      0|emem:
  118|      0|    lyplg_ext_parse_log(pctx, ext, LY_LLERR, LY_EMEM, "Memory allocation failed (%s()).", __func__);
  119|      0|    return LY_EMEM;
  120|   126k|}
metadata.c:annotation_compile:
  129|   126k|{
  130|   126k|    LY_ERR ret;
  131|   126k|    struct lysc_ext_metadata *ann_cdata;
  132|       |
  133|       |    /* compile annotation substatements */
  134|   126k|    ext->compiled = ann_cdata = calloc(1, sizeof *ann_cdata);
  135|   126k|    if (!ann_cdata) {
  ------------------
  |  Branch (135:9): [True: 0, False: 126k]
  ------------------
  136|      0|        goto emem;
  137|      0|    }
  138|   126k|    LY_ARRAY_CREATE_GOTO(lysc_ctx_get_ctx(cctx), ext->substmts, 6, ret, emem);
  ------------------
  |  |  187|   126k|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  ------------------
  |  |  |  |  133|   126k|    { \
  |  |  |  |  134|   126k|        char *p__; \
  |  |  |  |  135|   126k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:13): [True: 0, False: 126k]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  141|      0|            } \
  |  |  |  |  142|   126k|        } else { \
  |  |  |  |  143|   126k|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  144|   126k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (144:17): [True: 0, False: 126k]
  |  |  |  |  ------------------
  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  147|      0|            } \
  |  |  |  |  148|   126k|        } \
  |  |  |  |  149|   126k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  150|   126k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  151|   126k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (151:13): [True: 126k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  152|   126k|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  153|   126k|        } \
  |  |  |  |  154|   126k|    }
  |  |  ------------------
  ------------------
  139|       |
  140|   126k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
  141|   126k|    ext->substmts[0].stmt = LY_STMT_IF_FEATURE;
  142|   126k|    ext->substmts[0].storage = NULL;
  143|       |
  144|   126k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
  145|   126k|    ext->substmts[1].stmt = LY_STMT_UNITS;
  146|   126k|    ext->substmts[1].storage = &ann_cdata->units;
  147|       |
  148|   126k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
  149|   126k|    ext->substmts[2].stmt = LY_STMT_STATUS;
  150|   126k|    ext->substmts[2].storage = &ann_cdata->flags;
  151|       |
  152|   126k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
  153|   126k|    ext->substmts[3].stmt = LY_STMT_TYPE;
  154|   126k|    ext->substmts[3].storage = &ann_cdata->type;
  155|       |
  156|   126k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
  157|   126k|    ext->substmts[4].stmt = LY_STMT_DESCRIPTION;
  158|   126k|    ext->substmts[4].storage = &ann_cdata->dsc;
  159|       |
  160|   126k|    LY_ARRAY_INCREMENT(ext->substmts);
  ------------------
  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
  161|   126k|    ext->substmts[5].stmt = LY_STMT_REFERENCE;
  162|   126k|    ext->substmts[5].storage = &ann_cdata->ref;
  163|       |
  164|   126k|    ret = lyplg_ext_compile_extension_instance(cctx, extp, ext);
  165|   126k|    return ret;
  166|       |
  167|      0|emem:
  168|      0|    lyplg_ext_compile_log(cctx, ext, LY_LLERR, LY_EMEM, "Memory allocation failed (%s()).", __func__);
  169|      0|    return LY_EMEM;
  170|   126k|}
metadata.c:annotation_pfree:
  192|   126k|{
  193|   126k|    if (!ext->substmts) {
  ------------------
  |  Branch (193:9): [True: 0, False: 126k]
  ------------------
  194|      0|        return;
  195|      0|    }
  196|       |
  197|   126k|    lyplg_ext_pfree_instance_substatements(ctx, ext->substmts);
  198|   126k|    free(ext->parsed);
  199|   126k|}
metadata.c:annotation_cfree:
  208|   126k|{
  209|   126k|    if (!ext->substmts) {
  ------------------
  |  Branch (209:9): [True: 0, False: 126k]
  ------------------
  210|      0|        return;
  211|      0|    }
  212|       |
  213|   126k|    lyplg_ext_cfree_instance_substatements(ctx, ext->substmts);
  214|   126k|    free(ext->compiled);
  215|   126k|}

ly_resolve_prefix:
  126|   731k|{
  127|   731k|    const struct lys_module *mod = NULL;
  128|       |
  129|   731k|    LY_CHECK_ARG_RET(ctx, prefix, prefix_len, NULL);
  ------------------
  |  |  226|   731k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   731k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   731k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|   731k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   731k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 731k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   731k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 731k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   731k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  130|       |
  131|   731k|    switch (format) {
  ------------------
  |  Branch (131:13): [True: 0, False: 731k]
  ------------------
  132|   506k|    case LY_VALUE_SCHEMA:
  ------------------
  |  Branch (132:5): [True: 506k, False: 224k]
  ------------------
  133|   506k|        mod = ly_schema_resolve_prefix(ctx, prefix, prefix_len, prefix_data);
  134|   506k|        break;
  135|   224k|    case LY_VALUE_SCHEMA_RESOLVED:
  ------------------
  |  Branch (135:5): [True: 224k, False: 506k]
  ------------------
  136|   224k|        mod = ly_schema_resolved_resolve_prefix(ctx, prefix, prefix_len, prefix_data);
  137|   224k|        break;
  138|      0|    case LY_VALUE_XML:
  ------------------
  |  Branch (138:5): [True: 0, False: 731k]
  ------------------
  139|      0|    case LY_VALUE_STR_NS:
  ------------------
  |  Branch (139:5): [True: 0, False: 731k]
  ------------------
  140|      0|        mod = ly_xml_resolve_prefix(ctx, prefix, prefix_len, prefix_data);
  141|      0|        break;
  142|      0|    case LY_VALUE_CANON:
  ------------------
  |  Branch (142:5): [True: 0, False: 731k]
  ------------------
  143|      0|    case LY_VALUE_JSON:
  ------------------
  |  Branch (143:5): [True: 0, False: 731k]
  ------------------
  144|      0|    case LY_VALUE_LYB:
  ------------------
  |  Branch (144:5): [True: 0, False: 731k]
  ------------------
  145|      0|        mod = ly_json_resolve_prefix(ctx, prefix, prefix_len, prefix_data);
  146|      0|        break;
  147|   731k|    }
  148|       |
  149|   731k|    return mod;
  150|   731k|}
lyplg_type_free_simple:
  346|  14.0k|{
  347|  14.0k|    lydict_remove(ctx, value->_canonical);
  348|  14.0k|    value->_canonical = NULL;
  349|  14.0k|}
lyplg_type_prefix_data_new:
  619|  70.2k|{
  620|   140k|    LY_CHECK_ARG_RET(ctx, value, format_p, prefix_data_p, LY_EINVAL);
  ------------------
  |  |  226|  70.2k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  70.2k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  70.2k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  219|  70.2k|#define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  218|  70.2k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|  70.2k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|  70.2k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  70.2k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  70.2k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  621|       |
  622|  70.2k|    *prefix_data_p = NULL;
  623|  70.2k|    return ly_store_prefix_data(ctx, value, value_len, format, prefix_data, format_p, (void **)prefix_data_p);
  624|   140k|}
lyplg_type_check_hints:
  665|  14.0k|{
  666|  14.0k|    LY_CHECK_ARG_RET(NULL, value || !value_len, err, LY_EINVAL);
  ------------------
  |  |  226|  14.0k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  14.0k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|  14.0k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:51): [True: 14.0k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:51): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  667|       |
  668|  14.0k|    *err = NULL;
  669|  14.0k|    if (!value) {
  ------------------
  |  Branch (669:9): [True: 0, False: 14.0k]
  ------------------
  670|      0|        value = "";
  671|      0|    }
  672|       |
  673|  14.0k|    switch (type) {
  ------------------
  |  Branch (673:13): [True: 0, False: 14.0k]
  ------------------
  674|      0|    case LY_TYPE_UINT8:
  ------------------
  |  Branch (674:5): [True: 0, False: 14.0k]
  ------------------
  675|      0|    case LY_TYPE_UINT16:
  ------------------
  |  Branch (675:5): [True: 0, False: 14.0k]
  ------------------
  676|      0|    case LY_TYPE_UINT32:
  ------------------
  |  Branch (676:5): [True: 0, False: 14.0k]
  ------------------
  677|      0|    case LY_TYPE_INT8:
  ------------------
  |  Branch (677:5): [True: 0, False: 14.0k]
  ------------------
  678|      0|    case LY_TYPE_INT16:
  ------------------
  |  Branch (678:5): [True: 0, False: 14.0k]
  ------------------
  679|      0|    case LY_TYPE_INT32:
  ------------------
  |  Branch (679:5): [True: 0, False: 14.0k]
  ------------------
  680|      0|        LY_CHECK_ARG_RET(NULL, base, LY_EINVAL);
  ------------------
  |  |  226|      0|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|      0|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|      0|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|      0|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|      0|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  681|       |
  682|      0|        if (!(hints & (LYD_VALHINT_DECNUM | LYD_VALHINT_OCTNUM | LYD_VALHINT_HEXNUM))) {
  ------------------
  |  |  919|      0|#define LYD_VALHINT_DECNUM     0x0002 /**< value is allowed to be a decimal number */
  ------------------
                      if (!(hints & (LYD_VALHINT_DECNUM | LYD_VALHINT_OCTNUM | LYD_VALHINT_HEXNUM))) {
  ------------------
  |  |  920|      0|#define LYD_VALHINT_OCTNUM     0x0004 /**< value is allowed to be an octal number */
  ------------------
                      if (!(hints & (LYD_VALHINT_DECNUM | LYD_VALHINT_OCTNUM | LYD_VALHINT_HEXNUM))) {
  ------------------
  |  |  921|      0|#define LYD_VALHINT_HEXNUM     0x0008 /**< value is allowed to be a hexadecimal number */
  ------------------
  |  Branch (682:13): [True: 0, False: 0]
  ------------------
  683|      0|            return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid non-number-encoded %s value \"%.*s\".",
  684|      0|                    lys_datatype2str(type), (int)value_len, value);
  685|      0|        }
  686|      0|        *base = type_get_hints_base(hints);
  687|      0|        break;
  688|      0|    case LY_TYPE_UINT64:
  ------------------
  |  Branch (688:5): [True: 0, False: 14.0k]
  ------------------
  689|      0|    case LY_TYPE_INT64:
  ------------------
  |  Branch (689:5): [True: 0, False: 14.0k]
  ------------------
  690|      0|        LY_CHECK_ARG_RET(NULL, base, LY_EINVAL);
  ------------------
  |  |  226|      0|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|      0|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|      0|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|      0|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|      0|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  691|       |
  692|      0|        if (!(hints & LYD_VALHINT_NUM64)) {
  ------------------
  |  |  922|      0|#define LYD_VALHINT_NUM64      0x0010 /**< value is allowed to be an int64 or uint64 */
  ------------------
  |  Branch (692:13): [True: 0, False: 0]
  ------------------
  693|      0|            return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid non-num64-encoded %s value \"%.*s\".",
  694|      0|                    lys_datatype2str(type), (int)value_len, value);
  695|      0|        }
  696|      0|        *base = type_get_hints_base(hints);
  697|      0|        break;
  698|      0|    case LY_TYPE_STRING:
  ------------------
  |  Branch (698:5): [True: 0, False: 14.0k]
  ------------------
  699|      0|    case LY_TYPE_DEC64:
  ------------------
  |  Branch (699:5): [True: 0, False: 14.0k]
  ------------------
  700|      0|    case LY_TYPE_ENUM:
  ------------------
  |  Branch (700:5): [True: 0, False: 14.0k]
  ------------------
  701|      0|    case LY_TYPE_BITS:
  ------------------
  |  Branch (701:5): [True: 0, False: 14.0k]
  ------------------
  702|      0|    case LY_TYPE_BINARY:
  ------------------
  |  Branch (702:5): [True: 0, False: 14.0k]
  ------------------
  703|      0|    case LY_TYPE_IDENT:
  ------------------
  |  Branch (703:5): [True: 0, False: 14.0k]
  ------------------
  704|      0|    case LY_TYPE_INST:
  ------------------
  |  Branch (704:5): [True: 0, False: 14.0k]
  ------------------
  705|      0|        if (!(hints & LYD_VALHINT_STRING)) {
  ------------------
  |  |  918|      0|#define LYD_VALHINT_STRING     0x0001 /**< value is allowed to be a string */
  ------------------
  |  Branch (705:13): [True: 0, False: 0]
  ------------------
  706|      0|            return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid non-string-encoded %s value \"%.*s\".",
  707|      0|                    lys_datatype2str(type), (int)value_len, value);
  708|      0|        }
  709|      0|        break;
  710|  14.0k|    case LY_TYPE_BOOL:
  ------------------
  |  Branch (710:5): [True: 14.0k, False: 0]
  ------------------
  711|  14.0k|        if (!(hints & LYD_VALHINT_BOOLEAN)) {
  ------------------
  |  |  923|  14.0k|#define LYD_VALHINT_BOOLEAN    0x0020 /**< value is allowed to be a boolean */
  ------------------
  |  Branch (711:13): [True: 0, False: 14.0k]
  ------------------
  712|      0|            return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid non-boolean-encoded %s value \"%.*s\".",
  713|      0|                    lys_datatype2str(type), (int)value_len, value);
  714|      0|        }
  715|  14.0k|        break;
  716|  14.0k|    case LY_TYPE_EMPTY:
  ------------------
  |  Branch (716:5): [True: 0, False: 14.0k]
  ------------------
  717|      0|        if (!(hints & LYD_VALHINT_EMPTY)) {
  ------------------
  |  |  924|      0|#define LYD_VALHINT_EMPTY      0x0040 /**< value is allowed to be empty */
  ------------------
  |  Branch (717:13): [True: 0, False: 0]
  ------------------
  718|      0|            return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid non-empty-encoded %s value \"%.*s\".",
  719|      0|                    lys_datatype2str(type), (int)value_len, value);
  720|      0|        }
  721|      0|        break;
  722|      0|    case LY_TYPE_UNKNOWN:
  ------------------
  |  Branch (722:5): [True: 0, False: 14.0k]
  ------------------
  723|      0|    case LY_TYPE_LEAFREF:
  ------------------
  |  Branch (723:5): [True: 0, False: 14.0k]
  ------------------
  724|      0|    case LY_TYPE_UNION:
  ------------------
  |  Branch (724:5): [True: 0, False: 14.0k]
  ------------------
  725|      0|        LOGINT_RET(NULL);
  ------------------
  |  |  196|      0|#define LOGINT_RET(CTX) LOGINT(CTX); return LY_EINT
  |  |  ------------------
  |  |  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  726|  14.0k|    }
  727|       |
  728|  14.0k|    return LY_SUCCESS;
  729|  14.0k|}
plugins_types.c:ly_schema_resolve_prefix:
   47|   506k|{
   48|   506k|    const struct lysp_module *prefix_mod = prefix_data;
   49|   506k|    struct lys_module *m = NULL;
   50|   506k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   506k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
   51|   506k|    const char *local_prefix;
   52|       |
   53|   506k|    local_prefix = prefix_mod->is_submod ? ((struct lysp_submodule *)prefix_mod)->prefix : prefix_mod->mod->prefix;
  ------------------
  |  Branch (53:20): [True: 0, False: 506k]
  ------------------
   54|   506k|    if (!prefix_len || !ly_strncmp(local_prefix, prefix, prefix_len)) {
  ------------------
  |  Branch (54:9): [True: 0, False: 506k]
  |  Branch (54:24): [True: 28.1k, False: 477k]
  ------------------
   55|       |        /* it is the prefix of the module itself */
   56|  28.1k|        m = prefix_mod->mod;
   57|  28.1k|    }
   58|       |
   59|       |    /* search in imports */
   60|   506k|    if (!m) {
  ------------------
  |  Branch (60:9): [True: 477k, False: 28.1k]
  ------------------
   61|   688k|        LY_ARRAY_FOR(prefix_mod->imports, u) {
  ------------------
  |  |  167|   477k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   477k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   477k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   477k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   688k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   688k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 688k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 688k, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   477k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   62|   688k|            if (!ly_strncmp(prefix_mod->imports[u].prefix, prefix, prefix_len)) {
  ------------------
  |  Branch (62:17): [True: 477k, False: 210k]
  ------------------
   63|   477k|                m = prefix_mod->imports[u].module;
   64|   477k|                break;
   65|   477k|            }
   66|   688k|        }
   67|   477k|    }
   68|       |
   69|   506k|    return m;
   70|   506k|}
plugins_types.c:ly_schema_resolved_resolve_prefix:
   78|   224k|{
   79|   224k|    const struct lysc_prefix *prefixes = prefix_data;
   80|   224k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   224k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
   81|       |
   82|   421k|    LY_ARRAY_FOR(prefixes, u) {
  ------------------
  |  |  167|   224k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   224k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   224k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   224k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   449k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   449k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 449k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 421k, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   224k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|   421k|        if ((!prefixes[u].prefix && !prefix_len) || (prefixes[u].prefix && !ly_strncmp(prefixes[u].prefix, prefix, prefix_len))) {
  ------------------
  |  Branch (83:14): [True: 224k, False: 196k]
  |  Branch (83:37): [True: 0, False: 224k]
  |  Branch (83:54): [True: 196k, False: 224k]
  |  Branch (83:76): [True: 196k, False: 0]
  ------------------
   84|   196k|            return prefixes[u].mod;
   85|   196k|        }
   86|   421k|    }
   87|       |
   88|  28.1k|    return NULL;
   89|   224k|}

lyplg_type_store_boolean:
   41|  14.0k|{
   42|  14.0k|    LY_ERR ret = LY_SUCCESS;
   43|  14.0k|    int8_t i;
   44|       |
   45|       |    /* init storage */
   46|  14.0k|    memset(storage, 0, sizeof *storage);
   47|  14.0k|    storage->realtype = type;
   48|       |
   49|  14.0k|    if (format == LY_VALUE_LYB) {
  ------------------
  |  Branch (49:9): [True: 0, False: 14.0k]
  ------------------
   50|       |        /* validation */
   51|      0|        if (value_len != 1) {
  ------------------
  |  Branch (51:13): [True: 0, False: 0]
  ------------------
   52|      0|            ret = ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid LYB boolean value size %zu (expected 1).",
   53|      0|                    value_len);
   54|      0|            goto cleanup;
   55|      0|        }
   56|       |
   57|       |        /* store value */
   58|      0|        i = *(int8_t *)value;
   59|      0|        storage->boolean = i ? 1 : 0;
  ------------------
  |  Branch (59:28): [True: 0, False: 0]
  ------------------
   60|       |
   61|       |        /* store canonical value, it always is */
   62|      0|        ret = lydict_insert(ctx, i ? "true" : "false", 0, &storage->_canonical);
  ------------------
  |  Branch (62:34): [True: 0, False: 0]
  ------------------
   63|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   64|       |
   65|       |        /* success */
   66|      0|        goto cleanup;
   67|      0|    }
   68|       |
   69|       |    /* check hints */
   70|  14.0k|    ret = lyplg_type_check_hints(hints, value, value_len, type->basetype, NULL, err);
   71|  14.0k|    LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
   72|       |
   73|       |    /* validate and store the value */
   74|  14.0k|    if ((value_len == ly_strlen_const("true")) && !strncmp(value, "true", ly_strlen_const("true"))) {
  ------------------
  |  |  472|  14.0k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
                  if ((value_len == ly_strlen_const("true")) && !strncmp(value, "true", ly_strlen_const("true"))) {
  ------------------
  |  |  472|  14.0k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (74:9): [True: 14.0k, False: 0]
  |  Branch (74:51): [True: 14.0k, False: 0]
  ------------------
   75|  14.0k|        i = 1;
   76|  14.0k|    } else if ((value_len == ly_strlen_const("false")) && !strncmp(value, "false", ly_strlen_const("false"))) {
  ------------------
  |  |  472|      0|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
                  } else if ((value_len == ly_strlen_const("false")) && !strncmp(value, "false", ly_strlen_const("false"))) {
  ------------------
  |  |  472|      0|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (76:16): [True: 0, False: 0]
  |  Branch (76:59): [True: 0, False: 0]
  ------------------
   77|      0|        i = 0;
   78|      0|    } else {
   79|      0|        ret = ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid boolean value \"%.*s\".", (int)value_len,
   80|      0|                (char *)value);
   81|      0|        goto cleanup;
   82|      0|    }
   83|  14.0k|    storage->boolean = i;
   84|       |
   85|       |    /* store canonical value, it always is */
   86|  14.0k|    if (options & LYPLG_TYPE_STORE_DYNAMIC) {
  ------------------
  |  |  470|  14.0k|#define LYPLG_TYPE_STORE_DYNAMIC   0x01 /**< Value was dynamically allocated in its exact size and is supposed to be freed or
  ------------------
  |  Branch (86:9): [True: 0, False: 14.0k]
  ------------------
   87|      0|        ret = lydict_insert_zc(ctx, (char *)value, &storage->_canonical);
   88|      0|        options &= ~LYPLG_TYPE_STORE_DYNAMIC;
  ------------------
  |  |  470|      0|#define LYPLG_TYPE_STORE_DYNAMIC   0x01 /**< Value was dynamically allocated in its exact size and is supposed to be freed or
  ------------------
   89|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   90|  14.0k|    } else {
   91|  14.0k|        ret = lydict_insert(ctx, value, value_len, &storage->_canonical);
   92|  14.0k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
   93|  14.0k|    }
   94|       |
   95|  14.0k|cleanup:
   96|  14.0k|    if (options & LYPLG_TYPE_STORE_DYNAMIC) {
  ------------------
  |  |  470|  14.0k|#define LYPLG_TYPE_STORE_DYNAMIC   0x01 /**< Value was dynamically allocated in its exact size and is supposed to be freed or
  ------------------
  |  Branch (96:9): [True: 0, False: 14.0k]
  ------------------
   97|      0|        free((char *)value);
   98|      0|    }
   99|       |
  100|  14.0k|    if (ret) {
  ------------------
  |  Branch (100:9): [True: 0, False: 14.0k]
  ------------------
  101|      0|        lyplg_type_free_simple(ctx, storage);
  102|      0|    }
  103|  14.0k|    return ret;
  104|  14.0k|}

lysc_update_path:
   52|  4.69M|{
   53|  4.69M|    int len;
   54|  4.69M|    uint8_t nextlevel = 0; /* 0 - no starttag, 1 - '/' starttag, 2 - '=' starttag + '}' endtag */
   55|       |
   56|  4.69M|    if (!name) {
  ------------------
  |  Branch (56:9): [True: 2.34M, False: 2.34M]
  ------------------
   57|       |        /* removing last path segment */
   58|  2.34M|        if (ctx->path[ctx->path_len - 1] == '}') {
  ------------------
  |  Branch (58:13): [True: 1.08M, False: 1.26M]
  ------------------
   59|  15.6M|            for ( ; ctx->path[ctx->path_len] != '=' && ctx->path[ctx->path_len] != '{'; --ctx->path_len) {}
  ------------------
  |  Branch (59:21): [True: 15.0M, False: 576k]
  |  Branch (59:56): [True: 14.5M, False: 506k]
  ------------------
   60|  1.08M|            if (ctx->path[ctx->path_len] == '=') {
  ------------------
  |  Branch (60:17): [True: 576k, False: 506k]
  ------------------
   61|   576k|                ctx->path[ctx->path_len++] = '}';
   62|   576k|            } else {
   63|       |                /* not a top-level special tag, remove also preceiding '/' */
   64|   506k|                goto remove_nodelevel;
   65|   506k|            }
   66|  1.26M|        } else {
   67|  1.77M|remove_nodelevel:
   68|  17.8M|            for ( ; ctx->path[ctx->path_len] != '/'; --ctx->path_len) {}
  ------------------
  |  Branch (68:21): [True: 16.0M, False: 1.77M]
  ------------------
   69|  1.77M|            if (ctx->path_len == 0) {
  ------------------
  |  Branch (69:17): [True: 337k, False: 1.43M]
  ------------------
   70|       |                /* top-level (last segment) */
   71|   337k|                ctx->path_len = 1;
   72|   337k|            }
   73|  1.77M|        }
   74|       |        /* set new terminating NULL-byte */
   75|  2.34M|        ctx->path[ctx->path_len] = '\0';
   76|  2.34M|    } else {
   77|  2.34M|        if (ctx->path_len > 1) {
  ------------------
  |  Branch (77:13): [True: 2.01M, False: 337k]
  ------------------
   78|  2.01M|            if (!parent_module && (ctx->path[ctx->path_len - 1] == '}') && (ctx->path[ctx->path_len - 2] != '\'')) {
  ------------------
  |  Branch (78:17): [True: 815k, False: 1.19M]
  |  Branch (78:35): [True: 590k, False: 224k]
  |  Branch (78:76): [True: 576k, False: 14.0k]
  ------------------
   79|       |                /* extension of the special tag */
   80|   576k|                nextlevel = 2;
   81|   576k|                --ctx->path_len;
   82|  1.43M|            } else {
   83|       |                /* there is already some path, so add next level */
   84|  1.43M|                nextlevel = 1;
   85|  1.43M|            }
   86|  2.01M|        } /* else the path is just initiated with '/', so do not add additional slash in case of top-level nodes */
   87|       |
   88|  2.34M|        if (nextlevel != 2) {
  ------------------
  |  Branch (88:13): [True: 1.77M, False: 576k]
  ------------------
   89|  1.77M|            if ((parent_module && (parent_module == ctx->cur_mod)) || (!parent_module && (ctx->path_len > 1) && (name[0] == '{'))) {
  ------------------
  |  Branch (89:18): [True: 1.19M, False: 576k]
  |  Branch (89:35): [True: 1.19M, False: 0]
  |  Branch (89:72): [True: 576k, False: 0]
  |  Branch (89:90): [True: 238k, False: 337k]
  |  Branch (89:113): [True: 238k, False: 0]
  ------------------
   90|       |                /* module not changed, print the name unprefixed */
   91|  1.43M|                len = snprintf(&ctx->path[ctx->path_len], LYSC_CTX_BUFSIZE - ctx->path_len, "%s%s", nextlevel ? "/" : "", name);
  ------------------
  |  |   59|  1.43M|#define LYSC_CTX_BUFSIZE 4078
  ------------------
  |  Branch (91:101): [True: 1.43M, False: 0]
  ------------------
   92|  1.43M|            } else {
   93|   337k|                len = snprintf(&ctx->path[ctx->path_len], LYSC_CTX_BUFSIZE - ctx->path_len, "%s%s:%s", nextlevel ? "/" : "", ctx->cur_mod->name, name);
  ------------------
  |  |   59|   337k|#define LYSC_CTX_BUFSIZE 4078
  ------------------
  |  Branch (93:104): [True: 0, False: 337k]
  ------------------
   94|   337k|            }
   95|  1.77M|        } else {
   96|   576k|            len = snprintf(&ctx->path[ctx->path_len], LYSC_CTX_BUFSIZE - ctx->path_len, "='%s'}", name);
  ------------------
  |  |   59|   576k|#define LYSC_CTX_BUFSIZE 4078
  ------------------
   97|   576k|        }
   98|  2.34M|        if (len >= LYSC_CTX_BUFSIZE - (int)ctx->path_len) {
  ------------------
  |  |   59|  2.34M|#define LYSC_CTX_BUFSIZE 4078
  ------------------
  |  Branch (98:13): [True: 0, False: 2.34M]
  ------------------
   99|       |            /* output truncated */
  100|      0|            ctx->path_len = LYSC_CTX_BUFSIZE - 1;
  ------------------
  |  |   59|      0|#define LYSC_CTX_BUFSIZE 4078
  ------------------
  101|  2.34M|        } else {
  102|  2.34M|            ctx->path_len += len;
  103|  2.34M|        }
  104|  2.34M|    }
  105|       |
  106|  4.69M|    LOG_LOCBACK(0, 0, 1, 0);
  ------------------
  |  |  152|  4.69M|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
  107|  4.69M|    LOG_LOCSET(NULL, NULL, ctx->path, NULL);
  ------------------
  |  |  141|  4.69M|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
  108|  4.69M|}
lys_compile_ext:
  158|   126k|{
  159|   126k|    LY_ERR ret = LY_SUCCESS;
  160|       |
  161|   126k|    DUP_STRING_GOTO(ctx->ctx, extp->argument, ext->argument, ret, cleanup);
  ------------------
  |  |  169|   126k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|   126k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 126k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  162|   126k|    ext->module = ctx->cur_mod;
  163|   126k|    ext->parent = parent;
  164|   126k|    ext->parent_stmt = extp->parent_stmt;
  165|   126k|    ext->parent_stmt_index = extp->parent_stmt_index;
  166|       |
  167|   126k|    lysc_update_path(ctx, (ext->parent_stmt & LY_STMT_NODE_MASK) ? ((struct lysc_node *)ext->parent)->module : NULL,
  ------------------
  |  |  135|   126k|#define LY_STMT_NODE_MASK 0xFFFF
  ------------------
  |  Branch (167:27): [True: 0, False: 126k]
  ------------------
  168|   126k|            "{extension}");
  169|   126k|    lysc_update_path(ctx, NULL, extp->name);
  170|       |
  171|       |    /* compile extension if not already */
  172|   126k|    LY_CHECK_GOTO(ret = lys_compile_extension(ctx, extp, &ext->def), cleanup);
  ------------------
  |  |  202|   126k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
  173|       |
  174|       |    /* compile */
  175|   126k|    if (ext->def->plugin && ext->def->plugin->compile) {
  ------------------
  |  Branch (175:9): [True: 126k, False: 0]
  |  Branch (175:29): [True: 126k, False: 0]
  ------------------
  176|   126k|        if (ext->argument) {
  ------------------
  |  Branch (176:13): [True: 126k, False: 0]
  ------------------
  177|   126k|            lysc_update_path(ctx, ext->module, ext->argument);
  178|   126k|        }
  179|   126k|        ret = ext->def->plugin->compile(ctx, extp, ext);
  180|   126k|        if (ret == LY_ENOT) {
  ------------------
  |  Branch (180:13): [True: 0, False: 126k]
  ------------------
  181|      0|            lysc_ext_instance_free(&ctx->free_ctx, ext);
  182|      0|        }
  183|   126k|        if (ext->argument) {
  ------------------
  |  Branch (183:13): [True: 126k, False: 0]
  ------------------
  184|   126k|            lysc_update_path(ctx, NULL, NULL);
  185|   126k|        }
  186|   126k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   126k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
  187|   126k|    }
  188|       |
  189|   126k|cleanup:
  190|   126k|    lysc_update_path(ctx, NULL, NULL);
  191|   126k|    lysc_update_path(ctx, NULL, NULL);
  192|   126k|    return ret;
  193|   126k|}
lys_identity_precompile:
  218|   112k|{
  219|   112k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  220|   112k|    struct lysc_ctx cctx;
  221|   112k|    struct lysc_ident *ident;
  222|   112k|    LY_ERR ret = LY_SUCCESS;
  223|       |
  224|   112k|    assert(ctx_sc || ctx);
  225|       |
  226|   112k|    if (!ctx_sc) {
  ------------------
  |  Branch (226:9): [True: 112k, False: 0]
  ------------------
  227|   112k|        if (parsed_mod) {
  ------------------
  |  Branch (227:13): [True: 112k, False: 0]
  ------------------
  228|   112k|            LYSC_CTX_INIT_PMOD(cctx, parsed_mod, NULL);
  ------------------
  |  |   84|   112k|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|   112k|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|   112k|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|   112k|    (CCTX).pmod = (PMOD); \
  |  |   88|   112k|    (CCTX).ext = (EXT); \
  |  |   89|   112k|    (CCTX).path_len = 1; \
  |  |   90|   112k|    (CCTX).path[0] = '/'; \
  |  |   91|   112k|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
  229|   112k|        } else {
  230|      0|            LYSC_CTX_INIT_CTX(cctx, ctx);
  ------------------
  |  |   70|      0|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   71|      0|    (CCTX).ctx = (CTX); \
  |  |   72|      0|    (CCTX).path_len = 1; \
  |  |   73|      0|    (CCTX).path[0] = '/'; \
  |  |   74|      0|    (CCTX).free_ctx.ctx = (CTX)
  ------------------
  231|      0|        }
  232|   112k|        ctx_sc = &cctx;
  233|   112k|    }
  234|       |
  235|   112k|    if (!identities_p) {
  ------------------
  |  Branch (235:9): [True: 98.4k, False: 14.0k]
  ------------------
  236|  98.4k|        return LY_SUCCESS;
  237|  98.4k|    }
  238|       |
  239|  14.0k|    lysc_update_path(ctx_sc, NULL, "{identity}");
  240|   112k|    LY_ARRAY_FOR(identities_p, u) {
  ------------------
  |  |  167|  14.0k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  14.0k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  14.0k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  14.0k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   126k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   126k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 126k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 112k, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  241|   112k|        lysc_update_path(ctx_sc, NULL, identities_p[u].name);
  242|       |
  243|       |        /* add new compiled identity */
  244|   112k|        LY_ARRAY_NEW_GOTO(ctx_sc->ctx, *identities, ident, ret, done);
  ------------------
  |  |  113|   112k|    LY_ARRAY_NEW(CTX, ARRAY, RET = LY_EMEM; goto GOTO); \
  |  |  ------------------
  |  |  |  |   61|   112k|    { \
  |  |  |  |   62|   112k|        char *p__; \
  |  |  |  |   63|   112k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 98.4k, False: 14.0k]
  |  |  |  |  ------------------
  |  |  |  |   64|  98.4k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  98.4k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  98.4k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  98.4k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 98.4k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  98.4k|        } else { \
  |  |  |  |   73|  14.0k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  14.0k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  14.0k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  14.0k|        } \
  |  |  |  |   80|   112k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   112k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   112k|    }
  |  |  ------------------
  |  |  114|   112k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |  115|   112k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
  245|       |
  246|   112k|        DUP_STRING_GOTO(ctx_sc->ctx, identities_p[u].name, ident->name, ret, done);
  ------------------
  |  |  169|   112k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  247|   112k|        DUP_STRING_GOTO(ctx_sc->ctx, identities_p[u].dsc, ident->dsc, ret, done);
  ------------------
  |  |  169|   112k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|   112k|        DUP_STRING_GOTO(ctx_sc->ctx, identities_p[u].ref, ident->ref, ret, done);
  ------------------
  |  |  169|   112k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|   112k|        ident->module = ctx_sc->cur_mod;
  250|       |        /* backlinks (derived) can be added no sooner than when all the identities in the current module are present */
  251|   112k|        COMPILE_EXTS_GOTO(ctx_sc, identities_p[u].exts, ident->exts, ident, ret, done);
  ------------------
  |  |  230|   112k|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 112k]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
  252|   112k|        ident->flags = identities_p[u].flags;
  253|       |
  254|   112k|        lysc_update_path(ctx_sc, NULL, NULL);
  255|   112k|    }
  256|  14.0k|    lysc_update_path(ctx_sc, NULL, NULL);
  257|       |
  258|  14.0k|done:
  259|  14.0k|    if (ret) {
  ------------------
  |  Branch (259:9): [True: 0, False: 14.0k]
  ------------------
  260|      0|        lysc_update_path(ctx_sc, NULL, NULL);
  261|      0|        lysc_update_path(ctx_sc, NULL, NULL);
  262|      0|    }
  263|  14.0k|    return ret;
  264|  14.0k|}
lys_compile_identity_bases:
  322|   112k|{
  323|   112k|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  324|   112k|    const char *s, *name;
  325|   112k|    const struct lys_module *mod;
  326|   112k|    struct lysc_ident **idref;
  327|       |
  328|   112k|    assert(ident || bases);
  329|       |
  330|   112k|    if ((LY_ARRAY_COUNT(bases_p) > 1) && (ctx->pmod->version < LYS_VERSION_1_1)) {
  ------------------
  |  |  148|   112k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 112k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (330:9): [True: 0, False: 112k]
  |  Branch (330:42): [True: 0, False: 0]
  ------------------
  331|      0|        LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  332|      0|                "Multiple bases in %s are allowed only in YANG 1.1 modules.", ident ? "identity" : "identityref type");
  333|      0|        return LY_EVALID;
  334|      0|    }
  335|       |
  336|   112k|    LY_ARRAY_FOR(bases_p, u) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   224k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   224k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 224k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 112k, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  337|   112k|        s = strchr(bases_p[u], ':');
  338|   112k|        if (s) {
  ------------------
  |  Branch (338:13): [True: 0, False: 112k]
  ------------------
  339|       |            /* prefixed identity */
  340|      0|            name = &s[1];
  341|      0|            mod = ly_resolve_prefix(ctx->ctx, bases_p[u], s - bases_p[u], LY_VALUE_SCHEMA, (void *)base_pmod);
  342|   112k|        } else {
  343|   112k|            name = bases_p[u];
  344|   112k|            mod = base_pmod->mod;
  345|   112k|        }
  346|   112k|        if (!mod) {
  ------------------
  |  Branch (346:13): [True: 0, False: 112k]
  ------------------
  347|      0|            if (ident) {
  ------------------
  |  Branch (347:17): [True: 0, False: 0]
  ------------------
  348|      0|                LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  349|      0|                        "Invalid prefix used for base (%s) of identity \"%s\".", bases_p[u], ident->name);
  350|      0|            } else {
  351|      0|                LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  352|      0|                        "Invalid prefix used for base (%s) of identityref.", bases_p[u]);
  353|      0|            }
  354|      0|            return LY_EVALID;
  355|      0|        }
  356|       |
  357|   112k|        idref = NULL;
  358|   168k|        LY_ARRAY_FOR(mod->identities, v) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   168k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   168k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 168k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 168k, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  359|   168k|            if (!strcmp(name, mod->identities[v].name)) {
  ------------------
  |  Branch (359:17): [True: 112k, False: 56.2k]
  ------------------
  360|   112k|                if (ident) {
  ------------------
  |  Branch (360:21): [True: 98.4k, False: 14.0k]
  ------------------
  361|  98.4k|                    if (ident == &mod->identities[v]) {
  ------------------
  |  Branch (361:25): [True: 0, False: 98.4k]
  ------------------
  362|      0|                        LOGVAL(ctx->ctx, LYVE_REFERENCE,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  363|      0|                                "Identity \"%s\" is derived from itself.", ident->name);
  364|      0|                        return LY_EVALID;
  365|      0|                    }
  366|  98.4k|                    LY_CHECK_RET(lys_compile_identity_circular_check(ctx, &mod->identities[v], ident->derived));
  ------------------
  |  |  206|  98.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  98.4k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  98.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  98.4k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 98.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  367|       |                    /* we have match! store the backlink */
  368|  98.4k|                    LY_ARRAY_NEW_RET(ctx->ctx, mod->identities[v].derived, idref, LY_EMEM);
  ------------------
  |  |   96|  98.4k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  98.4k|    { \
  |  |  |  |   62|  98.4k|        char *p__; \
  |  |  |  |   63|  98.4k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 70.2k, False: 28.1k]
  |  |  |  |  ------------------
  |  |  |  |   64|  70.2k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  70.2k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  70.2k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  70.2k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 70.2k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  70.2k|        } else { \
  |  |  |  |   73|  28.1k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  28.1k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 28.1k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  28.1k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  28.1k|        } \
  |  |  |  |   80|  98.4k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  98.4k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  98.4k|    }
  |  |  ------------------
  |  |   97|  98.4k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  98.4k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
  369|  98.4k|                    *idref = ident;
  370|  98.4k|                } else {
  371|       |                    /* we have match! store the found identity */
  372|  14.0k|                    LY_ARRAY_NEW_RET(ctx->ctx, *bases, idref, LY_EMEM);
  ------------------
  |  |   96|  14.0k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  14.0k|    { \
  |  |  |  |   62|  14.0k|        char *p__; \
  |  |  |  |   63|  14.0k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  |  |   64|      0|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  14.0k|        } else { \
  |  |  |  |   73|  14.0k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  14.0k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  14.0k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  14.0k|        } \
  |  |  |  |   80|  14.0k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  14.0k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  14.0k|    }
  |  |  ------------------
  |  |   97|  14.0k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  14.0k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
  373|  14.0k|                    *idref = &mod->identities[v];
  374|  14.0k|                }
  375|   112k|                break;
  376|   112k|            }
  377|   168k|        }
  378|   112k|        if (!idref) {
  ------------------
  |  Branch (378:13): [True: 0, False: 112k]
  ------------------
  379|      0|            if (ident) {
  ------------------
  |  Branch (379:17): [True: 0, False: 0]
  ------------------
  380|      0|                LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  381|      0|                        "Unable to find base (%s) of identity \"%s\".", bases_p[u], ident->name);
  382|      0|            } else {
  383|      0|                LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  384|      0|                        "Unable to find base (%s) of identityref.", bases_p[u]);
  385|      0|            }
  386|      0|            return LY_EVALID;
  387|      0|        }
  388|   112k|    }
  389|       |
  390|   112k|    return LY_SUCCESS;
  391|   112k|}
lys_compile_expr_implement:
  433|  70.2k|{
  434|  70.2k|    uint32_t i;
  435|  70.2k|    const char *ptr, *start, **imp_f, *all_f[] = {"*", NULL};
  436|  70.2k|    const struct lys_module *mod;
  437|       |
  438|  70.2k|    assert(implement || mod_p);
  439|       |
  440|   477k|    for (i = 0; i < expr->used; ++i) {
  ------------------
  |  Branch (440:17): [True: 407k, False: 70.2k]
  ------------------
  441|   407k|        if ((expr->tokens[i] != LYXP_TOKEN_NAMETEST) && (expr->tokens[i] != LYXP_TOKEN_LITERAL)) {
  ------------------
  |  Branch (441:13): [True: 267k, False: 140k]
  |  Branch (441:57): [True: 267k, False: 0]
  ------------------
  442|       |            /* token cannot have a prefix */
  443|   267k|            continue;
  444|   267k|        }
  445|       |
  446|   140k|        start = expr->expr + expr->tok_pos[i];
  447|   140k|        if (!(ptr = ly_strnchr(start, ':', expr->tok_len[i]))) {
  ------------------
  |  Branch (447:13): [True: 84.3k, False: 56.2k]
  ------------------
  448|       |            /* token without a prefix */
  449|  84.3k|            continue;
  450|  84.3k|        }
  451|       |
  452|  56.2k|        if (!(mod = ly_resolve_prefix(ctx, start, ptr - start, format, prefix_data))) {
  ------------------
  |  Branch (452:13): [True: 0, False: 56.2k]
  ------------------
  453|       |            /* unknown prefix, do not care right now */
  454|      0|            continue;
  455|      0|        }
  456|       |
  457|       |        /* unimplemented module found */
  458|  56.2k|        if (!mod->implemented && !implement) {
  ------------------
  |  Branch (458:13): [True: 0, False: 56.2k]
  |  Branch (458:34): [True: 0, False: 0]
  ------------------
  459|       |            /* should not be implemented now */
  460|      0|            *mod_p = mod;
  461|      0|            break;
  462|      0|        }
  463|       |
  464|  56.2k|        if (!mod->implemented) {
  ------------------
  |  Branch (464:13): [True: 0, False: 56.2k]
  ------------------
  465|       |            /* implement if not implemented */
  466|      0|            imp_f = (ctx->flags & LY_CTX_ENABLE_IMP_FEATURES) ? all_f : NULL;
  ------------------
  |  |  197|      0|#define LY_CTX_ENABLE_IMP_FEATURES 0x0100 /**< By default, all features of newly implemented imported modules of
  ------------------
  |  Branch (466:21): [True: 0, False: 0]
  ------------------
  467|      0|            LY_CHECK_RET(lys_implement((struct lys_module *)mod, imp_f, unres));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  468|      0|        }
  469|  56.2k|        if (!mod->compiled) {
  ------------------
  |  Branch (469:13): [True: 0, False: 56.2k]
  ------------------
  470|       |            /* compile if not implemented before or only marked for compilation */
  471|      0|            LY_CHECK_RET(lys_compile((struct lys_module *)mod, &unres->ds_unres));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  472|      0|        }
  473|  56.2k|    }
  474|       |
  475|  70.2k|    return LY_SUCCESS;
  476|  70.2k|}
lysc_check_status:
  622|   998k|{
  623|   998k|    uint16_t flg1, flg2;
  624|       |
  625|   998k|    flg1 = (flags1 & LYS_STATUS_MASK) ? (flags1 & LYS_STATUS_MASK) : LYS_STATUS_CURR;
  ------------------
  |  |  657|   998k|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
                  flg1 = (flags1 & LYS_STATUS_MASK) ? (flags1 & LYS_STATUS_MASK) : LYS_STATUS_CURR;
  ------------------
  |  |  657|   829k|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
                  flg1 = (flags1 & LYS_STATUS_MASK) ? (flags1 & LYS_STATUS_MASK) : LYS_STATUS_CURR;
  ------------------
  |  |  654|  1.16M|#define LYS_STATUS_CURR  0x04        /**< status current; */
  ------------------
  |  Branch (625:12): [True: 829k, False: 168k]
  ------------------
  626|   998k|    flg2 = (flags2 & LYS_STATUS_MASK) ? (flags2 & LYS_STATUS_MASK) : LYS_STATUS_CURR;
  ------------------
  |  |  657|   998k|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
                  flg2 = (flags2 & LYS_STATUS_MASK) ? (flags2 & LYS_STATUS_MASK) : LYS_STATUS_CURR;
  ------------------
  |  |  657|   393k|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
                  flg2 = (flags2 & LYS_STATUS_MASK) ? (flags2 & LYS_STATUS_MASK) : LYS_STATUS_CURR;
  ------------------
  |  |  654|  1.60M|#define LYS_STATUS_CURR  0x04        /**< status current; */
  ------------------
  |  Branch (626:12): [True: 393k, False: 604k]
  ------------------
  627|       |
  628|   998k|    if ((flg1 < flg2) && (mod1 == mod2)) {
  ------------------
  |  Branch (628:9): [True: 0, False: 998k]
  |  Branch (628:26): [True: 0, False: 0]
  ------------------
  629|      0|        if (ctx) {
  ------------------
  |  Branch (629:13): [True: 0, False: 0]
  ------------------
  630|      0|            LOGVAL(ctx->ctx, LYVE_REFERENCE, "A %s definition \"%s\" is not allowed to reference %s definition \"%s\".",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  631|      0|                    flg1 == LYS_STATUS_CURR ? "current" : "deprecated", name1,
  632|      0|                    flg2 == LYS_STATUS_OBSLT ? "obsolete" : "deprecated", name2);
  633|      0|        }
  634|      0|        return LY_EVALID;
  635|      0|    }
  636|       |
  637|   998k|    return LY_SUCCESS;
  638|   998k|}
lys_compile_depset_all:
 1479|  14.0k|{
 1480|  14.0k|    uint32_t i;
 1481|       |
 1482|   126k|    for (i = 0; i < unres->dep_sets.count; ++i) {
  ------------------
  |  Branch (1482:17): [True: 112k, False: 14.0k]
  ------------------
 1483|   112k|        LY_CHECK_RET(lys_compile_depset_check_features(unres->dep_sets.objs[i]));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1484|   112k|        LY_CHECK_RET(lys_compile_depset_r(ctx, unres->dep_sets.objs[i], unres));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1485|   112k|    }
 1486|       |
 1487|  14.0k|    return LY_SUCCESS;
 1488|  14.0k|}
lys_compile:
 1590|  56.2k|{
 1591|  56.2k|    struct lysc_ctx ctx;
 1592|  56.2k|    struct lysc_module *mod_c = NULL;
 1593|  56.2k|    struct lysp_module *sp;
 1594|  56.2k|    struct lysp_submodule *submod;
 1595|  56.2k|    struct lysp_node *pnode;
 1596|  56.2k|    struct lysp_node_grp *grp;
 1597|  56.2k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|  56.2k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1598|  56.2k|    LY_ERR ret = LY_SUCCESS;
 1599|       |
 1600|   168k|    LY_CHECK_ARG_RET(NULL, mod, mod->parsed, !mod->compiled, mod->ctx, LY_EINVAL);
  ------------------
  |  |  226|  56.2k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  56.2k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  56.2k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  220|  56.2k|#define LY_CHECK_ARG_RET4(CTX, ARG1, ARG2, ARG3, ARG4, RETVAL) LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL);\
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  219|  56.2k|#define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  218|  56.2k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  217|  56.2k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  217|  56.2k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  217|  56.2k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  221|  56.2k|    LY_CHECK_ARG_RET1(CTX, ARG4, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  56.2k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  56.2k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
 1601|       |
 1602|  56.2k|    assert(mod->implemented && mod->to_compile);
 1603|       |
 1604|      0|    sp = mod->parsed;
 1605|  56.2k|    LYSC_CTX_INIT_PMOD(ctx, sp, NULL);
  ------------------
  |  |   84|  56.2k|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|  56.2k|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|  56.2k|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|  56.2k|    (CCTX).pmod = (PMOD); \
  |  |   88|  56.2k|    (CCTX).ext = (EXT); \
  |  |   89|  56.2k|    (CCTX).path_len = 1; \
  |  |   90|  56.2k|    (CCTX).path[0] = '/'; \
  |  |   91|  56.2k|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 1606|  56.2k|    ctx.unres = unres;
 1607|       |
 1608|  56.2k|    ++mod->ctx->change_count;
 1609|  56.2k|    mod->compiled = mod_c = calloc(1, sizeof *mod_c);
 1610|  56.2k|    LY_CHECK_ERR_RET(!mod_c, LOGMEM(mod->ctx), LY_EMEM);
  ------------------
  |  |  207|  56.2k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 56.2k]
  |  |  ------------------
  ------------------
 1611|  56.2k|    mod_c->mod = mod;
 1612|       |
 1613|       |    /* compile augments and deviations of our module from other modules so they can be applied during compilation */
 1614|  56.2k|    LY_CHECK_GOTO(ret = lys_precompile_own_augments(&ctx), cleanup);
  ------------------
  |  |  202|  56.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 56.2k]
  |  |  ------------------
  ------------------
 1615|  56.2k|    LY_CHECK_GOTO(ret = lys_precompile_own_deviations(&ctx), cleanup);
  ------------------
  |  |  202|  56.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 56.2k]
  |  |  ------------------
  ------------------
 1616|       |
 1617|       |    /* data nodes */
 1618|  56.2k|    LY_LIST_FOR(sp->data, pnode) {
  ------------------
  |  |  181|  56.2k|    for ((ELEM) = (START); \
  |  |  182|  98.4k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 42.1k, False: 56.2k]
  |  |  ------------------
  |  |  183|  56.2k|         (ELEM) = (ELEM)->next)
  ------------------
 1619|  42.1k|        LY_CHECK_GOTO(ret = lys_compile_node(&ctx, pnode, NULL, 0, NULL), cleanup);
  ------------------
  |  |  202|  42.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 42.1k]
  |  |  ------------------
  ------------------
 1620|  42.1k|    }
 1621|       |
 1622|       |    /* top-level RPCs */
 1623|  56.2k|    LY_LIST_FOR((struct lysp_node *)sp->rpcs, pnode) {
  ------------------
  |  |  181|  56.2k|    for ((ELEM) = (START); \
  |  |  182|  56.2k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 56.2k]
  |  |  ------------------
  |  |  183|  56.2k|         (ELEM) = (ELEM)->next)
  ------------------
 1624|      0|        LY_CHECK_GOTO(ret = lys_compile_node(&ctx, pnode, NULL, 0, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1625|      0|    }
 1626|       |
 1627|       |    /* top-level notifications */
 1628|  56.2k|    LY_LIST_FOR((struct lysp_node *)sp->notifs, pnode) {
  ------------------
  |  |  181|  56.2k|    for ((ELEM) = (START); \
  |  |  182|  84.3k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 28.1k, False: 56.2k]
  |  |  ------------------
  |  |  183|  56.2k|         (ELEM) = (ELEM)->next)
  ------------------
 1629|  28.1k|        LY_CHECK_GOTO(ret = lys_compile_node(&ctx, pnode, NULL, 0, NULL), cleanup);
  ------------------
  |  |  202|  28.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 1630|  28.1k|    }
 1631|       |
 1632|       |    /* module extension instances */
 1633|  56.2k|    COMPILE_EXTS_GOTO(&ctx, sp->exts, mod_c->exts, mod_c, ret, cleanup);
  ------------------
  |  |  230|  56.2k|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 14.0k, False: 42.1k]
  |  |  ------------------
  |  |  231|  14.0k|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|  14.0k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 14.0k]
  |  |  ------------------
  |  |  232|  14.0k|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|  14.0k|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|  14.0k|    { \
  |  |  |  |  |  |  134|  14.0k|        char *p__; \
  |  |  |  |  |  |  135|  14.0k|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 14.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|  14.0k|        } else { \
  |  |  |  |  |  |  143|  28.1k|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 14.0k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  14.0k|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 14.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|  14.0k|        } \
  |  |  |  |  |  |  149|  14.0k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|  14.0k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|  14.0k|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 14.0k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|  28.1k|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 14.0k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|  14.0k|        } \
  |  |  |  |  |  |  154|  14.0k|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|   126k|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|  14.0k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  14.0k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  14.0k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  14.0k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   140k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   140k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 140k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 126k, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|   126k|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|   126k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|   126k|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|   126k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 126k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|   126k|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 126k]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|   126k|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 126k]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|   126k|        } \
  |  |  243|  14.0k|    }
  ------------------
 1634|       |
 1635|       |    /* the same for submodules */
 1636|  56.2k|    LY_ARRAY_FOR(sp->includes, u) {
  ------------------
  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  56.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  56.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  56.2k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  56.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  56.2k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1637|      0|        submod = sp->includes[u].submodule;
 1638|      0|        ctx.pmod = (struct lysp_module *)submod;
 1639|       |
 1640|      0|        LY_LIST_FOR(submod->data, pnode) {
  ------------------
  |  |  181|      0|    for ((ELEM) = (START); \
  |  |  182|      0|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  183|      0|         (ELEM) = (ELEM)->next)
  ------------------
 1641|      0|            ret = lys_compile_node(&ctx, pnode, NULL, 0, NULL);
 1642|      0|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1643|      0|        }
 1644|       |
 1645|      0|        LY_LIST_FOR((struct lysp_node *)submod->rpcs, pnode) {
  ------------------
  |  |  181|      0|    for ((ELEM) = (START); \
  |  |  182|      0|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  183|      0|         (ELEM) = (ELEM)->next)
  ------------------
 1646|      0|            ret = lys_compile_node(&ctx, pnode, NULL, 0, NULL);
 1647|      0|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1648|      0|        }
 1649|       |
 1650|      0|        LY_LIST_FOR((struct lysp_node *)submod->notifs, pnode) {
  ------------------
  |  |  181|      0|    for ((ELEM) = (START); \
  |  |  182|      0|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  183|      0|         (ELEM) = (ELEM)->next)
  ------------------
 1651|      0|            ret = lys_compile_node(&ctx, pnode, NULL, 0, NULL);
 1652|      0|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1653|      0|        }
 1654|       |
 1655|      0|        COMPILE_EXTS_GOTO(&ctx, submod->exts, mod_c->exts, mod_c, ret, cleanup);
  ------------------
  |  |  230|      0|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 1656|      0|    }
 1657|  56.2k|    ctx.pmod = sp;
 1658|       |
 1659|       |    /* validate non-instantiated groupings from the parsed schema,
 1660|       |     * without it we would accept even the schemas with invalid grouping specification */
 1661|  56.2k|    ctx.compile_opts |= LYS_COMPILE_GROUPING;
  ------------------
  |  |  537|  56.2k|#define LYS_COMPILE_GROUPING        0x01            /**< Compiling (validation) of a non-instantiated grouping.
  ------------------
 1662|  84.3k|    LY_LIST_FOR(sp->groupings, grp) {
  ------------------
  |  |  181|  56.2k|    for ((ELEM) = (START); \
  |  |  182|   140k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 84.3k, False: 56.2k]
  |  |  ------------------
  |  |  183|  84.3k|         (ELEM) = (ELEM)->next)
  ------------------
 1663|  84.3k|        if (!(grp->flags & LYS_USED_GRP)) {
  ------------------
  |  |  684|  84.3k|#define LYS_USED_GRP     0x0400      /**< internal flag for validating not-instantiated groupings
  ------------------
  |  Branch (1663:13): [True: 0, False: 84.3k]
  ------------------
 1664|      0|            LY_CHECK_GOTO(ret = lys_compile_grouping(&ctx, NULL, grp), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1665|      0|        }
 1666|  84.3k|    }
 1667|  56.2k|    LY_LIST_FOR(sp->data, pnode) {
  ------------------
  |  |  181|  56.2k|    for ((ELEM) = (START); \
  |  |  182|  98.4k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 42.1k, False: 56.2k]
  |  |  ------------------
  |  |  183|  56.2k|         (ELEM) = (ELEM)->next)
  ------------------
 1668|  42.1k|        LY_LIST_FOR((struct lysp_node_grp *)lysp_node_groupings(pnode), grp) {
  ------------------
  |  |  181|  42.1k|    for ((ELEM) = (START); \
  |  |  182|  42.1k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 42.1k]
  |  |  ------------------
  |  |  183|  42.1k|         (ELEM) = (ELEM)->next)
  ------------------
 1669|      0|            if (!(grp->flags & LYS_USED_GRP)) {
  ------------------
  |  |  684|      0|#define LYS_USED_GRP     0x0400      /**< internal flag for validating not-instantiated groupings
  ------------------
  |  Branch (1669:17): [True: 0, False: 0]
  ------------------
 1670|      0|                LY_CHECK_GOTO(ret = lys_compile_grouping(&ctx, pnode, grp), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1671|      0|            }
 1672|      0|        }
 1673|  42.1k|    }
 1674|  56.2k|    LY_ARRAY_FOR(sp->includes, u) {
  ------------------
  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  56.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  56.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  56.2k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  56.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  56.2k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1675|      0|        submod = sp->includes[u].submodule;
 1676|      0|        ctx.pmod = (struct lysp_module *)submod;
 1677|       |
 1678|      0|        LY_LIST_FOR(submod->groupings, grp) {
  ------------------
  |  |  181|      0|    for ((ELEM) = (START); \
  |  |  182|      0|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  183|      0|         (ELEM) = (ELEM)->next)
  ------------------
 1679|      0|            if (!(grp->flags & LYS_USED_GRP)) {
  ------------------
  |  |  684|      0|#define LYS_USED_GRP     0x0400      /**< internal flag for validating not-instantiated groupings
  ------------------
  |  Branch (1679:17): [True: 0, False: 0]
  ------------------
 1680|      0|                LY_CHECK_GOTO(ret = lys_compile_grouping(&ctx, NULL, grp), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1681|      0|            }
 1682|      0|        }
 1683|      0|        LY_LIST_FOR(submod->data, pnode) {
  ------------------
  |  |  181|      0|    for ((ELEM) = (START); \
  |  |  182|      0|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  183|      0|         (ELEM) = (ELEM)->next)
  ------------------
 1684|      0|            LY_LIST_FOR((struct lysp_node_grp *)lysp_node_groupings(pnode), grp) {
  ------------------
  |  |  181|      0|    for ((ELEM) = (START); \
  |  |  182|      0|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  183|      0|         (ELEM) = (ELEM)->next)
  ------------------
 1685|      0|                if (!(grp->flags & LYS_USED_GRP)) {
  ------------------
  |  |  684|      0|#define LYS_USED_GRP     0x0400      /**< internal flag for validating not-instantiated groupings
  ------------------
  |  Branch (1685:21): [True: 0, False: 0]
  ------------------
 1686|      0|                    LY_CHECK_GOTO(ret = lys_compile_grouping(&ctx, pnode, grp), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1687|      0|                }
 1688|      0|            }
 1689|      0|        }
 1690|      0|    }
 1691|  56.2k|    ctx.pmod = sp;
 1692|       |
 1693|  56.2k|    LOG_LOCBACK(0, 0, 1, 0);
  ------------------
  |  |  152|  56.2k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1694|       |
 1695|       |    /* finish compilation for all unresolved module items in the context */
 1696|  56.2k|    LY_CHECK_GOTO(ret = lys_compile_unres_mod(&ctx), cleanup);
  ------------------
  |  |  202|  56.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 56.2k]
  |  |  ------------------
  ------------------
 1697|       |
 1698|  56.2k|cleanup:
 1699|  56.2k|    LOG_LOCBACK(0, 0, 1, 0);
  ------------------
  |  |  152|  56.2k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1700|  56.2k|    lys_compile_unres_mod_erase(&ctx, ret);
 1701|  56.2k|    if (ret) {
  ------------------
  |  Branch (1701:9): [True: 0, False: 56.2k]
  ------------------
 1702|      0|        lysc_module_free(&ctx.free_ctx, mod_c);
 1703|      0|        mod->compiled = NULL;
 1704|      0|    }
 1705|  56.2k|    return ret;
 1706|  56.2k|}
lys_compile_identities:
 1710|   112k|{
 1711|   112k|    LY_ERR rc = LY_SUCCESS;
 1712|   112k|    struct lysc_ctx ctx;
 1713|   112k|    struct lysp_submodule *submod;
 1714|   112k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1715|       |
 1716|       |    /* pre-compile identities of the module and any submodules */
 1717|   112k|    rc = lys_identity_precompile(NULL, mod->ctx, mod->parsed, mod->parsed->identities, &mod->identities);
 1718|   112k|    LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1719|   112k|    LY_ARRAY_FOR(mod->parsed->includes, u) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   112k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   112k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1720|      0|        submod = mod->parsed->includes[u].submodule;
 1721|      0|        rc = lys_identity_precompile(NULL, mod->ctx, (struct lysp_module *)submod, submod->identities, &mod->identities);
 1722|      0|        LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1723|      0|    }
 1724|       |
 1725|       |    /* prepare context */
 1726|   112k|    LYSC_CTX_INIT_PMOD(ctx, mod->parsed, NULL);
  ------------------
  |  |   84|   112k|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|   112k|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|   112k|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|   112k|    (CCTX).pmod = (PMOD); \
  |  |   88|   112k|    (CCTX).ext = (EXT); \
  |  |   89|   112k|    (CCTX).path_len = 1; \
  |  |   90|   112k|    (CCTX).path[0] = '/'; \
  |  |   91|   112k|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 1727|       |
 1728|   112k|    if (mod->parsed->identities) {
  ------------------
  |  Branch (1728:9): [True: 14.0k, False: 98.4k]
  ------------------
 1729|  14.0k|        rc = lys_compile_identities_derived(&ctx, mod->parsed->identities, &mod->identities);
 1730|  14.0k|        LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 1731|  14.0k|    }
 1732|   112k|    lysc_update_path(&ctx, NULL, "{submodule}");
 1733|   112k|    LY_ARRAY_FOR(mod->parsed->includes, u) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   112k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   112k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1734|      0|        submod = mod->parsed->includes[u].submodule;
 1735|      0|        if (submod->identities) {
  ------------------
  |  Branch (1735:13): [True: 0, False: 0]
  ------------------
 1736|      0|            ctx.pmod = (struct lysp_module *)submod;
 1737|      0|            lysc_update_path(&ctx, NULL, submod->name);
 1738|      0|            rc = lys_compile_identities_derived(&ctx, submod->identities, &mod->identities);
 1739|      0|            lysc_update_path(&ctx, NULL, NULL);
 1740|      0|        }
 1741|       |
 1742|      0|        if (rc) {
  ------------------
  |  Branch (1742:13): [True: 0, False: 0]
  ------------------
 1743|      0|            break;
 1744|      0|        }
 1745|      0|    }
 1746|   112k|    lysc_update_path(&ctx, NULL, NULL);
 1747|       |
 1748|   112k|cleanup:
 1749|       |    /* always needed when using lysc_update_path() */
 1750|   112k|    LOG_LOCBACK(0, 0, 1, 0);
  ------------------
  |  |  152|   112k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1751|   112k|    return rc;
 1752|   112k|}
lys_implement:
 1789|  56.2k|{
 1790|  56.2k|    LY_ERR r;
 1791|  56.2k|    struct lys_module *m;
 1792|       |
 1793|  56.2k|    assert(!mod->implemented);
 1794|       |
 1795|       |    /* check collision with other implemented revision */
 1796|      0|    m = ly_ctx_get_module_implemented(mod->ctx, mod->name);
 1797|  56.2k|    if (m) {
  ------------------
  |  Branch (1797:9): [True: 0, False: 56.2k]
  ------------------
 1798|      0|        assert(m != mod);
 1799|      0|        LOGERR(mod->ctx, LY_EDENIED, "Module \"%s@%s\" is already implemented in revision \"%s\".",
  ------------------
  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (154:62): [True: 0, False: 0]
  |  |  |  Branch (154:62): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1800|      0|                mod->name, mod->revision ? mod->revision : "<none>", m->revision ? m->revision : "<none>");
 1801|      0|        return LY_EDENIED;
 1802|      0|    }
 1803|       |
 1804|       |    /* set features */
 1805|  56.2k|    r = lys_set_features(mod->parsed, features);
 1806|  56.2k|    if (r && (r != LY_EEXIST)) {
  ------------------
  |  Branch (1806:9): [True: 56.2k, False: 0]
  |  Branch (1806:14): [True: 0, False: 56.2k]
  ------------------
 1807|      0|        return r;
 1808|      0|    }
 1809|       |
 1810|       |    /*
 1811|       |     * mark the module implemented, which means
 1812|       |     * 1) to (re)compile it only ::lys_compile() call is needed
 1813|       |     * 2) its compilation will never cause new modules to be implemented (::lys_compile() does not return ::LY_ERECOMPILE)
 1814|       |     *    but there can be some unres items added that do
 1815|       |     */
 1816|  56.2k|    mod->implemented = 1;
 1817|       |
 1818|       |    /* this module is compiled in this compilation */
 1819|  56.2k|    mod->to_compile = 1;
 1820|       |
 1821|       |    /* add the module into newly implemented module set */
 1822|  56.2k|    LY_CHECK_RET(ly_set_add(&unres->implementing, mod, 1, NULL));
  ------------------
  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  56.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  56.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1823|       |
 1824|       |    /* mark target modules with our augments and deviations */
 1825|  56.2k|    LY_CHECK_RET(lys_precompile_augments_deviations(mod, unres));
  ------------------
  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  56.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  56.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1826|       |
 1827|       |    /* check whether this module may reference any modules compiled previously */
 1828|  56.2k|    LY_CHECK_RET(lys_has_compiled_import_r(mod));
  ------------------
  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  56.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  56.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1829|       |
 1830|  56.2k|    return LY_SUCCESS;
 1831|  56.2k|}
schema_compile.c:lys_compile_extension:
  120|   126k|{
  121|   126k|    LY_ERR ret = LY_SUCCESS;
  122|   126k|    struct lysp_ext *ep = extp->def;
  123|       |
  124|   126k|    if (!ep->compiled) {
  ------------------
  |  Branch (124:9): [True: 14.0k, False: 112k]
  ------------------
  125|  14.0k|        lysc_update_path(ctx, NULL, "{extension}");
  126|  14.0k|        lysc_update_path(ctx, NULL, ep->name);
  127|       |
  128|       |        /* compile the extension definition */
  129|  14.0k|        *ext = ep->compiled = calloc(1, sizeof **ext);
  130|  14.0k|        (*ext)->refcount = 1;
  131|  14.0k|        DUP_STRING_GOTO(ctx->ctx, ep->name, (*ext)->name, ret, cleanup);
  ------------------
  |  |  169|  14.0k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  132|  14.0k|        DUP_STRING_GOTO(ctx->ctx, ep->argname, (*ext)->argname, ret, cleanup);
  ------------------
  |  |  169|  14.0k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  133|  14.0k|        LY_CHECK_GOTO(ret = lysp_ext_find_definition(ctx->ctx, extp, (const struct lys_module **)&(*ext)->module, NULL),
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  134|  14.0k|                cleanup);
  135|       |
  136|       |        /* compile nested extensions */
  137|  14.0k|        COMPILE_EXTS_GOTO(ctx, ep->exts, (*ext)->exts, *ext, ret, cleanup);
  ------------------
  |  |  230|  14.0k|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 14.0k]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
  138|       |
  139|  14.0k|        lysc_update_path(ctx, NULL, NULL);
  140|  14.0k|        lysc_update_path(ctx, NULL, NULL);
  141|       |
  142|       |        /* find extension definition plugin */
  143|  14.0k|        (*ext)->plugin = extp->record ? (struct lyplg_ext *)&extp->record->plugin : NULL;
  ------------------
  |  Branch (143:26): [True: 14.0k, False: 0]
  ------------------
  144|  14.0k|    }
  145|       |
  146|   126k|    *ext = ep->compiled;
  147|       |
  148|   126k|cleanup:
  149|   126k|    if (ret) {
  ------------------
  |  Branch (149:9): [True: 0, False: 126k]
  ------------------
  150|      0|        lysc_update_path(ctx, NULL, NULL);
  151|      0|        lysc_update_path(ctx, NULL, NULL);
  152|      0|    }
  153|   126k|    return ret;
  154|   126k|}
schema_compile.c:lys_compile_identity_circular_check:
  279|  98.4k|{
  280|  98.4k|    LY_ERR ret = LY_SUCCESS;
  281|  98.4k|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|  98.4k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  282|  98.4k|    struct ly_set recursion = {0};
  283|  98.4k|    struct lysc_ident *drv;
  284|       |
  285|  98.4k|    if (!derived) {
  ------------------
  |  Branch (285:9): [True: 98.4k, False: 0]
  ------------------
  286|  98.4k|        return LY_SUCCESS;
  287|  98.4k|    }
  288|       |
  289|      0|    for (u = 0; u < LY_ARRAY_COUNT(derived); ++u) {
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (289:17): [True: 0, False: 0]
  ------------------
  290|      0|        if (ident == derived[u]) {
  ------------------
  |  Branch (290:13): [True: 0, False: 0]
  ------------------
  291|      0|            LOGVAL(ctx->ctx, LYVE_REFERENCE,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  292|      0|                    "Identity \"%s\" is indirectly derived from itself.", ident->name);
  293|      0|            ret = LY_EVALID;
  294|      0|            goto cleanup;
  295|      0|        }
  296|      0|        ret = ly_set_add(&recursion, derived[u], 0, NULL);
  297|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  298|      0|    }
  299|       |
  300|      0|    for (v = 0; v < recursion.count; ++v) {
  ------------------
  |  Branch (300:17): [True: 0, False: 0]
  ------------------
  301|      0|        drv = recursion.objs[v];
  302|      0|        for (u = 0; u < LY_ARRAY_COUNT(drv->derived); ++u) {
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (302:21): [True: 0, False: 0]
  ------------------
  303|      0|            if (ident == drv->derived[u]) {
  ------------------
  |  Branch (303:17): [True: 0, False: 0]
  ------------------
  304|      0|                LOGVAL(ctx->ctx, LYVE_REFERENCE,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  305|      0|                        "Identity \"%s\" is indirectly derived from itself.", ident->name);
  306|      0|                ret = LY_EVALID;
  307|      0|                goto cleanup;
  308|      0|            }
  309|      0|            ret = ly_set_add(&recursion, drv->derived[u], 0, NULL);
  310|      0|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  311|      0|        }
  312|      0|    }
  313|       |
  314|      0|cleanup:
  315|      0|    ly_set_erase(&recursion, NULL);
  316|      0|    return ret;
  317|      0|}
schema_compile.c:lys_compile_depset_check_features:
 1459|   112k|{
 1460|   112k|    struct lys_module *mod;
 1461|   112k|    uint32_t i;
 1462|       |
 1463|   224k|    for (i = 0; i < dep_set->count; ++i) {
  ------------------
  |  Branch (1463:17): [True: 112k, False: 112k]
  ------------------
 1464|   112k|        mod = dep_set->objs[i];
 1465|   112k|        if (!mod->to_compile) {
  ------------------
  |  Branch (1465:13): [True: 56.2k, False: 56.2k]
  ------------------
 1466|       |            /* skip */
 1467|  56.2k|            continue;
 1468|  56.2k|        }
 1469|       |
 1470|       |        /* check features of this module */
 1471|  56.2k|        LY_CHECK_RET(lys_check_features(mod->parsed));
  ------------------
  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  56.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  56.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  56.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1472|  56.2k|    }
 1473|       |
 1474|   112k|    return LY_SUCCESS;
 1475|   112k|}
schema_compile.c:lys_compile_depset_r:
 1406|   112k|{
 1407|   112k|    LY_ERR ret = LY_SUCCESS;
 1408|   112k|    struct lysf_ctx fctx = {.ctx = ctx};
 1409|   112k|    struct lys_module *mod;
 1410|   112k|    uint32_t i;
 1411|       |
 1412|   224k|    for (i = 0; i < dep_set->count; ++i) {
  ------------------
  |  Branch (1412:17): [True: 112k, False: 112k]
  ------------------
 1413|   112k|        mod = dep_set->objs[i];
 1414|   112k|        if (!mod->to_compile) {
  ------------------
  |  Branch (1414:13): [True: 56.2k, False: 56.2k]
  ------------------
 1415|       |            /* skip */
 1416|  56.2k|            continue;
 1417|  56.2k|        }
 1418|  56.2k|        assert(mod->implemented);
 1419|       |
 1420|       |        /* free the compiled module, if any */
 1421|      0|        lysc_module_free(&fctx, mod->compiled);
 1422|  56.2k|        mod->compiled = NULL;
 1423|       |
 1424|       |        /* (re)compile the module */
 1425|  56.2k|        LY_CHECK_GOTO(ret = lys_compile(mod, &unres->ds_unres), cleanup);
  ------------------
  |  |  202|  56.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 56.2k]
  |  |  ------------------
  ------------------
 1426|  56.2k|    }
 1427|       |
 1428|       |    /* resolve dep set unres */
 1429|   112k|    ret = lys_compile_unres_depset(ctx, unres);
 1430|   112k|    if (ret == LY_ERECOMPILE) {
  ------------------
  |  Branch (1430:9): [True: 0, False: 112k]
  ------------------
 1431|       |        /* new module is implemented, discard current dep set unres and recompile the whole dep set */
 1432|      0|        lys_compile_unres_depset_erase(ctx, unres);
 1433|      0|        return lys_compile_depset_r(ctx, dep_set, unres);
 1434|   112k|    } else if (ret) {
  ------------------
  |  Branch (1434:16): [True: 0, False: 112k]
  ------------------
 1435|       |        /* error */
 1436|      0|        goto cleanup;
 1437|      0|    }
 1438|       |
 1439|       |    /* success, unset the flags of all the modules in the dep set */
 1440|   224k|    for (i = 0; i < dep_set->count; ++i) {
  ------------------
  |  Branch (1440:17): [True: 112k, False: 112k]
  ------------------
 1441|   112k|        mod = dep_set->objs[i];
 1442|   112k|        mod->to_compile = 0;
 1443|   112k|    }
 1444|       |
 1445|   112k|cleanup:
 1446|   112k|    lys_compile_unres_depset_erase(ctx, unres);
 1447|   112k|    lysf_ctx_erase(&fctx);
 1448|   112k|    return ret;
 1449|   112k|}
schema_compile.c:lys_compile_unres_depset:
 1166|   112k|{
 1167|   112k|    LY_ERR ret = LY_SUCCESS, r;
 1168|   112k|    struct lysc_node *node;
 1169|   112k|    struct lysc_type *typeiter;
 1170|   112k|    struct lysc_type_leafref *lref;
 1171|   112k|    struct lysc_ctx cctx = {0};
 1172|   112k|    struct lys_depset_unres *ds_unres = &unres->ds_unres;
 1173|   112k|    struct ly_path *path;
 1174|   112k|    LY_ARRAY_COUNT_TYPE v;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1175|   112k|    struct lysc_unres_leafref *l;
 1176|   112k|    struct lysc_unres_when *w;
 1177|   112k|    struct lysc_unres_must *m;
 1178|   112k|    struct lysc_unres_dflt *d;
 1179|   112k|    uint32_t i, processed_leafrefs = 0;
 1180|       |
 1181|   112k|resolve_all:
 1182|       |    /* check disabled leafrefs first */
 1183|   112k|    while (ds_unres->disabled_leafrefs.count) {
  ------------------
  |  Branch (1183:12): [True: 0, False: 112k]
  ------------------
 1184|       |        /* remember index, it can change before we get to free this item */
 1185|      0|        i = ds_unres->disabled_leafrefs.count - 1;
 1186|      0|        l = ds_unres->disabled_leafrefs.objs[i];
 1187|      0|        LYSC_CTX_INIT_PMOD(cctx, l->node->module->parsed, l->ext);
  ------------------
  |  |   84|      0|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|      0|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|      0|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|      0|    (CCTX).pmod = (PMOD); \
  |  |   88|      0|    (CCTX).ext = (EXT); \
  |  |   89|      0|    (CCTX).path_len = 1; \
  |  |   90|      0|    (CCTX).path[0] = '/'; \
  |  |   91|      0|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 1188|       |
 1189|      0|        LOG_LOCSET(l->node, NULL, NULL, NULL);
  ------------------
  |  |  141|      0|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 1190|      0|        v = 0;
 1191|      0|        while ((ret == LY_SUCCESS) && (lref = lys_type_leafref_next(l->node, &v))) {
  ------------------
  |  Branch (1191:16): [True: 0, False: 0]
  |  Branch (1191:39): [True: 0, False: 0]
  ------------------
 1192|      0|            ret = lys_compile_unres_leafref(&cctx, l->node, lref, l->local_mod, unres);
 1193|      0|        }
 1194|      0|        LOG_LOCBACK(1, 0, 0, 0);
  ------------------
  |  |  152|      0|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1195|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1196|       |
 1197|      0|        ly_set_rm_index(&ds_unres->disabled_leafrefs, i, free);
 1198|      0|    }
 1199|       |
 1200|       |    /* for leafref, we need 2 rounds - first detects circular chain by storing the first referred type (which
 1201|       |     * can be also leafref, in case it is already resolved, go through the chain and check that it does not
 1202|       |     * point to the starting leafref type). The second round stores the first non-leafref type for later data validation.
 1203|       |     * Also do the same check for set of the disabled leafrefs, but without the second round. */
 1204|   182k|    for (i = processed_leafrefs; i < ds_unres->leafrefs.count; ++i) {
  ------------------
  |  Branch (1204:34): [True: 70.2k, False: 112k]
  ------------------
 1205|  70.2k|        l = ds_unres->leafrefs.objs[i];
 1206|  70.2k|        LYSC_CTX_INIT_PMOD(cctx, l->node->module->parsed, l->ext);
  ------------------
  |  |   84|  70.2k|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|  70.2k|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|  70.2k|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|  70.2k|    (CCTX).pmod = (PMOD); \
  |  |   88|  70.2k|    (CCTX).ext = (EXT); \
  |  |   89|  70.2k|    (CCTX).path_len = 1; \
  |  |   90|  70.2k|    (CCTX).path[0] = '/'; \
  |  |   91|  70.2k|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 1207|       |
 1208|  70.2k|        LOG_LOCSET(l->node, NULL, NULL, NULL);
  ------------------
  |  |  141|  70.2k|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 1209|  70.2k|        v = 0;
 1210|   140k|        while ((ret == LY_SUCCESS) && (lref = lys_type_leafref_next(l->node, &v))) {
  ------------------
  |  Branch (1210:16): [True: 140k, False: 0]
  |  Branch (1210:39): [True: 70.2k, False: 70.2k]
  ------------------
 1211|  70.2k|            ret = lys_compile_unres_leafref(&cctx, l->node, lref, l->local_mod, unres);
 1212|  70.2k|        }
 1213|  70.2k|        LOG_LOCBACK(1, 0, 0, 0);
  ------------------
  |  |  152|  70.2k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1214|  70.2k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|  70.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 1215|  70.2k|    }
 1216|   182k|    for (i = processed_leafrefs; i < ds_unres->leafrefs.count; ++i) {
  ------------------
  |  Branch (1216:34): [True: 70.2k, False: 112k]
  ------------------
 1217|  70.2k|        l = ds_unres->leafrefs.objs[i];
 1218|       |
 1219|       |        /* store pointer to the real type */
 1220|  70.2k|        v = 0;
 1221|   140k|        while ((lref = lys_type_leafref_next(l->node, &v))) {
  ------------------
  |  Branch (1221:16): [True: 70.2k, False: 70.2k]
  ------------------
 1222|  70.2k|            for (typeiter = lref->realtype;
 1223|  70.2k|                    typeiter->basetype == LY_TYPE_LEAFREF;
  ------------------
  |  Branch (1223:21): [True: 0, False: 70.2k]
  ------------------
 1224|  70.2k|                    typeiter = ((struct lysc_type_leafref *)typeiter)->realtype) {}
 1225|       |
 1226|  70.2k|            lysc_type_free(&cctx.free_ctx, lref->realtype);
 1227|  70.2k|            lref->realtype = typeiter;
 1228|  70.2k|            ++lref->realtype->refcount;
 1229|  70.2k|        }
 1230|       |
 1231|       |        /* if 'goto' will be used on the 'resolve_all' label, then the current leafref will not be processed again */
 1232|  70.2k|        processed_leafrefs++;
 1233|  70.2k|    }
 1234|       |
 1235|       |    /* check when, first implement all the referenced modules (for the cyclic check in the next loop to work) */
 1236|   112k|    i = 0;
 1237|   112k|    while (i < ds_unres->whens.count) {
  ------------------
  |  Branch (1237:12): [True: 0, False: 112k]
  ------------------
 1238|      0|        w = ds_unres->whens.objs[i];
 1239|      0|        LYSC_CTX_INIT_PMOD(cctx, w->node->module->parsed, NULL);
  ------------------
  |  |   84|      0|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|      0|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|      0|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|      0|    (CCTX).pmod = (PMOD); \
  |  |   88|      0|    (CCTX).ext = (EXT); \
  |  |   89|      0|    (CCTX).path_len = 1; \
  |  |   90|      0|    (CCTX).path[0] = '/'; \
  |  |   91|      0|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 1240|       |
 1241|      0|        LOG_LOCSET(w->node, NULL, NULL, NULL);
  ------------------
  |  |  141|      0|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 1242|      0|        r = lys_compile_unres_when_implement(&cctx, w->when, unres);
 1243|      0|        LOG_LOCBACK(w->node ? 1 : 0, 0, 0, 0);
  ------------------
  |  |  152|      0|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  |  |  ------------------
  |  |  |  Branch (152:28): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1244|       |
 1245|      0|        if (r == LY_ENOT) {
  ------------------
  |  Branch (1245:13): [True: 0, False: 0]
  ------------------
 1246|       |            /* skip full when check, remove from the set */
 1247|      0|            free(w);
 1248|      0|            ly_set_rm_index(&ds_unres->whens, i, NULL);
 1249|      0|            continue;
 1250|      0|        } else if (r) {
  ------------------
  |  Branch (1250:20): [True: 0, False: 0]
  ------------------
 1251|       |            /* error */
 1252|      0|            ret = r;
 1253|      0|            goto cleanup;
 1254|      0|        }
 1255|       |
 1256|      0|        ++i;
 1257|      0|    }
 1258|   112k|    while (ds_unres->whens.count) {
  ------------------
  |  Branch (1258:12): [True: 0, False: 112k]
  ------------------
 1259|      0|        i = ds_unres->whens.count - 1;
 1260|      0|        w = ds_unres->whens.objs[i];
 1261|      0|        LYSC_CTX_INIT_PMOD(cctx, w->node->module->parsed, NULL);
  ------------------
  |  |   84|      0|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|      0|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|      0|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|      0|    (CCTX).pmod = (PMOD); \
  |  |   88|      0|    (CCTX).ext = (EXT); \
  |  |   89|      0|    (CCTX).path_len = 1; \
  |  |   90|      0|    (CCTX).path[0] = '/'; \
  |  |   91|      0|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 1262|       |
 1263|      0|        LOG_LOCSET(w->node, NULL, NULL, NULL);
  ------------------
  |  |  141|      0|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 1264|      0|        ret = lys_compile_unres_when(&cctx, w->when, w->node);
 1265|      0|        LOG_LOCBACK(w->node ? 1 : 0, 0, 0, 0);
  ------------------
  |  |  152|      0|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  |  |  ------------------
  |  |  |  Branch (152:28): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1266|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1267|       |
 1268|      0|        free(w);
 1269|      0|        ly_set_rm_index(&ds_unres->whens, i, NULL);
 1270|      0|    }
 1271|       |
 1272|       |    /* check must */
 1273|   112k|    while (ds_unres->musts.count) {
  ------------------
  |  Branch (1273:12): [True: 0, False: 112k]
  ------------------
 1274|      0|        i = ds_unres->musts.count - 1;
 1275|      0|        m = ds_unres->musts.objs[i];
 1276|      0|        LYSC_CTX_INIT_PMOD(cctx, m->node->module->parsed, m->ext);
  ------------------
  |  |   84|      0|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|      0|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|      0|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|      0|    (CCTX).pmod = (PMOD); \
  |  |   88|      0|    (CCTX).ext = (EXT); \
  |  |   89|      0|    (CCTX).path_len = 1; \
  |  |   90|      0|    (CCTX).path[0] = '/'; \
  |  |   91|      0|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 1277|       |
 1278|      0|        LOG_LOCSET(m->node, NULL, NULL, NULL);
  ------------------
  |  |  141|      0|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 1279|      0|        ret = lys_compile_unres_must(&cctx, m->node, m->local_mods, unres);
 1280|      0|        LOG_LOCBACK(1, 0, 0, 0);
  ------------------
  |  |  152|      0|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1281|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1282|       |
 1283|      0|        lysc_unres_must_free(m);
 1284|      0|        ly_set_rm_index(&ds_unres->musts, i, NULL);
 1285|      0|    }
 1286|       |
 1287|       |    /* remove disabled enums/bits */
 1288|   126k|    while (ds_unres->disabled_bitenums.count) {
  ------------------
  |  Branch (1288:12): [True: 14.0k, False: 112k]
  ------------------
 1289|  14.0k|        i = ds_unres->disabled_bitenums.count - 1;
 1290|  14.0k|        node = ds_unres->disabled_bitenums.objs[i];
 1291|  14.0k|        LYSC_CTX_INIT_PMOD(cctx, node->module->parsed, NULL);
  ------------------
  |  |   84|  14.0k|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|  14.0k|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|  14.0k|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|  14.0k|    (CCTX).pmod = (PMOD); \
  |  |   88|  14.0k|    (CCTX).ext = (EXT); \
  |  |   89|  14.0k|    (CCTX).path_len = 1; \
  |  |   90|  14.0k|    (CCTX).path[0] = '/'; \
  |  |   91|  14.0k|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 1292|       |
 1293|  14.0k|        LOG_LOCSET(node, NULL, NULL, NULL);
  ------------------
  |  |  141|  14.0k|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 1294|  14.0k|        ret = lys_compile_unres_disabled_bitenum(&cctx, (struct lysc_node_leaf *)node);
 1295|  14.0k|        LOG_LOCBACK(1, 0, 0, 0);
  ------------------
  |  |  152|  14.0k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1296|  14.0k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 1297|       |
 1298|  14.0k|        ly_set_rm_index(&ds_unres->disabled_bitenums, i, NULL);
 1299|  14.0k|    }
 1300|       |
 1301|       |    /* finish incomplete default values compilation */
 1302|   126k|    while (ds_unres->dflts.count) {
  ------------------
  |  Branch (1302:12): [True: 14.0k, False: 112k]
  ------------------
 1303|  14.0k|        i = ds_unres->dflts.count - 1;
 1304|  14.0k|        d = ds_unres->dflts.objs[i];
 1305|  14.0k|        LYSC_CTX_INIT_PMOD(cctx, d->leaf->module->parsed, NULL);
  ------------------
  |  |   84|  14.0k|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|  14.0k|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|  14.0k|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|  14.0k|    (CCTX).pmod = (PMOD); \
  |  |   88|  14.0k|    (CCTX).ext = (EXT); \
  |  |   89|  14.0k|    (CCTX).path_len = 1; \
  |  |   90|  14.0k|    (CCTX).path[0] = '/'; \
  |  |   91|  14.0k|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 1306|       |
 1307|  14.0k|        LOG_LOCSET(&d->leaf->node, NULL, NULL, NULL);
  ------------------
  |  |  141|  14.0k|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 1308|  14.0k|        if (d->leaf->nodetype == LYS_LEAF) {
  ------------------
  |  |  242|  14.0k|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
  |  Branch (1308:13): [True: 14.0k, False: 0]
  ------------------
 1309|  14.0k|            ret = lys_compile_unres_leaf_dlft(&cctx, d->leaf, d->dflt, unres);
 1310|  14.0k|        } else {
 1311|      0|            ret = lys_compile_unres_llist_dflts(&cctx, d->llist, d->dflt, d->dflts, unres);
 1312|      0|        }
 1313|  14.0k|        LOG_LOCBACK(1, 0, 0, 0);
  ------------------
  |  |  152|  14.0k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1314|  14.0k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 1315|       |
 1316|  14.0k|        lysc_unres_dflt_free(ctx, d);
 1317|  14.0k|        ly_set_rm_index(&ds_unres->dflts, i, NULL);
 1318|  14.0k|    }
 1319|       |
 1320|       |    /* some unres items may have been added */
 1321|   112k|    if ((processed_leafrefs != ds_unres->leafrefs.count) || ds_unres->disabled_leafrefs.count ||
  ------------------
  |  Branch (1321:9): [True: 0, False: 112k]
  |  Branch (1321:61): [True: 0, False: 112k]
  ------------------
 1322|   112k|            ds_unres->whens.count || ds_unres->musts.count || ds_unres->dflts.count) {
  ------------------
  |  Branch (1322:13): [True: 0, False: 112k]
  |  Branch (1322:38): [True: 0, False: 112k]
  |  Branch (1322:63): [True: 0, False: 112k]
  ------------------
 1323|      0|        goto resolve_all;
 1324|      0|    }
 1325|       |
 1326|       |    /* finally, remove all disabled nodes */
 1327|   112k|    for (i = 0; i < ds_unres->disabled.count; ++i) {
  ------------------
  |  Branch (1327:17): [True: 0, False: 112k]
  ------------------
 1328|      0|        node = ds_unres->disabled.snodes[i];
 1329|      0|        if (node->flags & LYS_KEY) {
  ------------------
  |  |  671|      0|#define LYS_KEY          0x0100      /**< flag for leafs being a key of a list, applicable only to ::lysc_node_leaf */
  ------------------
  |  Branch (1329:13): [True: 0, False: 0]
  ------------------
 1330|      0|            LOG_LOCSET(node, NULL, NULL, NULL);
  ------------------
  |  |  141|      0|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 1331|      0|            LOGVAL(ctx, LYVE_REFERENCE, "Key \"%s\" is disabled.", node->name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1332|      0|            LOG_LOCBACK(1, 0, 0, 0);
  ------------------
  |  |  152|      0|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1333|      0|            ret = LY_EVALID;
 1334|      0|            goto cleanup;
 1335|      0|        }
 1336|      0|        LYSC_CTX_INIT_PMOD(cctx, node->module->parsed, NULL);
  ------------------
  |  |   84|      0|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|      0|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|      0|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|      0|    (CCTX).pmod = (PMOD); \
  |  |   88|      0|    (CCTX).ext = (EXT); \
  |  |   89|      0|    (CCTX).path_len = 1; \
  |  |   90|      0|    (CCTX).path[0] = '/'; \
  |  |   91|      0|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 1337|       |
 1338|      0|        lysc_node_free(&cctx.free_ctx, node, 1);
 1339|      0|    }
 1340|       |
 1341|       |    /* also check if the leafref target has not been disabled */
 1342|   182k|    for (i = 0; i < ds_unres->leafrefs.count; ++i) {
  ------------------
  |  Branch (1342:17): [True: 70.2k, False: 112k]
  ------------------
 1343|  70.2k|        l = ds_unres->leafrefs.objs[i];
 1344|  70.2k|        LYSC_CTX_INIT_PMOD(cctx, l->node->module->parsed, l->ext);
  ------------------
  |  |   84|  70.2k|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|  70.2k|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|  70.2k|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|  70.2k|    (CCTX).pmod = (PMOD); \
  |  |   88|  70.2k|    (CCTX).ext = (EXT); \
  |  |   89|  70.2k|    (CCTX).path_len = 1; \
  |  |   90|  70.2k|    (CCTX).path[0] = '/'; \
  |  |   91|  70.2k|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 1345|       |
 1346|  70.2k|        v = 0;
 1347|   140k|        while ((lref = lys_type_leafref_next(l->node, &v))) {
  ------------------
  |  Branch (1347:16): [True: 70.2k, False: 70.2k]
  ------------------
 1348|  70.2k|            ret = ly_path_compile_leafref(cctx.ctx, l->node, cctx.ext, lref->path,
 1349|  70.2k|                    (l->node->flags & LYS_IS_OUTPUT) ? LY_PATH_OPER_OUTPUT : LY_PATH_OPER_INPUT, LY_PATH_TARGET_MANY,
  ------------------
  |  |  720|  70.2k|#define LYS_IS_OUTPUT    0x2000      /**< flag for nodes that are in the subtree of an output statement */
  ------------------
                                  (l->node->flags & LYS_IS_OUTPUT) ? LY_PATH_OPER_OUTPUT : LY_PATH_OPER_INPUT, LY_PATH_TARGET_MANY,
  ------------------
  |  |  133|      0|#define LY_PATH_OPER_OUTPUT 0x02    /**< if any RPC/action is traversed, its output nodes are used */
  ------------------
                                  (l->node->flags & LYS_IS_OUTPUT) ? LY_PATH_OPER_OUTPUT : LY_PATH_OPER_INPUT, LY_PATH_TARGET_MANY,
  ------------------
  |  |  132|   140k|#define LY_PATH_OPER_INPUT  0x01    /**< if any RPC/action is traversed, its input nodes are used */
  ------------------
                                  (l->node->flags & LYS_IS_OUTPUT) ? LY_PATH_OPER_OUTPUT : LY_PATH_OPER_INPUT, LY_PATH_TARGET_MANY,
  ------------------
  |  |  143|  70.2k|#define LY_PATH_TARGET_MANY    0x20    /**< last (target) node may identify all instances (of leaf-list/list) */
  ------------------
  |  Branch (1349:21): [True: 0, False: 70.2k]
  ------------------
 1350|  70.2k|                    LY_VALUE_SCHEMA_RESOLVED, lref->prefixes, &path);
 1351|  70.2k|            ly_path_free(l->node->module->ctx, path);
 1352|       |
 1353|  70.2k|            assert(ret != LY_ERECOMPILE);
 1354|  70.2k|            if (ret) {
  ------------------
  |  Branch (1354:17): [True: 0, False: 70.2k]
  ------------------
 1355|      0|                LOG_LOCSET(l->node, NULL, NULL, NULL);
  ------------------
  |  |  141|      0|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 1356|      0|                LOGVAL(ctx, LYVE_REFERENCE, "Target of leafref \"%s\" cannot be referenced because it is disabled.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1357|      0|                        l->node->name);
 1358|      0|                LOG_LOCBACK(1, 0, 0, 0);
  ------------------
  |  |  152|      0|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1359|      0|                ret = LY_EVALID;
 1360|      0|                goto cleanup;
 1361|      0|            }
 1362|  70.2k|        }
 1363|  70.2k|    }
 1364|       |
 1365|   112k|cleanup:
 1366|   112k|    lysf_ctx_erase(&cctx.free_ctx);
 1367|   112k|    return ret;
 1368|   112k|}
schema_compile.c:lys_type_leafref_next:
 1122|   421k|{
 1123|   421k|    struct lysc_type_leafref *ret = NULL;
 1124|   421k|    struct lysc_type_union *uni;
 1125|   421k|    struct lysc_type *leaf_type;
 1126|       |
 1127|   421k|    assert(node->nodetype & LYD_NODE_TERM);
 1128|       |
 1129|      0|    leaf_type = ((struct lysc_node_leaf *)node)->type;
 1130|   421k|    if (leaf_type->basetype == LY_TYPE_UNION) {
  ------------------
  |  Branch (1130:9): [True: 0, False: 421k]
  ------------------
 1131|      0|        uni = (struct lysc_type_union *)leaf_type;
 1132|       |
 1133|       |        /* find next union leafref */
 1134|      0|        while (*index < LY_ARRAY_COUNT(uni->types)) {
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1134:16): [True: 0, False: 0]
  ------------------
 1135|      0|            if (uni->types[*index]->basetype == LY_TYPE_LEAFREF) {
  ------------------
  |  Branch (1135:17): [True: 0, False: 0]
  ------------------
 1136|      0|                ret = (struct lysc_type_leafref *)uni->types[*index];
 1137|      0|                ++(*index);
 1138|      0|                break;
 1139|      0|            }
 1140|       |
 1141|      0|            ++(*index);
 1142|      0|        }
 1143|   421k|    } else {
 1144|       |        /* return just the single leafref */
 1145|   421k|        if (*index == 0) {
  ------------------
  |  Branch (1145:13): [True: 210k, False: 210k]
  ------------------
 1146|   210k|            ++(*index);
 1147|   210k|            assert(leaf_type->basetype == LY_TYPE_LEAFREF);
 1148|      0|            ret = (struct lysc_type_leafref *)leaf_type;
 1149|   210k|        }
 1150|   421k|    }
 1151|       |
 1152|      0|    return ret;
 1153|   421k|}
schema_compile.c:lys_compile_unres_leafref:
  891|  70.2k|{
  892|  70.2k|    const struct lysc_node *target = NULL;
  893|  70.2k|    struct ly_path *p;
  894|  70.2k|    struct lysc_type *type;
  895|  70.2k|    uint16_t flg;
  896|       |
  897|  70.2k|    assert(node->nodetype & (LYS_LEAF | LYS_LEAFLIST));
  898|       |
  899|  70.2k|    if (lref->realtype) {
  ------------------
  |  Branch (899:9): [True: 0, False: 70.2k]
  ------------------
  900|       |        /* already resolved, may happen (shared union typedef with a leafref) */
  901|      0|        return LY_SUCCESS;
  902|      0|    }
  903|       |
  904|       |    /* first implement all the modules in the path */
  905|  70.2k|    LY_CHECK_RET(lys_compile_expr_implement(ctx->ctx, lref->path, LY_VALUE_SCHEMA_RESOLVED, lref->prefixes, 1, unres, NULL));
  ------------------
  |  |  206|  70.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  70.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  70.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  70.2k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  906|       |
  907|       |    /* try to find the target, current module is that of the context node (RFC 7950 6.4.1 second bullet) */
  908|  70.2k|    LY_CHECK_RET(ly_path_compile_leafref(ctx->ctx, node, ctx->ext, lref->path,
  ------------------
  |  |  206|  70.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  70.2k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  70.2k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   140k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  909|  70.2k|            (node->flags & LYS_IS_OUTPUT) ? LY_PATH_OPER_OUTPUT : LY_PATH_OPER_INPUT, LY_PATH_TARGET_MANY,
  910|  70.2k|            LY_VALUE_SCHEMA_RESOLVED, lref->prefixes, &p));
  911|       |
  912|       |    /* get the target node */
  913|  70.2k|    target = p[LY_ARRAY_COUNT(p) - 1].node;
  ------------------
  |  |  148|  70.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 70.2k, False: 0]
  |  |  ------------------
  ------------------
  914|  70.2k|    ly_path_free(node->module->ctx, p);
  915|       |
  916|  70.2k|    if (!(target->nodetype & (LYS_LEAF | LYS_LEAFLIST))) {
  ------------------
  |  |  242|  70.2k|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
                  if (!(target->nodetype & (LYS_LEAF | LYS_LEAFLIST))) {
  ------------------
  |  |  243|  70.2k|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (916:9): [True: 0, False: 70.2k]
  ------------------
  917|      0|        LOGVAL(ctx->ctx, LYVE_REFERENCE, "Invalid leafref path \"%s\" - target node is %s instead of leaf or leaf-list.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  918|      0|                lref->path->expr, lys_nodetype2str(target->nodetype));
  919|      0|        return LY_EVALID;
  920|      0|    }
  921|       |
  922|       |    /* check status */
  923|  70.2k|    ctx->path[0] = '\0';
  924|  70.2k|    lysc_path(node, LYSC_PATH_LOG, ctx->path, LYSC_CTX_BUFSIZE);
  ------------------
  |  |   59|  70.2k|#define LYSC_CTX_BUFSIZE 4078
  ------------------
  925|  70.2k|    ctx->path_len = strlen(ctx->path);
  926|  70.2k|    if (node->module == local_mod->mod) {
  ------------------
  |  Branch (926:9): [True: 70.2k, False: 0]
  ------------------
  927|       |        /* use flags of the context node since the definition is local */
  928|  70.2k|        flg = node->flags;
  929|  70.2k|    } else {
  930|       |        /* definition is foreign (deviation), always current */
  931|      0|        flg = LYS_STATUS_CURR;
  ------------------
  |  |  654|      0|#define LYS_STATUS_CURR  0x04        /**< status current; */
  ------------------
  932|      0|    }
  933|  70.2k|    if (lysc_check_status(ctx, flg, local_mod->mod, node->name, target->flags, target->module, target->name)) {
  ------------------
  |  Branch (933:9): [True: 0, False: 70.2k]
  ------------------
  934|      0|        return LY_EVALID;
  935|      0|    }
  936|  70.2k|    ctx->path_len = 1;
  937|  70.2k|    ctx->path[1] = '\0';
  938|       |
  939|       |    /* check config */
  940|  70.2k|    if (lref->require_instance) {
  ------------------
  |  Branch (940:9): [True: 70.2k, False: 0]
  ------------------
  941|  70.2k|        if ((node->flags & LYS_CONFIG_W) && (target->flags & LYS_CONFIG_R)) {
  ------------------
  |  |  651|  70.2k|#define LYS_CONFIG_W     0x01        /**< config true; */
  ------------------
                      if ((node->flags & LYS_CONFIG_W) && (target->flags & LYS_CONFIG_R)) {
  ------------------
  |  |  652|      0|#define LYS_CONFIG_R     0x02        /**< config false; */
  ------------------
  |  Branch (941:13): [True: 0, False: 70.2k]
  |  Branch (941:45): [True: 0, False: 0]
  ------------------
  942|      0|            LOGVAL(ctx->ctx, LYVE_REFERENCE, "Invalid leafref path \"%s\" - target is supposed"
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  943|      0|                    " to represent configuration data (as the leafref does), but it does not.", lref->path->expr);
  944|      0|            return LY_EVALID;
  945|      0|        }
  946|  70.2k|    }
  947|       |
  948|       |    /* check for circular chain of leafrefs */
  949|  70.2k|    for (type = ((struct lysc_node_leaf *)target)->type;
  950|  70.2k|            type && (type->basetype == LY_TYPE_LEAFREF);
  ------------------
  |  Branch (950:13): [True: 70.2k, False: 0]
  |  Branch (950:21): [True: 0, False: 70.2k]
  ------------------
  951|  70.2k|            type = ((struct lysc_type_leafref *)type)->realtype) {
  952|      0|        if (type == (struct lysc_type *)lref) {
  ------------------
  |  Branch (952:13): [True: 0, False: 0]
  ------------------
  953|       |            /* circular chain detected */
  954|      0|            LOGVAL(ctx->ctx, LYVE_REFERENCE, "Invalid leafref path \"%s\" - circular chain of leafrefs detected.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  955|      0|                    lref->path->expr);
  956|      0|            return LY_EVALID;
  957|      0|        }
  958|      0|    }
  959|       |
  960|       |    /* store the type */
  961|  70.2k|    lref->realtype = ((struct lysc_node_leaf *)target)->type;
  962|  70.2k|    ++lref->realtype->refcount;
  963|  70.2k|    return LY_SUCCESS;
  964|  70.2k|}
schema_compile.c:lys_compile_unres_disabled_bitenum:
  842|  14.0k|{
  843|  14.0k|    struct lysc_type **t;
  844|  14.0k|    LY_ARRAY_COUNT_TYPE u, count;
  ------------------
  |  |  104|  14.0k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  845|  14.0k|    struct lysc_type_enum *ent;
  846|  14.0k|    ly_bool has_value = 0;
  847|       |
  848|  14.0k|    if (leaf->type->basetype == LY_TYPE_UNION) {
  ------------------
  |  Branch (848:9): [True: 0, False: 14.0k]
  ------------------
  849|      0|        t = ((struct lysc_type_union *)leaf->type)->types;
  850|      0|        count = LY_ARRAY_COUNT(t);
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  851|  14.0k|    } else {
  852|  14.0k|        t = &leaf->type;
  853|  14.0k|        count = 1;
  854|  14.0k|    }
  855|  28.1k|    for (u = 0; u < count; ++u) {
  ------------------
  |  Branch (855:17): [True: 14.0k, False: 14.0k]
  ------------------
  856|  14.0k|        if ((t[u]->basetype == LY_TYPE_BITS) || (t[u]->basetype == LY_TYPE_ENUM)) {
  ------------------
  |  Branch (856:13): [True: 0, False: 14.0k]
  |  Branch (856:49): [True: 14.0k, False: 0]
  ------------------
  857|       |            /* remove all disabled items */
  858|  14.0k|            ent = (struct lysc_type_enum *)(t[u]);
  859|  14.0k|            lys_compile_unres_disabled_bitenum_remove(&ctx->free_ctx, ent->enums);
  860|       |
  861|  14.0k|            if (LY_ARRAY_COUNT(ent->enums)) {
  ------------------
  |  |  148|  14.0k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:31): [True: 14.0k, False: 0]
  |  |  |  Branch (148:32): [True: 14.0k, False: 0]
  |  |  ------------------
  ------------------
  862|  14.0k|                has_value = 1;
  863|  14.0k|            }
  864|  14.0k|        } else {
  865|      0|            has_value = 1;
  866|      0|        }
  867|  14.0k|    }
  868|       |
  869|  14.0k|    if (!has_value) {
  ------------------
  |  Branch (869:9): [True: 0, False: 14.0k]
  ------------------
  870|      0|        LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Node \"%s\" without any (or all disabled) valid values.", leaf->name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  871|      0|        return LY_EVALID;
  872|      0|    }
  873|       |
  874|  14.0k|    return LY_SUCCESS;
  875|  14.0k|}
schema_compile.c:lys_compile_unres_disabled_bitenum_remove:
  810|  14.0k|{
  811|  14.0k|    LY_ARRAY_COUNT_TYPE u = 0, last_u;
  ------------------
  |  |  104|  14.0k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  812|       |
  813|  42.1k|    while (u < LY_ARRAY_COUNT(items)) {
  ------------------
  |  |  148|  42.1k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 42.1k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (813:12): [True: 28.1k, False: 14.0k]
  ------------------
  814|  28.1k|        if (items[u].flags & LYS_DISABLED) {
  ------------------
  |  |  673|  28.1k|#define LYS_DISABLED     0x0100      /**< internal flag for a disabled statement, used only for bits/enums */
  ------------------
  |  Branch (814:13): [True: 0, False: 28.1k]
  ------------------
  815|       |            /* free the disabled item */
  816|      0|            lysc_enum_item_free(ctx, &items[u]);
  817|       |
  818|       |            /* replace it with the following items */
  819|      0|            last_u = LY_ARRAY_COUNT(items) - 1;
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  820|      0|            if (u < last_u) {
  ------------------
  |  Branch (820:17): [True: 0, False: 0]
  ------------------
  821|      0|                memmove(items + u, items + u + 1, (last_u - u) * sizeof *items);
  822|      0|            }
  823|       |
  824|       |            /* one item less */
  825|      0|            LY_ARRAY_DECREMENT(items);
  ------------------
  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
  826|      0|            continue;
  827|      0|        }
  828|       |
  829|  28.1k|        ++u;
  830|  28.1k|    }
  831|  14.0k|}
schema_compile.c:lys_compile_unres_leaf_dlft:
 1025|  14.0k|{
 1026|  14.0k|    LY_ERR ret;
 1027|       |
 1028|  14.0k|    assert(!leaf->dflt);
 1029|       |
 1030|  14.0k|    if (leaf->flags & (LYS_MAND_TRUE | LYS_KEY)) {
  ------------------
  |  |  658|  14.0k|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
                  if (leaf->flags & (LYS_MAND_TRUE | LYS_KEY)) {
  ------------------
  |  |  671|  14.0k|#define LYS_KEY          0x0100      /**< flag for leafs being a key of a list, applicable only to ::lysc_node_leaf */
  ------------------
  |  Branch (1030:9): [True: 0, False: 14.0k]
  ------------------
 1031|       |        /* ignore default values for keys and mandatory leaves */
 1032|      0|        return LY_SUCCESS;
 1033|      0|    }
 1034|       |
 1035|       |    /* allocate the default value */
 1036|  14.0k|    leaf->dflt = calloc(1, sizeof *leaf->dflt);
 1037|  14.0k|    LY_CHECK_ERR_RET(!leaf->dflt, LOGMEM(ctx->ctx), LY_EMEM);
  ------------------
  |  |  207|  14.0k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 1038|       |
 1039|       |    /* store the default value */
 1040|  14.0k|    ret = lys_compile_unres_dflt(ctx, &leaf->node, leaf->type, dflt->str, dflt->mod, leaf->dflt, unres);
 1041|  14.0k|    if (ret) {
  ------------------
  |  Branch (1041:9): [True: 0, False: 14.0k]
  ------------------
 1042|      0|        free(leaf->dflt);
 1043|      0|        leaf->dflt = NULL;
 1044|      0|    }
 1045|       |
 1046|  14.0k|    return ret;
 1047|  14.0k|}
schema_compile.c:lys_compile_unres_dflt:
  981|  14.0k|{
  982|  14.0k|    LY_ERR ret;
  983|  14.0k|    uint32_t options;
  984|  14.0k|    struct ly_err_item *err = NULL;
  985|       |
  986|  14.0k|    options = (ctx->ctx->flags & LY_CTX_REF_IMPLEMENTED) ? LYPLG_TYPE_STORE_IMPLEMENT : 0;
  ------------------
  |  |  163|  14.0k|#define LY_CTX_REF_IMPLEMENTED 0x02 /**< Implement all imported modules "referenced" from an implemented module.
  ------------------
                  options = (ctx->ctx->flags & LY_CTX_REF_IMPLEMENTED) ? LYPLG_TYPE_STORE_IMPLEMENT : 0;
  ------------------
  |  |  474|      0|#define LYPLG_TYPE_STORE_IMPLEMENT 0x02 /**< If a foreign module is needed to be implemented to successfully instantiate
  ------------------
  |  Branch (986:15): [True: 0, False: 14.0k]
  ------------------
  987|  14.0k|    ret = type->plugin->store(ctx->ctx, type, dflt, strlen(dflt), options, LY_VALUE_SCHEMA, (void *)dflt_pmod,
  988|  14.0k|            LYD_HINT_SCHEMA, node, storage, unres, &err);
  ------------------
  |  |  958|  14.0k|#define LYD_HINT_SCHEMA     0x01FF /**< special node/value hint to be used for generic schema node/value(for cases when
  ------------------
  989|  14.0k|    if (ret == LY_ERECOMPILE) {
  ------------------
  |  Branch (989:9): [True: 0, False: 14.0k]
  ------------------
  990|       |        /* fine, but we need to recompile */
  991|      0|        return LY_ERECOMPILE;
  992|  14.0k|    } else if (ret == LY_EINCOMPLETE) {
  ------------------
  |  Branch (992:16): [True: 0, False: 14.0k]
  ------------------
  993|       |        /* we have no data so we will not be resolving it */
  994|      0|        ret = LY_SUCCESS;
  995|      0|    }
  996|       |
  997|  14.0k|    if (ret) {
  ------------------
  |  Branch (997:9): [True: 0, False: 14.0k]
  ------------------
  998|      0|        LOG_LOCSET(node, NULL, NULL, NULL);
  ------------------
  |  |  141|      0|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
  999|      0|        if (err) {
  ------------------
  |  Branch (999:13): [True: 0, False: 0]
  ------------------
 1000|      0|            LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Invalid default - value does not fit the type (%s).", err->msg);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1001|      0|            ly_err_free(err);
 1002|      0|        } else {
 1003|      0|            LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Invalid default - value does not fit the type.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1004|      0|        }
 1005|      0|        LOG_LOCBACK(1, 0, 0, 0);
  ------------------
  |  |  152|      0|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1006|      0|        return ret;
 1007|      0|    }
 1008|       |
 1009|  14.0k|    LY_ATOMIC_INC_BARRIER(((struct lysc_type *)storage->realtype)->refcount);
  ------------------
  |  |   35|  14.0k|# define LY_ATOMIC_INC_BARRIER(var) __sync_fetch_and_add(&(var), 1)
  ------------------
 1010|  14.0k|    return LY_SUCCESS;
 1011|  14.0k|}
schema_compile.c:lysc_unres_dflt_free:
  204|  14.0k|{
  205|  14.0k|    assert(!r->dflt || !r->dflts);
  206|  14.0k|    if (r->dflt) {
  ------------------
  |  Branch (206:9): [True: 14.0k, False: 0]
  ------------------
  207|  14.0k|        lysp_qname_free((struct ly_ctx *)ctx, r->dflt);
  208|  14.0k|        free(r->dflt);
  209|  14.0k|    } else {
  210|      0|        FREE_ARRAY((struct ly_ctx *)ctx, r->dflts, lysp_qname_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  211|      0|    }
  212|  14.0k|    free(r);
  213|  14.0k|}
schema_compile.c:lys_compile_unres_depset_erase:
 1378|   112k|{
 1379|   112k|    uint32_t i;
 1380|       |
 1381|   112k|    ly_set_erase(&unres->ds_unres.whens, free);
 1382|   112k|    for (i = 0; i < unres->ds_unres.musts.count; ++i) {
  ------------------
  |  Branch (1382:17): [True: 0, False: 112k]
  ------------------
 1383|      0|        lysc_unres_must_free(unres->ds_unres.musts.objs[i]);
 1384|      0|    }
 1385|   112k|    ly_set_erase(&unres->ds_unres.musts, NULL);
 1386|   112k|    ly_set_erase(&unres->ds_unres.leafrefs, free);
 1387|   112k|    for (i = 0; i < unres->ds_unres.dflts.count; ++i) {
  ------------------
  |  Branch (1387:17): [True: 0, False: 112k]
  ------------------
 1388|      0|        lysc_unres_dflt_free(ctx, unres->ds_unres.dflts.objs[i]);
 1389|      0|    }
 1390|   112k|    ly_set_erase(&unres->ds_unres.dflts, NULL);
 1391|   112k|    ly_set_erase(&unres->ds_unres.disabled, NULL);
 1392|   112k|    ly_set_erase(&unres->ds_unres.disabled_leafrefs, free);
 1393|   112k|    ly_set_erase(&unres->ds_unres.disabled_bitenums, NULL);
 1394|   112k|}
schema_compile.c:lys_compile_unres_mod:
 1498|  56.2k|{
 1499|  56.2k|    struct lysc_augment *aug;
 1500|  56.2k|    struct lysc_deviation *dev;
 1501|  56.2k|    struct lys_module *orig_mod = ctx->cur_mod;
 1502|  56.2k|    uint32_t i;
 1503|       |
 1504|       |    /* check that all augments were applied */
 1505|  56.2k|    for (i = 0; i < ctx->augs.count; ++i) {
  ------------------
  |  Branch (1505:17): [True: 0, False: 56.2k]
  ------------------
 1506|      0|        aug = ctx->augs.objs[i];
 1507|      0|        ctx->cur_mod = aug->aug_pmod->mod;
 1508|      0|        if (aug->ext) {
  ------------------
  |  Branch (1508:13): [True: 0, False: 0]
  ------------------
 1509|      0|            lysc_update_path(ctx, NULL, "{extension}");
 1510|      0|            lysc_update_path(ctx, NULL, aug->ext->name);
 1511|      0|        }
 1512|      0|        lysc_update_path(ctx, NULL, "{augment}");
 1513|      0|        lysc_update_path(ctx, NULL, aug->nodeid->expr);
 1514|      0|        LOGVAL(ctx->ctx, LYVE_REFERENCE, "Augment%s target node \"%s\" from module \"%s\" was not found.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1515|      0|                aug->ext ? " extension" : "", aug->nodeid->expr, LYSP_MODULE_NAME(aug->aug_pmod));
 1516|      0|        ctx->cur_mod = orig_mod;
 1517|      0|        lysc_update_path(ctx, NULL, NULL);
 1518|      0|        lysc_update_path(ctx, NULL, NULL);
 1519|      0|        if (aug->ext) {
  ------------------
  |  Branch (1519:13): [True: 0, False: 0]
  ------------------
 1520|      0|            lysc_update_path(ctx, NULL, NULL);
 1521|      0|            lysc_update_path(ctx, NULL, NULL);
 1522|      0|        }
 1523|      0|    }
 1524|  56.2k|    if (ctx->augs.count) {
  ------------------
  |  Branch (1524:9): [True: 0, False: 56.2k]
  ------------------
 1525|      0|        return LY_ENOTFOUND;
 1526|      0|    }
 1527|       |
 1528|       |    /* check that all deviations were applied */
 1529|  56.2k|    for (i = 0; i < ctx->devs.count; ++i) {
  ------------------
  |  Branch (1529:17): [True: 0, False: 56.2k]
  ------------------
 1530|      0|        dev = ctx->devs.objs[i];
 1531|      0|        lysc_update_path(ctx, NULL, "{deviation}");
 1532|      0|        lysc_update_path(ctx, NULL, dev->nodeid->expr);
 1533|      0|        LOGVAL(ctx->ctx, LYVE_REFERENCE, "Deviation(s) target node \"%s\" from module \"%s\" was not found.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1534|      0|                dev->nodeid->expr, LYSP_MODULE_NAME(dev->dev_pmods[0]));
 1535|      0|        lysc_update_path(ctx, NULL, NULL);
 1536|      0|        lysc_update_path(ctx, NULL, NULL);
 1537|      0|    }
 1538|  56.2k|    if (ctx->devs.count) {
  ------------------
  |  Branch (1538:9): [True: 0, False: 56.2k]
  ------------------
 1539|      0|        return LY_ENOTFOUND;
 1540|      0|    }
 1541|       |
 1542|  56.2k|    return LY_SUCCESS;
 1543|  56.2k|}
schema_compile.c:lys_compile_unres_mod_erase:
 1553|  56.2k|{
 1554|  56.2k|    uint32_t i;
 1555|       |
 1556|  56.2k|    ly_set_erase(&ctx->groupings, NULL);
 1557|  56.2k|    ly_set_erase(&ctx->tpdf_chain, NULL);
 1558|       |
 1559|  56.2k|    if (!error) {
  ------------------
  |  Branch (1559:9): [True: 56.2k, False: 0]
  ------------------
 1560|       |        /* there can be no leftover deviations or augments */
 1561|  56.2k|        LY_CHECK_ERR_RET(ctx->augs.count, LOGINT(ctx->ctx), );
  ------------------
  |  |  207|  56.2k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 56.2k]
  |  |  ------------------
  ------------------
 1562|  56.2k|        LY_CHECK_ERR_RET(ctx->devs.count, LOGINT(ctx->ctx), );
  ------------------
  |  |  207|  56.2k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 56.2k]
  |  |  ------------------
  ------------------
 1563|       |
 1564|  56.2k|        ly_set_erase(&ctx->augs, NULL);
 1565|  56.2k|        ly_set_erase(&ctx->devs, NULL);
 1566|  56.2k|        ly_set_erase(&ctx->uses_augs, NULL);
 1567|  56.2k|        ly_set_erase(&ctx->uses_rfns, NULL);
 1568|  56.2k|    } else {
 1569|      0|        for (i = 0; i < ctx->augs.count; ++i) {
  ------------------
  |  Branch (1569:21): [True: 0, False: 0]
  ------------------
 1570|      0|            lysc_augment_free(ctx->ctx, ctx->augs.objs[i]);
 1571|      0|        }
 1572|      0|        ly_set_erase(&ctx->augs, NULL);
 1573|      0|        for (i = 0; i < ctx->devs.count; ++i) {
  ------------------
  |  Branch (1573:21): [True: 0, False: 0]
  ------------------
 1574|      0|            lysc_deviation_free(ctx->ctx, ctx->devs.objs[i]);
 1575|      0|        }
 1576|      0|        ly_set_erase(&ctx->devs, NULL);
 1577|      0|        for (i = 0; i < ctx->uses_augs.count; ++i) {
  ------------------
  |  Branch (1577:21): [True: 0, False: 0]
  ------------------
 1578|      0|            lysc_augment_free(ctx->ctx, ctx->uses_augs.objs[i]);
 1579|      0|        }
 1580|      0|        ly_set_erase(&ctx->uses_augs, NULL);
 1581|      0|        for (i = 0; i < ctx->uses_rfns.count; ++i) {
  ------------------
  |  Branch (1581:21): [True: 0, False: 0]
  ------------------
 1582|      0|            lysc_refine_free(ctx->ctx, ctx->uses_rfns.objs[i]);
 1583|      0|        }
 1584|      0|        ly_set_erase(&ctx->uses_rfns, NULL);
 1585|      0|    }
 1586|  56.2k|}
schema_compile.c:lys_compile_identities_derived:
  403|  14.0k|{
  404|  14.0k|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|  14.0k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  405|       |
  406|  14.0k|    lysc_update_path(ctx, NULL, "{identity}");
  407|       |
  408|   126k|    for (u = 0; u < LY_ARRAY_COUNT(*idents); ++u) {
  ------------------
  |  |  148|   126k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 126k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (408:17): [True: 112k, False: 14.0k]
  ------------------
  409|       |        /* find matching parsed identity */
  410|   506k|        for (v = 0; v < LY_ARRAY_COUNT(idents_p); ++v) {
  ------------------
  |  |  148|   506k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 506k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (410:21): [True: 506k, False: 0]
  ------------------
  411|   506k|            if (idents_p[v].name == (*idents)[u].name) {
  ------------------
  |  Branch (411:17): [True: 112k, False: 393k]
  ------------------
  412|   112k|                break;
  413|   112k|            }
  414|   506k|        }
  415|       |
  416|   112k|        if ((v == LY_ARRAY_COUNT(idents_p)) || !idents_p[v].bases) {
  ------------------
  |  |  148|   112k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 112k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (416:13): [True: 0, False: 112k]
  |  Branch (416:48): [True: 14.0k, False: 98.4k]
  ------------------
  417|       |            /* identity not found (it may be from a submodule) or identity without bases */
  418|  14.0k|            continue;
  419|  14.0k|        }
  420|       |
  421|  98.4k|        lysc_update_path(ctx, NULL, (*idents)[u].name);
  422|  98.4k|        LY_CHECK_RET(lys_compile_identity_bases(ctx, ctx->pmod, idents_p[v].bases, &(*idents)[u], NULL));
  ------------------
  |  |  206|  98.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  98.4k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  98.4k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  98.4k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 98.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  423|  98.4k|        lysc_update_path(ctx, NULL, NULL);
  424|  98.4k|    }
  425|       |
  426|  14.0k|    lysc_update_path(ctx, NULL, NULL);
  427|  14.0k|    return LY_SUCCESS;
  428|  14.0k|}
schema_compile.c:lys_has_compiled_import_r:
 1764|  70.2k|{
 1765|  70.2k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|  70.2k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1766|  70.2k|    struct lys_module *m;
 1767|       |
 1768|  84.3k|    LY_ARRAY_FOR(mod->parsed->imports, u) {
  ------------------
  |  |  167|  70.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  70.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  70.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  70.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   154k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   154k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 126k, False: 28.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 84.3k, False: 70.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  84.3k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1769|  84.3k|        m = mod->parsed->imports[u].module;
 1770|  84.3k|        if (!m->implemented) {
  ------------------
  |  Branch (1770:13): [True: 70.2k, False: 14.0k]
  ------------------
 1771|  70.2k|            continue;
 1772|  70.2k|        }
 1773|       |
 1774|  14.0k|        if (!m->to_compile) {
  ------------------
  |  Branch (1774:13): [True: 0, False: 14.0k]
  ------------------
 1775|       |            /* module was not/will not be compiled in this compilation (so disabled nodes are not present) */
 1776|      0|            m->to_compile = 1;
 1777|      0|            return LY_ERECOMPILE;
 1778|      0|        }
 1779|       |
 1780|       |        /* recursive */
 1781|  14.0k|        LY_CHECK_RET(lys_has_compiled_import_r(m));
  ------------------
  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.0k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|  14.0k|    }
 1783|       |
 1784|  70.2k|    return LY_SUCCESS;
 1785|  70.2k|}

lys_precompile_uses_augments_refines:
  225|   224k|{
  226|   224k|    LY_ERR ret = LY_SUCCESS;
  227|   224k|    struct lyxp_expr *exp = NULL;
  228|   224k|    struct lysc_augment *aug;
  229|   224k|    struct lysp_node_augment *aug_p;
  230|   224k|    struct lysc_refine *rfn;
  231|   224k|    struct lysp_refine **new_rfn;
  232|   224k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   224k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  233|   224k|    uint32_t i;
  234|   224k|    struct ly_set mod_set = {0};
  235|       |
  236|   224k|    LY_LIST_FOR(uses_p->augments, aug_p) {
  ------------------
  |  |  181|   224k|    for ((ELEM) = (START); \
  |  |  182|   224k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 224k]
  |  |  ------------------
  |  |  183|   224k|         (ELEM) = (ELEM)->next)
  ------------------
  237|      0|        lysc_update_path(ctx, NULL, "{augment}");
  238|      0|        lysc_update_path(ctx, NULL, aug_p->nodeid);
  239|       |
  240|       |        /* parse the nodeid */
  241|      0|        LY_CHECK_GOTO(ret = lys_nodeid_mod_check(ctx, aug_p->nodeid, 0, &mod_set, &exp, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  242|       |
  243|       |        /* allocate new compiled augment and store it in the set */
  244|      0|        aug = calloc(1, sizeof *aug);
  245|      0|        LY_CHECK_ERR_GOTO(!aug, LOGMEM(ctx->ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  246|      0|        LY_CHECK_GOTO(ret = ly_set_add(&ctx->uses_augs, aug, 1, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  247|       |
  248|      0|        aug->nodeid = exp;
  249|      0|        exp = NULL;
  250|      0|        aug->aug_pmod = ctx->pmod;
  251|      0|        aug->nodeid_ctx_node = ctx_node;
  252|      0|        aug->aug_p = aug_p;
  253|       |
  254|      0|        lysc_update_path(ctx, NULL, NULL);
  255|      0|        lysc_update_path(ctx, NULL, NULL);
  256|      0|    }
  257|       |
  258|   224k|    LY_ARRAY_FOR(uses_p->refines, u) {
  ------------------
  |  |  167|   224k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   224k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   224k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   224k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   224k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   224k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 224k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 224k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   224k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|      0|        lysc_update_path(ctx, NULL, "{refine}");
  260|      0|        lysc_update_path(ctx, NULL, uses_p->refines[u].nodeid);
  261|       |
  262|       |        /* parse the nodeid */
  263|      0|        LY_CHECK_GOTO(ret = lys_nodeid_mod_check(ctx, uses_p->refines[u].nodeid, 0, &mod_set, &exp, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  264|       |
  265|       |        /* try to find the node in already compiled refines */
  266|      0|        rfn = NULL;
  267|      0|        for (i = 0; i < ctx->uses_rfns.count; ++i) {
  ------------------
  |  Branch (267:21): [True: 0, False: 0]
  ------------------
  268|      0|            if (lys_abs_schema_nodeid_match(ctx->ctx, exp, ctx->pmod, ((struct lysc_refine *)ctx->uses_rfns.objs[i])->nodeid,
  ------------------
  |  Branch (268:17): [True: 0, False: 0]
  ------------------
  269|      0|                    ctx->pmod)) {
  270|      0|                rfn = ctx->uses_rfns.objs[i];
  271|      0|                break;
  272|      0|            }
  273|      0|        }
  274|       |
  275|      0|        if (!rfn) {
  ------------------
  |  Branch (275:13): [True: 0, False: 0]
  ------------------
  276|       |            /* allocate new compiled refine */
  277|      0|            rfn = calloc(1, sizeof *rfn);
  278|      0|            LY_CHECK_ERR_GOTO(!rfn, LOGMEM(ctx->ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  279|      0|            LY_CHECK_GOTO(ret = ly_set_add(&ctx->uses_rfns, rfn, 1, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  280|       |
  281|      0|            rfn->nodeid = exp;
  282|      0|            exp = NULL;
  283|      0|            rfn->nodeid_pmod = ctx->cur_mod->parsed;
  284|      0|            rfn->nodeid_ctx_node = ctx_node;
  285|      0|            rfn->uses_p = uses_p;
  286|      0|        } else {
  287|       |            /* just free exp */
  288|      0|            lyxp_expr_free(ctx->ctx, exp);
  289|      0|            exp = NULL;
  290|      0|        }
  291|       |
  292|       |        /* add new parsed refine structure */
  293|      0|        LY_ARRAY_NEW_GOTO(ctx->ctx, rfn->rfns, new_rfn, ret, cleanup);
  ------------------
  |  |  113|      0|    LY_ARRAY_NEW(CTX, ARRAY, RET = LY_EMEM; goto GOTO); \
  |  |  ------------------
  |  |  |  |   61|      0|    { \
  |  |  |  |   62|      0|        char *p__; \
  |  |  |  |   63|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   64|      0|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|      0|        } else { \
  |  |  |  |   73|      0|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|      0|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|      0|        } \
  |  |  |  |   80|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|      0|    }
  |  |  ------------------
  |  |  114|      0|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |  115|      0|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
  294|      0|        *new_rfn = &uses_p->refines[u];
  295|       |
  296|      0|        lysc_update_path(ctx, NULL, NULL);
  297|      0|        lysc_update_path(ctx, NULL, NULL);
  298|      0|    }
  299|       |
  300|   224k|cleanup:
  301|   224k|    if (ret) {
  ------------------
  |  Branch (301:9): [True: 0, False: 224k]
  ------------------
  302|      0|        lysc_update_path(ctx, NULL, NULL);
  303|      0|        lysc_update_path(ctx, NULL, NULL);
  304|      0|    }
  305|       |    /* should include only this module, will fail later if not */
  306|   224k|    ly_set_erase(&mod_set, NULL);
  307|   224k|    lyxp_expr_free(ctx->ctx, exp);
  308|   224k|    return ret;
  309|   224k|}
lysp_qname_dup:
  425|  14.0k|{
  426|  14.0k|    LY_ERR ret = LY_SUCCESS;
  427|       |
  428|  14.0k|    if (!orig_qname->str) {
  ------------------
  |  Branch (428:9): [True: 0, False: 14.0k]
  ------------------
  429|      0|        return LY_SUCCESS;
  430|      0|    }
  431|       |
  432|  14.0k|    DUP_STRING(ctx, orig_qname->str, qname->str, ret);
  ------------------
  |  |  167|  14.0k|#define DUP_STRING(CTX, ORIG, DUP, RET) RET = lydict_insert(CTX, ORIG, 0, &(DUP))
  ------------------
  433|  14.0k|    assert(orig_qname->mod);
  434|      0|    qname->mod = orig_qname->mod;
  435|       |
  436|  14.0k|    return ret;
  437|  14.0k|}
lysp_dev_node_free:
 1702|   899k|{
 1703|   899k|    if (!dev_pnode) {
  ------------------
  |  Branch (1703:9): [True: 899k, False: 0]
  ------------------
 1704|   899k|        return;
 1705|   899k|    }
 1706|       |
 1707|      0|    switch (dev_pnode->nodetype) {
 1708|      0|    case LYS_CONTAINER:
  ------------------
  |  |  240|      0|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (1708:5): [True: 0, False: 0]
  ------------------
 1709|      0|        ((struct lysp_node_container *)dev_pnode)->child = NULL;
 1710|      0|        ((struct lysp_node_container *)dev_pnode)->actions = NULL;
 1711|      0|        ((struct lysp_node_container *)dev_pnode)->notifs = NULL;
 1712|      0|        break;
 1713|      0|    case LYS_LIST:
  ------------------
  |  |  244|      0|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (1713:5): [True: 0, False: 0]
  ------------------
 1714|      0|        ((struct lysp_node_list *)dev_pnode)->child = NULL;
 1715|      0|        ((struct lysp_node_list *)dev_pnode)->actions = NULL;
 1716|      0|        ((struct lysp_node_list *)dev_pnode)->notifs = NULL;
 1717|      0|        break;
 1718|      0|    case LYS_CHOICE:
  ------------------
  |  |  241|      0|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
  |  Branch (1718:5): [True: 0, False: 0]
  ------------------
 1719|      0|        ((struct lysp_node_choice *)dev_pnode)->child = NULL;
 1720|      0|        break;
 1721|      0|    case LYS_CASE:
  ------------------
  |  |  247|      0|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
  |  Branch (1721:5): [True: 0, False: 0]
  ------------------
 1722|      0|        ((struct lysp_node_case *)dev_pnode)->child = NULL;
 1723|      0|        break;
 1724|      0|    case LYS_LEAF:
  ------------------
  |  |  242|      0|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
  |  Branch (1724:5): [True: 0, False: 0]
  ------------------
 1725|      0|    case LYS_LEAFLIST:
  ------------------
  |  |  243|      0|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (1725:5): [True: 0, False: 0]
  ------------------
 1726|      0|    case LYS_ANYXML:
  ------------------
  |  |  245|      0|#define LYS_ANYXML      0x0020    /**< anyxml statement node */
  ------------------
  |  Branch (1726:5): [True: 0, False: 0]
  ------------------
 1727|      0|    case LYS_ANYDATA:
  ------------------
  |  |  246|      0|#define LYS_ANYDATA     0x0060    /**< anydata statement node, in tests it can be used for both #LYS_ANYXML and #LYS_ANYDATA */
  ------------------
  |  Branch (1727:5): [True: 0, False: 0]
  ------------------
 1728|       |        /* no children */
 1729|      0|        break;
 1730|      0|    case LYS_NOTIF:
  ------------------
  |  |  251|      0|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (1730:5): [True: 0, False: 0]
  ------------------
 1731|      0|        ((struct lysp_node_notif *)dev_pnode)->child = NULL;
 1732|      0|        break;
 1733|      0|    case LYS_RPC:
  ------------------
  |  |  249|      0|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
  |  Branch (1733:5): [True: 0, False: 0]
  ------------------
 1734|      0|    case LYS_ACTION:
  ------------------
  |  |  250|      0|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
  |  Branch (1734:5): [True: 0, False: 0]
  ------------------
 1735|      0|        ((struct lysp_node_action *)dev_pnode)->input.child = NULL;
 1736|      0|        ((struct lysp_node_action *)dev_pnode)->output.child = NULL;
 1737|      0|        break;
 1738|      0|    case LYS_INPUT:
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
  |  Branch (1738:5): [True: 0, False: 0]
  ------------------
 1739|      0|    case LYS_OUTPUT:
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (1739:5): [True: 0, False: 0]
  ------------------
 1740|      0|        ((struct lysp_node_action_inout *)dev_pnode)->child = NULL;
 1741|      0|        lysp_node_free(&cctx->free_ctx, dev_pnode);
 1742|      0|        free(dev_pnode);
 1743|      0|        return;
 1744|      0|    default:
  ------------------
  |  Branch (1744:5): [True: 0, False: 0]
  ------------------
 1745|      0|        LOGINT(cctx->ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
 1746|      0|        return;
 1747|      0|    }
 1748|       |
 1749|      0|    lysp_node_free(&cctx->free_ctx, dev_pnode);
 1750|      0|}
lys_compile_node_deviations_refines:
 1755|   899k|{
 1756|   899k|    LY_ERR ret = LY_SUCCESS;
 1757|   899k|    uint32_t i;
 1758|   899k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   899k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1759|   899k|    struct lysc_refine *rfn;
 1760|   899k|    struct lysc_deviation *dev;
 1761|       |
 1762|   899k|    *dev_pnode = NULL;
 1763|   899k|    *not_supported = 0;
 1764|       |
 1765|   899k|    for (i = 0; i < ctx->uses_rfns.count; ) {
  ------------------
  |  Branch (1765:17): [True: 0, False: 899k]
  ------------------
 1766|      0|        rfn = ctx->uses_rfns.objs[i];
 1767|       |
 1768|      0|        if (!lysp_schema_nodeid_match(rfn->nodeid, rfn->nodeid_pmod, NULL, rfn->nodeid_ctx_node, parent, pnode,
  ------------------
  |  Branch (1768:13): [True: 0, False: 0]
  ------------------
 1769|      0|                ctx->cur_mod, ctx->ext)) {
 1770|       |            /* not our target node */
 1771|      0|            ++i;
 1772|      0|            continue;
 1773|      0|        }
 1774|       |
 1775|      0|        if (!*dev_pnode) {
  ------------------
  |  Branch (1775:13): [True: 0, False: 0]
  ------------------
 1776|       |            /* first refine on this node, create a copy first */
 1777|      0|            LY_CHECK_GOTO(ret = lysp_dup_single(ctx, pnode, 1, dev_pnode), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1778|      0|        }
 1779|       |
 1780|       |        /* apply all the refines by changing (the copy of) the parsed node */
 1781|      0|        LY_ARRAY_FOR(rfn->rfns, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|            LY_CHECK_GOTO(ret = lys_apply_refine(ctx, rfn->rfns[u], rfn->nodeid_pmod, *dev_pnode), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1783|      0|        }
 1784|       |
 1785|       |        /* refine was applied, remove it */
 1786|      0|        lysc_refine_free(ctx->ctx, rfn);
 1787|      0|        ly_set_rm_index(&ctx->uses_rfns, i, NULL);
 1788|       |
 1789|       |        /* refines use relative paths so more may apply to a single node */
 1790|      0|    }
 1791|       |
 1792|   899k|    for (i = 0; i < ctx->devs.count; ++i) {
  ------------------
  |  Branch (1792:17): [True: 0, False: 899k]
  ------------------
 1793|      0|        dev = ctx->devs.objs[i];
 1794|       |
 1795|      0|        if (!lysp_schema_nodeid_match(dev->nodeid, dev->dev_pmods[0], NULL, NULL, parent, pnode, ctx->cur_mod, ctx->ext)) {
  ------------------
  |  Branch (1795:13): [True: 0, False: 0]
  ------------------
 1796|       |            /* not our target node */
 1797|      0|            continue;
 1798|      0|        }
 1799|       |
 1800|      0|        if (dev->not_supported) {
  ------------------
  |  Branch (1800:13): [True: 0, False: 0]
  ------------------
 1801|       |            /* it is not supported, no more deviations */
 1802|      0|            *not_supported = 1;
 1803|      0|            goto dev_applied;
 1804|      0|        }
 1805|       |
 1806|      0|        if (!*dev_pnode) {
  ------------------
  |  Branch (1806:13): [True: 0, False: 0]
  ------------------
 1807|       |            /* first deviation on this node, create a copy first */
 1808|      0|            LY_CHECK_GOTO(ret = lysp_dup_single(ctx, pnode, 1, dev_pnode), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1809|      0|        }
 1810|       |
 1811|       |        /* apply all the deviates by changing (the copy of) the parsed node */
 1812|      0|        LY_ARRAY_FOR(dev->devs, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1813|      0|            LY_CHECK_GOTO(ret = lys_apply_deviation(ctx, dev->devs[u], dev->dev_pmods[u], *dev_pnode), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1814|      0|        }
 1815|       |
 1816|      0|dev_applied:
 1817|       |        /* deviation was applied, remove it */
 1818|      0|        lysc_deviation_free(ctx->ctx, dev);
 1819|      0|        ly_set_rm_index(&ctx->devs, i, NULL);
 1820|       |
 1821|       |        /* all the deviations for one target node are in one structure, we are done */
 1822|      0|        break;
 1823|      0|    }
 1824|       |
 1825|   899k|cleanup:
 1826|   899k|    if (ret) {
  ------------------
  |  Branch (1826:9): [True: 0, False: 899k]
  ------------------
 1827|      0|        lysp_dev_node_free(ctx, *dev_pnode);
 1828|      0|        *dev_pnode = NULL;
 1829|      0|        *not_supported = 0;
 1830|      0|    }
 1831|   899k|    return ret;
 1832|   899k|}
lys_compile_node_augments:
 2004|   309k|{
 2005|   309k|    LY_ERR ret = LY_SUCCESS;
 2006|   309k|    struct lys_module *orig_mod = ctx->cur_mod;
 2007|   309k|    struct lysp_module *orig_pmod = ctx->pmod;
 2008|   309k|    uint32_t i;
 2009|   309k|    char orig_path[LYSC_CTX_BUFSIZE];
 2010|   309k|    struct lysc_augment *aug;
 2011|       |
 2012|       |    /* uses augments */
 2013|   309k|    for (i = 0; i < ctx->uses_augs.count; ) {
  ------------------
  |  Branch (2013:17): [True: 0, False: 309k]
  ------------------
 2014|      0|        aug = ctx->uses_augs.objs[i];
 2015|       |
 2016|      0|        if (!lysp_schema_nodeid_match(aug->nodeid, orig_mod->parsed, aug->ext, aug->nodeid_ctx_node, node, NULL, NULL,
  ------------------
  |  Branch (2016:13): [True: 0, False: 0]
  ------------------
 2017|      0|                ctx->ext)) {
 2018|       |            /* not our target node */
 2019|      0|            ++i;
 2020|      0|            continue;
 2021|      0|        }
 2022|       |
 2023|       |        /* use the path and modules from the augment */
 2024|      0|        lysc_update_path(ctx, NULL, "{augment}");
 2025|      0|        lysc_update_path(ctx, NULL, aug->aug_p->nodeid);
 2026|      0|        ctx->pmod = (struct lysp_module *)aug->aug_pmod;
 2027|       |
 2028|       |        /* apply augment, restore the path */
 2029|      0|        ret = lys_compile_augment(ctx, aug->aug_p, node);
 2030|      0|        lysc_update_path(ctx, NULL, NULL);
 2031|      0|        lysc_update_path(ctx, NULL, NULL);
 2032|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2033|       |
 2034|       |        /* augment was applied, remove it (index and the whole set may have changed because other augments
 2035|       |         * could have been applied) */
 2036|      0|        ly_set_rm(&ctx->uses_augs, aug, NULL);
 2037|      0|        lysc_augment_free(ctx->ctx, aug);
 2038|      0|        i = 0;
 2039|      0|    }
 2040|       |
 2041|       |    /* top-level augments */
 2042|   309k|    for (i = 0; i < ctx->augs.count; ) {
  ------------------
  |  Branch (2042:17): [True: 0, False: 309k]
  ------------------
 2043|      0|        aug = ctx->augs.objs[i];
 2044|       |
 2045|      0|        if (!lysp_schema_nodeid_match(aug->nodeid, aug->aug_pmod, aug->ext, NULL, node, NULL, NULL, ctx->ext)) {
  ------------------
  |  Branch (2045:13): [True: 0, False: 0]
  ------------------
 2046|       |            /* not our target node */
 2047|      0|            ++i;
 2048|      0|            continue;
 2049|      0|        }
 2050|       |
 2051|       |        /* use the path and modules from the augment */
 2052|      0|        strcpy(orig_path, ctx->path);
 2053|      0|        ctx->path_len = 1;
 2054|      0|        ctx->cur_mod = aug->aug_pmod->mod;
 2055|      0|        ctx->pmod = (struct lysp_module *)aug->aug_pmod;
 2056|      0|        lysc_update_path(ctx, NULL, "{augment}");
 2057|      0|        lysc_update_path(ctx, NULL, aug->aug_p->nodeid);
 2058|       |
 2059|       |        /* apply augment, restore the path */
 2060|      0|        ret = lys_compile_augment(ctx, aug->aug_p, node);
 2061|      0|        strcpy(ctx->path, orig_path);
 2062|      0|        ctx->path_len = strlen(ctx->path);
 2063|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2064|       |
 2065|       |        /* augment was applied, remove it */
 2066|      0|        ly_set_rm(&ctx->augs, aug, NULL);
 2067|      0|        lysc_augment_free(ctx->ctx, aug);
 2068|      0|        i = 0;
 2069|      0|    }
 2070|       |
 2071|   309k|cleanup:
 2072|   309k|    ctx->cur_mod = orig_mod;
 2073|   309k|    ctx->pmod = orig_pmod;
 2074|   309k|    return ret;
 2075|   309k|}
lys_precompile_own_augments:
 2161|  56.2k|{
 2162|  56.2k|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|  56.2k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 2163|  56.2k|    const struct lys_module *aug_mod;
 2164|  56.2k|    const struct lysp_module *submod;
 2165|       |
 2166|  56.2k|    LY_ARRAY_FOR(ctx->cur_mod->augmented_by, u) {
  ------------------
  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  56.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  56.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  56.2k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  56.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  56.2k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2167|      0|        aug_mod = ctx->cur_mod->augmented_by[u];
 2168|       |
 2169|       |        /* collect all module augments */
 2170|      0|        LY_CHECK_RET(lys_precompile_own_augments_mod(ctx, aug_mod->parsed));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2171|       |
 2172|       |        /* collect all submodules augments */
 2173|      0|        LY_ARRAY_FOR(aug_mod->parsed->includes, v) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2174|      0|            submod = (struct lysp_module *)aug_mod->parsed->includes[v].submodule;
 2175|       |
 2176|      0|            LY_CHECK_RET(lys_precompile_own_augments_mod(ctx, submod));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2177|      0|        }
 2178|      0|    }
 2179|       |
 2180|  56.2k|    return LY_SUCCESS;
 2181|  56.2k|}
lys_precompile_own_deviations:
 2245|  56.2k|{
 2246|  56.2k|    LY_ARRAY_COUNT_TYPE u, v, w;
  ------------------
  |  |  104|  56.2k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 2247|  56.2k|    struct lys_module *orig_cur_mod;
 2248|  56.2k|    const struct lys_module *dev_mod;
 2249|  56.2k|    struct lysc_deviation *dev;
 2250|  56.2k|    struct lysp_deviate *d;
 2251|  56.2k|    int not_supported;
 2252|  56.2k|    uint32_t i;
 2253|       |
 2254|  56.2k|    LY_ARRAY_FOR(ctx->cur_mod->deviated_by, u) {
  ------------------
  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  56.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  56.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  56.2k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  56.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  56.2k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2255|      0|        dev_mod = ctx->cur_mod->deviated_by[u];
 2256|       |
 2257|       |        /* compile all module deviations */
 2258|      0|        LY_ARRAY_FOR(dev_mod->parsed->deviations, v) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2259|      0|            LY_CHECK_RET(lys_precompile_own_deviation(ctx, &dev_mod->parsed->deviations[v], dev_mod->parsed));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2260|      0|        }
 2261|       |
 2262|       |        /* compile all submodules deviations */
 2263|      0|        LY_ARRAY_FOR(dev_mod->parsed->includes, v) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2264|      0|            LY_ARRAY_FOR(dev_mod->parsed->includes[v].submodule->deviations, w) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2265|      0|                LY_CHECK_RET(lys_precompile_own_deviation(ctx, &dev_mod->parsed->includes[v].submodule->deviations[w],
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2266|      0|                        (struct lysp_module *)dev_mod->parsed->includes[v].submodule));
 2267|      0|            }
 2268|      0|        }
 2269|      0|    }
 2270|       |
 2271|       |    /* set not-supported flags for all the deviations */
 2272|  56.2k|    for (i = 0; i < ctx->devs.count; ++i) {
  ------------------
  |  Branch (2272:17): [True: 0, False: 56.2k]
  ------------------
 2273|      0|        dev = ctx->devs.objs[i];
 2274|      0|        not_supported = 0;
 2275|       |
 2276|      0|        LY_ARRAY_FOR(dev->devs, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2277|      0|            LY_LIST_FOR(dev->devs[u]->deviates, d) {
  ------------------
  |  |  181|      0|    for ((ELEM) = (START); \
  |  |  182|      0|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  183|      0|         (ELEM) = (ELEM)->next)
  ------------------
 2278|      0|                if (d->mod == LYS_DEV_NOT_SUPPORTED) {
  ------------------
  |  |  470|      0|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (2278:21): [True: 0, False: 0]
  ------------------
 2279|      0|                    not_supported = 1;
 2280|      0|                    break;
 2281|      0|                }
 2282|      0|            }
 2283|      0|            if (not_supported) {
  ------------------
  |  Branch (2283:17): [True: 0, False: 0]
  ------------------
 2284|      0|                break;
 2285|      0|            }
 2286|      0|        }
 2287|      0|        if (not_supported && (LY_ARRAY_COUNT(dev->devs) > 1)) {
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2287:13): [True: 0, False: 0]
  |  Branch (2287:30): [True: 0, False: 0]
  ------------------
 2288|      0|            orig_cur_mod = ctx->cur_mod;
 2289|      0|            ctx->cur_mod = dev->dev_pmods[u]->mod;
 2290|      0|            lysc_update_path(ctx, NULL, "{deviation}");
 2291|      0|            lysc_update_path(ctx, NULL, dev->nodeid->expr);
 2292|      0|            LOGVAL(ctx->ctx, LYVE_SEMANTICS,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2293|      0|                    "Multiple deviations of \"%s\" with one of them being \"not-supported\".", dev->nodeid->expr);
 2294|      0|            lysc_update_path(ctx, NULL, NULL);
 2295|      0|            lysc_update_path(ctx, NULL, NULL);
 2296|      0|            ctx->cur_mod = orig_cur_mod;
 2297|      0|            return LY_EVALID;
 2298|      0|        }
 2299|       |
 2300|      0|        dev->not_supported = not_supported;
 2301|      0|    }
 2302|       |
 2303|  56.2k|    return LY_SUCCESS;
 2304|  56.2k|}
lys_precompile_augments_deviations:
 2446|  56.2k|{
 2447|  56.2k|    LY_ERR ret = LY_SUCCESS, r;
 2448|  56.2k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|  56.2k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 2449|  56.2k|    struct lys_module *m;
 2450|  56.2k|    struct lysp_module *submod;
 2451|  56.2k|    const char **imp_f, *all_f[] = {"*", NULL};
 2452|  56.2k|    uint32_t i;
 2453|  56.2k|    struct ly_set mod_set = {0};
 2454|       |
 2455|       |    /* module */
 2456|  56.2k|    LY_CHECK_GOTO(ret = lys_precompile_mod_augments_deviations(mod->parsed, &mod_set), cleanup);
  ------------------
  |  |  202|  56.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 56.2k]
  |  |  ------------------
  ------------------
 2457|       |
 2458|       |    /* submodules */
 2459|  56.2k|    LY_ARRAY_FOR(mod->parsed->includes, u) {
  ------------------
  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  56.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  56.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  56.2k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  56.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  56.2k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2460|      0|        submod = (struct lysp_module *)mod->parsed->includes[u].submodule;
 2461|      0|        LY_CHECK_GOTO(ret = lys_precompile_mod_augments_deviations(submod, &mod_set), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2462|      0|    }
 2463|       |
 2464|  56.2k|    for (i = 0; i < mod_set.count; ++i) {
  ------------------
  |  Branch (2464:17): [True: 0, False: 56.2k]
  ------------------
 2465|      0|        m = mod_set.objs[i];
 2466|       |
 2467|      0|        if (m == mod) {
  ------------------
  |  Branch (2467:13): [True: 0, False: 0]
  ------------------
 2468|       |            /* will be applied normally later */
 2469|      0|            continue;
 2470|      0|        }
 2471|       |
 2472|       |        /* we do not actually need the target modules compiled with out amends, they just need to be implemented
 2473|       |         * not compiled yet and marked for compilation */
 2474|       |
 2475|      0|        if (!m->implemented) {
  ------------------
  |  Branch (2475:13): [True: 0, False: 0]
  ------------------
 2476|       |            /* implement the target module */
 2477|      0|            imp_f = (mod->ctx->flags & LY_CTX_ENABLE_IMP_FEATURES) ? all_f : NULL;
  ------------------
  |  |  197|      0|#define LY_CTX_ENABLE_IMP_FEATURES 0x0100 /**< By default, all features of newly implemented imported modules of
  ------------------
  |  Branch (2477:21): [True: 0, False: 0]
  ------------------
 2478|      0|            r = lys_implement(m, imp_f, unres);
 2479|      0|            if (r == LY_ERECOMPILE) {
  ------------------
  |  Branch (2479:17): [True: 0, False: 0]
  ------------------
 2480|       |                /* implement all the modules right away to save possible later recompilation */
 2481|      0|                ret = r;
 2482|      0|                continue;
 2483|      0|            } else if (r) {
  ------------------
  |  Branch (2483:24): [True: 0, False: 0]
  ------------------
 2484|       |                /* error */
 2485|      0|                ret = r;
 2486|      0|                goto cleanup;
 2487|      0|            }
 2488|      0|        } else if (m->compiled) {
  ------------------
  |  Branch (2488:20): [True: 0, False: 0]
  ------------------
 2489|       |            /* target module was already compiled without our amends (augment/deviation), we need to recompile it */
 2490|      0|            m->to_compile = 1;
 2491|      0|            ret = LY_ERECOMPILE;
 2492|      0|            continue;
 2493|      0|        }
 2494|      0|    }
 2495|       |
 2496|  56.2k|cleanup:
 2497|  56.2k|    ly_set_erase(&mod_set, NULL);
 2498|  56.2k|    return ret;
 2499|  56.2k|}
schema_compile_amend.c:lys_precompile_mod_augments_deviations:
 2367|  56.2k|{
 2368|  56.2k|    LY_ERR ret = LY_SUCCESS;
 2369|  56.2k|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|  56.2k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 2370|  56.2k|    struct lysc_ctx ctx;
 2371|  56.2k|    struct lys_module *m;
 2372|  56.2k|    struct lysp_node_augment *aug;
 2373|  56.2k|    struct ly_set set = {0};
 2374|       |
 2375|  56.2k|    LYSC_CTX_INIT_PMOD(ctx, pmod, NULL);
  ------------------
  |  |   84|  56.2k|    memset(&(CCTX), 0, sizeof (CCTX)); \
  |  |   85|  56.2k|    (CCTX).ctx = (PMOD)->mod->ctx; \
  |  |   86|  56.2k|    (CCTX).cur_mod = (PMOD)->mod; \
  |  |   87|  56.2k|    (CCTX).pmod = (PMOD); \
  |  |   88|  56.2k|    (CCTX).ext = (EXT); \
  |  |   89|  56.2k|    (CCTX).path_len = 1; \
  |  |   90|  56.2k|    (CCTX).path[0] = '/'; \
  |  |   91|  56.2k|    (CCTX).free_ctx.ctx = (PMOD)->mod->ctx
  ------------------
 2376|       |
 2377|  56.2k|    LY_LIST_FOR(pmod->augments, aug) {
  ------------------
  |  |  181|  56.2k|    for ((ELEM) = (START); \
  |  |  182|  56.2k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 56.2k]
  |  |  ------------------
  |  |  183|  56.2k|         (ELEM) = (ELEM)->next)
  ------------------
 2378|       |        /* get target module */
 2379|      0|        lysc_update_path(&ctx, NULL, "{augment}");
 2380|      0|        lysc_update_path(&ctx, NULL, aug->nodeid);
 2381|      0|        ret = lys_nodeid_mod_check(&ctx, aug->nodeid, 1, &set, NULL, &m);
 2382|      0|        lysc_update_path(&ctx, NULL, NULL);
 2383|      0|        lysc_update_path(&ctx, NULL, NULL);
 2384|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2385|       |
 2386|       |        /* add this module into the target module augmented_by, if not there and implemented */
 2387|      0|        if ((lys_array_add_mod_ref(&ctx, pmod->mod, &m->augmented_by) != LY_EEXIST) ||
  ------------------
  |  Branch (2387:13): [True: 0, False: 0]
  ------------------
 2388|      0|                !lys_precompile_mod_set_is_all_implemented(&set)) {
  ------------------
  |  Branch (2388:17): [True: 0, False: 0]
  ------------------
 2389|      0|            LY_CHECK_GOTO(ret = ly_set_merge(mod_set, &set, 0, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2390|      0|        }
 2391|      0|        ly_set_erase(&set, NULL);
 2392|      0|    }
 2393|       |
 2394|  56.2k|    LY_ARRAY_FOR(pmod->deviations, u) {
  ------------------
  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  56.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  56.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  56.2k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  56.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  56.2k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2395|       |        /* get target module */
 2396|      0|        lysc_update_path(&ctx, NULL, "{deviation}");
 2397|      0|        lysc_update_path(&ctx, NULL, pmod->deviations[u].nodeid);
 2398|      0|        ret = lys_nodeid_mod_check(&ctx, pmod->deviations[u].nodeid, 1, &set, NULL, &m);
 2399|      0|        lysc_update_path(&ctx, NULL, NULL);
 2400|      0|        lysc_update_path(&ctx, NULL, NULL);
 2401|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2402|       |
 2403|       |        /* add this module into the target module deviated_by, if not there and implemented */
 2404|      0|        if ((lys_array_add_mod_ref(&ctx, pmod->mod, &m->deviated_by) != LY_EEXIST) ||
  ------------------
  |  Branch (2404:13): [True: 0, False: 0]
  ------------------
 2405|      0|                !lys_precompile_mod_set_is_all_implemented(&set)) {
  ------------------
  |  Branch (2405:17): [True: 0, False: 0]
  ------------------
 2406|      0|            LY_CHECK_GOTO(ret = ly_set_merge(mod_set, &set, 0, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2407|      0|        }
 2408|      0|        ly_set_erase(&set, NULL);
 2409|      0|    }
 2410|       |
 2411|   126k|    LY_ARRAY_FOR(pmod->exts, u) {
  ------------------
  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  56.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  56.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   182k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   182k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 140k, False: 42.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 126k, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2412|   126k|        aug = NULL;
 2413|   759k|        LY_ARRAY_FOR(pmod->exts[u].substmts, v) {
  ------------------
  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   885k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   885k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 885k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 759k, False: 126k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   759k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2414|   759k|            if (pmod->exts[u].substmts[v].stmt == LY_STMT_AUGMENT) {
  ------------------
  |  Branch (2414:17): [True: 0, False: 759k]
  ------------------
 2415|      0|                aug = *(struct lysp_node_augment **)pmod->exts[u].substmts[v].storage;
 2416|      0|                break;
 2417|      0|            }
 2418|   759k|        }
 2419|   126k|        if (!aug) {
  ------------------
  |  Branch (2419:13): [True: 126k, False: 0]
  ------------------
 2420|   126k|            continue;
 2421|   126k|        }
 2422|       |
 2423|       |        /* get target module */
 2424|      0|        lysc_update_path(&ctx, NULL, "{ext-augment}");
 2425|      0|        lysc_update_path(&ctx, NULL, aug->nodeid);
 2426|      0|        ret = lys_nodeid_mod_check(&ctx, aug->nodeid, 1, &set, NULL, &m);
 2427|      0|        lysc_update_path(&ctx, NULL, NULL);
 2428|      0|        lysc_update_path(&ctx, NULL, NULL);
 2429|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2430|       |
 2431|       |        /* add this module into the target module augmented_by, if not there and implemented */
 2432|      0|        if ((lys_array_add_mod_ref(&ctx, pmod->mod, &m->augmented_by) != LY_EEXIST) ||
  ------------------
  |  Branch (2432:13): [True: 0, False: 0]
  ------------------
 2433|      0|                !lys_precompile_mod_set_is_all_implemented(&set)) {
  ------------------
  |  Branch (2433:17): [True: 0, False: 0]
  ------------------
 2434|      0|            LY_CHECK_GOTO(ret = ly_set_merge(mod_set, &set, 0, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2435|      0|        }
 2436|      0|        ly_set_erase(&set, NULL);
 2437|      0|    }
 2438|       |
 2439|  56.2k|cleanup:
 2440|  56.2k|    ly_set_erase(&set, NULL);
 2441|  56.2k|    return ret;
 2442|  56.2k|}

lys_compile_type_range:
  855|  98.4k|{
  856|  98.4k|    LY_ERR ret = LY_SUCCESS;
  857|  98.4k|    const char *expr;
  858|  98.4k|    struct lysc_range_part *parts = NULL, *part;
  859|  98.4k|    ly_bool range_expected = 0, uns;
  860|  98.4k|    LY_ARRAY_COUNT_TYPE parts_done = 0, u, v;
  ------------------
  |  |  104|  98.4k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  861|       |
  862|  98.4k|    assert(range);
  863|      0|    assert(range_p);
  864|       |
  865|      0|    expr = range_p->arg.str;
  866|   281k|    while (1) {
  ------------------
  |  Branch (866:12): [Folded - Ignored]
  ------------------
  867|   281k|        if (isspace(*expr)) {
  868|      0|            ++expr;
  869|   281k|        } else if (*expr == '\0') {
  ------------------
  |  Branch (869:20): [True: 98.4k, False: 182k]
  ------------------
  870|  98.4k|            if (range_expected) {
  ------------------
  |  Branch (870:17): [True: 0, False: 98.4k]
  ------------------
  871|      0|                LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  872|      0|                        "Invalid %s restriction - unexpected end of the expression after \"..\" (%s).",
  873|      0|                        length_restr ? "length" : "range", range_p->arg.str);
  874|      0|                ret = LY_EVALID;
  875|      0|                goto cleanup;
  876|  98.4k|            } else if (!parts || (parts_done == LY_ARRAY_COUNT(parts))) {
  ------------------
  |  |  148|  98.4k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 98.4k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (876:24): [True: 0, False: 98.4k]
  |  Branch (876:34): [True: 0, False: 98.4k]
  ------------------
  877|      0|                LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  878|      0|                        "Invalid %s restriction - unexpected end of the expression (%s).",
  879|      0|                        length_restr ? "length" : "range", range_p->arg.str);
  880|      0|                ret = LY_EVALID;
  881|      0|                goto cleanup;
  882|      0|            }
  883|  98.4k|            parts_done++;
  884|  98.4k|            break;
  885|   182k|        } else if (!strncmp(expr, "min", ly_strlen_const("min"))) {
  ------------------
  |  |  472|   182k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (885:20): [True: 0, False: 182k]
  ------------------
  886|      0|            if (parts) {
  ------------------
  |  Branch (886:17): [True: 0, False: 0]
  ------------------
  887|       |                /* min cannot be used elsewhere than in the first part */
  888|      0|                LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  889|      0|                        "Invalid %s restriction - unexpected data before min keyword (%.*s).", length_restr ? "length" : "range",
  890|      0|                        (int)(expr - range_p->arg.str), range_p->arg.str);
  891|      0|                ret = LY_EVALID;
  892|      0|                goto cleanup;
  893|      0|            }
  894|      0|            expr += ly_strlen_const("min");
  ------------------
  |  |  472|      0|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  895|       |
  896|      0|            LY_ARRAY_NEW_GOTO(ctx->ctx, parts, part, ret, cleanup);
  ------------------
  |  |  113|      0|    LY_ARRAY_NEW(CTX, ARRAY, RET = LY_EMEM; goto GOTO); \
  |  |  ------------------
  |  |  |  |   61|      0|    { \
  |  |  |  |   62|      0|        char *p__; \
  |  |  |  |   63|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   64|      0|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|      0|        } else { \
  |  |  |  |   73|      0|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|      0|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|      0|        } \
  |  |  |  |   80|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|      0|    }
  |  |  ------------------
  |  |  114|      0|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |  115|      0|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
  897|      0|            LY_CHECK_GOTO(ret = range_part_minmax(ctx, part, 0, 0, basetype, 1, length_restr, frdigits, base_range, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  898|      0|            part->max_64 = part->min_64;
  899|   182k|        } else if (*expr == '|') {
  ------------------
  |  Branch (899:20): [True: 0, False: 182k]
  ------------------
  900|      0|            if (!parts || range_expected) {
  ------------------
  |  Branch (900:17): [True: 0, False: 0]
  |  Branch (900:27): [True: 0, False: 0]
  ------------------
  901|      0|                LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  902|      0|                        "Invalid %s restriction - unexpected beginning of the expression (%s).", length_restr ? "length" : "range", expr);
  903|      0|                ret = LY_EVALID;
  904|      0|                goto cleanup;
  905|      0|            }
  906|      0|            expr++;
  907|      0|            parts_done++;
  908|       |            /* process next part of the expression */
  909|   182k|        } else if (!strncmp(expr, "..", 2)) {
  ------------------
  |  Branch (909:20): [True: 42.1k, False: 140k]
  ------------------
  910|  42.1k|            expr += 2;
  911|  42.1k|            while (isspace(*expr)) {
  912|      0|                expr++;
  913|      0|            }
  914|  42.1k|            if (!parts || (LY_ARRAY_COUNT(parts) == parts_done)) {
  ------------------
  |  |  148|  42.1k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 42.1k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (914:17): [True: 0, False: 42.1k]
  |  Branch (914:27): [True: 0, False: 42.1k]
  ------------------
  915|      0|                LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  916|      0|                        "Invalid %s restriction - unexpected \"..\" without a lower bound.", length_restr ? "length" : "range");
  917|      0|                ret = LY_EVALID;
  918|      0|                goto cleanup;
  919|      0|            }
  920|       |            /* continue expecting the upper boundary */
  921|  42.1k|            range_expected = 1;
  922|   140k|        } else if (isdigit(*expr) || (*expr == '-') || (*expr == '+')) {
  ------------------
  |  Branch (922:38): [True: 0, False: 42.1k]
  |  Branch (922:56): [True: 0, False: 42.1k]
  ------------------
  923|       |            /* number */
  924|  98.4k|            if (range_expected) {
  ------------------
  |  Branch (924:17): [True: 0, False: 98.4k]
  ------------------
  925|      0|                part = &parts[LY_ARRAY_COUNT(parts) - 1];
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  926|      0|                LY_CHECK_GOTO(ret = range_part_minmax(ctx, part, 1, part->min_64, basetype, 0, length_restr, frdigits, NULL, &expr), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  927|      0|                range_expected = 0;
  928|  98.4k|            } else {
  929|  98.4k|                LY_ARRAY_NEW_GOTO(ctx->ctx, parts, part, ret, cleanup);
  ------------------
  |  |  113|  98.4k|    LY_ARRAY_NEW(CTX, ARRAY, RET = LY_EMEM; goto GOTO); \
  |  |  ------------------
  |  |  |  |   61|  98.4k|    { \
  |  |  |  |   62|  98.4k|        char *p__; \
  |  |  |  |   63|  98.4k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 0, False: 98.4k]
  |  |  |  |  ------------------
  |  |  |  |   64|      0|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  98.4k|        } else { \
  |  |  |  |   73|  98.4k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  98.4k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 98.4k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  98.4k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  98.4k|        } \
  |  |  |  |   80|  98.4k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  98.4k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  98.4k|    }
  |  |  ------------------
  |  |  114|  98.4k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |  115|  98.4k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
  930|  98.4k|                LY_CHECK_GOTO(ret = range_part_minmax(ctx, part, 0, parts_done ? parts[LY_ARRAY_COUNT(parts) - 2].max_64 : 0,
  ------------------
  |  |  202|   393k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 98.4k]
  |  |  |  Branch (202:40): [True: 0, False: 0]
  |  |  |  Branch (202:40): [True: 0, False: 98.4k]
  |  |  |  Branch (202:40): [True: 0, False: 98.4k]
  |  |  ------------------
  ------------------
  931|  98.4k|                        basetype, parts_done ? 0 : 1, length_restr, frdigits, NULL, &expr), cleanup);
  932|  98.4k|                part->max_64 = part->min_64;
  933|  98.4k|            }
  934|       |
  935|       |            /* continue with possible another expression part */
  936|  98.4k|        } else if (!strncmp(expr, "max", ly_strlen_const("max"))) {
  ------------------
  |  |  472|  42.1k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (936:20): [True: 42.1k, False: 0]
  ------------------
  937|  42.1k|            expr += ly_strlen_const("max");
  ------------------
  |  |  472|  42.1k|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  938|  42.1k|            while (isspace(*expr)) {
  939|      0|                expr++;
  940|      0|            }
  941|  42.1k|            if (*expr != '\0') {
  ------------------
  |  Branch (941:17): [True: 0, False: 42.1k]
  ------------------
  942|      0|                LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG, "Invalid %s restriction - unexpected data after max keyword (%s).",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  943|      0|                        length_restr ? "length" : "range", expr);
  944|      0|                ret = LY_EVALID;
  945|      0|                goto cleanup;
  946|      0|            }
  947|  42.1k|            if (range_expected) {
  ------------------
  |  Branch (947:17): [True: 42.1k, False: 0]
  ------------------
  948|  42.1k|                part = &parts[LY_ARRAY_COUNT(parts) - 1];
  ------------------
  |  |  148|  42.1k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 42.1k, False: 0]
  |  |  ------------------
  ------------------
  949|  42.1k|                LY_CHECK_GOTO(ret = range_part_minmax(ctx, part, 1, part->min_64, basetype, 0, length_restr, frdigits, base_range, NULL), cleanup);
  ------------------
  |  |  202|  42.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 42.1k]
  |  |  ------------------
  ------------------
  950|  42.1k|                range_expected = 0;
  951|  42.1k|            } else {
  952|      0|                LY_ARRAY_NEW_GOTO(ctx->ctx, parts, part, ret, cleanup);
  ------------------
  |  |  113|      0|    LY_ARRAY_NEW(CTX, ARRAY, RET = LY_EMEM; goto GOTO); \
  |  |  ------------------
  |  |  |  |   61|      0|    { \
  |  |  |  |   62|      0|        char *p__; \
  |  |  |  |   63|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   64|      0|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|      0|        } else { \
  |  |  |  |   73|      0|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|      0|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|      0|        } \
  |  |  |  |   80|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|      0|    }
  |  |  ------------------
  |  |  114|      0|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |  115|      0|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
  953|      0|                LY_CHECK_GOTO(ret = range_part_minmax(ctx, part, 1, parts_done ? parts[LY_ARRAY_COUNT(parts) - 2].max_64 : 0,
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  |  Branch (202:40): [True: 0, False: 0]
  |  |  |  Branch (202:40): [True: 0, False: 0]
  |  |  |  Branch (202:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  954|      0|                        basetype, parts_done ? 0 : 1, length_restr, frdigits, base_range, NULL), cleanup);
  955|      0|                part->min_64 = part->max_64;
  956|      0|            }
  957|  42.1k|        } else {
  958|      0|            LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG, "Invalid %s restriction - unexpected data (%s).",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  959|      0|                    length_restr ? "length" : "range", expr);
  960|      0|            ret = LY_EVALID;
  961|      0|            goto cleanup;
  962|      0|        }
  963|   281k|    }
  964|       |
  965|       |    /* check with the previous range/length restriction */
  966|  98.4k|    if (base_range) {
  ------------------
  |  Branch (966:9): [True: 0, False: 98.4k]
  ------------------
  967|      0|        switch (basetype) {
  968|      0|        case LY_TYPE_BINARY:
  ------------------
  |  Branch (968:9): [True: 0, False: 0]
  ------------------
  969|      0|        case LY_TYPE_UINT8:
  ------------------
  |  Branch (969:9): [True: 0, False: 0]
  ------------------
  970|      0|        case LY_TYPE_UINT16:
  ------------------
  |  Branch (970:9): [True: 0, False: 0]
  ------------------
  971|      0|        case LY_TYPE_UINT32:
  ------------------
  |  Branch (971:9): [True: 0, False: 0]
  ------------------
  972|      0|        case LY_TYPE_UINT64:
  ------------------
  |  Branch (972:9): [True: 0, False: 0]
  ------------------
  973|      0|        case LY_TYPE_STRING:
  ------------------
  |  Branch (973:9): [True: 0, False: 0]
  ------------------
  974|      0|            uns = 1;
  975|      0|            break;
  976|      0|        case LY_TYPE_DEC64:
  ------------------
  |  Branch (976:9): [True: 0, False: 0]
  ------------------
  977|      0|        case LY_TYPE_INT8:
  ------------------
  |  Branch (977:9): [True: 0, False: 0]
  ------------------
  978|      0|        case LY_TYPE_INT16:
  ------------------
  |  Branch (978:9): [True: 0, False: 0]
  ------------------
  979|      0|        case LY_TYPE_INT32:
  ------------------
  |  Branch (979:9): [True: 0, False: 0]
  ------------------
  980|      0|        case LY_TYPE_INT64:
  ------------------
  |  Branch (980:9): [True: 0, False: 0]
  ------------------
  981|      0|            uns = 0;
  982|      0|            break;
  983|      0|        default:
  ------------------
  |  Branch (983:9): [True: 0, False: 0]
  ------------------
  984|      0|            LOGINT(ctx->ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  985|      0|            ret = LY_EINT;
  986|      0|            goto cleanup;
  987|      0|        }
  988|      0|        for (u = v = 0; u < parts_done && v < LY_ARRAY_COUNT(base_range->parts); ++u) {
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (988:25): [True: 0, False: 0]
  |  Branch (988:43): [True: 0, False: 0]
  ------------------
  989|      0|            if ((uns && (parts[u].min_u64 < base_range->parts[v].min_u64)) || (!uns && (parts[u].min_64 < base_range->parts[v].min_64))) {
  ------------------
  |  Branch (989:18): [True: 0, False: 0]
  |  Branch (989:25): [True: 0, False: 0]
  |  Branch (989:80): [True: 0, False: 0]
  |  Branch (989:88): [True: 0, False: 0]
  ------------------
  990|      0|                goto baseerror;
  991|      0|            }
  992|       |            /* current lower bound is not lower than the base */
  993|      0|            if (base_range->parts[v].min_64 == base_range->parts[v].max_64) {
  ------------------
  |  Branch (993:17): [True: 0, False: 0]
  ------------------
  994|       |                /* base has single value */
  995|      0|                if (base_range->parts[v].min_64 == parts[u].min_64) {
  ------------------
  |  Branch (995:21): [True: 0, False: 0]
  ------------------
  996|       |                    /* both lower bounds are the same */
  997|      0|                    if (parts[u].min_64 != parts[u].max_64) {
  ------------------
  |  Branch (997:25): [True: 0, False: 0]
  ------------------
  998|       |                        /* current continues with a range */
  999|      0|                        goto baseerror;
 1000|      0|                    } else {
 1001|       |                        /* equal single values, move both forward */
 1002|      0|                        ++v;
 1003|      0|                        continue;
 1004|      0|                    }
 1005|      0|                } else {
 1006|       |                    /* base is single value lower than current range, so the
 1007|       |                     * value from base range is removed in the current,
 1008|       |                     * move only base and repeat checking */
 1009|      0|                    ++v;
 1010|      0|                    --u;
 1011|      0|                    continue;
 1012|      0|                }
 1013|      0|            } else {
 1014|       |                /* base is the range */
 1015|      0|                if (parts[u].min_64 == parts[u].max_64) {
  ------------------
  |  Branch (1015:21): [True: 0, False: 0]
  ------------------
 1016|       |                    /* current is a single value */
 1017|      0|                    if ((uns && (parts[u].max_u64 > base_range->parts[v].max_u64)) || (!uns && (parts[u].max_64 > base_range->parts[v].max_64))) {
  ------------------
  |  Branch (1017:26): [True: 0, False: 0]
  |  Branch (1017:33): [True: 0, False: 0]
  |  Branch (1017:88): [True: 0, False: 0]
  |  Branch (1017:96): [True: 0, False: 0]
  ------------------
 1018|       |                        /* current is behind the base range, so base range is omitted,
 1019|       |                         * move the base and keep the current for further check */
 1020|      0|                        ++v;
 1021|      0|                        --u;
 1022|      0|                    } /* else it is within the base range, so move the current, but keep the base */
 1023|      0|                    continue;
 1024|      0|                } else {
 1025|       |                    /* both are ranges - check the higher bound, the lower was already checked */
 1026|      0|                    if ((uns && (parts[u].max_u64 > base_range->parts[v].max_u64)) || (!uns && (parts[u].max_64 > base_range->parts[v].max_64))) {
  ------------------
  |  Branch (1026:26): [True: 0, False: 0]
  |  Branch (1026:33): [True: 0, False: 0]
  |  Branch (1026:88): [True: 0, False: 0]
  |  Branch (1026:96): [True: 0, False: 0]
  ------------------
 1027|       |                        /* higher bound is higher than the current higher bound */
 1028|      0|                        if ((uns && (parts[u].min_u64 > base_range->parts[v].max_u64)) || (!uns && (parts[u].min_64 > base_range->parts[v].max_64))) {
  ------------------
  |  Branch (1028:30): [True: 0, False: 0]
  |  Branch (1028:37): [True: 0, False: 0]
  |  Branch (1028:92): [True: 0, False: 0]
  |  Branch (1028:100): [True: 0, False: 0]
  ------------------
 1029|       |                            /* but the current lower bound is also higher, so the base range is omitted,
 1030|       |                             * continue with the same current, but move the base */
 1031|      0|                            --u;
 1032|      0|                            ++v;
 1033|      0|                            continue;
 1034|      0|                        }
 1035|       |                        /* current range starts within the base range but end behind it */
 1036|      0|                        goto baseerror;
 1037|      0|                    } else {
 1038|       |                        /* current range is smaller than the base,
 1039|       |                         * move current, but stay with the base */
 1040|      0|                        continue;
 1041|      0|                    }
 1042|      0|                }
 1043|      0|            }
 1044|      0|        }
 1045|      0|        if (u != parts_done) {
  ------------------
  |  Branch (1045:13): [True: 0, False: 0]
  ------------------
 1046|      0|baseerror:
 1047|      0|            LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1048|      0|                    "Invalid %s restriction - the derived restriction (%s) is not equally or more limiting.",
 1049|      0|                    length_restr ? "length" : "range", range_p->arg.str);
 1050|      0|            ret = LY_EVALID;
 1051|      0|            goto cleanup;
 1052|      0|        }
 1053|      0|    }
 1054|       |
 1055|  98.4k|    if (!(*range)) {
  ------------------
  |  Branch (1055:9): [True: 98.4k, False: 0]
  ------------------
 1056|  98.4k|        *range = calloc(1, sizeof **range);
 1057|  98.4k|        LY_CHECK_ERR_RET(!(*range), LOGMEM(ctx->ctx), LY_EMEM);
  ------------------
  |  |  207|  98.4k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 98.4k]
  |  |  ------------------
  ------------------
 1058|  98.4k|    }
 1059|       |
 1060|       |    /* we rewrite the following values as the types chain is being processed */
 1061|  98.4k|    if (range_p->eapptag) {
  ------------------
  |  Branch (1061:9): [True: 0, False: 98.4k]
  ------------------
 1062|      0|        lydict_remove(ctx->ctx, (*range)->eapptag);
 1063|      0|        LY_CHECK_GOTO(ret = lydict_insert(ctx->ctx, range_p->eapptag, 0, &(*range)->eapptag), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1064|      0|    }
 1065|  98.4k|    if (range_p->emsg) {
  ------------------
  |  Branch (1065:9): [True: 0, False: 98.4k]
  ------------------
 1066|      0|        lydict_remove(ctx->ctx, (*range)->emsg);
 1067|      0|        LY_CHECK_GOTO(ret = lydict_insert(ctx->ctx, range_p->emsg, 0, &(*range)->emsg), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1068|      0|    }
 1069|  98.4k|    if (range_p->dsc) {
  ------------------
  |  Branch (1069:9): [True: 0, False: 98.4k]
  ------------------
 1070|      0|        lydict_remove(ctx->ctx, (*range)->dsc);
 1071|      0|        LY_CHECK_GOTO(ret = lydict_insert(ctx->ctx, range_p->dsc, 0, &(*range)->dsc), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1072|      0|    }
 1073|  98.4k|    if (range_p->ref) {
  ------------------
  |  Branch (1073:9): [True: 0, False: 98.4k]
  ------------------
 1074|      0|        lydict_remove(ctx->ctx, (*range)->ref);
 1075|      0|        LY_CHECK_GOTO(ret = lydict_insert(ctx->ctx, range_p->ref, 0, &(*range)->ref), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1076|      0|    }
 1077|       |    /* extensions are taken only from the last range by the caller */
 1078|       |
 1079|  98.4k|    (*range)->parts = parts;
 1080|  98.4k|    parts = NULL;
 1081|  98.4k|cleanup:
 1082|  98.4k|    LY_ARRAY_FREE(parts);
  ------------------
  |  |  232|  98.4k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 0, False: 98.4k]
  |  |  ------------------
  ------------------
 1083|       |
 1084|  98.4k|    return ret;
 1085|  98.4k|}
lys_compile_type_pattern_check:
 1246|  42.1k|{
 1247|  42.1k|    size_t idx, size, brack;
 1248|  42.1k|    char *perl_regex;
 1249|  42.1k|    int err_code, compile_opts;
 1250|  42.1k|    const char *orig_ptr;
 1251|  42.1k|    PCRE2_SIZE err_offset;
 1252|  42.1k|    pcre2_code *code_local;
 1253|  42.1k|    ly_bool escaped;
 1254|  42.1k|    LY_ERR r;
 1255|       |
 1256|       |    /* adjust the expression to a Perl equivalent
 1257|       |     * http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#regexs */
 1258|       |
 1259|       |    /* allocate space for the transformed pattern */
 1260|  42.1k|    size = strlen(pattern) + 1;
 1261|  42.1k|    compile_opts = PCRE2_UTF | PCRE2_UCP | PCRE2_ANCHORED | PCRE2_DOLLAR_ENDONLY | PCRE2_NO_AUTO_CAPTURE;
 1262|  42.1k|#ifdef PCRE2_ENDANCHORED
 1263|  42.1k|    compile_opts |= PCRE2_ENDANCHORED;
 1264|       |#else
 1265|       |    /* add space for trailing $ anchor */
 1266|       |    size++;
 1267|       |#endif
 1268|  42.1k|    perl_regex = malloc(size);
 1269|  42.1k|    LY_CHECK_ERR_RET(!perl_regex, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|  42.1k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 42.1k]
  |  |  ------------------
  ------------------
 1270|  42.1k|    perl_regex[0] = '\0';
 1271|       |
 1272|       |    /* we need to replace all "$" and "^" (that are not in "[]") with "\$" and "\^" */
 1273|  42.1k|    brack = 0;
 1274|  42.1k|    idx = 0;
 1275|  42.1k|    escaped = 0;
 1276|  42.1k|    orig_ptr = pattern;
 1277|  1.06M|    while (orig_ptr[0]) {
  ------------------
  |  Branch (1277:12): [True: 1.02M, False: 42.1k]
  ------------------
 1278|  1.02M|        switch (orig_ptr[0]) {
 1279|      0|        case '$':
  ------------------
  |  Branch (1279:9): [True: 0, False: 1.02M]
  ------------------
 1280|  42.1k|        case '^':
  ------------------
  |  Branch (1280:9): [True: 42.1k, False: 984k]
  ------------------
 1281|  42.1k|            if (!brack) {
  ------------------
  |  Branch (1281:17): [True: 0, False: 42.1k]
  ------------------
 1282|       |                /* make space for the extra character */
 1283|      0|                ++size;
 1284|      0|                perl_regex = ly_realloc(perl_regex, size);
 1285|      0|                LY_CHECK_ERR_RET(!perl_regex, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1286|       |
 1287|       |                /* print escape slash */
 1288|      0|                perl_regex[idx] = '\\';
 1289|      0|                ++idx;
 1290|      0|            }
 1291|  42.1k|            break;
 1292|  56.2k|        case '\\':
  ------------------
  |  Branch (1292:9): [True: 56.2k, False: 970k]
  ------------------
 1293|       |            /*  escape character found or backslash is escaped */
 1294|  56.2k|            escaped = !escaped;
 1295|       |            /* copy backslash and continue with the next character */
 1296|  56.2k|            perl_regex[idx] = orig_ptr[0];
 1297|  56.2k|            ++idx;
 1298|  56.2k|            ++orig_ptr;
 1299|  56.2k|            continue;
 1300|  70.2k|        case '[':
  ------------------
  |  Branch (1300:9): [True: 70.2k, False: 955k]
  ------------------
 1301|  70.2k|            if (!escaped) {
  ------------------
  |  Branch (1301:17): [True: 70.2k, False: 0]
  ------------------
 1302|  70.2k|                ++brack;
 1303|  70.2k|            }
 1304|  70.2k|            break;
 1305|  70.2k|        case ']':
  ------------------
  |  Branch (1305:9): [True: 70.2k, False: 955k]
  ------------------
 1306|  70.2k|            if (!brack && !escaped) {
  ------------------
  |  Branch (1306:17): [True: 0, False: 70.2k]
  |  Branch (1306:27): [True: 0, False: 0]
  ------------------
 1307|       |                /* If ']' does not terminate a character class expression, then pcre2_compile() implicitly escapes the
 1308|       |                 * ']' character. But this seems to be against the regular expressions rules declared in
 1309|       |                 * "XML schema: Datatypes" and therefore an error is returned. So for example if pattern is '\[a]' then
 1310|       |                 * pcre2 match characters '[a]' literally but in YANG such pattern is not allowed.
 1311|       |                 */
 1312|      0|                LOGVAL(ctx, LY_VCODE_INREGEXP, pattern, orig_ptr, "character group doesn't begin with '['");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1313|      0|                free(perl_regex);
 1314|      0|                return LY_EVALID;
 1315|  70.2k|            } else if (!escaped) {
  ------------------
  |  Branch (1315:24): [True: 70.2k, False: 0]
  ------------------
 1316|  70.2k|                --brack;
 1317|  70.2k|            }
 1318|  70.2k|            break;
 1319|   787k|        default:
  ------------------
  |  Branch (1319:9): [True: 787k, False: 238k]
  ------------------
 1320|   787k|            break;
 1321|  1.02M|        }
 1322|       |
 1323|       |        /* copy char */
 1324|   970k|        perl_regex[idx] = orig_ptr[0];
 1325|       |
 1326|   970k|        ++idx;
 1327|   970k|        ++orig_ptr;
 1328|   970k|        escaped = 0;
 1329|   970k|    }
 1330|       |#ifndef PCRE2_ENDANCHORED
 1331|       |    /* anchor match to end of subject */
 1332|       |    perl_regex[idx++] = '$';
 1333|       |#endif
 1334|  42.1k|    perl_regex[idx] = '\0';
 1335|       |
 1336|       |    /* transform character blocks */
 1337|  42.1k|    if ((r = lys_compile_pattern_chblocks_xmlschema2perl(ctx, pattern, &perl_regex))) {
  ------------------
  |  Branch (1337:9): [True: 0, False: 42.1k]
  ------------------
 1338|      0|        free(perl_regex);
 1339|      0|        return r;
 1340|      0|    }
 1341|       |
 1342|       |    /* must return 0, already checked during parsing */
 1343|  42.1k|    code_local = pcre2_compile((PCRE2_SPTR)perl_regex, PCRE2_ZERO_TERMINATED, compile_opts,
 1344|  42.1k|            &err_code, &err_offset, NULL);
 1345|  42.1k|    if (!code_local) {
  ------------------
  |  Branch (1345:9): [True: 0, False: 42.1k]
  ------------------
 1346|      0|        PCRE2_UCHAR err_msg[LY_PCRE2_MSG_LIMIT] = {0};
 1347|       |
 1348|      0|        pcre2_get_error_message(err_code, err_msg, LY_PCRE2_MSG_LIMIT);
  ------------------
  |  |   34|      0|#define LY_PCRE2_MSG_LIMIT 256
  ------------------
 1349|      0|        LOGVAL(ctx, LY_VCODE_INREGEXP, pattern, perl_regex + err_offset, err_msg);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1350|      0|        free(perl_regex);
 1351|      0|        return LY_EVALID;
 1352|      0|    }
 1353|  42.1k|    free(perl_regex);
 1354|       |
 1355|  42.1k|    if (code) {
  ------------------
  |  Branch (1355:9): [True: 42.1k, False: 0]
  ------------------
 1356|  42.1k|        *code = code_local;
 1357|  42.1k|    } else {
 1358|      0|        free(code_local);
 1359|      0|    }
 1360|       |
 1361|  42.1k|    return LY_SUCCESS;
 1362|       |
 1363|  42.1k|#undef URANGE_LEN
 1364|  42.1k|}
lys_compile_type_patterns:
 1369|  28.1k|{
 1370|  28.1k|    struct lysc_pattern **pattern;
 1371|  28.1k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|  28.1k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1372|  28.1k|    LY_ERR ret = LY_SUCCESS;
 1373|       |
 1374|       |    /* first, copy the patterns from the base type */
 1375|  28.1k|    if (base_patterns) {
  ------------------
  |  Branch (1375:9): [True: 0, False: 28.1k]
  ------------------
 1376|      0|        *patterns = lysc_patterns_dup(ctx->ctx, base_patterns);
 1377|      0|        LY_CHECK_ERR_RET(!(*patterns), LOGMEM(ctx->ctx), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1378|      0|    }
 1379|       |
 1380|  42.1k|    LY_ARRAY_FOR(patterns_p, u) {
  ------------------
  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  28.1k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  28.1k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  70.2k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  70.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 70.2k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 42.1k, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  42.1k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1381|  42.1k|        LY_ARRAY_NEW_RET(ctx->ctx, (*patterns), pattern, LY_EMEM);
  ------------------
  |  |   96|  42.1k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|  42.1k|    { \
  |  |  |  |   62|  42.1k|        char *p__; \
  |  |  |  |   63|  42.1k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 14.0k, False: 28.1k]
  |  |  |  |  ------------------
  |  |  |  |   64|  14.0k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  14.0k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  14.0k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  14.0k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  28.1k|        } else { \
  |  |  |  |   73|  28.1k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  28.1k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 28.1k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  28.1k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  28.1k|        } \
  |  |  |  |   80|  42.1k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  42.1k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  42.1k|    }
  |  |  ------------------
  |  |   97|  42.1k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|  42.1k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1382|  42.1k|        *pattern = calloc(1, sizeof **pattern);
 1383|  42.1k|        ++(*pattern)->refcount;
 1384|       |
 1385|  42.1k|        ret = lys_compile_type_pattern_check(ctx->ctx, &patterns_p[u].arg.str[1], &(*pattern)->code);
 1386|  42.1k|        LY_CHECK_RET(ret);
  ------------------
  |  |  206|  42.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  42.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  42.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  42.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 42.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1387|       |
 1388|  42.1k|        if (patterns_p[u].arg.str[0] == LYSP_RESTR_PATTERN_NACK) {
  ------------------
  |  |  361|  42.1k|#define LYSP_RESTR_PATTERN_NACK  0x15
  ------------------
  |  Branch (1388:13): [True: 0, False: 42.1k]
  ------------------
 1389|      0|            (*pattern)->inverted = 1;
 1390|      0|        }
 1391|  42.1k|        DUP_STRING_GOTO(ctx->ctx, &patterns_p[u].arg.str[1], (*pattern)->expr, ret, done);
  ------------------
  |  |  169|  42.1k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|  42.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 42.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1392|  42.1k|        DUP_STRING_GOTO(ctx->ctx, patterns_p[u].eapptag, (*pattern)->eapptag, ret, done);
  ------------------
  |  |  169|  42.1k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|  42.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 42.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1393|  42.1k|        DUP_STRING_GOTO(ctx->ctx, patterns_p[u].emsg, (*pattern)->emsg, ret, done);
  ------------------
  |  |  169|  42.1k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|  42.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 42.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1394|  42.1k|        DUP_STRING_GOTO(ctx->ctx, patterns_p[u].dsc, (*pattern)->dsc, ret, done);
  ------------------
  |  |  169|  42.1k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|  42.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 42.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1395|  42.1k|        DUP_STRING_GOTO(ctx->ctx, patterns_p[u].ref, (*pattern)->ref, ret, done);
  ------------------
  |  |  169|  42.1k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|  42.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 42.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1396|  42.1k|        COMPILE_EXTS_GOTO(ctx, patterns_p[u].exts, (*pattern)->exts, (*pattern), ret, done);
  ------------------
  |  |  230|  42.1k|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 42.1k]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 1397|  42.1k|    }
 1398|  28.1k|done:
 1399|  28.1k|    return ret;
 1400|  28.1k|}
lys_compile_type_enums:
 1457|  42.1k|{
 1458|  42.1k|    LY_ERR ret = LY_SUCCESS;
 1459|  42.1k|    LY_ARRAY_COUNT_TYPE u, v, match = 0;
  ------------------
  |  |  104|  42.1k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1460|  42.1k|    int32_t highest_value = INT32_MIN, cur_val = INT32_MIN;
 1461|  42.1k|    uint32_t highest_position = 0, cur_pos = 0;
 1462|  42.1k|    struct lysc_type_bitenum_item *e, storage;
 1463|  42.1k|    ly_bool enabled;
 1464|       |
 1465|  42.1k|    if (base_enums && (ctx->pmod->version < LYS_VERSION_1_1)) {
  ------------------
  |  Branch (1465:9): [True: 0, False: 42.1k]
  |  Branch (1465:23): [True: 0, False: 0]
  ------------------
 1466|      0|        LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG, "%s type can be subtyped only in YANG 1.1 modules.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1467|      0|                basetype == LY_TYPE_ENUM ? "Enumeration" : "Bits");
 1468|      0|        return LY_EVALID;
 1469|      0|    }
 1470|       |
 1471|   140k|    LY_ARRAY_FOR(enums_p, u) {
  ------------------
  |  |  167|  42.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  42.1k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  42.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  42.1k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   182k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   182k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 182k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 140k, False: 42.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   140k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1472|       |        /* perform all checks */
 1473|   140k|        if (base_enums) {
  ------------------
  |  Branch (1473:13): [True: 0, False: 140k]
  ------------------
 1474|       |            /* check the enum/bit presence in the base type - the set of enums/bits in the derived type must be a subset */
 1475|      0|            LY_ARRAY_FOR(base_enums, v) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1476|      0|                if (!strcmp(enums_p[u].name, base_enums[v].name)) {
  ------------------
  |  Branch (1476:21): [True: 0, False: 0]
  ------------------
 1477|      0|                    break;
 1478|      0|                }
 1479|      0|            }
 1480|      0|            if (v == LY_ARRAY_COUNT(base_enums)) {
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1480:17): [True: 0, False: 0]
  ------------------
 1481|      0|                LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1482|      0|                        "Invalid %s - derived type adds new item \"%s\".",
 1483|      0|                        basetype == LY_TYPE_ENUM ? "enumeration" : "bits", enums_p[u].name);
 1484|      0|                return LY_EVALID;
 1485|      0|            }
 1486|      0|            match = v;
 1487|      0|        }
 1488|       |
 1489|   140k|        if (basetype == LY_TYPE_ENUM) {
  ------------------
  |  Branch (1489:13): [True: 140k, False: 0]
  ------------------
 1490|   140k|            if (enums_p[u].flags & LYS_SET_VALUE) {
  ------------------
  |  |  686|   140k|#define LYS_SET_VALUE    0x0200      /**< value attribute is set */
  ------------------
  |  Branch (1490:17): [True: 0, False: 140k]
  ------------------
 1491|       |                /* value assigned by model */
 1492|      0|                cur_val = (int32_t)enums_p[u].value;
 1493|       |                /* check collision with other values */
 1494|      0|                LY_ARRAY_FOR(*bitenums, v) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1495|      0|                    if (cur_val == (*bitenums)[v].value) {
  ------------------
  |  Branch (1495:25): [True: 0, False: 0]
  ------------------
 1496|      0|                        LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1497|      0|                                "Invalid enumeration - value %d collide in items \"%s\" and \"%s\".",
 1498|      0|                                cur_val, enums_p[u].name, (*bitenums)[v].name);
 1499|      0|                        return LY_EVALID;
 1500|      0|                    }
 1501|      0|                }
 1502|   140k|            } else if (base_enums) {
  ------------------
  |  Branch (1502:24): [True: 0, False: 140k]
  ------------------
 1503|       |                /* inherit the assigned value */
 1504|      0|                cur_val = base_enums[match].value;
 1505|   140k|            } else {
 1506|       |                /* assign value automatically */
 1507|   140k|                if (u == 0) {
  ------------------
  |  Branch (1507:21): [True: 42.1k, False: 98.4k]
  ------------------
 1508|  42.1k|                    cur_val = 0;
 1509|  98.4k|                } else if (highest_value == INT32_MAX) {
  ------------------
  |  Branch (1509:28): [True: 0, False: 98.4k]
  ------------------
 1510|      0|                    LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1511|      0|                            "Invalid enumeration - it is not possible to auto-assign enum value for "
 1512|      0|                            "\"%s\" since the highest value is already 2147483647.", enums_p[u].name);
 1513|      0|                    return LY_EVALID;
 1514|  98.4k|                } else {
 1515|  98.4k|                    cur_val = highest_value + 1;
 1516|  98.4k|                }
 1517|   140k|            }
 1518|       |
 1519|       |            /* save highest value for auto assing */
 1520|   140k|            if (highest_value < cur_val) {
  ------------------
  |  Branch (1520:17): [True: 140k, False: 0]
  ------------------
 1521|   140k|                highest_value = cur_val;
 1522|   140k|            }
 1523|   140k|        } else { /* LY_TYPE_BITS */
 1524|      0|            if (enums_p[u].flags & LYS_SET_VALUE) {
  ------------------
  |  |  686|      0|#define LYS_SET_VALUE    0x0200      /**< value attribute is set */
  ------------------
  |  Branch (1524:17): [True: 0, False: 0]
  ------------------
 1525|       |                /* value assigned by model */
 1526|      0|                cur_pos = (uint32_t)enums_p[u].value;
 1527|       |                /* check collision with other values */
 1528|      0|                LY_ARRAY_FOR(*bitenums, v) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1529|      0|                    if (cur_pos == (*bitenums)[v].position) {
  ------------------
  |  Branch (1529:25): [True: 0, False: 0]
  ------------------
 1530|      0|                        LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1531|      0|                                "Invalid bits - position %u collide in items \"%s\" and \"%s\".",
 1532|      0|                                cur_pos, enums_p[u].name, (*bitenums)[v].name);
 1533|      0|                        return LY_EVALID;
 1534|      0|                    }
 1535|      0|                }
 1536|      0|            } else if (base_enums) {
  ------------------
  |  Branch (1536:24): [True: 0, False: 0]
  ------------------
 1537|       |                /* inherit the assigned value */
 1538|      0|                cur_pos = base_enums[match].position;
 1539|      0|            } else {
 1540|       |                /* assign value automatically */
 1541|      0|                if (u == 0) {
  ------------------
  |  Branch (1541:21): [True: 0, False: 0]
  ------------------
 1542|      0|                    cur_pos = 0;
 1543|      0|                } else if (highest_position == UINT32_MAX) {
  ------------------
  |  Branch (1543:28): [True: 0, False: 0]
  ------------------
 1544|       |                    /* counter overflow */
 1545|      0|                    LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1546|      0|                            "Invalid bits - it is not possible to auto-assign bit position for "
 1547|      0|                            "\"%s\" since the highest value is already 4294967295.", enums_p[u].name);
 1548|      0|                    return LY_EVALID;
 1549|      0|                } else {
 1550|      0|                    cur_pos = highest_position + 1;
 1551|      0|                }
 1552|      0|            }
 1553|       |
 1554|       |            /* save highest position for auto assing */
 1555|      0|            if (highest_position < cur_pos) {
  ------------------
  |  Branch (1555:17): [True: 0, False: 0]
  ------------------
 1556|      0|                highest_position = cur_pos;
 1557|      0|            }
 1558|      0|        }
 1559|       |
 1560|       |        /* the assigned values must not change from the derived type */
 1561|   140k|        if (base_enums) {
  ------------------
  |  Branch (1561:13): [True: 0, False: 140k]
  ------------------
 1562|      0|            if (basetype == LY_TYPE_ENUM) {
  ------------------
  |  Branch (1562:17): [True: 0, False: 0]
  ------------------
 1563|      0|                if (cur_val != base_enums[match].value) {
  ------------------
  |  Branch (1563:21): [True: 0, False: 0]
  ------------------
 1564|      0|                    LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1565|      0|                            "Invalid enumeration - value of the item \"%s\" has changed from %d to %d in the derived type.",
 1566|      0|                            enums_p[u].name, base_enums[match].value, cur_val);
 1567|      0|                    return LY_EVALID;
 1568|      0|                }
 1569|      0|            } else {
 1570|      0|                if (cur_pos != base_enums[match].position) {
  ------------------
  |  Branch (1570:21): [True: 0, False: 0]
  ------------------
 1571|      0|                    LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1572|      0|                            "Invalid bits - position of the item \"%s\" has changed from %u to %u in the derived type.",
 1573|      0|                            enums_p[u].name, base_enums[match].position, cur_pos);
 1574|      0|                    return LY_EVALID;
 1575|      0|                }
 1576|      0|            }
 1577|      0|        }
 1578|       |
 1579|       |        /* add new enum/bit */
 1580|   281k|        LY_ARRAY_NEW_RET(ctx->ctx, *bitenums, e, LY_EMEM);
  ------------------
  |  |   96|   140k|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|   140k|    { \
  |  |  |  |   62|   140k|        char *p__; \
  |  |  |  |   63|   140k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 98.4k, False: 42.1k]
  |  |  |  |  ------------------
  |  |  |  |   64|  98.4k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  98.4k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  98.4k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  98.4k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 98.4k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  98.4k|        } else { \
  |  |  |  |   73|  42.1k|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|  42.1k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 42.1k]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|  42.1k|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|  42.1k|        } \
  |  |  |  |   80|   140k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|   140k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|   140k|    }
  |  |  ------------------
  |  |   97|   140k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|   140k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1581|   281k|        DUP_STRING_GOTO(ctx->ctx, enums_p[u].name, e->name, ret, done);
  ------------------
  |  |  169|   140k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|   140k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 140k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1582|   140k|        DUP_STRING_GOTO(ctx->ctx, enums_p[u].dsc, e->dsc, ret, done);
  ------------------
  |  |  169|   140k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|   140k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 140k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1583|   140k|        DUP_STRING_GOTO(ctx->ctx, enums_p[u].ref, e->ref, ret, done);
  ------------------
  |  |  169|   140k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|   140k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 140k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1584|   140k|        e->flags = (enums_p[u].flags & LYS_FLAGS_COMPILED_MASK) | (basetype == LY_TYPE_ENUM ? LYS_IS_ENUM : 0);
  ------------------
  |  |  724|   140k|#define LYS_FLAGS_COMPILED_MASK 0xff /**< mask for flags that maps to the compiled structures */
  ------------------
                      e->flags = (enums_p[u].flags & LYS_FLAGS_COMPILED_MASK) | (basetype == LY_TYPE_ENUM ? LYS_IS_ENUM : 0);
  ------------------
  |  |  716|   140k|#define LYS_IS_ENUM      0x0200      /**< flag to simply distinguish type in struct lysc_type_bitenum_item */
  ------------------
  |  Branch (1584:68): [True: 140k, False: 0]
  ------------------
 1585|   140k|        if (basetype == LY_TYPE_ENUM) {
  ------------------
  |  Branch (1585:13): [True: 140k, False: 0]
  ------------------
 1586|   140k|            e->value = cur_val;
 1587|   140k|        } else {
 1588|      0|            e->position = cur_pos;
 1589|      0|        }
 1590|   140k|        COMPILE_EXTS_GOTO(ctx, enums_p[u].exts, e->exts, e, ret, done);
  ------------------
  |  |  230|   140k|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 140k]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 1591|       |
 1592|       |        /* evaluate if-ffeatures */
 1593|   140k|        LY_CHECK_RET(lys_eval_iffeatures(ctx->ctx, enums_p[u].iffeatures, &enabled));
  ------------------
  |  |  206|   140k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   140k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   140k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   140k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 140k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1594|   140k|        if (!enabled) {
  ------------------
  |  Branch (1594:13): [True: 0, False: 140k]
  ------------------
 1595|       |            /* set only flag, later resolved and removed */
 1596|      0|            e->flags |= LYS_DISABLED;
  ------------------
  |  |  673|      0|#define LYS_DISABLED     0x0100      /**< internal flag for a disabled statement, used only for bits/enums */
  ------------------
 1597|      0|        }
 1598|       |
 1599|   140k|        if (basetype == LY_TYPE_BITS) {
  ------------------
  |  Branch (1599:13): [True: 0, False: 140k]
  ------------------
 1600|       |            /* keep bits ordered by position */
 1601|      0|            for (v = u; v && (*bitenums)[v - 1].position > e->position; --v) {}
  ------------------
  |  Branch (1601:25): [True: 0, False: 0]
  |  Branch (1601:30): [True: 0, False: 0]
  ------------------
 1602|      0|            if (v != u) {
  ------------------
  |  Branch (1602:17): [True: 0, False: 0]
  ------------------
 1603|      0|                memcpy(&storage, e, sizeof *e);
 1604|      0|                memmove(&(*bitenums)[v + 1], &(*bitenums)[v], (u - v) * sizeof **bitenums);
 1605|      0|                memcpy(&(*bitenums)[v], &storage, sizeof storage);
 1606|      0|            }
 1607|      0|        }
 1608|   140k|    }
 1609|       |
 1610|  42.1k|done:
 1611|  42.1k|    return ret;
 1612|  42.1k|}
lys_compile_type:
 2114|   941k|{
 2115|   941k|    LY_ERR ret = LY_SUCCESS;
 2116|   941k|    ly_bool dummyloops = 0;
 2117|   941k|    struct lys_type_item *tctx, *tctx_prev = NULL, *tctx_iter;
 2118|   941k|    LY_DATA_TYPE basetype = LY_TYPE_UNKNOWN;
 2119|   941k|    struct lysc_type *base = NULL;
 2120|   941k|    struct ly_set tpdf_chain = {0};
 2121|   941k|    struct lyplg_type *plugin;
 2122|       |
 2123|   941k|    *type = NULL;
 2124|   941k|    if (dflt) {
  ------------------
  |  Branch (2124:9): [True: 590k, False: 351k]
  ------------------
 2125|   590k|        *dflt = NULL;
 2126|   590k|    }
 2127|       |
 2128|   941k|    tctx = calloc(1, sizeof *tctx);
 2129|   941k|    LY_CHECK_ERR_RET(!tctx, LOGMEM(ctx->ctx), LY_EMEM);
  ------------------
  |  |  207|   941k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 941k]
  |  |  ------------------
  ------------------
 2130|   941k|    for (ret = lysp_type_find(type_p->name, context_pnode, type_p->pmod, ctx->ext, &basetype, &tctx->tpdf, &tctx->node);
 2131|  1.33M|            ret == LY_SUCCESS;
  ------------------
  |  Branch (2131:13): [True: 1.33M, False: 0]
  ------------------
 2132|   941k|            ret = lysp_type_find(tctx_prev->tpdf->type.name, tctx_prev->node, tctx_prev->tpdf->type.pmod, ctx->ext,
 2133|  1.33M|                    &basetype, &tctx->tpdf, &tctx->node)) {
 2134|  1.33M|        if (basetype) {
  ------------------
  |  Branch (2134:13): [True: 871k, False: 463k]
  ------------------
 2135|   871k|            break;
 2136|   871k|        }
 2137|       |
 2138|       |        /* check status */
 2139|   463k|        ret = lysc_check_status(ctx, context_flags, (void *)type_p->pmod, context_name, tctx->tpdf->flags,
 2140|   463k|                (void *)tctx->tpdf->type.pmod, tctx->node ? tctx->node->name : tctx->tpdf->name);
  ------------------
  |  Branch (2140:48): [True: 0, False: 463k]
  ------------------
 2141|   463k|        LY_CHECK_ERR_GOTO(ret, free(tctx), cleanup);
  ------------------
  |  |  203|   463k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 463k]
  |  |  ------------------
  ------------------
 2142|       |
 2143|   463k|        if (units && !*units) {
  ------------------
  |  Branch (2143:13): [True: 379k, False: 84.3k]
  |  Branch (2143:22): [True: 379k, False: 0]
  ------------------
 2144|       |            /* inherit units */
 2145|   379k|            DUP_STRING(ctx->ctx, tctx->tpdf->units, *units, ret);
  ------------------
  |  |  167|   379k|#define DUP_STRING(CTX, ORIG, DUP, RET) RET = lydict_insert(CTX, ORIG, 0, &(DUP))
  ------------------
 2146|   379k|            LY_CHECK_ERR_GOTO(ret, free(tctx), cleanup);
  ------------------
  |  |  203|   379k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 379k]
  |  |  ------------------
  ------------------
 2147|   379k|        }
 2148|   463k|        if (dflt && !*dflt && tctx->tpdf->dflt.str) {
  ------------------
  |  Branch (2148:13): [True: 379k, False: 84.3k]
  |  Branch (2148:21): [True: 379k, False: 0]
  |  Branch (2148:31): [True: 0, False: 379k]
  ------------------
 2149|       |            /* inherit default */
 2150|      0|            *dflt = (struct lysp_qname *)&tctx->tpdf->dflt;
 2151|      0|        }
 2152|   463k|        if (dummyloops && (!units || *units) && dflt && *dflt) {
  ------------------
  |  Branch (2152:13): [True: 0, False: 463k]
  |  Branch (2152:28): [True: 0, False: 0]
  |  Branch (2152:38): [True: 0, False: 0]
  |  Branch (2152:49): [True: 0, False: 0]
  |  Branch (2152:57): [True: 0, False: 0]
  ------------------
 2153|      0|            basetype = ((struct lys_type_item *)tpdf_chain.objs[tpdf_chain.count - 1])->tpdf->type.compiled->basetype;
 2154|      0|            break;
 2155|      0|        }
 2156|       |
 2157|   463k|        if (tctx->tpdf->type.compiled && (tctx->tpdf->type.compiled->refcount == 1)) {
  ------------------
  |  Branch (2157:13): [True: 379k, False: 84.3k]
  |  Branch (2157:42): [True: 0, False: 379k]
  ------------------
 2158|       |            /* context recompilation - everything was freed previously (the only reference is from the parsed type itself)
 2159|       |             * and we need now recompile the type again in the updated context. */
 2160|      0|            lysc_type_free(&ctx->free_ctx, tctx->tpdf->type.compiled);
 2161|      0|            ((struct lysp_tpdf *)tctx->tpdf)->type.compiled = NULL;
 2162|      0|        }
 2163|       |
 2164|   463k|        if (tctx->tpdf->type.compiled) {
  ------------------
  |  Branch (2164:13): [True: 379k, False: 84.3k]
  ------------------
 2165|       |            /* it is not necessary to continue, the rest of the chain was already compiled,
 2166|       |             * but we still may need to inherit default and units values, so start dummy loops */
 2167|   379k|            basetype = tctx->tpdf->type.compiled->basetype;
 2168|   379k|            ret = ly_set_add(&tpdf_chain, tctx, 1, NULL);
 2169|   379k|            LY_CHECK_ERR_GOTO(ret, free(tctx), cleanup);
  ------------------
  |  |  203|   379k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 379k]
  |  |  ------------------
  ------------------
 2170|       |
 2171|   379k|            if ((units && !*units) || (dflt && !*dflt)) {
  ------------------
  |  Branch (2171:18): [True: 309k, False: 70.2k]
  |  Branch (2171:27): [True: 309k, False: 0]
  |  Branch (2171:40): [True: 0, False: 70.2k]
  |  Branch (2171:48): [True: 0, False: 0]
  ------------------
 2172|   309k|                dummyloops = 1;
 2173|   309k|                goto preparenext;
 2174|   309k|            } else {
 2175|  70.2k|                tctx = NULL;
 2176|  70.2k|                break;
 2177|  70.2k|            }
 2178|   379k|        }
 2179|       |
 2180|       |        /* circular typedef reference detection */
 2181|  84.3k|        for (uint32_t u = 0; u < tpdf_chain.count; u++) {
  ------------------
  |  Branch (2181:30): [True: 0, False: 84.3k]
  ------------------
 2182|       |            /* local part */
 2183|      0|            tctx_iter = (struct lys_type_item *)tpdf_chain.objs[u];
 2184|      0|            if (tctx_iter->tpdf == tctx->tpdf) {
  ------------------
  |  Branch (2184:17): [True: 0, False: 0]
  ------------------
 2185|      0|                LOGVAL(ctx->ctx, LYVE_REFERENCE,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2186|      0|                        "Invalid \"%s\" type reference - circular chain of types detected.", tctx->tpdf->name);
 2187|      0|                free(tctx);
 2188|      0|                ret = LY_EVALID;
 2189|      0|                goto cleanup;
 2190|      0|            }
 2191|      0|        }
 2192|  84.3k|        for (uint32_t u = 0; u < ctx->tpdf_chain.count; u++) {
  ------------------
  |  Branch (2192:30): [True: 0, False: 84.3k]
  ------------------
 2193|       |            /* global part for unions corner case */
 2194|      0|            tctx_iter = (struct lys_type_item *)ctx->tpdf_chain.objs[u];
 2195|      0|            if (tctx_iter->tpdf == tctx->tpdf) {
  ------------------
  |  Branch (2195:17): [True: 0, False: 0]
  ------------------
 2196|      0|                LOGVAL(ctx->ctx, LYVE_REFERENCE,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2197|      0|                        "Invalid \"%s\" type reference - circular chain of types detected.", tctx->tpdf->name);
 2198|      0|                free(tctx);
 2199|      0|                ret = LY_EVALID;
 2200|      0|                goto cleanup;
 2201|      0|            }
 2202|      0|        }
 2203|       |
 2204|       |        /* store information for the following processing */
 2205|  84.3k|        ret = ly_set_add(&tpdf_chain, tctx, 1, NULL);
 2206|  84.3k|        LY_CHECK_ERR_GOTO(ret, free(tctx), cleanup);
  ------------------
  |  |  203|  84.3k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 84.3k]
  |  |  ------------------
  ------------------
 2207|       |
 2208|   393k|preparenext:
 2209|       |        /* prepare next loop */
 2210|   393k|        tctx_prev = tctx;
 2211|   393k|        tctx = calloc(1, sizeof *tctx);
 2212|   393k|        LY_CHECK_ERR_RET(!tctx, LOGMEM(ctx->ctx), LY_EMEM);
  ------------------
  |  |  207|   393k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 393k]
  |  |  ------------------
  ------------------
 2213|   393k|    }
 2214|   941k|    free(tctx);
 2215|       |
 2216|       |    /* basic checks */
 2217|   941k|    if (basetype == LY_TYPE_UNKNOWN) {
  ------------------
  |  Branch (2217:9): [True: 0, False: 941k]
  ------------------
 2218|      0|        LOGVAL(ctx->ctx, LYVE_REFERENCE,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2219|      0|                "Referenced type \"%s\" not found.", tctx_prev ? tctx_prev->tpdf->type.name : type_p->name);
 2220|      0|        ret = LY_EVALID;
 2221|      0|        goto cleanup;
 2222|      0|    }
 2223|   941k|    if (~type_substmt_map[basetype] & type_p->flags) {
  ------------------
  |  Branch (2223:9): [True: 0, False: 941k]
  ------------------
 2224|      0|        LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG, "Invalid type restrictions for %s type.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2225|      0|                ly_data_type2str[basetype]);
 2226|      0|        ret = LY_EVALID;
 2227|      0|        goto cleanup;
 2228|      0|    }
 2229|       |
 2230|       |    /* get restrictions from the referred typedefs */
 2231|  1.40M|    for (uint32_t u = tpdf_chain.count - 1; u + 1 > 0; --u) {
  ------------------
  |  Branch (2231:45): [True: 463k, False: 941k]
  ------------------
 2232|   463k|        tctx = (struct lys_type_item *)tpdf_chain.objs[u];
 2233|       |
 2234|       |        /* remember the typedef context for circular check */
 2235|   463k|        ret = ly_set_add(&ctx->tpdf_chain, tctx, 1, NULL);
 2236|   463k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   463k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 463k]
  |  |  ------------------
  ------------------
 2237|       |
 2238|   463k|        if (tctx->tpdf->type.compiled) {
  ------------------
  |  Branch (2238:13): [True: 379k, False: 84.3k]
  ------------------
 2239|       |            /* already compiled */
 2240|   379k|            base = tctx->tpdf->type.compiled;
 2241|   379k|            continue;
 2242|   379k|        }
 2243|       |
 2244|       |        /* try to find loaded user type plugins */
 2245|  84.3k|        plugin = lyplg_type_plugin_find(tctx->tpdf->type.pmod->mod->name, tctx->tpdf->type.pmod->mod->revision,
 2246|  84.3k|                tctx->tpdf->name);
 2247|  84.3k|        if (!plugin && base) {
  ------------------
  |  Branch (2247:13): [True: 56.2k, False: 28.1k]
  |  Branch (2247:24): [True: 0, False: 56.2k]
  ------------------
 2248|       |            /* use the base type implementation if available */
 2249|      0|            plugin = base->plugin;
 2250|      0|        }
 2251|  84.3k|        if (!plugin) {
  ------------------
  |  Branch (2251:13): [True: 56.2k, False: 28.1k]
  ------------------
 2252|       |            /* use the internal built-in type implementation */
 2253|  56.2k|            plugin = lyplg_type_plugin_find("", NULL, ly_data_type2str[basetype]);
 2254|  56.2k|        }
 2255|  84.3k|        assert(plugin);
 2256|       |
 2257|  84.3k|        if ((basetype != LY_TYPE_LEAFREF) && (u != tpdf_chain.count - 1) && !tctx->tpdf->type.flags &&
  ------------------
  |  Branch (2257:13): [True: 84.3k, False: 0]
  |  Branch (2257:46): [True: 0, False: 84.3k]
  |  Branch (2257:77): [True: 0, False: 0]
  ------------------
 2258|  84.3k|                !tctx->tpdf->type.exts && (plugin == base->plugin)) {
  ------------------
  |  Branch (2258:17): [True: 0, False: 0]
  |  Branch (2258:43): [True: 0, False: 0]
  ------------------
 2259|       |            /* no change, reuse the compiled base */
 2260|      0|            ((struct lysp_tpdf *)tctx->tpdf)->type.compiled = base;
 2261|      0|            LY_ATOMIC_INC_BARRIER(base->refcount);
  ------------------
  |  |   35|      0|# define LY_ATOMIC_INC_BARRIER(var) __sync_fetch_and_add(&(var), 1)
  ------------------
 2262|      0|            continue;
 2263|      0|        }
 2264|       |
 2265|  84.3k|        if (~type_substmt_map[basetype] & tctx->tpdf->type.flags) {
  ------------------
  |  Branch (2265:13): [True: 0, False: 84.3k]
  ------------------
 2266|      0|            LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG, "Invalid type \"%s\" restriction(s) for %s type.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2267|      0|                    tctx->tpdf->name, ly_data_type2str[basetype]);
 2268|      0|            ret = LY_EVALID;
 2269|      0|            goto cleanup;
 2270|  84.3k|        } else if ((basetype == LY_TYPE_EMPTY) && tctx->tpdf->dflt.str) {
  ------------------
  |  Branch (2270:20): [True: 0, False: 84.3k]
  |  Branch (2270:51): [True: 0, False: 0]
  ------------------
 2271|      0|            LOGVAL(ctx->ctx, LYVE_SEMANTICS,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2272|      0|                    "Invalid type \"%s\" - \"empty\" type must not have a default value (%s).",
 2273|      0|                    tctx->tpdf->name, tctx->tpdf->dflt.str);
 2274|      0|            ret = LY_EVALID;
 2275|      0|            goto cleanup;
 2276|      0|        }
 2277|       |
 2278|       |        /* compile the typedef type */
 2279|  84.3k|        ret = lys_compile_type_(ctx, tctx->node, tctx->tpdf->flags, tctx->tpdf->name, &tctx->tpdf->type, basetype,
 2280|  84.3k|                tctx->tpdf->name, base, plugin, &tpdf_chain, u + 1, &base);
 2281|  84.3k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|  84.3k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 84.3k]
  |  |  ------------------
  ------------------
 2282|       |
 2283|       |        /* store separately compiled typedef type to be reused */
 2284|  84.3k|        ((struct lysp_tpdf *)tctx->tpdf)->type.compiled = base;
 2285|  84.3k|        LY_ATOMIC_INC_BARRIER(base->refcount);
  ------------------
  |  |   35|  84.3k|# define LY_ATOMIC_INC_BARRIER(var) __sync_fetch_and_add(&(var), 1)
  ------------------
 2286|  84.3k|    }
 2287|       |
 2288|       |    /* remove the processed typedef contexts from the stack for circular check */
 2289|   941k|    ctx->tpdf_chain.count = ctx->tpdf_chain.count - tpdf_chain.count;
 2290|       |
 2291|       |    /* process the type definition in leaf */
 2292|   941k|    if (type_p->flags || type_p->exts || !base || (basetype == LY_TYPE_LEAFREF)) {
  ------------------
  |  Branch (2292:9): [True: 309k, False: 632k]
  |  Branch (2292:26): [True: 0, False: 632k]
  |  Branch (2292:42): [True: 168k, False: 463k]
  |  Branch (2292:51): [True: 0, False: 463k]
  ------------------
 2293|       |        /* leaf type has changes that need to be compiled into the type */
 2294|   477k|        plugin = base ? base->plugin : lyplg_type_plugin_find("", NULL, ly_data_type2str[basetype]);
  ------------------
  |  Branch (2294:18): [True: 0, False: 477k]
  ------------------
 2295|   477k|        ret = lys_compile_type_(ctx, context_pnode, context_flags, context_name, (struct lysp_type *)type_p, basetype,
 2296|   477k|                NULL, base, plugin, &tpdf_chain, 0, type);
 2297|   477k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   477k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 477k]
  |  |  ------------------
  ------------------
 2298|   477k|    } else {
 2299|       |        /* no changes of the type in the leaf, just use the base compiled type */
 2300|   463k|        *type = base;
 2301|   463k|    }
 2302|       |
 2303|   941k|cleanup:
 2304|   941k|    ly_set_erase(&tpdf_chain, free);
 2305|   941k|    return ret;
 2306|   941k|}
lys_compile_node_connect:
 2433|   899k|{
 2434|   899k|    struct lysc_node **children, *anchor = NULL;
 2435|   899k|    int insert_after = 0;
 2436|       |
 2437|   899k|    node->parent = parent;
 2438|       |
 2439|   899k|    if (parent) {
  ------------------
  |  Branch (2439:9): [True: 829k, False: 70.2k]
  ------------------
 2440|   829k|        if (node->nodetype == LYS_INPUT) {
  ------------------
  |  |  254|   829k|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
  |  Branch (2440:13): [True: 0, False: 829k]
  ------------------
 2441|      0|            assert(parent->nodetype & (LYS_ACTION | LYS_RPC));
 2442|       |            /* input node is part of the action but link it with output */
 2443|      0|            node->next = &((struct lysc_node_action *)parent)->output.node;
 2444|      0|            node->prev = node->next;
 2445|      0|            return LY_SUCCESS;
 2446|   829k|        } else if (node->nodetype == LYS_OUTPUT) {
  ------------------
  |  |  255|   829k|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (2446:20): [True: 0, False: 829k]
  ------------------
 2447|       |            /* output node is part of the action but link it with input */
 2448|      0|            node->next = NULL;
 2449|      0|            node->prev = &((struct lysc_node_action *)parent)->input.node;
 2450|      0|            return LY_SUCCESS;
 2451|   829k|        } else if (node->nodetype == LYS_ACTION) {
  ------------------
  |  |  250|   829k|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
  |  Branch (2451:20): [True: 0, False: 829k]
  ------------------
 2452|      0|            children = (struct lysc_node **)lysc_node_actions_p(parent);
 2453|   829k|        } else if (node->nodetype == LYS_NOTIF) {
  ------------------
  |  |  251|   829k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (2453:20): [True: 0, False: 829k]
  ------------------
 2454|      0|            children = (struct lysc_node **)lysc_node_notifs_p(parent);
 2455|   829k|        } else {
 2456|   829k|            children = lysc_node_child_p(parent);
 2457|   829k|        }
 2458|   829k|        assert(children);
 2459|       |
 2460|   829k|        if (!(*children)) {
  ------------------
  |  Branch (2460:13): [True: 295k, False: 534k]
  ------------------
 2461|       |            /* first child */
 2462|   295k|            *children = node;
 2463|   534k|        } else if (node->flags & LYS_KEY) {
  ------------------
  |  |  671|   534k|#define LYS_KEY          0x0100      /**< flag for leafs being a key of a list, applicable only to ::lysc_node_leaf */
  ------------------
  |  Branch (2463:20): [True: 0, False: 534k]
  ------------------
 2464|       |            /* special handling of adding keys */
 2465|      0|            assert(node->module == parent->module);
 2466|      0|            anchor = *children;
 2467|      0|            if (anchor->flags & LYS_KEY) {
  ------------------
  |  |  671|      0|#define LYS_KEY          0x0100      /**< flag for leafs being a key of a list, applicable only to ::lysc_node_leaf */
  ------------------
  |  Branch (2467:17): [True: 0, False: 0]
  ------------------
 2468|      0|                while ((anchor->flags & LYS_KEY) && anchor->next) {
  ------------------
  |  |  671|      0|#define LYS_KEY          0x0100      /**< flag for leafs being a key of a list, applicable only to ::lysc_node_leaf */
  ------------------
  |  Branch (2468:24): [True: 0, False: 0]
  |  Branch (2468:53): [True: 0, False: 0]
  ------------------
 2469|      0|                    anchor = anchor->next;
 2470|      0|                }
 2471|       |                /* insert after the last key */
 2472|      0|                insert_after = 1;
 2473|      0|            } /* else insert before anchor (at the beginning) */
 2474|   534k|        } else if ((*children)->prev->module == node->module) {
  ------------------
  |  Branch (2474:20): [True: 534k, False: 0]
  ------------------
 2475|       |            /* last child is from the same module, keep the order and insert at the end */
 2476|   534k|            anchor = (*children)->prev;
 2477|   534k|            insert_after = 1;
 2478|   534k|        } else if (parent->module == node->module) {
  ------------------
  |  Branch (2478:20): [True: 0, False: 0]
  ------------------
 2479|       |            /* adding module child after some augments were connected */
 2480|      0|            for (anchor = *children; anchor->module == node->module; anchor = anchor->next) {}
  ------------------
  |  Branch (2480:38): [True: 0, False: 0]
  ------------------
 2481|      0|        } else {
 2482|       |            /* some augments are already connected and we are connecting new ones,
 2483|       |             * keep module name order and insert the node into the children list */
 2484|      0|            anchor = *children;
 2485|      0|            do {
 2486|      0|                anchor = anchor->prev;
 2487|       |
 2488|       |                /* check that we have not found the last augment node from our module or
 2489|       |                 * the first augment node from a "smaller" module or
 2490|       |                 * the first node from a local module */
 2491|      0|                if ((anchor->module == node->module) || (strcmp(anchor->module->name, node->module->name) < 0) ||
  ------------------
  |  Branch (2491:21): [True: 0, False: 0]
  |  Branch (2491:57): [True: 0, False: 0]
  ------------------
 2492|      0|                        (anchor->module == parent->module)) {
  ------------------
  |  Branch (2492:25): [True: 0, False: 0]
  ------------------
 2493|       |                    /* insert after */
 2494|      0|                    insert_after = 1;
 2495|      0|                    break;
 2496|      0|                }
 2497|       |
 2498|       |                /* we have traversed all the nodes, insert before anchor (as the first node) */
 2499|      0|            } while (anchor->prev->next);
  ------------------
  |  Branch (2499:22): [True: 0, False: 0]
  ------------------
 2500|      0|        }
 2501|       |
 2502|       |        /* insert */
 2503|   829k|        if (anchor) {
  ------------------
  |  Branch (2503:13): [True: 534k, False: 295k]
  ------------------
 2504|   534k|            if (insert_after) {
  ------------------
  |  Branch (2504:17): [True: 534k, False: 0]
  ------------------
 2505|   534k|                node->next = anchor->next;
 2506|   534k|                node->prev = anchor;
 2507|   534k|                anchor->next = node;
 2508|   534k|                if (node->next) {
  ------------------
  |  Branch (2508:21): [True: 0, False: 534k]
  ------------------
 2509|       |                    /* middle node */
 2510|      0|                    node->next->prev = node;
 2511|   534k|                } else {
 2512|       |                    /* last node */
 2513|   534k|                    (*children)->prev = node;
 2514|   534k|                }
 2515|   534k|            } else {
 2516|      0|                node->next = anchor;
 2517|      0|                node->prev = anchor->prev;
 2518|      0|                anchor->prev = node;
 2519|      0|                if (anchor == *children) {
  ------------------
  |  Branch (2519:21): [True: 0, False: 0]
  ------------------
 2520|       |                    /* first node */
 2521|      0|                    *children = node;
 2522|      0|                } else {
 2523|       |                    /* middle node */
 2524|      0|                    node->prev->next = node;
 2525|      0|                }
 2526|      0|            }
 2527|   534k|        }
 2528|       |
 2529|       |        /* check the name uniqueness (even for an only child, it may be in case) */
 2530|   829k|        if (lys_compile_node_uniqness(ctx, parent, node->name, node)) {
  ------------------
  |  Branch (2530:13): [True: 0, False: 829k]
  ------------------
 2531|      0|            return LY_EEXIST;
 2532|      0|        }
 2533|   829k|    } else {
 2534|       |        /* top-level element */
 2535|  70.2k|        struct lysc_node **list;
 2536|       |
 2537|  70.2k|        if (ctx->ext) {
  ------------------
  |  Branch (2537:13): [True: 0, False: 70.2k]
  ------------------
 2538|      0|            lyplg_ext_get_storage_p(ctx->ext, LY_STMT_DATA_NODE_MASK, (const void ***)&list);
  ------------------
  |  |  126|      0|#define LY_STMT_DATA_NODE_MASK (LY_STMT_ANYDATA | LY_STMT_ANYXML | LY_STMT_CASE | LY_STMT_CHOICE | LY_STMT_CONTAINER |\
  |  |  127|      0|        LY_STMT_LEAF | LY_STMT_LEAF_LIST | LY_STMT_LIST)
  ------------------
 2539|  70.2k|        } else if (node->nodetype == LYS_RPC) {
  ------------------
  |  |  249|  70.2k|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
  |  Branch (2539:20): [True: 0, False: 70.2k]
  ------------------
 2540|      0|            list = (struct lysc_node **)&ctx->cur_mod->compiled->rpcs;
 2541|  70.2k|        } else if (node->nodetype == LYS_NOTIF) {
  ------------------
  |  |  251|  70.2k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (2541:20): [True: 28.1k, False: 42.1k]
  ------------------
 2542|  28.1k|            list = (struct lysc_node **)&ctx->cur_mod->compiled->notifs;
 2543|  42.1k|        } else {
 2544|  42.1k|            list = &ctx->cur_mod->compiled->data;
 2545|  42.1k|        }
 2546|  70.2k|        if (!(*list)) {
  ------------------
  |  Branch (2546:13): [True: 42.1k, False: 28.1k]
  ------------------
 2547|  42.1k|            *list = node;
 2548|  42.1k|        } else {
 2549|       |            /* insert at the end of the module's top-level nodes list */
 2550|  28.1k|            (*list)->prev->next = node;
 2551|  28.1k|            node->prev = (*list)->prev;
 2552|  28.1k|            (*list)->prev = node;
 2553|  28.1k|        }
 2554|       |
 2555|       |        /* check the name uniqueness on top-level */
 2556|  70.2k|        if (lys_compile_node_uniqness(ctx, NULL, node->name, node)) {
  ------------------
  |  Branch (2556:13): [True: 0, False: 70.2k]
  ------------------
 2557|      0|            return LY_EEXIST;
 2558|      0|        }
 2559|  70.2k|    }
 2560|       |
 2561|   899k|    return LY_SUCCESS;
 2562|   899k|}
lys_compile_node_choice_child:
 3584|  28.1k|{
 3585|  28.1k|    LY_ERR ret = LY_SUCCESS;
 3586|  28.1k|    struct lysp_node *child_p_next = child_p->next;
 3587|  28.1k|    struct lysp_node_case *cs_p;
 3588|  28.1k|    struct lysc_node_case *cs_c;
 3589|       |
 3590|  28.1k|    if (child_p->nodetype == LYS_CASE) {
  ------------------
  |  |  247|  28.1k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
  |  Branch (3590:9): [True: 0, False: 28.1k]
  ------------------
 3591|       |        /* standard case under choice */
 3592|      0|        ret = lys_compile_node(ctx, child_p, node, 0, child_set);
 3593|  28.1k|    } else {
 3594|       |        /* we need the implicit case first, so create a fake parsed (shorthand) case */
 3595|  28.1k|        cs_p = calloc(1, sizeof *cs_p);
 3596|  28.1k|        LY_CHECK_ERR_RET(!cs_p, LOGMEM(ctx->ctx), LY_EMEM);
  ------------------
  |  |  207|  28.1k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 3597|  28.1k|        cs_p->nodetype = LYS_CASE;
  ------------------
  |  |  247|  28.1k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
 3598|  28.1k|        DUP_STRING_GOTO(ctx->ctx, child_p->name, cs_p->name, ret, revert_sh_case);
  ------------------
  |  |  169|  28.1k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|  28.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3599|  28.1k|        cs_p->child = child_p;
 3600|       |
 3601|       |        /* make the child the only case child */
 3602|  28.1k|        child_p->next = NULL;
 3603|       |
 3604|       |        /* compile it normally */
 3605|  28.1k|        LY_CHECK_GOTO(ret = lys_compile_node(ctx, (struct lysp_node *)cs_p, node, 0, child_set), revert_sh_case);
  ------------------
  |  |  202|  28.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 3606|       |
 3607|  28.1k|        if (((struct lysc_node_choice *)node)->cases) {
  ------------------
  |  Branch (3607:13): [True: 28.1k, False: 0]
  ------------------
 3608|       |            /* find our case node */
 3609|  28.1k|            cs_c = (struct lysc_node_case *)((struct lysc_node_choice *)node)->cases;
 3610|  42.1k|            while (cs_c->name != cs_p->name) {
  ------------------
  |  Branch (3610:20): [True: 14.0k, False: 28.1k]
  ------------------
 3611|  14.0k|                cs_c = (struct lysc_node_case *)cs_c->next;
 3612|  14.0k|                assert(cs_c);
 3613|  14.0k|            }
 3614|       |
 3615|  28.1k|            if (ctx->ctx->flags & LY_CTX_SET_PRIV_PARSED) {
  ------------------
  |  |  183|  28.1k|#define LY_CTX_SET_PRIV_PARSED 0x40 /**< For all compiled nodes, their private objects (::lysc_node.priv) are used
  ------------------
  |  Branch (3615:17): [True: 0, False: 28.1k]
  ------------------
 3616|       |                /* compiled case node cannot point to his corresponding parsed node
 3617|       |                 * because it exists temporarily so it must be set to NULL
 3618|       |                 */
 3619|      0|                assert(cs_c->priv == cs_p);
 3620|      0|                cs_c->priv = NULL;
 3621|      0|            }
 3622|       |
 3623|       |            /* status is copied from his child and not from his parent as usual. */
 3624|  28.1k|            if (cs_c->child) {
  ------------------
  |  Branch (3624:17): [True: 28.1k, False: 0]
  ------------------
 3625|  28.1k|                cs_c->flags &= ~LYS_STATUS_MASK;
  ------------------
  |  |  657|  28.1k|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
 3626|  28.1k|                cs_c->flags |= (LYS_STATUS_MASK & cs_c->child->flags);
  ------------------
  |  |  657|  28.1k|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
 3627|  28.1k|            }
 3628|  28.1k|        } /* else it was removed by a deviation */
 3629|       |
 3630|  28.1k|revert_sh_case:
 3631|       |        /* free the parsed shorthand case and correct pointers back */
 3632|  28.1k|        cs_p->child = NULL;
 3633|  28.1k|        lysp_node_free(&ctx->free_ctx, (struct lysp_node *)cs_p);
 3634|  28.1k|        child_p->next = child_p_next;
 3635|  28.1k|    }
 3636|       |
 3637|  28.1k|    return ret;
 3638|  28.1k|}
lys_compile_mandatory_parents:
 3746|   210k|{
 3747|   210k|    const struct lysc_node *iter;
 3748|       |
 3749|   210k|    if (add) { /* set flag */
  ------------------
  |  Branch (3749:9): [True: 210k, False: 0]
  ------------------
 3750|   238k|        for ( ; parent && parent->nodetype == LYS_CONTAINER && !(parent->flags & LYS_MAND_TRUE) && !(parent->flags & LYS_PRESENCE);
  ------------------
  |  |  240|   421k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
                      for ( ; parent && parent->nodetype == LYS_CONTAINER && !(parent->flags & LYS_MAND_TRUE) && !(parent->flags & LYS_PRESENCE);
  ------------------
  |  |  658|  28.1k|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
                      for ( ; parent && parent->nodetype == LYS_CONTAINER && !(parent->flags & LYS_MAND_TRUE) && !(parent->flags & LYS_PRESENCE);
  ------------------
  |  |  667|  28.1k|#define LYS_PRESENCE     0x80        /**< flag for presence property of a container, but it is not only for explicit presence
  ------------------
  |  Branch (3750:17): [True: 182k, False: 56.2k]
  |  Branch (3750:27): [True: 28.1k, False: 154k]
  |  Branch (3750:64): [True: 28.1k, False: 0]
  |  Branch (3750:100): [True: 28.1k, False: 0]
  ------------------
 3751|   210k|                parent = parent->parent) {
 3752|  28.1k|            parent->flags |= LYS_MAND_TRUE;
  ------------------
  |  |  658|  28.1k|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
 3753|  28.1k|        }
 3754|   210k|    } else { /* unset flag */
 3755|      0|        for ( ; parent && parent->nodetype == LYS_CONTAINER && (parent->flags & LYS_MAND_TRUE); parent = parent->parent) {
  ------------------
  |  |  240|      0|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
                      for ( ; parent && parent->nodetype == LYS_CONTAINER && (parent->flags & LYS_MAND_TRUE); parent = parent->parent) {
  ------------------
  |  |  658|      0|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
  |  Branch (3755:17): [True: 0, False: 0]
  |  Branch (3755:27): [True: 0, False: 0]
  |  Branch (3755:64): [True: 0, False: 0]
  ------------------
 3756|      0|            for (iter = lysc_node_child(parent); iter; iter = iter->next) {
  ------------------
  |  Branch (3756:50): [True: 0, False: 0]
  ------------------
 3757|      0|                if (iter->flags & LYS_MAND_TRUE) {
  ------------------
  |  |  658|      0|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
  |  Branch (3757:21): [True: 0, False: 0]
  ------------------
 3758|       |                    /* there is another mandatory node */
 3759|      0|                    return;
 3760|      0|                }
 3761|      0|            }
 3762|       |            /* unset mandatory flag - there is no mandatory children in the non-presence container */
 3763|      0|            parent->flags &= ~LYS_MAND_TRUE;
  ------------------
  |  |  658|      0|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
 3764|      0|        }
 3765|      0|    }
 3766|   210k|}
lys_compile_node:
 4185|  1.12M|{
 4186|  1.12M|    LY_ERR ret = LY_SUCCESS;
 4187|  1.12M|    struct lysc_node *node = NULL;
 4188|  1.12M|    uint32_t prev_opts = ctx->compile_opts;
 4189|       |
 4190|  1.12M|    LY_ERR (*node_compile_spec)(struct lysc_ctx *, struct lysp_node *, struct lysc_node *);
 4191|       |
 4192|  1.12M|    if (pnode->nodetype != LYS_USES) {
  ------------------
  |  |  253|  1.12M|#define LYS_USES        0x0800    /**< uses statement node */
  ------------------
  |  Branch (4192:9): [True: 899k, False: 224k]
  ------------------
 4193|   899k|        lysc_update_path(ctx, parent ? parent->module : NULL, pnode->name);
  ------------------
  |  Branch (4193:31): [True: 829k, False: 70.2k]
  ------------------
 4194|   899k|    } else {
 4195|   224k|        lysc_update_path(ctx, NULL, "{uses}");
 4196|   224k|        lysc_update_path(ctx, NULL, pnode->name);
 4197|   224k|    }
 4198|       |
 4199|  1.12M|    switch (pnode->nodetype) {
 4200|  70.2k|    case LYS_CONTAINER:
  ------------------
  |  |  240|  70.2k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (4200:5): [True: 70.2k, False: 1.05M]
  ------------------
 4201|  70.2k|        node = (struct lysc_node *)calloc(1, sizeof(struct lysc_node_container));
 4202|  70.2k|        node_compile_spec = lys_compile_node_container;
 4203|  70.2k|        break;
 4204|   463k|    case LYS_LEAF:
  ------------------
  |  |  242|   463k|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
  |  Branch (4204:5): [True: 463k, False: 660k]
  ------------------
 4205|   463k|        node = (struct lysc_node *)calloc(1, sizeof(struct lysc_node_leaf));
 4206|   463k|        node_compile_spec = lys_compile_node_leaf;
 4207|   463k|        break;
 4208|   168k|    case LYS_LIST:
  ------------------
  |  |  244|   168k|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (4208:5): [True: 168k, False: 955k]
  ------------------
 4209|   168k|        node = (struct lysc_node *)calloc(1, sizeof(struct lysc_node_list));
 4210|   168k|        node_compile_spec = lys_compile_node_list;
 4211|   168k|        break;
 4212|   126k|    case LYS_LEAFLIST:
  ------------------
  |  |  243|   126k|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (4212:5): [True: 126k, False: 998k]
  ------------------
 4213|   126k|        node = (struct lysc_node *)calloc(1, sizeof(struct lysc_node_leaflist));
 4214|   126k|        node_compile_spec = lys_compile_node_leaflist;
 4215|   126k|        break;
 4216|  14.0k|    case LYS_CHOICE:
  ------------------
  |  |  241|  14.0k|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
  |  Branch (4216:5): [True: 14.0k, False: 1.11M]
  ------------------
 4217|  14.0k|        node = (struct lysc_node *)calloc(1, sizeof(struct lysc_node_choice));
 4218|  14.0k|        node_compile_spec = lys_compile_node_choice;
 4219|  14.0k|        break;
 4220|  28.1k|    case LYS_CASE:
  ------------------
  |  |  247|  28.1k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
  |  Branch (4220:5): [True: 28.1k, False: 1.09M]
  ------------------
 4221|  28.1k|        node = (struct lysc_node *)calloc(1, sizeof(struct lysc_node_case));
 4222|  28.1k|        node_compile_spec = lys_compile_node_case;
 4223|  28.1k|        break;
 4224|      0|    case LYS_ANYXML:
  ------------------
  |  |  245|      0|#define LYS_ANYXML      0x0020    /**< anyxml statement node */
  ------------------
  |  Branch (4224:5): [True: 0, False: 1.12M]
  ------------------
 4225|      0|    case LYS_ANYDATA:
  ------------------
  |  |  246|      0|#define LYS_ANYDATA     0x0060    /**< anydata statement node, in tests it can be used for both #LYS_ANYXML and #LYS_ANYDATA */
  ------------------
  |  Branch (4225:5): [True: 0, False: 1.12M]
  ------------------
 4226|      0|        node = (struct lysc_node *)calloc(1, sizeof(struct lysc_node_anydata));
 4227|      0|        node_compile_spec = lys_compile_node_any;
 4228|      0|        break;
 4229|      0|    case LYS_RPC:
  ------------------
  |  |  249|      0|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
  |  Branch (4229:5): [True: 0, False: 1.12M]
  ------------------
 4230|      0|    case LYS_ACTION:
  ------------------
  |  |  250|      0|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
  |  Branch (4230:5): [True: 0, False: 1.12M]
  ------------------
 4231|      0|        if (ctx->compile_opts & (LYS_IS_INPUT | LYS_IS_OUTPUT | LYS_IS_NOTIF)) {
  ------------------
  |  |  718|      0|#define LYS_IS_INPUT     0x1000      /**< flag for nodes that are in the subtree of an input statement */
  ------------------
                      if (ctx->compile_opts & (LYS_IS_INPUT | LYS_IS_OUTPUT | LYS_IS_NOTIF)) {
  ------------------
  |  |  720|      0|#define LYS_IS_OUTPUT    0x2000      /**< flag for nodes that are in the subtree of an output statement */
  ------------------
                      if (ctx->compile_opts & (LYS_IS_INPUT | LYS_IS_OUTPUT | LYS_IS_NOTIF)) {
  ------------------
  |  |  722|      0|#define LYS_IS_NOTIF     0x4000      /**< flag for nodes that are in the subtree of a notification statement */
  ------------------
  |  Branch (4231:13): [True: 0, False: 0]
  ------------------
 4232|      0|            LOGVAL(ctx->ctx, LYVE_SEMANTICS,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4233|      0|                    "Action \"%s\" is placed inside %s.", pnode->name,
 4234|      0|                    (ctx->compile_opts & LYS_IS_NOTIF) ? "notification" : "another RPC/action");
 4235|      0|            return LY_EVALID;
 4236|      0|        }
 4237|      0|        node = (struct lysc_node *)calloc(1, sizeof(struct lysc_node_action));
 4238|      0|        node_compile_spec = lys_compile_node_action;
 4239|      0|        ctx->compile_opts |= LYS_COMPILE_NO_CONFIG;
  ------------------
  |  |  545|      0|#define LYS_COMPILE_NO_CONFIG       0x04            /**< ignore config statements, neither inherit config value */
  ------------------
 4240|      0|        break;
 4241|  28.1k|    case LYS_NOTIF:
  ------------------
  |  |  251|  28.1k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (4241:5): [True: 28.1k, False: 1.09M]
  ------------------
 4242|  28.1k|        if (ctx->compile_opts & (LYS_IS_INPUT | LYS_IS_OUTPUT | LYS_IS_NOTIF)) {
  ------------------
  |  |  718|  28.1k|#define LYS_IS_INPUT     0x1000      /**< flag for nodes that are in the subtree of an input statement */
  ------------------
                      if (ctx->compile_opts & (LYS_IS_INPUT | LYS_IS_OUTPUT | LYS_IS_NOTIF)) {
  ------------------
  |  |  720|  28.1k|#define LYS_IS_OUTPUT    0x2000      /**< flag for nodes that are in the subtree of an output statement */
  ------------------
                      if (ctx->compile_opts & (LYS_IS_INPUT | LYS_IS_OUTPUT | LYS_IS_NOTIF)) {
  ------------------
  |  |  722|  28.1k|#define LYS_IS_NOTIF     0x4000      /**< flag for nodes that are in the subtree of a notification statement */
  ------------------
  |  Branch (4242:13): [True: 0, False: 28.1k]
  ------------------
 4243|      0|            LOGVAL(ctx->ctx, LYVE_SEMANTICS,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4244|      0|                    "Notification \"%s\" is placed inside %s.", pnode->name,
 4245|      0|                    (ctx->compile_opts & LYS_IS_NOTIF) ? "another notification" : "RPC/action");
 4246|      0|            return LY_EVALID;
 4247|      0|        }
 4248|  28.1k|        node = (struct lysc_node *)calloc(1, sizeof(struct lysc_node_notif));
 4249|  28.1k|        node_compile_spec = lys_compile_node_notif;
 4250|  28.1k|        ctx->compile_opts |= LYS_COMPILE_NOTIFICATION;
  ------------------
  |  |  550|  28.1k|#define LYS_COMPILE_NOTIFICATION    (LYS_IS_NOTIF | LYS_COMPILE_NO_CONFIG)  /**< Internal option when compiling schema tree of Notification */
  |  |  ------------------
  |  |  |  |  722|  28.1k|#define LYS_IS_NOTIF     0x4000      /**< flag for nodes that are in the subtree of a notification statement */
  |  |  ------------------
  |  |               #define LYS_COMPILE_NOTIFICATION    (LYS_IS_NOTIF | LYS_COMPILE_NO_CONFIG)  /**< Internal option when compiling schema tree of Notification */
  |  |  ------------------
  |  |  |  |  545|  28.1k|#define LYS_COMPILE_NO_CONFIG       0x04            /**< ignore config statements, neither inherit config value */
  |  |  ------------------
  ------------------
 4251|  28.1k|        break;
 4252|   224k|    case LYS_USES:
  ------------------
  |  |  253|   224k|#define LYS_USES        0x0800    /**< uses statement node */
  ------------------
  |  Branch (4252:5): [True: 224k, False: 899k]
  ------------------
 4253|   224k|        ret = lys_compile_uses(ctx, (struct lysp_node_uses *)pnode, parent, inherited_flags, child_set);
 4254|   224k|        lysc_update_path(ctx, NULL, NULL);
 4255|   224k|        lysc_update_path(ctx, NULL, NULL);
 4256|   224k|        return ret;
 4257|      0|    default:
  ------------------
  |  Branch (4257:5): [True: 0, False: 1.12M]
  ------------------
 4258|      0|        LOGINT(ctx->ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
 4259|      0|        return LY_EINT;
 4260|  1.12M|    }
 4261|   899k|    LY_CHECK_ERR_RET(!node, LOGMEM(ctx->ctx), LY_EMEM);
  ------------------
  |  |  207|   899k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 899k]
  |  |  ------------------
  ------------------
 4262|       |
 4263|   899k|    ret = lys_compile_node_(ctx, pnode, parent, inherited_flags, node_compile_spec, node, child_set);
 4264|       |
 4265|   899k|    ctx->compile_opts = prev_opts;
 4266|   899k|    lysc_update_path(ctx, NULL, NULL);
 4267|   899k|    return ret;
 4268|   899k|}
schema_compile_node.c:lys_compile_status:
  439|  1.12M|{
  440|       |    /* normalize to status-only */
  441|  1.12M|    parsed_flags &= LYS_STATUS_MASK;
  ------------------
  |  |  657|  1.12M|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
  442|  1.12M|    inherited_flags &= LYS_STATUS_MASK;
  ------------------
  |  |  657|  1.12M|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
  443|  1.12M|    parent_flags &= LYS_STATUS_MASK;
  ------------------
  |  |  657|  1.12M|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
  444|       |
  445|       |    /* check for conflicts */
  446|  1.12M|    if (parent_flags && parsed_flags && (parent_flags > parsed_flags)) {
  ------------------
  |  Branch (446:9): [True: 1.05M, False: 70.2k]
  |  Branch (446:25): [True: 281k, False: 773k]
  |  Branch (446:41): [True: 0, False: 281k]
  ------------------
  447|      0|        LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Status \"%s\" of \"%s\" is in conflict with \"%s\" status of parent \"%s\".",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  448|      0|                lys_status2str(parsed_flags), stmt_name, lys_status2str(parent_flags), parent_name);
  449|      0|        return LY_EVALID;
  450|  1.12M|    } else if (inherited_flags && parsed_flags && (inherited_flags > parsed_flags)) {
  ------------------
  |  Branch (450:16): [True: 379k, False: 745k]
  |  Branch (450:35): [True: 98.4k, False: 281k]
  |  Branch (450:51): [True: 0, False: 98.4k]
  ------------------
  451|      0|        LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Inherited schema-only status \"%s\" is in conflict with \"%s\" status of \"%s\".",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  452|      0|                lys_status2str(inherited_flags), lys_status2str(parsed_flags), stmt_name);
  453|      0|        return LY_EVALID;
  454|  1.12M|    } else if (parent_flags && inherited_flags && (parent_flags > inherited_flags)) {
  ------------------
  |  Branch (454:16): [True: 1.05M, False: 70.2k]
  |  Branch (454:32): [True: 379k, False: 674k]
  |  Branch (454:51): [True: 0, False: 379k]
  ------------------
  455|      0|        LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Status \"%s\" of parent \"%s\" is in conflict with inherited schema-only status \"%s\".",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  456|      0|                lys_status2str(parent_flags), parent_name, lys_status2str(inherited_flags));
  457|      0|        return LY_EVALID;
  458|      0|    }
  459|       |
  460|       |    /* clear */
  461|  1.12M|    (*stmt_flags) &= ~LYS_STATUS_MASK;
  ------------------
  |  |  657|  1.12M|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
  462|       |
  463|  1.12M|    if (parsed_flags) {
  ------------------
  |  Branch (463:9): [True: 309k, False: 815k]
  ------------------
  464|       |        /* explicit status */
  465|   309k|        (*stmt_flags) |= parsed_flags;
  466|   815k|    } else if (inherited_flags) {
  ------------------
  |  Branch (466:16): [True: 281k, False: 534k]
  ------------------
  467|       |        /* inherited status from a schema-only statement */
  468|   281k|        (*stmt_flags) |= inherited_flags;
  469|   534k|    } else if (parent_flags) {
  ------------------
  |  Branch (469:16): [True: 492k, False: 42.1k]
  ------------------
  470|       |        /* inherited status from a parent node */
  471|   492k|        (*stmt_flags) |= parent_flags;
  472|   492k|    } else {
  473|       |        /* default status */
  474|  42.1k|        (*stmt_flags) |= LYS_STATUS_CURR;
  ------------------
  |  |  654|  42.1k|#define LYS_STATUS_CURR  0x04        /**< status current; */
  ------------------
  475|  42.1k|    }
  476|       |
  477|  1.12M|    return LY_SUCCESS;
  478|  1.12M|}
schema_compile_node.c:range_part_minmax:
  700|   140k|{
  701|   140k|    LY_ERR ret = LY_SUCCESS;
  702|   140k|    char *valcopy = NULL;
  703|   140k|    size_t len = 0;
  704|       |
  705|   140k|    if (value) {
  ------------------
  |  Branch (705:9): [True: 98.4k, False: 42.1k]
  ------------------
  706|  98.4k|        ret = range_part_check_value_syntax(ctx, basetype, frdigits, *value, &len, &valcopy);
  707|  98.4k|        LY_CHECK_GOTO(ret, finalize);
  ------------------
  |  |  202|  98.4k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 98.4k]
  |  |  ------------------
  ------------------
  708|  98.4k|    }
  709|   140k|    if (!valcopy && base_range) {
  ------------------
  |  Branch (709:9): [True: 42.1k, False: 98.4k]
  |  Branch (709:21): [True: 0, False: 42.1k]
  ------------------
  710|      0|        if (max) {
  ------------------
  |  Branch (710:13): [True: 0, False: 0]
  ------------------
  711|      0|            part->max_64 = base_range->parts[LY_ARRAY_COUNT(base_range->parts) - 1].max_64;
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  712|      0|        } else {
  713|      0|            part->min_64 = base_range->parts[0].min_64;
  714|      0|        }
  715|      0|        if (!first) {
  ------------------
  |  Branch (715:13): [True: 0, False: 0]
  ------------------
  716|      0|            ret = range_part_check_ascendancy(basetype <= LY_TYPE_STRING ? 1 : 0, max, max ? part->max_64 : part->min_64, prev);
  ------------------
  |  Branch (716:47): [True: 0, False: 0]
  |  Branch (716:88): [True: 0, False: 0]
  ------------------
  717|      0|        }
  718|      0|        goto finalize;
  719|      0|    }
  720|       |
  721|   140k|    switch (basetype) {
  722|      0|    case LY_TYPE_INT8: /* range */
  ------------------
  |  Branch (722:5): [True: 0, False: 140k]
  ------------------
  723|      0|        if (valcopy) {
  ------------------
  |  Branch (723:13): [True: 0, False: 0]
  ------------------
  724|      0|            ret = ly_parse_int(valcopy, strlen(valcopy), INT64_C(-128), INT64_C(127), LY_BASE_DEC, max ? &part->max_64 : &part->min_64);
  ------------------
  |  |  495|      0|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
  |  Branch (724:100): [True: 0, False: 0]
  ------------------
  725|      0|        } else if (max) {
  ------------------
  |  Branch (725:20): [True: 0, False: 0]
  ------------------
  726|      0|            part->max_64 = INT64_C(127);
  727|      0|        } else {
  728|      0|            part->min_64 = INT64_C(-128);
  729|      0|        }
  730|      0|        if (!ret && !first) {
  ------------------
  |  Branch (730:13): [True: 0, False: 0]
  |  Branch (730:21): [True: 0, False: 0]
  ------------------
  731|      0|            ret = range_part_check_ascendancy(0, max, max ? part->max_64 : part->min_64, prev);
  ------------------
  |  Branch (731:55): [True: 0, False: 0]
  ------------------
  732|      0|        }
  733|      0|        break;
  734|      0|    case LY_TYPE_INT16: /* range */
  ------------------
  |  Branch (734:5): [True: 0, False: 140k]
  ------------------
  735|      0|        if (valcopy) {
  ------------------
  |  Branch (735:13): [True: 0, False: 0]
  ------------------
  736|      0|            ret = ly_parse_int(valcopy, strlen(valcopy), INT64_C(-32768), INT64_C(32767), LY_BASE_DEC,
  ------------------
  |  |  495|      0|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
  737|      0|                    max ? &part->max_64 : &part->min_64);
  ------------------
  |  Branch (737:21): [True: 0, False: 0]
  ------------------
  738|      0|        } else if (max) {
  ------------------
  |  Branch (738:20): [True: 0, False: 0]
  ------------------
  739|      0|            part->max_64 = INT64_C(32767);
  740|      0|        } else {
  741|      0|            part->min_64 = INT64_C(-32768);
  742|      0|        }
  743|      0|        if (!ret && !first) {
  ------------------
  |  Branch (743:13): [True: 0, False: 0]
  |  Branch (743:21): [True: 0, False: 0]
  ------------------
  744|      0|            ret = range_part_check_ascendancy(0, max, max ? part->max_64 : part->min_64, prev);
  ------------------
  |  Branch (744:55): [True: 0, False: 0]
  ------------------
  745|      0|        }
  746|      0|        break;
  747|      0|    case LY_TYPE_INT32: /* range */
  ------------------
  |  Branch (747:5): [True: 0, False: 140k]
  ------------------
  748|      0|        if (valcopy) {
  ------------------
  |  Branch (748:13): [True: 0, False: 0]
  ------------------
  749|      0|            ret = ly_parse_int(valcopy, strlen(valcopy), INT64_C(-2147483648), INT64_C(2147483647), LY_BASE_DEC,
  ------------------
  |  |  495|      0|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
  750|      0|                    max ? &part->max_64 : &part->min_64);
  ------------------
  |  Branch (750:21): [True: 0, False: 0]
  ------------------
  751|      0|        } else if (max) {
  ------------------
  |  Branch (751:20): [True: 0, False: 0]
  ------------------
  752|      0|            part->max_64 = INT64_C(2147483647);
  753|      0|        } else {
  754|      0|            part->min_64 = INT64_C(-2147483648);
  755|      0|        }
  756|      0|        if (!ret && !first) {
  ------------------
  |  Branch (756:13): [True: 0, False: 0]
  |  Branch (756:21): [True: 0, False: 0]
  ------------------
  757|      0|            ret = range_part_check_ascendancy(0, max, max ? part->max_64 : part->min_64, prev);
  ------------------
  |  Branch (757:55): [True: 0, False: 0]
  ------------------
  758|      0|        }
  759|      0|        break;
  760|      0|    case LY_TYPE_INT64: /* range */
  ------------------
  |  Branch (760:5): [True: 0, False: 140k]
  ------------------
  761|      0|    case LY_TYPE_DEC64: /* range */
  ------------------
  |  Branch (761:5): [True: 0, False: 140k]
  ------------------
  762|      0|        if (valcopy) {
  ------------------
  |  Branch (762:13): [True: 0, False: 0]
  ------------------
  763|      0|            ret = ly_parse_int(valcopy, strlen(valcopy), INT64_C(-9223372036854775807) - INT64_C(1), INT64_C(9223372036854775807),
  764|      0|                    LY_BASE_DEC, max ? &part->max_64 : &part->min_64);
  ------------------
  |  |  495|      0|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
  |  Branch (764:34): [True: 0, False: 0]
  ------------------
  765|      0|        } else if (max) {
  ------------------
  |  Branch (765:20): [True: 0, False: 0]
  ------------------
  766|      0|            part->max_64 = INT64_C(9223372036854775807);
  767|      0|        } else {
  768|      0|            part->min_64 = INT64_C(-9223372036854775807) - INT64_C(1);
  769|      0|        }
  770|      0|        if (!ret && !first) {
  ------------------
  |  Branch (770:13): [True: 0, False: 0]
  |  Branch (770:21): [True: 0, False: 0]
  ------------------
  771|      0|            ret = range_part_check_ascendancy(0, max, max ? part->max_64 : part->min_64, prev);
  ------------------
  |  Branch (771:55): [True: 0, False: 0]
  ------------------
  772|      0|        }
  773|      0|        break;
  774|      0|    case LY_TYPE_UINT8: /* range */
  ------------------
  |  Branch (774:5): [True: 0, False: 140k]
  ------------------
  775|      0|        if (valcopy) {
  ------------------
  |  Branch (775:13): [True: 0, False: 0]
  ------------------
  776|      0|            ret = ly_parse_uint(valcopy, strlen(valcopy), UINT64_C(255), LY_BASE_DEC, max ? &part->max_u64 : &part->min_u64);
  ------------------
  |  |  495|      0|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
  |  Branch (776:87): [True: 0, False: 0]
  ------------------
  777|      0|        } else if (max) {
  ------------------
  |  Branch (777:20): [True: 0, False: 0]
  ------------------
  778|      0|            part->max_u64 = UINT64_C(255);
  779|      0|        } else {
  780|      0|            part->min_u64 = UINT64_C(0);
  781|      0|        }
  782|      0|        if (!ret && !first) {
  ------------------
  |  Branch (782:13): [True: 0, False: 0]
  |  Branch (782:21): [True: 0, False: 0]
  ------------------
  783|      0|            ret = range_part_check_ascendancy(1, max, max ? part->max_64 : part->min_64, prev);
  ------------------
  |  Branch (783:55): [True: 0, False: 0]
  ------------------
  784|      0|        }
  785|      0|        break;
  786|      0|    case LY_TYPE_UINT16: /* range */
  ------------------
  |  Branch (786:5): [True: 0, False: 140k]
  ------------------
  787|      0|        if (valcopy) {
  ------------------
  |  Branch (787:13): [True: 0, False: 0]
  ------------------
  788|      0|            ret = ly_parse_uint(valcopy, strlen(valcopy), UINT64_C(65535), LY_BASE_DEC, max ? &part->max_u64 : &part->min_u64);
  ------------------
  |  |  495|      0|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
  |  Branch (788:89): [True: 0, False: 0]
  ------------------
  789|      0|        } else if (max) {
  ------------------
  |  Branch (789:20): [True: 0, False: 0]
  ------------------
  790|      0|            part->max_u64 = UINT64_C(65535);
  791|      0|        } else {
  792|      0|            part->min_u64 = UINT64_C(0);
  793|      0|        }
  794|      0|        if (!ret && !first) {
  ------------------
  |  Branch (794:13): [True: 0, False: 0]
  |  Branch (794:21): [True: 0, False: 0]
  ------------------
  795|      0|            ret = range_part_check_ascendancy(1, max, max ? part->max_64 : part->min_64, prev);
  ------------------
  |  Branch (795:55): [True: 0, False: 0]
  ------------------
  796|      0|        }
  797|      0|        break;
  798|  56.2k|    case LY_TYPE_UINT32: /* range */
  ------------------
  |  Branch (798:5): [True: 56.2k, False: 84.3k]
  ------------------
  799|  56.2k|        if (valcopy) {
  ------------------
  |  Branch (799:13): [True: 28.1k, False: 28.1k]
  ------------------
  800|  28.1k|            ret = ly_parse_uint(valcopy, strlen(valcopy), UINT64_C(4294967295), LY_BASE_DEC,
  ------------------
  |  |  495|  28.1k|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
  801|  28.1k|                    max ? &part->max_u64 : &part->min_u64);
  ------------------
  |  Branch (801:21): [True: 0, False: 28.1k]
  ------------------
  802|  28.1k|        } else if (max) {
  ------------------
  |  Branch (802:20): [True: 28.1k, False: 0]
  ------------------
  803|  28.1k|            part->max_u64 = UINT64_C(4294967295);
  804|  28.1k|        } else {
  805|      0|            part->min_u64 = UINT64_C(0);
  806|      0|        }
  807|  56.2k|        if (!ret && !first) {
  ------------------
  |  Branch (807:13): [True: 56.2k, False: 0]
  |  Branch (807:21): [True: 28.1k, False: 28.1k]
  ------------------
  808|  28.1k|            ret = range_part_check_ascendancy(1, max, max ? part->max_64 : part->min_64, prev);
  ------------------
  |  Branch (808:55): [True: 28.1k, False: 0]
  ------------------
  809|  28.1k|        }
  810|  56.2k|        break;
  811|      0|    case LY_TYPE_UINT64: /* range */
  ------------------
  |  Branch (811:5): [True: 0, False: 140k]
  ------------------
  812|  84.3k|    case LY_TYPE_STRING: /* length */
  ------------------
  |  Branch (812:5): [True: 84.3k, False: 56.2k]
  ------------------
  813|  84.3k|    case LY_TYPE_BINARY: /* length */
  ------------------
  |  Branch (813:5): [True: 0, False: 140k]
  ------------------
  814|  84.3k|        if (valcopy) {
  ------------------
  |  Branch (814:13): [True: 70.2k, False: 14.0k]
  ------------------
  815|  70.2k|            ret = ly_parse_uint(valcopy, strlen(valcopy), UINT64_C(18446744073709551615), LY_BASE_DEC,
  ------------------
  |  |  495|  70.2k|#define LY_BASE_DEC 10  /**< Decimal numeral base */
  ------------------
  816|  70.2k|                    max ? &part->max_u64 : &part->min_u64);
  ------------------
  |  Branch (816:21): [True: 0, False: 70.2k]
  ------------------
  817|  70.2k|        } else if (max) {
  ------------------
  |  Branch (817:20): [True: 14.0k, False: 0]
  ------------------
  818|  14.0k|            part->max_u64 = UINT64_C(18446744073709551615);
  819|  14.0k|        } else {
  820|      0|            part->min_u64 = UINT64_C(0);
  821|      0|        }
  822|  84.3k|        if (!ret && !first) {
  ------------------
  |  Branch (822:13): [True: 84.3k, False: 0]
  |  Branch (822:21): [True: 14.0k, False: 70.2k]
  ------------------
  823|  14.0k|            ret = range_part_check_ascendancy(1, max, max ? part->max_64 : part->min_64, prev);
  ------------------
  |  Branch (823:55): [True: 14.0k, False: 0]
  ------------------
  824|  14.0k|        }
  825|  84.3k|        break;
  826|      0|    default:
  ------------------
  |  Branch (826:5): [True: 0, False: 140k]
  ------------------
  827|      0|        LOGINT(ctx->ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  828|      0|        ret = LY_EINT;
  829|   140k|    }
  830|       |
  831|   140k|finalize:
  832|   140k|    if (ret == LY_EDENIED) {
  ------------------
  |  Branch (832:9): [True: 0, False: 140k]
  ------------------
  833|      0|        LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  834|      0|                "Invalid %s restriction - value \"%s\" does not fit the type limitations.",
  835|      0|                length_restr ? "length" : "range", valcopy ? valcopy : *value);
  836|   140k|    } else if (ret == LY_EVALID) {
  ------------------
  |  Branch (836:16): [True: 0, False: 140k]
  ------------------
  837|      0|        LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  838|      0|                "Invalid %s restriction - invalid value \"%s\".",
  839|      0|                length_restr ? "length" : "range", valcopy ? valcopy : *value);
  840|   140k|    } else if (ret == LY_EEXIST) {
  ------------------
  |  Branch (840:16): [True: 0, False: 140k]
  ------------------
  841|      0|        LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  842|      0|                "Invalid %s restriction - values are not in ascending order (%s).",
  843|      0|                length_restr ? "length" : "range",
  844|      0|                (valcopy && basetype != LY_TYPE_DEC64) ? valcopy : value ? *value : max ? "max" : "min");
  845|   140k|    } else if (!ret && value) {
  ------------------
  |  Branch (845:16): [True: 140k, False: 0]
  |  Branch (845:24): [True: 98.4k, False: 42.1k]
  ------------------
  846|  98.4k|        *value = *value + len;
  847|  98.4k|    }
  848|   140k|    free(valcopy);
  849|   140k|    return ret;
  850|   140k|}
schema_compile_node.c:range_part_check_value_syntax:
  593|  98.4k|{
  594|  98.4k|    size_t fraction = 0, size;
  595|       |
  596|  98.4k|    *len = 0;
  597|       |
  598|  98.4k|    assert(value);
  599|       |    /* parse value */
  600|  98.4k|    if (!isdigit(value[*len]) && (value[*len] != '-') && (value[*len] != '+')) {
  ------------------
  |  Branch (600:9): [True: 0, False: 98.4k]
  |  Branch (600:34): [True: 0, False: 0]
  |  Branch (600:58): [True: 0, False: 0]
  ------------------
  601|      0|        return LY_EVALID;
  602|      0|    }
  603|       |
  604|  98.4k|    if ((value[*len] == '-') || (value[*len] == '+')) {
  ------------------
  |  Branch (604:9): [True: 0, False: 98.4k]
  |  Branch (604:33): [True: 0, False: 98.4k]
  ------------------
  605|      0|        ++(*len);
  606|      0|    }
  607|       |
  608|  98.4k|    while (isdigit(value[*len])) {
  609|  98.4k|        ++(*len);
  610|  98.4k|    }
  611|       |
  612|  98.4k|    if ((basetype != LY_TYPE_DEC64) || (value[*len] != '.') || !isdigit(value[*len + 1])) {
  ------------------
  |  Branch (612:9): [True: 98.4k, False: 0]
  |  Branch (612:40): [True: 0, False: 0]
  |  Branch (612:64): [True: 0, False: 0]
  ------------------
  613|  98.4k|        if (basetype == LY_TYPE_DEC64) {
  ------------------
  |  Branch (613:13): [True: 0, False: 98.4k]
  ------------------
  614|      0|            goto decimal;
  615|  98.4k|        } else {
  616|  98.4k|            *valcopy = strndup(value, *len);
  617|  98.4k|            return LY_SUCCESS;
  618|  98.4k|        }
  619|  98.4k|    }
  620|      0|    fraction = *len;
  621|       |
  622|      0|    ++(*len);
  623|      0|    while (isdigit(value[*len])) {
  624|      0|        ++(*len);
  625|      0|    }
  626|       |
  627|      0|    if (basetype == LY_TYPE_DEC64) {
  ------------------
  |  Branch (627:9): [True: 0, False: 0]
  ------------------
  628|      0|decimal:
  629|      0|        assert(frdigits);
  630|      0|        if (fraction && (*len - 1 - fraction > frdigits)) {
  ------------------
  |  Branch (630:13): [True: 0, False: 0]
  |  Branch (630:25): [True: 0, False: 0]
  ------------------
  631|      0|            LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  632|      0|                    "Range boundary \"%.*s\" of decimal64 type exceeds defined number (%u) of fraction digits.",
  633|      0|                    (int)(*len), value, frdigits);
  634|      0|            return LY_EINVAL;
  635|      0|        }
  636|      0|        if (fraction) {
  ------------------
  |  Branch (636:13): [True: 0, False: 0]
  ------------------
  637|      0|            size = (*len) + (frdigits - ((*len) - 1 - fraction));
  638|      0|        } else {
  639|      0|            size = (*len) + frdigits + 1;
  640|      0|        }
  641|      0|        *valcopy = malloc(size * sizeof **valcopy);
  642|      0|        LY_CHECK_ERR_RET(!(*valcopy), LOGMEM(ctx->ctx), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  643|       |
  644|      0|        (*valcopy)[size - 1] = '\0';
  645|      0|        if (fraction) {
  ------------------
  |  Branch (645:13): [True: 0, False: 0]
  ------------------
  646|      0|            memcpy(&(*valcopy)[0], &value[0], fraction);
  647|      0|            memcpy(&(*valcopy)[fraction], &value[fraction + 1], (*len) - 1 - (fraction));
  648|      0|            memset(&(*valcopy)[(*len) - 1], '0', frdigits - ((*len) - 1 - fraction));
  649|      0|        } else {
  650|      0|            memcpy(&(*valcopy)[0], &value[0], *len);
  651|      0|            memset(&(*valcopy)[*len], '0', frdigits);
  652|      0|        }
  653|      0|    }
  654|      0|    return LY_SUCCESS;
  655|      0|}
schema_compile_node.c:range_part_check_ascendancy:
  668|  42.1k|{
  669|  42.1k|    if (unsigned_value) {
  ------------------
  |  Branch (669:9): [True: 42.1k, False: 0]
  ------------------
  670|  42.1k|        if ((max && ((uint64_t)prev_value > (uint64_t)value)) || (!max && ((uint64_t)prev_value >= (uint64_t)value))) {
  ------------------
  |  Branch (670:14): [True: 42.1k, False: 0]
  |  Branch (670:21): [True: 0, False: 42.1k]
  |  Branch (670:67): [True: 0, False: 42.1k]
  |  Branch (670:75): [True: 0, False: 0]
  ------------------
  671|      0|            return LY_EEXIST;
  672|      0|        }
  673|  42.1k|    } else {
  674|      0|        if ((max && (prev_value > value)) || (!max && (prev_value >= value))) {
  ------------------
  |  Branch (674:14): [True: 0, False: 0]
  |  Branch (674:21): [True: 0, False: 0]
  |  Branch (674:47): [True: 0, False: 0]
  |  Branch (674:55): [True: 0, False: 0]
  ------------------
  675|      0|            return LY_EEXIST;
  676|      0|        }
  677|      0|    }
  678|  42.1k|    return LY_SUCCESS;
  679|  42.1k|}
schema_compile_node.c:lys_compile_pattern_chblocks_xmlschema2perl:
 1097|  42.1k|{
 1098|  42.1k|#define URANGE_LEN 19
 1099|  42.1k|    char *ublock2urange[][2] = {
 1100|  42.1k|        {"BasicLatin", "[\\x{0000}-\\x{007F}]"},
 1101|  42.1k|        {"Latin-1Supplement", "[\\x{0080}-\\x{00FF}]"},
 1102|  42.1k|        {"LatinExtended-A", "[\\x{0100}-\\x{017F}]"},
 1103|  42.1k|        {"LatinExtended-B", "[\\x{0180}-\\x{024F}]"},
 1104|  42.1k|        {"IPAExtensions", "[\\x{0250}-\\x{02AF}]"},
 1105|  42.1k|        {"SpacingModifierLetters", "[\\x{02B0}-\\x{02FF}]"},
 1106|  42.1k|        {"CombiningDiacriticalMarks", "[\\x{0300}-\\x{036F}]"},
 1107|  42.1k|        {"Greek", "[\\x{0370}-\\x{03FF}]"},
 1108|  42.1k|        {"Cyrillic", "[\\x{0400}-\\x{04FF}]"},
 1109|  42.1k|        {"Armenian", "[\\x{0530}-\\x{058F}]"},
 1110|  42.1k|        {"Hebrew", "[\\x{0590}-\\x{05FF}]"},
 1111|  42.1k|        {"Arabic", "[\\x{0600}-\\x{06FF}]"},
 1112|  42.1k|        {"Syriac", "[\\x{0700}-\\x{074F}]"},
 1113|  42.1k|        {"Thaana", "[\\x{0780}-\\x{07BF}]"},
 1114|  42.1k|        {"Devanagari", "[\\x{0900}-\\x{097F}]"},
 1115|  42.1k|        {"Bengali", "[\\x{0980}-\\x{09FF}]"},
 1116|  42.1k|        {"Gurmukhi", "[\\x{0A00}-\\x{0A7F}]"},
 1117|  42.1k|        {"Gujarati", "[\\x{0A80}-\\x{0AFF}]"},
 1118|  42.1k|        {"Oriya", "[\\x{0B00}-\\x{0B7F}]"},
 1119|  42.1k|        {"Tamil", "[\\x{0B80}-\\x{0BFF}]"},
 1120|  42.1k|        {"Telugu", "[\\x{0C00}-\\x{0C7F}]"},
 1121|  42.1k|        {"Kannada", "[\\x{0C80}-\\x{0CFF}]"},
 1122|  42.1k|        {"Malayalam", "[\\x{0D00}-\\x{0D7F}]"},
 1123|  42.1k|        {"Sinhala", "[\\x{0D80}-\\x{0DFF}]"},
 1124|  42.1k|        {"Thai", "[\\x{0E00}-\\x{0E7F}]"},
 1125|  42.1k|        {"Lao", "[\\x{0E80}-\\x{0EFF}]"},
 1126|  42.1k|        {"Tibetan", "[\\x{0F00}-\\x{0FFF}]"},
 1127|  42.1k|        {"Myanmar", "[\\x{1000}-\\x{109F}]"},
 1128|  42.1k|        {"Georgian", "[\\x{10A0}-\\x{10FF}]"},
 1129|  42.1k|        {"HangulJamo", "[\\x{1100}-\\x{11FF}]"},
 1130|  42.1k|        {"Ethiopic", "[\\x{1200}-\\x{137F}]"},
 1131|  42.1k|        {"Cherokee", "[\\x{13A0}-\\x{13FF}]"},
 1132|  42.1k|        {"UnifiedCanadianAboriginalSyllabics", "[\\x{1400}-\\x{167F}]"},
 1133|  42.1k|        {"Ogham", "[\\x{1680}-\\x{169F}]"},
 1134|  42.1k|        {"Runic", "[\\x{16A0}-\\x{16FF}]"},
 1135|  42.1k|        {"Khmer", "[\\x{1780}-\\x{17FF}]"},
 1136|  42.1k|        {"Mongolian", "[\\x{1800}-\\x{18AF}]"},
 1137|  42.1k|        {"LatinExtendedAdditional", "[\\x{1E00}-\\x{1EFF}]"},
 1138|  42.1k|        {"GreekExtended", "[\\x{1F00}-\\x{1FFF}]"},
 1139|  42.1k|        {"GeneralPunctuation", "[\\x{2000}-\\x{206F}]"},
 1140|  42.1k|        {"SuperscriptsandSubscripts", "[\\x{2070}-\\x{209F}]"},
 1141|  42.1k|        {"CurrencySymbols", "[\\x{20A0}-\\x{20CF}]"},
 1142|  42.1k|        {"CombiningMarksforSymbols", "[\\x{20D0}-\\x{20FF}]"},
 1143|  42.1k|        {"LetterlikeSymbols", "[\\x{2100}-\\x{214F}]"},
 1144|  42.1k|        {"NumberForms", "[\\x{2150}-\\x{218F}]"},
 1145|  42.1k|        {"Arrows", "[\\x{2190}-\\x{21FF}]"},
 1146|  42.1k|        {"MathematicalOperators", "[\\x{2200}-\\x{22FF}]"},
 1147|  42.1k|        {"MiscellaneousTechnical", "[\\x{2300}-\\x{23FF}]"},
 1148|  42.1k|        {"ControlPictures", "[\\x{2400}-\\x{243F}]"},
 1149|  42.1k|        {"OpticalCharacterRecognition", "[\\x{2440}-\\x{245F}]"},
 1150|  42.1k|        {"EnclosedAlphanumerics", "[\\x{2460}-\\x{24FF}]"},
 1151|  42.1k|        {"BoxDrawing", "[\\x{2500}-\\x{257F}]"},
 1152|  42.1k|        {"BlockElements", "[\\x{2580}-\\x{259F}]"},
 1153|  42.1k|        {"GeometricShapes", "[\\x{25A0}-\\x{25FF}]"},
 1154|  42.1k|        {"MiscellaneousSymbols", "[\\x{2600}-\\x{26FF}]"},
 1155|  42.1k|        {"Dingbats", "[\\x{2700}-\\x{27BF}]"},
 1156|  42.1k|        {"BraillePatterns", "[\\x{2800}-\\x{28FF}]"},
 1157|  42.1k|        {"CJKRadicalsSupplement", "[\\x{2E80}-\\x{2EFF}]"},
 1158|  42.1k|        {"KangxiRadicals", "[\\x{2F00}-\\x{2FDF}]"},
 1159|  42.1k|        {"IdeographicDescriptionCharacters", "[\\x{2FF0}-\\x{2FFF}]"},
 1160|  42.1k|        {"CJKSymbolsandPunctuation", "[\\x{3000}-\\x{303F}]"},
 1161|  42.1k|        {"Hiragana", "[\\x{3040}-\\x{309F}]"},
 1162|  42.1k|        {"Katakana", "[\\x{30A0}-\\x{30FF}]"},
 1163|  42.1k|        {"Bopomofo", "[\\x{3100}-\\x{312F}]"},
 1164|  42.1k|        {"HangulCompatibilityJamo", "[\\x{3130}-\\x{318F}]"},
 1165|  42.1k|        {"Kanbun", "[\\x{3190}-\\x{319F}]"},
 1166|  42.1k|        {"BopomofoExtended", "[\\x{31A0}-\\x{31BF}]"},
 1167|  42.1k|        {"EnclosedCJKLettersandMonths", "[\\x{3200}-\\x{32FF}]"},
 1168|  42.1k|        {"CJKCompatibility", "[\\x{3300}-\\x{33FF}]"},
 1169|  42.1k|        {"CJKUnifiedIdeographsExtensionA", "[\\x{3400}-\\x{4DB5}]"},
 1170|  42.1k|        {"CJKUnifiedIdeographs", "[\\x{4E00}-\\x{9FFF}]"},
 1171|  42.1k|        {"YiSyllables", "[\\x{A000}-\\x{A48F}]"},
 1172|  42.1k|        {"YiRadicals", "[\\x{A490}-\\x{A4CF}]"},
 1173|  42.1k|        {"HangulSyllables", "[\\x{AC00}-\\x{D7A3}]"},
 1174|  42.1k|        {"PrivateUse", "[\\x{E000}-\\x{F8FF}]"},
 1175|  42.1k|        {"CJKCompatibilityIdeographs", "[\\x{F900}-\\x{FAFF}]"},
 1176|  42.1k|        {"AlphabeticPresentationForms", "[\\x{FB00}-\\x{FB4F}]"},
 1177|  42.1k|        {"ArabicPresentationForms-A", "[\\x{FB50}-\\x{FDFF}]"},
 1178|  42.1k|        {"CombiningHalfMarks", "[\\x{FE20}-\\x{FE2F}]"},
 1179|  42.1k|        {"CJKCompatibilityForms", "[\\x{FE30}-\\x{FE4F}]"},
 1180|  42.1k|        {"SmallFormVariants", "[\\x{FE50}-\\x{FE6F}]"},
 1181|  42.1k|        {"ArabicPresentationForms-B", "[\\x{FE70}-\\x{FEFE}]"},
 1182|  42.1k|        {"HalfwidthandFullwidthForms", "[\\x{FF00}-\\x{FFEF}]"},
 1183|  42.1k|        {"Specials", "[\\x{FEFF}|\\x{FFF0}-\\x{FFFD}]"},
 1184|  42.1k|        {NULL, NULL}
 1185|  42.1k|    };
 1186|       |
 1187|  42.1k|    size_t idx, idx2, start, end;
 1188|  42.1k|    char *perl_regex, *ptr;
 1189|       |
 1190|  42.1k|    perl_regex = *regex;
 1191|       |
 1192|       |    /* substitute Unicode Character Blocks with exact Character Ranges */
 1193|  42.1k|    while ((ptr = strstr(perl_regex, "\\p{Is"))) {
  ------------------
  |  Branch (1193:12): [True: 0, False: 42.1k]
  ------------------
 1194|      0|        start = ptr - perl_regex;
 1195|       |
 1196|      0|        ptr = strchr(ptr, '}');
 1197|      0|        if (!ptr) {
  ------------------
  |  Branch (1197:13): [True: 0, False: 0]
  ------------------
 1198|      0|            LOGVAL(ctx, LY_VCODE_INREGEXP, pattern, perl_regex + start + 2, "unterminated character property");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1199|      0|            return LY_EVALID;
 1200|      0|        }
 1201|      0|        end = (ptr - perl_regex) + 1;
 1202|       |
 1203|       |        /* need more space */
 1204|      0|        if (end - start < URANGE_LEN) {
  ------------------
  |  | 1098|      0|#define URANGE_LEN 19
  ------------------
  |  Branch (1204:13): [True: 0, False: 0]
  ------------------
 1205|      0|            perl_regex = ly_realloc(perl_regex, strlen(perl_regex) + (URANGE_LEN - (end - start)) + 1);
  ------------------
  |  | 1098|      0|#define URANGE_LEN 19
  ------------------
 1206|      0|            *regex = perl_regex;
 1207|      0|            LY_CHECK_ERR_RET(!perl_regex, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1208|      0|        }
 1209|       |
 1210|       |        /* find our range */
 1211|      0|        for (idx = 0; ublock2urange[idx][0]; ++idx) {
  ------------------
  |  Branch (1211:23): [True: 0, False: 0]
  ------------------
 1212|      0|            if (!strncmp(perl_regex + start + ly_strlen_const("\\p{Is"),
  ------------------
  |  |  472|      0|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (1212:17): [True: 0, False: 0]
  ------------------
 1213|      0|                    ublock2urange[idx][0], strlen(ublock2urange[idx][0]))) {
 1214|      0|                break;
 1215|      0|            }
 1216|      0|        }
 1217|      0|        if (!ublock2urange[idx][0]) {
  ------------------
  |  Branch (1217:13): [True: 0, False: 0]
  ------------------
 1218|      0|            LOGVAL(ctx, LY_VCODE_INREGEXP, pattern, perl_regex + start + 5, "unknown block name");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1219|      0|            return LY_EVALID;
 1220|      0|        }
 1221|       |
 1222|       |        /* make the space in the string and replace the block (but we cannot include brackets if it was already enclosed in them) */
 1223|      0|        for (idx2 = 0, idx = 0; idx2 < start; ++idx2) {
  ------------------
  |  Branch (1223:33): [True: 0, False: 0]
  ------------------
 1224|      0|            if ((perl_regex[idx2] == '[') && (!idx2 || (perl_regex[idx2 - 1] != '\\'))) {
  ------------------
  |  Branch (1224:17): [True: 0, False: 0]
  |  Branch (1224:47): [True: 0, False: 0]
  |  Branch (1224:56): [True: 0, False: 0]
  ------------------
 1225|      0|                ++idx;
 1226|      0|            }
 1227|      0|            if ((perl_regex[idx2] == ']') && (!idx2 || (perl_regex[idx2 - 1] != '\\'))) {
  ------------------
  |  Branch (1227:17): [True: 0, False: 0]
  |  Branch (1227:47): [True: 0, False: 0]
  |  Branch (1227:56): [True: 0, False: 0]
  ------------------
 1228|      0|                --idx;
 1229|      0|            }
 1230|      0|        }
 1231|      0|        if (idx) {
  ------------------
  |  Branch (1231:13): [True: 0, False: 0]
  ------------------
 1232|       |            /* skip brackets */
 1233|      0|            memmove(perl_regex + start + (URANGE_LEN - 2), perl_regex + end, strlen(perl_regex + end) + 1);
  ------------------
  |  | 1098|      0|#define URANGE_LEN 19
  ------------------
 1234|      0|            memcpy(perl_regex + start, ublock2urange[idx][1] + 1, URANGE_LEN - 2);
  ------------------
  |  | 1098|      0|#define URANGE_LEN 19
  ------------------
 1235|      0|        } else {
 1236|      0|            memmove(perl_regex + start + URANGE_LEN, perl_regex + end, strlen(perl_regex + end) + 1);
  ------------------
  |  | 1098|      0|#define URANGE_LEN 19
  ------------------
 1237|      0|            memcpy(perl_regex + start, ublock2urange[idx][1], URANGE_LEN);
  ------------------
  |  | 1098|      0|#define URANGE_LEN 19
  ------------------
 1238|      0|        }
 1239|      0|    }
 1240|       |
 1241|  42.1k|    return LY_SUCCESS;
 1242|  42.1k|}
schema_compile_node.c:lys_compile_type_:
 1756|   562k|{
 1757|   562k|    LY_ERR rc = LY_SUCCESS;
 1758|   562k|    struct lysc_type_bin *bin;
 1759|   562k|    struct lysc_type_num *num;
 1760|   562k|    struct lysc_type_str *str;
 1761|   562k|    struct lysc_type_bits *bits;
 1762|   562k|    struct lysc_type_enum *enumeration;
 1763|   562k|    struct lysc_type_dec *dec;
 1764|   562k|    struct lysc_type_identityref *idref;
 1765|   562k|    struct lysc_type_leafref *lref;
 1766|   562k|    struct lysc_type_union *un;
 1767|   562k|    struct lys_type_item *tpdf_item;
 1768|   562k|    const struct lysp_type *base_type_p;
 1769|   562k|    uint32_t i;
 1770|       |
 1771|       |    /* alloc and init */
 1772|   562k|    *type = lys_new_type(basetype);
 1773|   562k|    LY_CHECK_ERR_GOTO(!(*type), LOGMEM(ctx->ctx), cleanup);
  ------------------
  |  |  203|   562k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 562k]
  |  |  ------------------
  ------------------
 1774|       |
 1775|   562k|    (*type)->basetype = basetype;
 1776|   562k|    (*type)->plugin = plugin;
 1777|       |
 1778|   562k|    switch (basetype) {
  ------------------
  |  Branch (1778:13): [True: 0, False: 562k]
  ------------------
 1779|      0|    case LY_TYPE_BINARY:
  ------------------
  |  Branch (1779:5): [True: 0, False: 562k]
  ------------------
 1780|      0|        bin = (struct lysc_type_bin *)*type;
 1781|       |
 1782|       |        /* RFC 7950 9.8.1, 9.4.4 - length, number of octets it contains */
 1783|      0|        if (type_p->length) {
  ------------------
  |  Branch (1783:13): [True: 0, False: 0]
  ------------------
 1784|      0|            LY_CHECK_GOTO(rc = lys_compile_type_range(ctx, type_p->length, basetype, 1, 0,
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  |  Branch (202:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1785|      0|                    base ? ((struct lysc_type_bin *)base)->length : NULL, &bin->length), cleanup);
 1786|      0|            if (!tpdfname) {
  ------------------
  |  Branch (1786:17): [True: 0, False: 0]
  ------------------
 1787|      0|                COMPILE_EXTS_GOTO(ctx, type_p->length->exts, bin->length->exts, bin->length, rc, cleanup);
  ------------------
  |  |  230|      0|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 1788|      0|            }
 1789|      0|        }
 1790|      0|        break;
 1791|      0|    case LY_TYPE_BITS:
  ------------------
  |  Branch (1791:5): [True: 0, False: 562k]
  ------------------
 1792|       |        /* RFC 7950 9.7 - bits */
 1793|      0|        bits = (struct lysc_type_bits *)*type;
 1794|      0|        if (type_p->bits) {
  ------------------
  |  Branch (1794:13): [True: 0, False: 0]
  ------------------
 1795|       |            /* compile bits from this type */
 1796|      0|            LY_CHECK_GOTO(rc = lys_compile_type_enums(ctx, type_p->bits, basetype,
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  |  Branch (202:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1797|      0|                    base ? (struct lysc_type_bitenum_item *)((struct lysc_type_bits *)base)->bits : NULL,
 1798|      0|                    (struct lysc_type_bitenum_item **)&bits->bits), cleanup);
 1799|      0|        } else if (base) {
  ------------------
  |  Branch (1799:20): [True: 0, False: 0]
  ------------------
 1800|       |            /* recompile bits from the first superior type with bits */
 1801|      0|            assert(tpdf_chain->count > tpdf_chain_last);
 1802|      0|            base_type_p = NULL;
 1803|      0|            i = tpdf_chain->count;
 1804|      0|            do {
 1805|      0|                --i;
 1806|      0|                tpdf_item = tpdf_chain->objs[i];
 1807|       |
 1808|      0|                if (tpdf_item->tpdf->type.bits) {
  ------------------
  |  Branch (1808:21): [True: 0, False: 0]
  ------------------
 1809|      0|                    base_type_p = &tpdf_item->tpdf->type;
 1810|      0|                    break;
 1811|      0|                }
 1812|      0|            } while (i > tpdf_chain_last);
  ------------------
  |  Branch (1812:22): [True: 0, False: 0]
  ------------------
 1813|      0|            assert(base_type_p);
 1814|       |
 1815|      0|            LY_CHECK_GOTO(rc = lys_compile_type_enums(ctx, base_type_p->bits, basetype, NULL,
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1816|      0|                    (struct lysc_type_bitenum_item **)&bits->bits), cleanup);
 1817|      0|        } else {
 1818|       |            /* type derived from bits built-in type must contain at least one bit */
 1819|      0|            if (tpdfname) {
  ------------------
  |  Branch (1819:17): [True: 0, False: 0]
  ------------------
 1820|      0|                LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "bit", "bits type ", tpdfname);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1821|      0|            } else {
 1822|      0|                LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "bit", "bits type", "");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1823|      0|            }
 1824|      0|            rc = LY_EVALID;
 1825|      0|            goto cleanup;
 1826|      0|        }
 1827|      0|        break;
 1828|      0|    case LY_TYPE_DEC64:
  ------------------
  |  Branch (1828:5): [True: 0, False: 562k]
  ------------------
 1829|      0|        dec = (struct lysc_type_dec *)*type;
 1830|       |
 1831|       |        /* RFC 7950 9.3.4 - fraction-digits */
 1832|      0|        if (!base) {
  ------------------
  |  Branch (1832:13): [True: 0, False: 0]
  ------------------
 1833|      0|            if (!type_p->fraction_digits) {
  ------------------
  |  Branch (1833:17): [True: 0, False: 0]
  ------------------
 1834|      0|                if (tpdfname) {
  ------------------
  |  Branch (1834:21): [True: 0, False: 0]
  ------------------
 1835|      0|                    LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "fraction-digits", "decimal64 type ", tpdfname);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1836|      0|                } else {
 1837|      0|                    LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "fraction-digits", "decimal64 type", "");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1838|      0|                }
 1839|      0|                rc = LY_EVALID;
 1840|      0|                goto cleanup;
 1841|      0|            }
 1842|      0|            dec->fraction_digits = type_p->fraction_digits;
 1843|      0|        } else {
 1844|      0|            if (type_p->fraction_digits) {
  ------------------
  |  Branch (1844:17): [True: 0, False: 0]
  ------------------
 1845|       |                /* fraction digits is prohibited in types not directly derived from built-in decimal64 */
 1846|      0|                if (tpdfname) {
  ------------------
  |  Branch (1846:21): [True: 0, False: 0]
  ------------------
 1847|      0|                    LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1848|      0|                            "Invalid fraction-digits substatement for type \"%s\" not directly derived from decimal64 built-in type.",
 1849|      0|                            tpdfname);
 1850|      0|                } else {
 1851|      0|                    LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1852|      0|                            "Invalid fraction-digits substatement for type not directly derived from decimal64 built-in type.");
 1853|      0|                }
 1854|      0|                rc = LY_EVALID;
 1855|      0|                goto cleanup;
 1856|      0|            }
 1857|      0|            dec->fraction_digits = ((struct lysc_type_dec *)base)->fraction_digits;
 1858|      0|        }
 1859|       |
 1860|       |        /* RFC 7950 9.2.4 - range */
 1861|      0|        if (type_p->range) {
  ------------------
  |  Branch (1861:13): [True: 0, False: 0]
  ------------------
 1862|      0|            LY_CHECK_GOTO(rc = lys_compile_type_range(ctx, type_p->range, basetype, 0, dec->fraction_digits,
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  |  Branch (202:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1863|      0|                    base ? ((struct lysc_type_dec *)base)->range : NULL, &dec->range), cleanup);
 1864|      0|            if (!tpdfname) {
  ------------------
  |  Branch (1864:17): [True: 0, False: 0]
  ------------------
 1865|      0|                COMPILE_EXTS_GOTO(ctx, type_p->range->exts, dec->range->exts, dec->range, rc, cleanup);
  ------------------
  |  |  230|      0|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 1866|      0|            }
 1867|      0|        }
 1868|      0|        break;
 1869|   210k|    case LY_TYPE_STRING:
  ------------------
  |  Branch (1869:5): [True: 210k, False: 351k]
  ------------------
 1870|   210k|        str = (struct lysc_type_str *)*type;
 1871|       |
 1872|       |        /* RFC 7950 9.4.4 - length */
 1873|   210k|        if (type_p->length) {
  ------------------
  |  Branch (1873:13): [True: 70.2k, False: 140k]
  ------------------
 1874|  70.2k|            LY_CHECK_GOTO(rc = lys_compile_type_range(ctx, type_p->length, basetype, 1, 0,
  ------------------
  |  |  202|   140k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 70.2k]
  |  |  |  Branch (202:40): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 1875|  70.2k|                    base ? ((struct lysc_type_str *)base)->length : NULL, &str->length), cleanup);
 1876|  70.2k|            if (!tpdfname) {
  ------------------
  |  Branch (1876:17): [True: 56.2k, False: 14.0k]
  ------------------
 1877|  56.2k|                COMPILE_EXTS_GOTO(ctx, type_p->length->exts, str->length->exts, str->length, rc, cleanup);
  ------------------
  |  |  230|  56.2k|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 56.2k]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 1878|  56.2k|            }
 1879|   140k|        } else if (base && ((struct lysc_type_str *)base)->length) {
  ------------------
  |  Branch (1879:20): [True: 0, False: 140k]
  |  Branch (1879:28): [True: 0, False: 0]
  ------------------
 1880|      0|            str->length = lysc_range_dup(ctx, ((struct lysc_type_str *)base)->length, tpdf_chain, tpdf_chain_last);
 1881|      0|        }
 1882|       |
 1883|       |        /* RFC 7950 9.4.5 - pattern */
 1884|   210k|        if (type_p->patterns) {
  ------------------
  |  Branch (1884:13): [True: 28.1k, False: 182k]
  ------------------
 1885|  28.1k|            LY_CHECK_GOTO(rc = lys_compile_type_patterns(ctx, type_p->patterns,
  ------------------
  |  |  202|  56.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  |  Branch (202:40): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 1886|  28.1k|                    base ? ((struct lysc_type_str *)base)->patterns : NULL, &str->patterns), cleanup);
 1887|   182k|        } else if (base && ((struct lysc_type_str *)base)->patterns) {
  ------------------
  |  Branch (1887:20): [True: 0, False: 182k]
  |  Branch (1887:28): [True: 0, False: 0]
  ------------------
 1888|      0|            str->patterns = lysc_patterns_dup(ctx->ctx, ((struct lysc_type_str *)base)->patterns);
 1889|      0|        }
 1890|   210k|        break;
 1891|   210k|    case LY_TYPE_ENUM:
  ------------------
  |  Branch (1891:5): [True: 42.1k, False: 520k]
  ------------------
 1892|  42.1k|        enumeration = (struct lysc_type_enum *)*type;
 1893|       |
 1894|       |        /* RFC 7950 9.6 - enum */
 1895|  42.1k|        if (type_p->enums) {
  ------------------
  |  Branch (1895:13): [True: 42.1k, False: 0]
  ------------------
 1896|  42.1k|            LY_CHECK_GOTO(rc = lys_compile_type_enums(ctx, type_p->enums, basetype,
  ------------------
  |  |  202|  84.3k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 42.1k]
  |  |  |  Branch (202:40): [True: 0, False: 42.1k]
  |  |  ------------------
  ------------------
 1897|  42.1k|                    base ? ((struct lysc_type_enum *)base)->enums : NULL, &enumeration->enums), cleanup);
 1898|  42.1k|        } else if (base) {
  ------------------
  |  Branch (1898:20): [True: 0, False: 0]
  ------------------
 1899|       |            /* recompile enums from the first superior type with enums */
 1900|      0|            assert(tpdf_chain->count > tpdf_chain_last);
 1901|      0|            base_type_p = NULL;
 1902|      0|            i = tpdf_chain->count;
 1903|      0|            do {
 1904|      0|                --i;
 1905|      0|                tpdf_item = tpdf_chain->objs[i];
 1906|       |
 1907|      0|                if (tpdf_item->tpdf->type.enums) {
  ------------------
  |  Branch (1907:21): [True: 0, False: 0]
  ------------------
 1908|      0|                    base_type_p = &tpdf_item->tpdf->type;
 1909|      0|                    break;
 1910|      0|                }
 1911|      0|            } while (i > tpdf_chain_last);
  ------------------
  |  Branch (1911:22): [True: 0, False: 0]
  ------------------
 1912|      0|            assert(base_type_p);
 1913|       |
 1914|      0|            LY_CHECK_GOTO(rc = lys_compile_type_enums(ctx, base_type_p->enums, basetype, NULL, &enumeration->enums), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1915|      0|        } else {
 1916|       |            /* type derived from enumerations built-in type must contain at least one enum */
 1917|      0|            if (tpdfname) {
  ------------------
  |  Branch (1917:17): [True: 0, False: 0]
  ------------------
 1918|      0|                LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "enum", "enumeration type ", tpdfname);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1919|      0|            } else {
 1920|      0|                LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "enum", "enumeration type", "");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1921|      0|            }
 1922|      0|            rc = LY_EVALID;
 1923|      0|            goto cleanup;
 1924|      0|        }
 1925|  42.1k|        break;
 1926|  42.1k|    case LY_TYPE_INT8:
  ------------------
  |  Branch (1926:5): [True: 0, False: 562k]
  ------------------
 1927|      0|    case LY_TYPE_UINT8:
  ------------------
  |  Branch (1927:5): [True: 0, False: 562k]
  ------------------
 1928|      0|    case LY_TYPE_INT16:
  ------------------
  |  Branch (1928:5): [True: 0, False: 562k]
  ------------------
 1929|      0|    case LY_TYPE_UINT16:
  ------------------
  |  Branch (1929:5): [True: 0, False: 562k]
  ------------------
 1930|      0|    case LY_TYPE_INT32:
  ------------------
  |  Branch (1930:5): [True: 0, False: 562k]
  ------------------
 1931|  28.1k|    case LY_TYPE_UINT32:
  ------------------
  |  Branch (1931:5): [True: 28.1k, False: 534k]
  ------------------
 1932|  28.1k|    case LY_TYPE_INT64:
  ------------------
  |  Branch (1932:5): [True: 0, False: 562k]
  ------------------
 1933|  28.1k|    case LY_TYPE_UINT64:
  ------------------
  |  Branch (1933:5): [True: 0, False: 562k]
  ------------------
 1934|  28.1k|        num = (struct lysc_type_num *)*type;
 1935|       |
 1936|       |        /* RFC 6020 9.2.4 - range */
 1937|  28.1k|        if (type_p->range) {
  ------------------
  |  Branch (1937:13): [True: 28.1k, False: 0]
  ------------------
 1938|  28.1k|            LY_CHECK_GOTO(rc = lys_compile_type_range(ctx, type_p->range, basetype, 0, 0,
  ------------------
  |  |  202|  56.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  |  Branch (202:40): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 1939|  28.1k|                    base ? ((struct lysc_type_num *)base)->range : NULL, &num->range), cleanup);
 1940|  28.1k|            if (!tpdfname) {
  ------------------
  |  Branch (1940:17): [True: 28.1k, False: 0]
  ------------------
 1941|  28.1k|                COMPILE_EXTS_GOTO(ctx, type_p->range->exts, num->range->exts, num->range, rc, cleanup);
  ------------------
  |  |  230|  28.1k|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 28.1k]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 1942|  28.1k|            }
 1943|  28.1k|        }
 1944|  28.1k|        break;
 1945|  28.1k|    case LY_TYPE_IDENT:
  ------------------
  |  Branch (1945:5): [True: 14.0k, False: 548k]
  ------------------
 1946|  14.0k|        idref = (struct lysc_type_identityref *)*type;
 1947|       |
 1948|       |        /* RFC 7950 9.10.2 - base */
 1949|  14.0k|        if (type_p->bases) {
  ------------------
  |  Branch (1949:13): [True: 14.0k, False: 0]
  ------------------
 1950|  14.0k|            if (base) {
  ------------------
  |  Branch (1950:17): [True: 0, False: 14.0k]
  ------------------
 1951|       |                /* only the directly derived identityrefs can contain base specification */
 1952|      0|                if (tpdfname) {
  ------------------
  |  Branch (1952:21): [True: 0, False: 0]
  ------------------
 1953|      0|                    LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1954|      0|                            "Invalid base substatement for the type \"%s\" not directly derived from identityref built-in type.",
 1955|      0|                            tpdfname);
 1956|      0|                } else {
 1957|      0|                    LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1958|      0|                            "Invalid base substatement for the type not directly derived from identityref built-in type.");
 1959|      0|                }
 1960|      0|                rc = LY_EVALID;
 1961|      0|                goto cleanup;
 1962|      0|            }
 1963|  14.0k|            LY_CHECK_GOTO(rc = lys_compile_identity_bases(ctx, type_p->pmod, type_p->bases, NULL, &idref->bases), cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 1964|  14.0k|        } else if (base) {
  ------------------
  |  Branch (1964:20): [True: 0, False: 0]
  ------------------
 1965|       |            /* copy all the bases */
 1966|      0|            const struct lysc_type_identityref *idref_base = (struct lysc_type_identityref *)base;
 1967|      0|            LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1968|       |
 1969|      0|            LY_ARRAY_CREATE_GOTO(ctx->ctx, idref->bases, LY_ARRAY_COUNT(idref_base->bases), rc, cleanup);
  ------------------
  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  ------------------
  |  |  |  |  133|      0|    { \
  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  141|      0|            } \
  |  |  |  |  142|      0|        } else { \
  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  147|      0|            } \
  |  |  |  |  148|      0|        } \
  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  153|      0|        } \
  |  |  |  |  154|      0|    }
  |  |  ------------------
  ------------------
 1970|      0|            LY_ARRAY_FOR(idref_base->bases, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1971|      0|                idref->bases[u] = idref_base->bases[u];
 1972|      0|                LY_ARRAY_INCREMENT(idref->bases);
  ------------------
  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
 1973|      0|            }
 1974|      0|        } else {
 1975|       |            /* type derived from identityref built-in type must contain at least one base */
 1976|      0|            if (tpdfname) {
  ------------------
  |  Branch (1976:17): [True: 0, False: 0]
  ------------------
 1977|      0|                LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "base", "identityref type ", tpdfname);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1978|      0|            } else {
 1979|      0|                LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "base", "identityref type", "");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1980|      0|            }
 1981|      0|            rc = LY_EVALID;
 1982|      0|            goto cleanup;
 1983|      0|        }
 1984|  14.0k|        break;
 1985|  70.2k|    case LY_TYPE_LEAFREF:
  ------------------
  |  Branch (1985:5): [True: 70.2k, False: 492k]
  ------------------
 1986|  70.2k|        lref = (struct lysc_type_leafref *)*type;
 1987|       |
 1988|       |        /* RFC 7950 9.9.3 - require-instance */
 1989|  70.2k|        if (type_p->flags & LYS_SET_REQINST) {
  ------------------
  |  |  699|  70.2k|#define LYS_SET_REQINST  0x0200      /**< type's flag for present require-instance substatement */
  ------------------
  |  Branch (1989:13): [True: 0, False: 70.2k]
  ------------------
 1990|      0|            if (type_p->pmod->version < LYS_VERSION_1_1) {
  ------------------
  |  Branch (1990:17): [True: 0, False: 0]
  ------------------
 1991|      0|                if (tpdfname) {
  ------------------
  |  Branch (1991:21): [True: 0, False: 0]
  ------------------
 1992|      0|                    LOGVAL(ctx->ctx, LYVE_SEMANTICS,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1993|      0|                            "Leafref type \"%s\" can be restricted by require-instance statement only in YANG 1.1 modules.", tpdfname);
 1994|      0|                } else {
 1995|      0|                    LOGVAL(ctx->ctx, LYVE_SEMANTICS,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1996|      0|                            "Leafref type can be restricted by require-instance statement only in YANG 1.1 modules.");
 1997|      0|                }
 1998|      0|                rc = LY_EVALID;
 1999|      0|                goto cleanup;
 2000|      0|            }
 2001|      0|            lref->require_instance = type_p->require_instance;
 2002|  70.2k|        } else if (base) {
  ------------------
  |  Branch (2002:20): [True: 0, False: 70.2k]
  ------------------
 2003|       |            /* inherit */
 2004|      0|            lref->require_instance = ((struct lysc_type_leafref *)base)->require_instance;
 2005|  70.2k|        } else {
 2006|       |            /* default is true */
 2007|  70.2k|            lref->require_instance = 1;
 2008|  70.2k|        }
 2009|  70.2k|        if (type_p->path) {
  ------------------
  |  Branch (2009:13): [True: 70.2k, False: 0]
  ------------------
 2010|  70.2k|            LY_VALUE_FORMAT format;
 2011|       |
 2012|  70.2k|            LY_CHECK_GOTO(rc = lyxp_expr_dup(ctx->ctx, type_p->path, 0, 0, &lref->path), cleanup);
  ------------------
  |  |  202|  70.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 2013|  70.2k|            LY_CHECK_GOTO(lyplg_type_prefix_data_new(ctx->ctx, type_p->path->expr, strlen(type_p->path->expr),
  ------------------
  |  |  202|  70.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 2014|  70.2k|                    LY_VALUE_SCHEMA, type_p->pmod, &format, (void **)&lref->prefixes), cleanup);
 2015|  70.2k|        } else if (base) {
  ------------------
  |  Branch (2015:20): [True: 0, False: 0]
  ------------------
 2016|      0|            LY_CHECK_GOTO(rc = lyxp_expr_dup(ctx->ctx, ((struct lysc_type_leafref *)base)->path, 0, 0, &lref->path), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2017|      0|            LY_CHECK_GOTO(rc = lyplg_type_prefix_data_dup(ctx->ctx, LY_VALUE_SCHEMA_RESOLVED,
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2018|      0|                    ((struct lysc_type_leafref *)base)->prefixes, (void **)&lref->prefixes), cleanup);
 2019|      0|        } else {
 2020|       |            /* type derived from leafref built-in type must contain path */
 2021|      0|            if (tpdfname) {
  ------------------
  |  Branch (2021:17): [True: 0, False: 0]
  ------------------
 2022|      0|                LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "path", "leafref type ", tpdfname);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2023|      0|            } else {
 2024|      0|                LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "path", "leafref type", "");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2025|      0|            }
 2026|      0|            rc = LY_EVALID;
 2027|      0|            goto cleanup;
 2028|      0|        }
 2029|  70.2k|        break;
 2030|  70.2k|    case LY_TYPE_INST:
  ------------------
  |  Branch (2030:5): [True: 0, False: 562k]
  ------------------
 2031|       |        /* RFC 7950 9.9.3 - require-instance */
 2032|      0|        if (type_p->flags & LYS_SET_REQINST) {
  ------------------
  |  |  699|      0|#define LYS_SET_REQINST  0x0200      /**< type's flag for present require-instance substatement */
  ------------------
  |  Branch (2032:13): [True: 0, False: 0]
  ------------------
 2033|      0|            ((struct lysc_type_instanceid *)*type)->require_instance = type_p->require_instance;
 2034|      0|        } else {
 2035|       |            /* default is true */
 2036|      0|            ((struct lysc_type_instanceid *)*type)->require_instance = 1;
 2037|      0|        }
 2038|      0|        break;
 2039|   112k|    case LY_TYPE_UNION:
  ------------------
  |  Branch (2039:5): [True: 112k, False: 449k]
  ------------------
 2040|   112k|        un = (struct lysc_type_union *)*type;
 2041|       |
 2042|       |        /* RFC 7950 7.4 - type */
 2043|   112k|        if (type_p->types) {
  ------------------
  |  Branch (2043:13): [True: 112k, False: 0]
  ------------------
 2044|   112k|            if (base) {
  ------------------
  |  Branch (2044:17): [True: 0, False: 112k]
  ------------------
 2045|       |                /* only the directly derived union can contain types specification */
 2046|      0|                if (tpdfname) {
  ------------------
  |  Branch (2046:21): [True: 0, False: 0]
  ------------------
 2047|      0|                    LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2048|      0|                            "Invalid type substatement for the type \"%s\" not directly derived from union built-in type.",
 2049|      0|                            tpdfname);
 2050|      0|                } else {
 2051|      0|                    LOGVAL(ctx->ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2052|      0|                            "Invalid type substatement for the type not directly derived from union built-in type.");
 2053|      0|                }
 2054|      0|                rc = LY_EVALID;
 2055|      0|                goto cleanup;
 2056|      0|            }
 2057|       |            /* compile the type */
 2058|   112k|            LY_CHECK_GOTO(rc = lys_compile_type_union(ctx, type_p->types, context_pnode, context_flags, context_name,
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 2059|   112k|                    &un->types), cleanup);
 2060|   112k|        } else if (base) {
  ------------------
  |  Branch (2060:20): [True: 0, False: 0]
  ------------------
 2061|       |            /* copy all the types */
 2062|      0|            const struct lysc_type_union *un_base = (struct lysc_type_union *)base;
 2063|      0|            LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 2064|       |
 2065|      0|            LY_ARRAY_CREATE_GOTO(ctx->ctx, un->types, LY_ARRAY_COUNT(un_base->types), rc, cleanup);
  ------------------
  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  ------------------
  |  |  |  |  133|      0|    { \
  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  141|      0|            } \
  |  |  |  |  142|      0|        } else { \
  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  147|      0|            } \
  |  |  |  |  148|      0|        } \
  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  153|      0|        } \
  |  |  |  |  154|      0|    }
  |  |  ------------------
  ------------------
 2066|      0|            LY_ARRAY_FOR(un_base->types, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2067|      0|                un->types[u] = un_base->types[u];
 2068|      0|                LY_ATOMIC_INC_BARRIER(un->types[u]->refcount);
  ------------------
  |  |   35|      0|# define LY_ATOMIC_INC_BARRIER(var) __sync_fetch_and_add(&(var), 1)
  ------------------
 2069|      0|                LY_ARRAY_INCREMENT(un->types);
  ------------------
  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
 2070|      0|            }
 2071|      0|        } else {
 2072|       |            /* type derived from union built-in type must contain at least one type */
 2073|      0|            if (tpdfname) {
  ------------------
  |  Branch (2073:17): [True: 0, False: 0]
  ------------------
 2074|      0|                LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "type", "union type ", tpdfname);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2075|      0|            } else {
 2076|      0|                LOGVAL(ctx->ctx, LY_VCODE_MISSCHILDSTMT, "type", "union type", "");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2077|      0|            }
 2078|      0|            rc = LY_EVALID;
 2079|      0|            goto cleanup;
 2080|      0|        }
 2081|   112k|        break;
 2082|   112k|    case LY_TYPE_BOOL:
  ------------------
  |  Branch (2082:5): [True: 28.1k, False: 534k]
  ------------------
 2083|  84.3k|    case LY_TYPE_EMPTY:
  ------------------
  |  Branch (2083:5): [True: 56.2k, False: 506k]
  ------------------
 2084|  84.3k|    case LY_TYPE_UNKNOWN: /* just to complete switch */
  ------------------
  |  Branch (2084:5): [True: 0, False: 562k]
  ------------------
 2085|  84.3k|        break;
 2086|   562k|    }
 2087|       |
 2088|   562k|    if (tpdf_chain->count > tpdf_chain_last) {
  ------------------
  |  Branch (2088:9): [True: 0, False: 562k]
  ------------------
 2089|      0|        i = tpdf_chain->count;
 2090|      0|        do {
 2091|      0|            --i;
 2092|      0|            tpdf_item = tpdf_chain->objs[i];
 2093|       |
 2094|       |            /* compile previous typedefs extensions */
 2095|      0|            COMPILE_EXTS_GOTO(ctx, tpdf_item->tpdf->type.exts, (*type)->exts, *type, rc, cleanup);
  ------------------
  |  |  230|      0|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 2096|      0|        } while (i > tpdf_chain_last);
  ------------------
  |  Branch (2096:18): [True: 0, False: 0]
  ------------------
 2097|      0|    }
 2098|       |
 2099|       |    /* compile new parsed extensions */
 2100|   562k|    COMPILE_EXTS_GOTO(ctx, type_p->exts, (*type)->exts, *type, rc, cleanup);
  ------------------
  |  |  230|   562k|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 562k]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 2101|       |
 2102|   562k|cleanup:
 2103|   562k|    if (rc) {
  ------------------
  |  Branch (2103:9): [True: 0, False: 562k]
  ------------------
 2104|      0|        LY_ATOMIC_INC_BARRIER((*type)->refcount);
  ------------------
  |  |   35|      0|# define LY_ATOMIC_INC_BARRIER(var) __sync_fetch_and_add(&(var), 1)
  ------------------
 2105|      0|        lysc_type_free(&ctx->free_ctx, *type);
 2106|      0|        *type = NULL;
 2107|      0|    }
 2108|   562k|    return rc;
 2109|   562k|}
schema_compile_node.c:lys_new_type:
 1683|   562k|{
 1684|   562k|    struct lysc_type *type = NULL;
 1685|       |
 1686|   562k|    switch (basetype) {
  ------------------
  |  Branch (1686:13): [True: 0, False: 562k]
  ------------------
 1687|      0|    case LY_TYPE_BINARY:
  ------------------
  |  Branch (1687:5): [True: 0, False: 562k]
  ------------------
 1688|      0|        type = calloc(1, sizeof(struct lysc_type_bin));
 1689|      0|        break;
 1690|      0|    case LY_TYPE_BITS:
  ------------------
  |  Branch (1690:5): [True: 0, False: 562k]
  ------------------
 1691|      0|        type = calloc(1, sizeof(struct lysc_type_bits));
 1692|      0|        break;
 1693|      0|    case LY_TYPE_DEC64:
  ------------------
  |  Branch (1693:5): [True: 0, False: 562k]
  ------------------
 1694|      0|        type = calloc(1, sizeof(struct lysc_type_dec));
 1695|      0|        break;
 1696|   210k|    case LY_TYPE_STRING:
  ------------------
  |  Branch (1696:5): [True: 210k, False: 351k]
  ------------------
 1697|   210k|        type = calloc(1, sizeof(struct lysc_type_str));
 1698|   210k|        break;
 1699|  42.1k|    case LY_TYPE_ENUM:
  ------------------
  |  Branch (1699:5): [True: 42.1k, False: 520k]
  ------------------
 1700|  42.1k|        type = calloc(1, sizeof(struct lysc_type_enum));
 1701|  42.1k|        break;
 1702|      0|    case LY_TYPE_INT8:
  ------------------
  |  Branch (1702:5): [True: 0, False: 562k]
  ------------------
 1703|      0|    case LY_TYPE_UINT8:
  ------------------
  |  Branch (1703:5): [True: 0, False: 562k]
  ------------------
 1704|      0|    case LY_TYPE_INT16:
  ------------------
  |  Branch (1704:5): [True: 0, False: 562k]
  ------------------
 1705|      0|    case LY_TYPE_UINT16:
  ------------------
  |  Branch (1705:5): [True: 0, False: 562k]
  ------------------
 1706|      0|    case LY_TYPE_INT32:
  ------------------
  |  Branch (1706:5): [True: 0, False: 562k]
  ------------------
 1707|  28.1k|    case LY_TYPE_UINT32:
  ------------------
  |  Branch (1707:5): [True: 28.1k, False: 534k]
  ------------------
 1708|  28.1k|    case LY_TYPE_INT64:
  ------------------
  |  Branch (1708:5): [True: 0, False: 562k]
  ------------------
 1709|  28.1k|    case LY_TYPE_UINT64:
  ------------------
  |  Branch (1709:5): [True: 0, False: 562k]
  ------------------
 1710|  28.1k|        type = calloc(1, sizeof(struct lysc_type_num));
 1711|  28.1k|        break;
 1712|  14.0k|    case LY_TYPE_IDENT:
  ------------------
  |  Branch (1712:5): [True: 14.0k, False: 548k]
  ------------------
 1713|  14.0k|        type = calloc(1, sizeof(struct lysc_type_identityref));
 1714|  14.0k|        break;
 1715|  70.2k|    case LY_TYPE_LEAFREF:
  ------------------
  |  Branch (1715:5): [True: 70.2k, False: 492k]
  ------------------
 1716|  70.2k|        type = calloc(1, sizeof(struct lysc_type_leafref));
 1717|  70.2k|        break;
 1718|      0|    case LY_TYPE_INST:
  ------------------
  |  Branch (1718:5): [True: 0, False: 562k]
  ------------------
 1719|      0|        type = calloc(1, sizeof(struct lysc_type_instanceid));
 1720|      0|        break;
 1721|   112k|    case LY_TYPE_UNION:
  ------------------
  |  Branch (1721:5): [True: 112k, False: 449k]
  ------------------
 1722|   112k|        type = calloc(1, sizeof(struct lysc_type_union));
 1723|   112k|        break;
 1724|  28.1k|    case LY_TYPE_BOOL:
  ------------------
  |  Branch (1724:5): [True: 28.1k, False: 534k]
  ------------------
 1725|  84.3k|    case LY_TYPE_EMPTY:
  ------------------
  |  Branch (1725:5): [True: 56.2k, False: 506k]
  ------------------
 1726|  84.3k|        type = calloc(1, sizeof(struct lysc_type));
 1727|  84.3k|        break;
 1728|      0|    case LY_TYPE_UNKNOWN:
  ------------------
  |  Branch (1728:5): [True: 0, False: 562k]
  ------------------
 1729|      0|        break;
 1730|   562k|    }
 1731|       |
 1732|   562k|    return type;
 1733|   562k|}
schema_compile_node.c:lys_compile_type_union:
 1628|   112k|{
 1629|   112k|    LY_ERR ret = LY_SUCCESS;
 1630|   112k|    struct lysc_type **utypes = *utypes_p;
 1631|   112k|    struct lysc_type_union *un_aux = NULL;
 1632|       |
 1633|   112k|    LY_ARRAY_CREATE_GOTO(ctx->ctx, utypes, LY_ARRAY_COUNT(ptypes), ret, error);
  ------------------
  |  |  187|   112k|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  ------------------
  |  |  |  |  133|   112k|    { \
  |  |  |  |  134|   112k|        char *p__; \
  |  |  |  |  135|   112k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:13): [True: 0, False: 112k]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  141|      0|            } \
  |  |  |  |  142|   112k|        } else { \
  |  |  |  |  143|   224k|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (143:68): [True: 112k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  144|   112k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (144:17): [True: 0, False: 112k]
  |  |  |  |  ------------------
  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  147|      0|            } \
  |  |  |  |  148|   112k|        } \
  |  |  |  |  149|   112k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  150|   112k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  151|   112k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (151:13): [True: 112k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  152|   224k|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (152:70): [True: 112k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  153|   112k|        } \
  |  |  |  |  154|   112k|    }
  |  |  ------------------
  ------------------
 1634|   337k|    for (LY_ARRAY_COUNT_TYPE u = 0, additional = 0; u < LY_ARRAY_COUNT(ptypes); ++u) {
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
                  for (LY_ARRAY_COUNT_TYPE u = 0, additional = 0; u < LY_ARRAY_COUNT(ptypes); ++u) {
  ------------------
  |  |  148|   337k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 337k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1634:53): [True: 224k, False: 112k]
  ------------------
 1635|   224k|        ret = lys_compile_type(ctx, context_pnode, context_flags, context_name, &ptypes[u], &utypes[u + additional],
 1636|   224k|                NULL, NULL);
 1637|   224k|        LY_CHECK_GOTO(ret, error);
  ------------------
  |  |  202|   224k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 224k]
  |  |  ------------------
  ------------------
 1638|   224k|        LY_ATOMIC_INC_BARRIER(utypes[u + additional]->refcount);
  ------------------
  |  |   35|   224k|# define LY_ATOMIC_INC_BARRIER(var) __sync_fetch_and_add(&(var), 1)
  ------------------
 1639|       |
 1640|   224k|        if (utypes[u + additional]->basetype == LY_TYPE_UNION) {
  ------------------
  |  Branch (1640:13): [True: 0, False: 224k]
  ------------------
 1641|       |            /* add space for additional types from the union subtype */
 1642|      0|            un_aux = (struct lysc_type_union *)utypes[u + additional];
 1643|      0|            LY_ARRAY_CREATE_GOTO(ctx->ctx, utypes,
  ------------------
  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  ------------------
  |  |  |  |  133|      0|    { \
  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  141|      0|            } \
  |  |  |  |  142|      0|        } else { \
  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  147|      0|            } \
  |  |  |  |  148|      0|        } \
  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  153|      0|        } \
  |  |  |  |  154|      0|    }
  |  |  ------------------
  ------------------
 1644|      0|                    LY_ARRAY_COUNT(ptypes) + additional + LY_ARRAY_COUNT(un_aux->types) - LY_ARRAY_COUNT(utypes), ret, error);
 1645|       |
 1646|       |            /* copy subtypes of the subtype union */
 1647|      0|            for (LY_ARRAY_COUNT_TYPE v = 0; v < LY_ARRAY_COUNT(un_aux->types); ++v) {
  ------------------
  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
                          for (LY_ARRAY_COUNT_TYPE v = 0; v < LY_ARRAY_COUNT(un_aux->types); ++v) {
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1647:45): [True: 0, False: 0]
  ------------------
 1648|      0|                utypes[u + additional] = un_aux->types[v];
 1649|      0|                LY_ATOMIC_INC_BARRIER(un_aux->types[v]->refcount);
  ------------------
  |  |   35|      0|# define LY_ATOMIC_INC_BARRIER(var) __sync_fetch_and_add(&(var), 1)
  ------------------
 1650|      0|                ++additional;
 1651|      0|                LY_ARRAY_INCREMENT(utypes);
  ------------------
  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
 1652|      0|            }
 1653|       |            /* compensate u increment in main loop */
 1654|      0|            --additional;
 1655|       |
 1656|       |            /* free the replaced union subtype */
 1657|      0|            lysc_type_free(&ctx->free_ctx, (struct lysc_type *)un_aux);
 1658|      0|            un_aux = NULL;
 1659|   224k|        } else {
 1660|   224k|            LY_ARRAY_INCREMENT(utypes);
  ------------------
  |  |  198|   224k|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
 1661|   224k|        }
 1662|   224k|    }
 1663|       |
 1664|   112k|    *utypes_p = utypes;
 1665|   112k|    return LY_SUCCESS;
 1666|       |
 1667|      0|error:
 1668|      0|    if (un_aux) {
  ------------------
  |  Branch (1668:9): [True: 0, False: 0]
  ------------------
 1669|      0|        lysc_type_free(&ctx->free_ctx, (struct lysc_type *)un_aux);
 1670|      0|    }
 1671|      0|    *utypes_p = utypes;
 1672|      0|    return ret;
 1673|   112k|}
schema_compile_node.c:lys_compile_node_uniqness:
 2323|   899k|{
 2324|   899k|    const struct lysc_node *iter, *iter2;
 2325|   899k|    const struct lysc_node_action *actions;
 2326|   899k|    const struct lysc_node_notif *notifs;
 2327|   899k|    uint32_t getnext_flags;
 2328|   899k|    struct ly_set parent_choices = {0};
 2329|       |
 2330|   899k|#define CHECK_NODE(iter, exclude, name) (iter != (void *)exclude && (iter)->module == exclude->module && !strcmp(name, (iter)->name))
 2331|       |
 2332|   899k|    if (exclude->nodetype == LYS_CASE) {
  ------------------
  |  |  247|   899k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
  |  Branch (2332:9): [True: 28.1k, False: 871k]
  ------------------
 2333|       |        /* check restricted only to all the cases */
 2334|  28.1k|        assert(parent->nodetype == LYS_CHOICE);
 2335|  42.1k|        LY_LIST_FOR(lysc_node_child(parent), iter) {
  ------------------
  |  |  181|  28.1k|    for ((ELEM) = (START); \
  |  |  182|  70.2k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 42.1k, False: 28.1k]
  |  |  ------------------
  |  |  183|  42.1k|         (ELEM) = (ELEM)->next)
  ------------------
 2336|  42.1k|            if (CHECK_NODE(iter, exclude, name)) {
  ------------------
  |  | 2330|  42.1k|#define CHECK_NODE(iter, exclude, name) (iter != (void *)exclude && (iter)->module == exclude->module && !strcmp(name, (iter)->name))
  |  |  ------------------
  |  |  |  Branch (2330:42): [True: 14.0k, False: 28.1k]
  |  |  |  Branch (2330:69): [True: 14.0k, False: 0]
  |  |  |  Branch (2330:106): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 2337|      0|                LOGVAL(ctx->ctx, LY_VCODE_DUPIDENT, name, "case");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2338|      0|                return LY_EEXIST;
 2339|      0|            }
 2340|  42.1k|        }
 2341|       |
 2342|  28.1k|        return LY_SUCCESS;
 2343|  28.1k|    }
 2344|       |
 2345|       |    /* no reason for our parent to be choice anymore */
 2346|   871k|    assert(!parent || (parent->nodetype != LYS_CHOICE));
 2347|       |
 2348|   871k|    if (parent && (parent->nodetype == LYS_CASE)) {
  ------------------
  |  |  247|   801k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
  |  Branch (2348:9): [True: 801k, False: 70.2k]
  |  Branch (2348:19): [True: 28.1k, False: 773k]
  ------------------
 2349|       |        /* move to the first data definition parent */
 2350|       |
 2351|       |        /* but remember the choice nodes on the parents path to avoid believe they collide with our node */
 2352|  28.1k|        iter = lysc_data_parent(parent);
  ------------------
  |  | 1780|  28.1k|#define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
  |  |  ------------------
  |  |  |  Branch (1780:49): [True: 28.1k, False: 0]
  |  |  ------------------
  ------------------
 2353|  56.2k|        do {
 2354|  56.2k|            parent = parent->parent;
 2355|  56.2k|            if (parent && (parent->nodetype == LYS_CHOICE)) {
  ------------------
  |  |  241|  56.2k|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
  |  Branch (2355:17): [True: 56.2k, False: 0]
  |  Branch (2355:27): [True: 28.1k, False: 28.1k]
  ------------------
 2356|  28.1k|                ly_set_add(&parent_choices, (void *)parent, 1, NULL);
 2357|  28.1k|            }
 2358|  56.2k|        } while (parent != iter);
  ------------------
  |  Branch (2358:18): [True: 28.1k, False: 28.1k]
  ------------------
 2359|  28.1k|    }
 2360|       |
 2361|   871k|    getnext_flags = LYS_GETNEXT_WITHCHOICE;
  ------------------
  |  | 2188|   871k|#define LYS_GETNEXT_WITHCHOICE   0x01 /**< ::lys_getnext() option to allow returning #LYS_CHOICE nodes instead of looking into them */
  ------------------
 2362|   871k|    if (parent && (parent->nodetype & (LYS_RPC | LYS_ACTION))) {
  ------------------
  |  |  249|   801k|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
                  if (parent && (parent->nodetype & (LYS_RPC | LYS_ACTION))) {
  ------------------
  |  |  250|   801k|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
  |  Branch (2362:9): [True: 801k, False: 70.2k]
  |  Branch (2362:19): [True: 0, False: 801k]
  ------------------
 2363|       |        /* move to the inout to avoid traversing a not-filled-yet (the other) node */
 2364|      0|        if (exclude->flags & LYS_IS_OUTPUT) {
  ------------------
  |  |  720|      0|#define LYS_IS_OUTPUT    0x2000      /**< flag for nodes that are in the subtree of an output statement */
  ------------------
  |  Branch (2364:13): [True: 0, False: 0]
  ------------------
 2365|      0|            getnext_flags |= LYS_GETNEXT_OUTPUT;
  ------------------
  |  | 2192|      0|#define LYS_GETNEXT_OUTPUT       0x10 /**< ::lys_getnext() option to provide RPC's/action's output schema nodes instead of input schema nodes
  ------------------
 2366|      0|            parent = lysc_node_child(parent)->next;
 2367|      0|        } else {
 2368|      0|            parent = lysc_node_child(parent);
 2369|      0|        }
 2370|      0|    }
 2371|       |
 2372|   871k|    iter = NULL;
 2373|   871k|    if (!parent && ctx->ext) {
  ------------------
  |  Branch (2373:9): [True: 70.2k, False: 801k]
  |  Branch (2373:20): [True: 0, False: 70.2k]
  ------------------
 2374|      0|        while ((iter = lys_getnext_ext(iter, parent, ctx->ext, getnext_flags))) {
  ------------------
  |  Branch (2374:16): [True: 0, False: 0]
  ------------------
 2375|      0|            if (!ly_set_contains(&parent_choices, (void *)iter, NULL) && CHECK_NODE(iter, exclude, name)) {
  ------------------
  |  | 2330|      0|#define CHECK_NODE(iter, exclude, name) (iter != (void *)exclude && (iter)->module == exclude->module && !strcmp(name, (iter)->name))
  |  |  ------------------
  |  |  |  Branch (2330:42): [True: 0, False: 0]
  |  |  |  Branch (2330:69): [True: 0, False: 0]
  |  |  |  Branch (2330:106): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2375:17): [True: 0, False: 0]
  ------------------
 2376|      0|                goto error;
 2377|      0|            }
 2378|       |
 2379|       |            /* we must compare with both the choice and all its nested data-definiition nodes (but not recursively) */
 2380|      0|            if (iter->nodetype == LYS_CHOICE) {
  ------------------
  |  |  241|      0|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
  |  Branch (2380:17): [True: 0, False: 0]
  ------------------
 2381|      0|                iter2 = NULL;
 2382|      0|                while ((iter2 = lys_getnext_ext(iter2, iter, NULL, 0))) {
  ------------------
  |  Branch (2382:24): [True: 0, False: 0]
  ------------------
 2383|      0|                    if (CHECK_NODE(iter2, exclude, name)) {
  ------------------
  |  | 2330|      0|#define CHECK_NODE(iter, exclude, name) (iter != (void *)exclude && (iter)->module == exclude->module && !strcmp(name, (iter)->name))
  |  |  ------------------
  |  |  |  Branch (2330:42): [True: 0, False: 0]
  |  |  |  Branch (2330:69): [True: 0, False: 0]
  |  |  |  Branch (2330:106): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2384|      0|                        goto error;
 2385|      0|                    }
 2386|      0|                }
 2387|      0|            }
 2388|      0|        }
 2389|   871k|    } else {
 2390|  3.16M|        while ((iter = lys_getnext(iter, parent, ctx->cur_mod->compiled, getnext_flags))) {
  ------------------
  |  Branch (2390:16): [True: 2.29M, False: 871k]
  ------------------
 2391|  2.29M|            if (!ly_set_contains(&parent_choices, (void *)iter, NULL) && CHECK_NODE(iter, exclude, name)) {
  ------------------
  |  | 2330|  2.26M|#define CHECK_NODE(iter, exclude, name) (iter != (void *)exclude && (iter)->module == exclude->module && !strcmp(name, (iter)->name))
  |  |  ------------------
  |  |  |  Branch (2330:42): [True: 1.41M, False: 843k]
  |  |  |  Branch (2330:69): [True: 1.41M, False: 0]
  |  |  |  Branch (2330:106): [True: 0, False: 1.41M]
  |  |  ------------------
  ------------------
  |  Branch (2391:17): [True: 2.26M, False: 28.1k]
  ------------------
 2392|      0|                goto error;
 2393|      0|            }
 2394|       |
 2395|       |            /* we must compare with both the choice and all its nested data-definiition nodes (but not recursively) */
 2396|  2.29M|            if (iter->nodetype == LYS_CHOICE) {
  ------------------
  |  |  241|  2.29M|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
  |  Branch (2396:17): [True: 42.1k, False: 2.24M]
  ------------------
 2397|  42.1k|                iter2 = NULL;
 2398|  84.3k|                while ((iter2 = lys_getnext(iter2, iter, NULL, 0))) {
  ------------------
  |  Branch (2398:24): [True: 42.1k, False: 42.1k]
  ------------------
 2399|  42.1k|                    if (CHECK_NODE(iter2, exclude, name)) {
  ------------------
  |  | 2330|  42.1k|#define CHECK_NODE(iter, exclude, name) (iter != (void *)exclude && (iter)->module == exclude->module && !strcmp(name, (iter)->name))
  |  |  ------------------
  |  |  |  Branch (2330:42): [True: 14.0k, False: 28.1k]
  |  |  |  Branch (2330:69): [True: 14.0k, False: 0]
  |  |  |  Branch (2330:106): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 2400|      0|                        goto error;
 2401|      0|                    }
 2402|  42.1k|                }
 2403|  42.1k|            }
 2404|  2.29M|        }
 2405|       |
 2406|   871k|        actions = parent ? lysc_node_actions(parent) : ctx->cur_mod->compiled->rpcs;
  ------------------
  |  Branch (2406:19): [True: 801k, False: 70.2k]
  ------------------
 2407|   871k|        LY_LIST_FOR((struct lysc_node *)actions, iter) {
  ------------------
  |  |  181|   871k|    for ((ELEM) = (START); \
  |  |  182|   871k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 871k]
  |  |  ------------------
  |  |  183|   871k|         (ELEM) = (ELEM)->next)
  ------------------
 2408|      0|            if (CHECK_NODE(iter, exclude, name)) {
  ------------------
  |  | 2330|      0|#define CHECK_NODE(iter, exclude, name) (iter != (void *)exclude && (iter)->module == exclude->module && !strcmp(name, (iter)->name))
  |  |  ------------------
  |  |  |  Branch (2330:42): [True: 0, False: 0]
  |  |  |  Branch (2330:69): [True: 0, False: 0]
  |  |  |  Branch (2330:106): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2409|      0|                goto error;
 2410|      0|            }
 2411|      0|        }
 2412|       |
 2413|   871k|        notifs = parent ? lysc_node_notifs(parent) : ctx->cur_mod->compiled->notifs;
  ------------------
  |  Branch (2413:18): [True: 801k, False: 70.2k]
  ------------------
 2414|   871k|        LY_LIST_FOR((struct lysc_node *)notifs, iter) {
  ------------------
  |  |  181|   871k|    for ((ELEM) = (START); \
  |  |  182|   913k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 42.1k, False: 871k]
  |  |  ------------------
  |  |  183|   871k|         (ELEM) = (ELEM)->next)
  ------------------
 2415|  42.1k|            if (CHECK_NODE(iter, exclude, name)) {
  ------------------
  |  | 2330|  42.1k|#define CHECK_NODE(iter, exclude, name) (iter != (void *)exclude && (iter)->module == exclude->module && !strcmp(name, (iter)->name))
  |  |  ------------------
  |  |  |  Branch (2330:42): [True: 14.0k, False: 28.1k]
  |  |  |  Branch (2330:69): [True: 14.0k, False: 0]
  |  |  |  Branch (2330:106): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 2416|      0|                goto error;
 2417|      0|            }
 2418|  42.1k|        }
 2419|   871k|    }
 2420|   871k|    ly_set_erase(&parent_choices, NULL);
 2421|   871k|    return LY_SUCCESS;
 2422|       |
 2423|      0|error:
 2424|      0|    ly_set_erase(&parent_choices, NULL);
 2425|      0|    LOGVAL(ctx->ctx, LY_VCODE_DUPIDENT, name, "data definition/RPC/action/notification");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2426|      0|    return LY_EEXIST;
 2427|       |
 2428|   871k|#undef CHECK_NODE
 2429|   871k|}
schema_compile_node.c:lys_compile_node_flags:
 2612|   899k|{
 2613|   899k|    uint16_t parent_flags;
 2614|   899k|    const char *parent_name;
 2615|       |
 2616|       |    /* copy flags except for status */
 2617|   899k|    node->flags = (parsed_flags & LYS_FLAGS_COMPILED_MASK) & ~LYS_STATUS_MASK;
  ------------------
  |  |  724|   899k|#define LYS_FLAGS_COMPILED_MASK 0xff /**< mask for flags that maps to the compiled structures */
  ------------------
                  node->flags = (parsed_flags & LYS_FLAGS_COMPILED_MASK) & ~LYS_STATUS_MASK;
  ------------------
  |  |  657|   899k|#define LYS_STATUS_MASK  0x1C        /**< mask for status value */
  ------------------
 2618|       |
 2619|       |    /* inherit config flags */
 2620|   899k|    LY_CHECK_RET(lys_compile_config(ctx, node));
  ------------------
  |  |  206|   899k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   899k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   899k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   899k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 899k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2621|       |
 2622|       |    /* compile status */
 2623|   899k|    parent_flags = node->parent ? node->parent->flags : 0;
  ------------------
  |  Branch (2623:20): [True: 829k, False: 70.2k]
  ------------------
 2624|   899k|    parent_name = node->parent ? node->parent->name : NULL;
  ------------------
  |  Branch (2624:19): [True: 829k, False: 70.2k]
  ------------------
 2625|   899k|    LY_CHECK_RET(lys_compile_status(ctx, parsed_flags, inherited_flags, parent_flags, parent_name, node->name, &node->flags));
  ------------------
  |  |  206|   899k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   899k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   899k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   899k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 899k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2626|       |
 2627|       |    /* other flags */
 2628|   899k|    if ((ctx->compile_opts & LYS_IS_INPUT) && (node->nodetype != LYS_INPUT)) {
  ------------------
  |  |  718|   899k|#define LYS_IS_INPUT     0x1000      /**< flag for nodes that are in the subtree of an input statement */
  ------------------
                  if ((ctx->compile_opts & LYS_IS_INPUT) && (node->nodetype != LYS_INPUT)) {
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
  |  Branch (2628:9): [True: 0, False: 899k]
  |  Branch (2628:47): [True: 0, False: 0]
  ------------------
 2629|      0|        node->flags |= LYS_IS_INPUT;
  ------------------
  |  |  718|      0|#define LYS_IS_INPUT     0x1000      /**< flag for nodes that are in the subtree of an input statement */
  ------------------
 2630|   899k|    } else if ((ctx->compile_opts & LYS_IS_OUTPUT) && (node->nodetype != LYS_OUTPUT)) {
  ------------------
  |  |  720|   899k|#define LYS_IS_OUTPUT    0x2000      /**< flag for nodes that are in the subtree of an output statement */
  ------------------
                  } else if ((ctx->compile_opts & LYS_IS_OUTPUT) && (node->nodetype != LYS_OUTPUT)) {
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (2630:16): [True: 0, False: 899k]
  |  Branch (2630:55): [True: 0, False: 0]
  ------------------
 2631|      0|        node->flags |= LYS_IS_OUTPUT;
  ------------------
  |  |  720|      0|#define LYS_IS_OUTPUT    0x2000      /**< flag for nodes that are in the subtree of an output statement */
  ------------------
 2632|   899k|    } else if ((ctx->compile_opts & LYS_IS_NOTIF) && (node->nodetype != LYS_NOTIF)) {
  ------------------
  |  |  722|   899k|#define LYS_IS_NOTIF     0x4000      /**< flag for nodes that are in the subtree of a notification statement */
  ------------------
                  } else if ((ctx->compile_opts & LYS_IS_NOTIF) && (node->nodetype != LYS_NOTIF)) {
  ------------------
  |  |  251|  56.2k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (2632:16): [True: 56.2k, False: 843k]
  |  Branch (2632:54): [True: 28.1k, False: 28.1k]
  ------------------
 2633|  28.1k|        node->flags |= LYS_IS_NOTIF;
  ------------------
  |  |  722|  28.1k|#define LYS_IS_NOTIF     0x4000      /**< flag for nodes that are in the subtree of a notification statement */
  ------------------
 2634|  28.1k|    }
 2635|       |
 2636|   899k|    return LY_SUCCESS;
 2637|   899k|}
schema_compile_node.c:lys_compile_config:
 2573|   899k|{
 2574|       |    /* case never has any explicit config */
 2575|   899k|    assert((node->nodetype != LYS_CASE) || !(node->flags & LYS_CONFIG_MASK));
 2576|       |
 2577|   899k|    if (ctx->compile_opts & LYS_COMPILE_NO_CONFIG) {
  ------------------
  |  |  545|   899k|#define LYS_COMPILE_NO_CONFIG       0x04            /**< ignore config statements, neither inherit config value */
  ------------------
  |  Branch (2577:9): [True: 56.2k, False: 843k]
  ------------------
 2578|       |        /* ignore config statements inside Notification/RPC/action/... data */
 2579|  56.2k|        node->flags &= ~LYS_CONFIG_MASK;
  ------------------
  |  |  653|  56.2k|#define LYS_CONFIG_MASK  0x03        /**< mask for config value */
  ------------------
 2580|   843k|    } else if (!(node->flags & LYS_CONFIG_MASK)) {
  ------------------
  |  |  653|   843k|#define LYS_CONFIG_MASK  0x03        /**< mask for config value */
  ------------------
  |  Branch (2580:16): [True: 801k, False: 42.1k]
  ------------------
 2581|       |        /* config not explicitly set, inherit it from parent */
 2582|   801k|        assert(!node->parent || (node->parent->flags & LYS_CONFIG_MASK) || (node->parent->nodetype & LYS_AUGMENT));
 2583|   801k|        if (node->parent && (node->parent->flags & LYS_CONFIG_MASK)) {
  ------------------
  |  |  653|   801k|#define LYS_CONFIG_MASK  0x03        /**< mask for config value */
  ------------------
  |  Branch (2583:13): [True: 801k, False: 0]
  |  Branch (2583:29): [True: 801k, False: 0]
  ------------------
 2584|   801k|            node->flags |= node->parent->flags & LYS_CONFIG_MASK;
  ------------------
  |  |  653|   801k|#define LYS_CONFIG_MASK  0x03        /**< mask for config value */
  ------------------
 2585|   801k|        } else {
 2586|       |            /* default is config true */
 2587|      0|            node->flags |= LYS_CONFIG_W;
  ------------------
  |  |  651|      0|#define LYS_CONFIG_W     0x01        /**< config true; */
  ------------------
 2588|      0|        }
 2589|   801k|    } else {
 2590|       |        /* config set explicitly */
 2591|  42.1k|        node->flags |= LYS_SET_CONFIG;
  ------------------
  |  |  706|  42.1k|#define LYS_SET_CONFIG   0x0800      /**< flag to know if the config property was set explicitly (flag set) or it is inherited. */
  ------------------
 2592|  42.1k|    }
 2593|       |
 2594|   899k|    if (node->parent && (node->parent->flags & LYS_CONFIG_R) && (node->flags & LYS_CONFIG_W)) {
  ------------------
  |  |  652|   829k|#define LYS_CONFIG_R     0x02        /**< config false; */
  ------------------
                  if (node->parent && (node->parent->flags & LYS_CONFIG_R) && (node->flags & LYS_CONFIG_W)) {
  ------------------
  |  |  651|   801k|#define LYS_CONFIG_W     0x01        /**< config true; */
  ------------------
  |  Branch (2594:9): [True: 829k, False: 70.2k]
  |  Branch (2594:25): [True: 801k, False: 28.1k]
  |  Branch (2594:65): [True: 0, False: 801k]
  ------------------
 2595|      0|        LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Configuration node cannot be child of any state data node.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2596|      0|        return LY_EVALID;
 2597|      0|    }
 2598|       |
 2599|   899k|    return LY_SUCCESS;
 2600|   899k|}
schema_compile_node.c:lys_compile_uses:
 3962|   224k|{
 3963|   224k|    LY_ERR rc = LY_SUCCESS;
 3964|   224k|    ly_bool enabled, child_unres_disabled = 0;
 3965|   224k|    uint32_t i, grp_stack_count, opt_prev = ctx->compile_opts;
 3966|   224k|    struct lysp_node_grp *grp = NULL;
 3967|   224k|    uint16_t uses_flags = 0;
 3968|   224k|    struct lysp_module *grp_mod;
 3969|   224k|    struct ly_set uses_child_set = {0};
 3970|       |
 3971|       |    /* find the referenced grouping */
 3972|   224k|    LY_CHECK_RET(lys_compile_uses_find_grouping(ctx, uses_p, &grp, &grp_mod));
  ------------------
  |  |  206|   224k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   224k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   224k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   224k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 224k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3973|       |
 3974|       |    /* grouping must not reference themselves - stack in ctx maintains list of groupings currently being applied */
 3975|   224k|    grp_stack_count = ctx->groupings.count;
 3976|   224k|    LY_CHECK_RET(ly_set_add(&ctx->groupings, (void *)grp, 0, NULL));
  ------------------
  |  |  206|   224k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   224k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   224k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   224k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 224k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3977|   224k|    if (grp_stack_count == ctx->groupings.count) {
  ------------------
  |  Branch (3977:9): [True: 0, False: 224k]
  ------------------
 3978|       |        /* the target grouping is already in the stack, so we are already inside it -> circular dependency */
 3979|      0|        LOGVAL(ctx->ctx, LYVE_REFERENCE,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3980|      0|                "Grouping \"%s\" references itself through a uses statement.", grp->name);
 3981|      0|        return LY_EVALID;
 3982|      0|    }
 3983|       |
 3984|       |    /* nodetype checks */
 3985|   224k|    if (grp->actions && (parent && !lysc_node_actions_p(parent))) {
  ------------------
  |  Branch (3985:9): [True: 0, False: 224k]
  |  Branch (3985:26): [True: 0, False: 0]
  |  Branch (3985:36): [True: 0, False: 0]
  ------------------
 3986|      0|        LOGVAL(ctx->ctx, LYVE_REFERENCE, "Invalid child %s \"%s\" of uses parent %s \"%s\" node.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3987|      0|                grp->actions->name, lys_nodetype2str(grp->actions->nodetype),
 3988|      0|                parent->name, lys_nodetype2str(parent->nodetype));
 3989|      0|        rc = LY_EVALID;
 3990|      0|        goto cleanup;
 3991|      0|    }
 3992|   224k|    if (grp->notifs && (parent && !lysc_node_notifs_p(parent))) {
  ------------------
  |  Branch (3992:9): [True: 0, False: 224k]
  |  Branch (3992:25): [True: 0, False: 0]
  |  Branch (3992:35): [True: 0, False: 0]
  ------------------
 3993|      0|        LOGVAL(ctx->ctx, LYVE_REFERENCE, "Invalid child %s \"%s\" of uses parent %s \"%s\" node.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3994|      0|                grp->notifs->name, lys_nodetype2str(grp->notifs->nodetype),
 3995|      0|                parent->name, lys_nodetype2str(parent->nodetype));
 3996|      0|        rc = LY_EVALID;
 3997|      0|        goto cleanup;
 3998|      0|    }
 3999|       |
 4000|       |    /* check status */
 4001|   224k|    rc = lysc_check_status(ctx, uses_p->flags, ctx->pmod, uses_p->name, grp->flags, grp_mod, grp->name);
 4002|   224k|    LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|   224k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 224k]
  |  |  ------------------
  ------------------
 4003|       |
 4004|       |    /* compile any augments and refines so they can be applied during the grouping nodes compilation */
 4005|   224k|    rc = lys_precompile_uses_augments_refines(ctx, uses_p, parent);
 4006|   224k|    LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|   224k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 224k]
  |  |  ------------------
  ------------------
 4007|       |
 4008|       |    /* compile special uses status flags */
 4009|   224k|    rc = lys_compile_status(ctx, uses_p->flags, inherited_flags, parent ? parent->flags : 0,
  ------------------
  |  Branch (4009:66): [True: 224k, False: 0]
  ------------------
 4010|   224k|            parent ? parent->name : NULL, "<uses>", &uses_flags);
  ------------------
  |  Branch (4010:13): [True: 224k, False: 0]
  ------------------
 4011|   224k|    LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|   224k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 224k]
  |  |  ------------------
  ------------------
 4012|       |
 4013|       |    /* uses if-features */
 4014|   224k|    LY_CHECK_GOTO(rc = lys_eval_iffeatures(ctx->ctx, uses_p->iffeatures, &enabled), cleanup);
  ------------------
  |  |  202|   224k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 224k]
  |  |  ------------------
  ------------------
 4015|   224k|    if (!enabled && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  546|      0|#define LYS_COMPILE_NO_DISABLED     0x08            /**< ignore if-feature statements */
  ------------------
                  if (!enabled && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  542|      0|#define LYS_COMPILE_DISABLED        0x02            /**< Compiling a disabled subtree (by its if-features). Meaning
  ------------------
                  if (!enabled && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  537|      0|#define LYS_COMPILE_GROUPING        0x01            /**< Compiling (validation) of a non-instantiated grouping.
  ------------------
  |  Branch (4015:9): [True: 0, False: 224k]
  |  Branch (4015:21): [True: 0, False: 0]
  ------------------
 4016|      0|        ctx->compile_opts |= LYS_COMPILE_DISABLED;
  ------------------
  |  |  542|      0|#define LYS_COMPILE_DISABLED        0x02            /**< Compiling a disabled subtree (by its if-features). Meaning
  ------------------
 4017|      0|        child_unres_disabled = 1;
 4018|      0|    }
 4019|       |
 4020|       |    /* uses grouping children */
 4021|   224k|    rc = lys_compile_uses_children(ctx, uses_p, uses_flags, grp->child, grp_mod, parent,
 4022|   224k|            child_set ? child_set : &uses_child_set, child_unres_disabled);
  ------------------
  |  Branch (4022:13): [True: 0, False: 224k]
  ------------------
 4023|   224k|    LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|   224k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 224k]
  |  |  ------------------
  ------------------
 4024|       |
 4025|       |    /* uses grouping RPCs/actions */
 4026|   224k|    rc = lys_compile_uses_children(ctx, uses_p, uses_flags, (struct lysp_node *)grp->actions, grp_mod, parent,
 4027|   224k|            child_set ? child_set : &uses_child_set, child_unres_disabled);
  ------------------
  |  Branch (4027:13): [True: 0, False: 224k]
  ------------------
 4028|   224k|    LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|   224k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 224k]
  |  |  ------------------
  ------------------
 4029|       |
 4030|       |    /* uses grouping notifications */
 4031|   224k|    rc = lys_compile_uses_children(ctx, uses_p, uses_flags, (struct lysp_node *)grp->notifs, grp_mod, parent,
 4032|   224k|            child_set ? child_set : &uses_child_set, child_unres_disabled);
  ------------------
  |  Branch (4032:13): [True: 0, False: 224k]
  ------------------
 4033|   224k|    LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|   224k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 224k]
  |  |  ------------------
  ------------------
 4034|       |
 4035|       |    /* check that all augments were applied */
 4036|   224k|    for (i = 0; i < ctx->uses_augs.count; ++i) {
  ------------------
  |  Branch (4036:17): [True: 0, False: 224k]
  ------------------
 4037|      0|        if (((struct lysc_augment *)ctx->uses_augs.objs[i])->aug_p->parent != (struct lysp_node *)uses_p) {
  ------------------
  |  Branch (4037:13): [True: 0, False: 0]
  ------------------
 4038|       |            /* augment of some parent uses, irrelevant now */
 4039|      0|            continue;
 4040|      0|        }
 4041|       |
 4042|      0|        LOGVAL(ctx->ctx, LYVE_REFERENCE, "Augment target node \"%s\" in grouping \"%s\" was not found.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 4043|      0|                ((struct lysc_augment *)ctx->uses_augs.objs[i])->nodeid->expr, grp->name);
 4044|      0|        rc = LY_ENOTFOUND;
 4045|      0|    }
 4046|   224k|    LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|   224k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 224k]
  |  |  ------------------
  ------------------
 4047|       |
 4048|       |    /* check that all refines were applied */
 4049|   224k|    for (i = 0; i < ctx->uses_rfns.count; ++i) {
  ------------------
  |  Branch (4049:17): [True: 0, False: 224k]
  ------------------
 4050|      0|        if (((struct lysc_refine *)ctx->uses_rfns.objs[i])->uses_p != uses_p) {
  ------------------
  |  Branch (4050:13): [True: 0, False: 0]
  ------------------
 4051|       |            /* refine of some parent uses, irrelevant now */
 4052|      0|            continue;
 4053|      0|        }
 4054|       |
 4055|      0|        LOGVAL(ctx->ctx, LYVE_REFERENCE, "Refine(s) target node \"%s\" in grouping \"%s\" was not found.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 4056|      0|                ((struct lysc_refine *)ctx->uses_rfns.objs[i])->nodeid->expr, grp->name);
 4057|      0|        rc = LY_ENOTFOUND;
 4058|      0|    }
 4059|   224k|    LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|   224k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 224k]
  |  |  ------------------
  ------------------
 4060|       |
 4061|       |    /* compile uses and grouping extensions into the parent */
 4062|   224k|    COMPILE_EXTS_GOTO(ctx, uses_p->exts, parent->exts, parent, rc, cleanup);
  ------------------
  |  |  230|   224k|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 224k]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 4063|   224k|    COMPILE_EXTS_GOTO(ctx, grp->exts, parent->exts, parent, rc, cleanup);
  ------------------
  |  |  230|   224k|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 224k]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 4064|       |
 4065|   224k|cleanup:
 4066|       |    /* restore previous context */
 4067|   224k|    ctx->compile_opts = opt_prev;
 4068|       |
 4069|       |    /* remove the grouping from the stack for circular groupings dependency check */
 4070|   224k|    ly_set_rm_index(&ctx->groupings, ctx->groupings.count - 1, NULL);
 4071|   224k|    assert(ctx->groupings.count == grp_stack_count);
 4072|       |
 4073|      0|    ly_set_erase(&uses_child_set, NULL);
 4074|   224k|    return rc;
 4075|   224k|}
schema_compile_node.c:lys_compile_uses_find_grouping:
 3800|   224k|{
 3801|   224k|    struct lysp_node *pnode;
 3802|   224k|    struct lysp_node_grp *grp;
 3803|   224k|    const struct lysp_node_grp *ext_grp;
 3804|   224k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   224k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 3805|   224k|    const char *id, *name, *prefix, *local_pref;
 3806|   224k|    size_t prefix_len, name_len;
 3807|   224k|    struct lysp_module *pmod, *found = NULL;
 3808|   224k|    const struct lys_module *mod;
 3809|       |
 3810|   224k|    *grp_p = NULL;
 3811|   224k|    *grp_pmod = NULL;
 3812|       |
 3813|       |    /* search for the grouping definition */
 3814|   224k|    id = uses_p->name;
 3815|   224k|    LY_CHECK_RET(ly_parse_nodeid(&id, &prefix, &prefix_len, &name, &name_len), LY_EVALID);
  ------------------
  |  |  206|   224k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   224k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   224k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|   224k|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:41): [True: 0, False: 224k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3816|   224k|    local_pref = ctx->pmod->is_submod ? ((struct lysp_submodule *)ctx->pmod)->prefix : ctx->pmod->mod->prefix;
  ------------------
  |  Branch (3816:18): [True: 0, False: 224k]
  ------------------
 3817|   224k|    if (!prefix || !ly_strncmp(local_pref, prefix, prefix_len)) {
  ------------------
  |  Branch (3817:9): [True: 224k, False: 0]
  |  Branch (3817:20): [True: 0, False: 0]
  ------------------
 3818|       |        /* current module, search local groupings first */
 3819|   224k|        pmod = ctx->pmod->mod->parsed; /* make sure that we will start in main_module, not submodule */
 3820|   674k|        for (pnode = uses_p->parent; !found && pnode; pnode = pnode->parent) {
  ------------------
  |  Branch (3820:38): [True: 674k, False: 0]
  |  Branch (3820:48): [True: 520k, False: 154k]
  ------------------
 3821|   520k|            if ((grp = match_grouping(lysp_node_groupings(pnode), name))) {
  ------------------
  |  Branch (3821:17): [True: 70.2k, False: 449k]
  ------------------
 3822|  70.2k|                found = ctx->pmod;
 3823|  70.2k|                break;
 3824|  70.2k|            }
 3825|   520k|        }
 3826|       |
 3827|       |        /* if in an extension, search possible groupings in it */
 3828|   224k|        if (!found && ctx->ext) {
  ------------------
  |  Branch (3828:13): [True: 154k, False: 70.2k]
  |  Branch (3828:23): [True: 0, False: 154k]
  ------------------
 3829|      0|            lyplg_ext_parsed_get_storage(ctx->ext, LY_STMT_GROUPING, sizeof ext_grp, (const void **)&ext_grp);
 3830|      0|            if ((grp = match_grouping(ext_grp, name))) {
  ------------------
  |  Branch (3830:17): [True: 0, False: 0]
  ------------------
 3831|      0|                found = ctx->pmod;
 3832|      0|            }
 3833|      0|        }
 3834|   224k|    } else {
 3835|       |        /* foreign module, find it first */
 3836|      0|        mod = ly_resolve_prefix(ctx->ctx, prefix, prefix_len, LY_VALUE_SCHEMA, ctx->pmod);
 3837|      0|        if (!mod) {
  ------------------
  |  Branch (3837:13): [True: 0, False: 0]
  ------------------
 3838|      0|            LOGVAL(ctx->ctx, LYVE_REFERENCE, "Invalid prefix used for grouping \"%s\" reference.", uses_p->name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3839|      0|            return LY_EVALID;
 3840|      0|        }
 3841|      0|        pmod = mod->parsed;
 3842|      0|    }
 3843|       |
 3844|   224k|    if (!found) {
  ------------------
  |  Branch (3844:9): [True: 154k, False: 70.2k]
  ------------------
 3845|       |        /* search in top-level groupings of the main module ... */
 3846|   154k|        if ((grp = match_grouping(pmod->groupings, name))) {
  ------------------
  |  Branch (3846:13): [True: 154k, False: 0]
  ------------------
 3847|   154k|            found = pmod;
 3848|   154k|        } else {
 3849|       |            /* ... and all the submodules */
 3850|      0|            LY_ARRAY_FOR(pmod->includes, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3851|      0|                if ((grp = match_grouping(pmod->includes[u].submodule->groupings, name))) {
  ------------------
  |  Branch (3851:21): [True: 0, False: 0]
  ------------------
 3852|      0|                    found = (struct lysp_module *)pmod->includes[u].submodule;
 3853|      0|                    break;
 3854|      0|                }
 3855|      0|            }
 3856|      0|        }
 3857|   154k|    }
 3858|   224k|    if (!found) {
  ------------------
  |  Branch (3858:9): [True: 0, False: 224k]
  ------------------
 3859|      0|        LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Grouping \"%s\" referenced by a uses statement not found.", uses_p->name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3860|      0|        return LY_EVALID;
 3861|      0|    }
 3862|       |
 3863|   224k|    if (!(ctx->compile_opts & LYS_COMPILE_GROUPING)) {
  ------------------
  |  |  537|   224k|#define LYS_COMPILE_GROUPING        0x01            /**< Compiling (validation) of a non-instantiated grouping.
  ------------------
  |  Branch (3863:9): [True: 224k, False: 0]
  ------------------
 3864|       |        /* remember that the grouping is instantiated to avoid its standalone validation */
 3865|   224k|        grp->flags |= LYS_USED_GRP;
  ------------------
  |  |  684|   224k|#define LYS_USED_GRP     0x0400      /**< internal flag for validating not-instantiated groupings
  ------------------
 3866|   224k|    }
 3867|       |
 3868|   224k|    *grp_p = grp;
 3869|   224k|    *grp_pmod = found;
 3870|   224k|    return LY_SUCCESS;
 3871|   224k|}
schema_compile_node.c:match_grouping:
 3778|   674k|{
 3779|   674k|    LY_LIST_FOR(node, node) {
  ------------------
  |  |  181|   674k|    for ((ELEM) = (START); \
  |  |  182|   955k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 506k, False: 449k]
  |  |  ------------------
  |  |  183|   674k|         (ELEM) = (ELEM)->next)
  ------------------
 3780|   506k|        if ((node->nodetype == LYS_GROUPING) && !strcmp(node->name, name)) {
  ------------------
  |  |  256|   506k|#define LYS_GROUPING    0x4000
  ------------------
  |  Branch (3780:13): [True: 506k, False: 0]
  |  Branch (3780:49): [True: 224k, False: 281k]
  ------------------
 3781|   224k|            return (struct lysp_node_grp *)node;
 3782|   224k|        }
 3783|   506k|    }
 3784|       |
 3785|   449k|    return NULL;
 3786|   674k|}
schema_compile_node.c:lys_compile_uses_children:
 3891|   674k|{
 3892|   674k|    LY_ERR rc = LY_SUCCESS;
 3893|   674k|    struct lysp_module *mod_old = ctx->pmod;
 3894|   674k|    uint32_t child_i, opt_prev = ctx->compile_opts;
 3895|   674k|    ly_bool enabled;
 3896|   674k|    struct lysp_node *pnode;
 3897|   674k|    struct lysc_node *node;
 3898|   674k|    struct lysc_when *when_shared = NULL;
 3899|       |
 3900|   674k|    assert(child_set);
 3901|       |
 3902|      0|    child_i = child_set->count;
 3903|   674k|    LY_LIST_FOR(child, pnode) {
  ------------------
  |  |  181|   674k|    for ((ELEM) = (START); \
  |  |  182|  1.05M|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 379k, False: 674k]
  |  |  ------------------
  |  |  183|   674k|         (ELEM) = (ELEM)->next)
  ------------------
 3904|       |        /* compile the nodes with their parsed (grouping) module */
 3905|   379k|        ctx->pmod = grp_mod;
 3906|   379k|        LY_CHECK_GOTO(rc = lys_compile_node(ctx, pnode, parent, inherited_flags, child_set), cleanup);
  ------------------
  |  |  202|   379k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 379k]
  |  |  ------------------
  ------------------
 3907|       |
 3908|       |        /* eval if-features again for the rest of this node processing */
 3909|   379k|        LY_CHECK_GOTO(rc = lys_eval_iffeatures(ctx->ctx, pnode->iffeatures, &enabled), cleanup);
  ------------------
  |  |  202|   379k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 379k]
  |  |  ------------------
  ------------------
 3910|   379k|        if (!enabled && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  546|      0|#define LYS_COMPILE_NO_DISABLED     0x08            /**< ignore if-feature statements */
  ------------------
                      if (!enabled && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  542|      0|#define LYS_COMPILE_DISABLED        0x02            /**< Compiling a disabled subtree (by its if-features). Meaning
  ------------------
                      if (!enabled && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  537|      0|#define LYS_COMPILE_GROUPING        0x01            /**< Compiling (validation) of a non-instantiated grouping.
  ------------------
  |  Branch (3910:13): [True: 0, False: 379k]
  |  Branch (3910:25): [True: 0, False: 0]
  ------------------
 3911|      0|            ctx->compile_opts |= LYS_COMPILE_DISABLED;
  ------------------
  |  |  542|      0|#define LYS_COMPILE_DISABLED        0x02            /**< Compiling a disabled subtree (by its if-features). Meaning
  ------------------
 3912|      0|        }
 3913|       |
 3914|       |        /* restore the parsed module */
 3915|   379k|        ctx->pmod = mod_old;
 3916|       |
 3917|       |        /* since the uses node is not present in the compiled tree, we need to pass some of its
 3918|       |         * statements to all its children */
 3919|   759k|        while (child_i < child_set->count) {
  ------------------
  |  Branch (3919:16): [True: 379k, False: 379k]
  ------------------
 3920|   379k|            node = child_set->snodes[child_i];
 3921|       |
 3922|   379k|            if (uses_p->when) {
  ------------------
  |  Branch (3922:17): [True: 0, False: 379k]
  ------------------
 3923|       |                /* pass uses when to all the children */
 3924|      0|                rc = lys_compile_when(ctx, uses_p->when, inherited_flags, parent, lysc_data_node(parent), node, &when_shared);
 3925|      0|                LY_CHECK_GOTO(rc, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3926|      0|            }
 3927|       |
 3928|   379k|            if (child_unres_disabled) {
  ------------------
  |  Branch (3928:17): [True: 0, False: 379k]
  ------------------
 3929|       |                /* child is disabled by the uses if-features */
 3930|      0|                ly_set_add(&ctx->unres->disabled, node, 1, NULL);
 3931|      0|            }
 3932|       |
 3933|       |            /* child processed */
 3934|   379k|            ++child_i;
 3935|   379k|        }
 3936|       |
 3937|       |        /* next iter */
 3938|   379k|        ctx->compile_opts = opt_prev;
 3939|   379k|    }
 3940|       |
 3941|   674k|cleanup:
 3942|   674k|    ctx->compile_opts = opt_prev;
 3943|   674k|    return rc;
 3944|   674k|}
schema_compile_node.c:lys_compile_node_container:
 2864|  70.2k|{
 2865|  70.2k|    struct lysp_node_container *cont_p = (struct lysp_node_container *)pnode;
 2866|  70.2k|    struct lysc_node_container *cont = (struct lysc_node_container *)node;
 2867|  70.2k|    struct lysp_node *child_p;
 2868|  70.2k|    LY_ERR ret = LY_SUCCESS;
 2869|       |
 2870|  70.2k|    if (cont_p->presence) {
  ------------------
  |  Branch (2870:9): [True: 28.1k, False: 42.1k]
  ------------------
 2871|       |        /* presence container */
 2872|  28.1k|        cont->flags |= LYS_PRESENCE;
  ------------------
  |  |  667|  28.1k|#define LYS_PRESENCE     0x80        /**< flag for presence property of a container, but it is not only for explicit presence
  ------------------
 2873|  28.1k|    }
 2874|       |
 2875|       |    /* more cases when the container has meaning but is kept NP for convenience:
 2876|       |     *   - when condition
 2877|       |     *   - direct child action/notification
 2878|       |     */
 2879|       |
 2880|  98.4k|    LY_LIST_FOR(cont_p->child, child_p) {
  ------------------
  |  |  181|  70.2k|    for ((ELEM) = (START); \
  |  |  182|   168k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 98.4k, False: 70.2k]
  |  |  ------------------
  |  |  183|  98.4k|         (ELEM) = (ELEM)->next)
  ------------------
 2881|  98.4k|        ret = lys_compile_node(ctx, child_p, node, 0, NULL);
 2882|  98.4k|        LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|  98.4k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 98.4k]
  |  |  ------------------
  ------------------
 2883|  98.4k|    }
 2884|       |
 2885|  70.2k|    COMPILE_ARRAY_GOTO(ctx, cont_p->musts, cont->musts, lys_compile_must, ret, done);
  ------------------
  |  |  219|  70.2k|    if (ARRAY_P) { \
  |  |  ------------------
  |  |  |  Branch (219:9): [True: 0, False: 70.2k]
  |  |  ------------------
  |  |  220|      0|        LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (220:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  221|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, ARRAY_C, __u + LY_ARRAY_COUNT(ARRAY_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  222|      0|        LY_ARRAY_FOR(ARRAY_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  223|      0|            LY_ARRAY_INCREMENT(ARRAY_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  224|      0|            RET = FUNC(CTX, &(ARRAY_P)[__u], &(ARRAY_C)[LY_ARRAY_COUNT(ARRAY_C) - 1]); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  225|      0|            LY_CHECK_GOTO(RET, GOTO); \
  |  |  ------------------
  |  |  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  226|      0|        } \
  |  |  227|      0|    }
  ------------------
 2886|       |
 2887|       |    /* add must(s) to unres */
 2888|  70.2k|    ret = lysc_unres_must_add(ctx, node, pnode);
 2889|  70.2k|    LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|  70.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 2890|       |
 2891|       |    /* connect any augments */
 2892|  70.2k|    LY_CHECK_GOTO(ret = lys_compile_node_augments(ctx, node), done);
  ------------------
  |  |  202|  70.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 2893|       |
 2894|  70.2k|    LY_LIST_FOR((struct lysp_node *)cont_p->actions, child_p) {
  ------------------
  |  |  181|  70.2k|    for ((ELEM) = (START); \
  |  |  182|  70.2k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 70.2k]
  |  |  ------------------
  |  |  183|  70.2k|         (ELEM) = (ELEM)->next)
  ------------------
 2895|      0|        ret = lys_compile_node(ctx, child_p, node, 0, NULL);
 2896|      0|        LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2897|      0|    }
 2898|  70.2k|    LY_LIST_FOR((struct lysp_node *)cont_p->notifs, child_p) {
  ------------------
  |  |  181|  70.2k|    for ((ELEM) = (START); \
  |  |  182|  70.2k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 70.2k]
  |  |  ------------------
  |  |  183|  70.2k|         (ELEM) = (ELEM)->next)
  ------------------
 2899|      0|        ret = lys_compile_node(ctx, child_p, node, 0, NULL);
 2900|      0|        LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2901|      0|    }
 2902|       |
 2903|  70.2k|done:
 2904|  70.2k|    return ret;
 2905|  70.2k|}
schema_compile_node.c:lysc_unres_must_add:
   99|   857k|{
  100|   857k|    struct lysc_unres_must *m = NULL;
  101|   857k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   857k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  102|   857k|    struct lysc_must *musts;
  103|   857k|    struct lysp_restr *pmusts;
  104|   857k|    LY_ERR ret;
  105|       |
  106|       |    /* do not check must(s) in a grouping */
  107|   857k|    if (ctx->compile_opts & LYS_COMPILE_GROUPING) {
  ------------------
  |  |  537|   857k|#define LYS_COMPILE_GROUPING        0x01            /**< Compiling (validation) of a non-instantiated grouping.
  ------------------
  |  Branch (107:9): [True: 0, False: 857k]
  ------------------
  108|      0|        return LY_SUCCESS;
  109|      0|    }
  110|       |
  111|   857k|    musts = lysc_node_musts(node);
  112|   857k|    pmusts = lysp_node_musts(pnode);
  113|   857k|    assert(LY_ARRAY_COUNT(musts) == LY_ARRAY_COUNT(pmusts));
  114|       |
  115|   857k|    if (!musts) {
  ------------------
  |  Branch (115:9): [True: 857k, False: 0]
  ------------------
  116|       |        /* no must */
  117|   857k|        return LY_SUCCESS;
  118|   857k|    }
  119|       |
  120|       |    /* add new unres must */
  121|      0|    m = calloc(1, sizeof *m);
  122|      0|    LY_CHECK_ERR_GOTO(!m, ret = LY_EMEM, error);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  123|      0|    m->node = node;
  124|       |
  125|       |    /* add must local modules */
  126|      0|    LY_ARRAY_CREATE_GOTO(ctx->ctx, m->local_mods, LY_ARRAY_COUNT(pmusts), ret, error);
  ------------------
  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  ------------------
  |  |  |  |  133|      0|    { \
  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  141|      0|            } \
  |  |  |  |  142|      0|        } else { \
  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  147|      0|            } \
  |  |  |  |  148|      0|        } \
  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  153|      0|        } \
  |  |  |  |  154|      0|    }
  |  |  ------------------
  ------------------
  127|      0|    LY_ARRAY_FOR(pmusts, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|      0|        m->local_mods[u] = pmusts[u].arg.mod;
  129|      0|        LY_ARRAY_INCREMENT(m->local_mods);
  ------------------
  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
  130|      0|    }
  131|       |
  132|       |    /* store ext */
  133|      0|    m->ext = ctx->ext;
  134|       |
  135|      0|    LY_CHECK_ERR_GOTO(ly_set_add(&ctx->unres->musts, m, 1, NULL), ret = LY_EMEM, error);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  136|       |
  137|      0|    return LY_SUCCESS;
  138|       |
  139|      0|error:
  140|      0|    if (m) {
  ------------------
  |  Branch (140:9): [True: 0, False: 0]
  ------------------
  141|      0|        LY_ARRAY_FREE(m->local_mods);
  ------------------
  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  142|      0|        free(m);
  143|      0|    }
  144|      0|    LOGMEM(ctx->ctx);
  ------------------
  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  145|      0|    return ret;
  146|      0|}
schema_compile_node.c:lys_compile_node_leaf:
 2970|   463k|{
 2971|   463k|    struct lysp_node_leaf *leaf_p = (struct lysp_node_leaf *)pnode;
 2972|   463k|    struct lysc_node_leaf *leaf = (struct lysc_node_leaf *)node;
 2973|   463k|    LY_ERR ret = LY_SUCCESS;
 2974|       |
 2975|   463k|    COMPILE_ARRAY_GOTO(ctx, leaf_p->musts, leaf->musts, lys_compile_must, ret, done);
  ------------------
  |  |  219|   463k|    if (ARRAY_P) { \
  |  |  ------------------
  |  |  |  Branch (219:9): [True: 0, False: 463k]
  |  |  ------------------
  |  |  220|      0|        LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (220:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  221|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, ARRAY_C, __u + LY_ARRAY_COUNT(ARRAY_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  222|      0|        LY_ARRAY_FOR(ARRAY_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  223|      0|            LY_ARRAY_INCREMENT(ARRAY_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  224|      0|            RET = FUNC(CTX, &(ARRAY_P)[__u], &(ARRAY_C)[LY_ARRAY_COUNT(ARRAY_C) - 1]); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  225|      0|            LY_CHECK_GOTO(RET, GOTO); \
  |  |  ------------------
  |  |  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  226|      0|        } \
  |  |  227|      0|    }
  ------------------
 2976|       |
 2977|       |    /* add must(s) to unres */
 2978|   463k|    ret = lysc_unres_must_add(ctx, node, pnode);
 2979|   463k|    LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|   463k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 463k]
  |  |  ------------------
  ------------------
 2980|       |
 2981|   463k|    if (leaf_p->units) {
  ------------------
  |  Branch (2981:9): [True: 0, False: 463k]
  ------------------
 2982|      0|        LY_CHECK_GOTO(ret = lydict_insert(ctx->ctx, leaf_p->units, 0, &leaf->units), done);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2983|      0|        leaf->flags |= LYS_SET_UNITS;
  ------------------
  |  |  705|      0|#define LYS_SET_UNITS    0x0400      /**< flag to know if the leaf's/leaflist's units are their own (flag set) or it is taken from the type. */
  ------------------
 2984|      0|    }
 2985|       |
 2986|       |    /* compile type */
 2987|   463k|    ret = lys_compile_node_type(ctx, pnode, &leaf_p->type, leaf);
 2988|   463k|    LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|   463k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 463k]
  |  |  ------------------
  ------------------
 2989|       |
 2990|       |    /* store/update default value */
 2991|   463k|    if (leaf_p->dflt.str) {
  ------------------
  |  Branch (2991:9): [True: 14.0k, False: 449k]
  ------------------
 2992|  14.0k|        LY_CHECK_RET(lysc_unres_leaf_dflt_add(ctx, leaf, &leaf_p->dflt));
  ------------------
  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.0k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2993|  14.0k|        leaf->flags |= LYS_SET_DFLT;
  ------------------
  |  |  700|  14.0k|#define LYS_SET_DFLT     0x0200      /**< flag to mark leaf/leaflist with own (or refined) default value, not a default value taken from its type, and default
  ------------------
 2994|  14.0k|    }
 2995|       |
 2996|       |    /* checks */
 2997|   463k|    if ((leaf->flags & LYS_SET_DFLT) && (leaf->flags & LYS_MAND_TRUE)) {
  ------------------
  |  |  700|   463k|#define LYS_SET_DFLT     0x0200      /**< flag to mark leaf/leaflist with own (or refined) default value, not a default value taken from its type, and default
  ------------------
                  if ((leaf->flags & LYS_SET_DFLT) && (leaf->flags & LYS_MAND_TRUE)) {
  ------------------
  |  |  658|  14.0k|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
  |  Branch (2997:9): [True: 14.0k, False: 449k]
  |  Branch (2997:41): [True: 0, False: 14.0k]
  ------------------
 2998|      0|        LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Invalid mandatory leaf with a default value.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2999|      0|        return LY_EVALID;
 3000|      0|    }
 3001|       |
 3002|   463k|done:
 3003|   463k|    return ret;
 3004|   463k|}
schema_compile_node.c:lys_compile_node_type:
 2918|   590k|{
 2919|   590k|    struct lysp_qname *dflt;
 2920|   590k|    struct lysc_type **t;
 2921|   590k|    LY_ARRAY_COUNT_TYPE u, count;
  ------------------
  |  |  104|   590k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 2922|   590k|    ly_bool in_unres = 0;
 2923|       |
 2924|   590k|    LY_CHECK_RET(lys_compile_type(ctx, context_node, leaf->flags, leaf->name, type_p, &leaf->type,
  ------------------
  |  |  206|   590k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   590k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   590k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.18M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 0, False: 590k]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 590k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2925|   590k|            leaf->units ? NULL : &leaf->units, &dflt));
 2926|   590k|    LY_ATOMIC_INC_BARRIER(leaf->type->refcount);
  ------------------
  |  |   35|   590k|# define LY_ATOMIC_INC_BARRIER(var) __sync_fetch_and_add(&(var), 1)
  ------------------
 2927|       |
 2928|       |    /* store default value, if any */
 2929|   590k|    if (dflt && !(leaf->flags & LYS_SET_DFLT)) {
  ------------------
  |  |  700|      0|#define LYS_SET_DFLT     0x0200      /**< flag to mark leaf/leaflist with own (or refined) default value, not a default value taken from its type, and default
  ------------------
  |  Branch (2929:9): [True: 0, False: 590k]
  |  Branch (2929:17): [True: 0, False: 0]
  ------------------
 2930|      0|        LY_CHECK_RET(lysc_unres_leaf_dflt_add(ctx, leaf, dflt));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2931|      0|    }
 2932|       |
 2933|       |    /* store leafref(s) to be resolved */
 2934|   590k|    LY_CHECK_RET(lysc_unres_leafref_add(ctx, leaf, type_p->pmod));
  ------------------
  |  |  206|   590k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   590k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   590k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   590k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 590k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2935|       |
 2936|       |    /* type-specific checks */
 2937|   590k|    if (leaf->type->basetype == LY_TYPE_UNION) {
  ------------------
  |  Branch (2937:9): [True: 56.2k, False: 534k]
  ------------------
 2938|  56.2k|        t = ((struct lysc_type_union *)leaf->type)->types;
 2939|  56.2k|        count = LY_ARRAY_COUNT(t);
  ------------------
  |  |  148|  56.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 56.2k, False: 0]
  |  |  ------------------
  ------------------
 2940|   534k|    } else {
 2941|   534k|        t = &leaf->type;
 2942|   534k|        count = 1;
 2943|   534k|    }
 2944|  1.23M|    for (u = 0; u < count; ++u) {
  ------------------
  |  Branch (2944:17): [True: 646k, False: 590k]
  ------------------
 2945|   646k|        if (t[u]->basetype == LY_TYPE_EMPTY) {
  ------------------
  |  Branch (2945:13): [True: 0, False: 646k]
  ------------------
 2946|      0|            if ((leaf->nodetype == LYS_LEAFLIST) && (ctx->pmod->version < LYS_VERSION_1_1)) {
  ------------------
  |  |  243|      0|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (2946:17): [True: 0, False: 0]
  |  Branch (2946:53): [True: 0, False: 0]
  ------------------
 2947|      0|                LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Leaf-list of type \"empty\" is allowed only in YANG 1.1 modules.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2948|      0|                return LY_EVALID;
 2949|      0|            }
 2950|   646k|        } else if (!in_unres && ((t[u]->basetype == LY_TYPE_BITS) || (t[u]->basetype == LY_TYPE_ENUM))) {
  ------------------
  |  Branch (2950:20): [True: 646k, False: 0]
  |  Branch (2950:34): [True: 0, False: 646k]
  |  Branch (2950:70): [True: 14.0k, False: 632k]
  ------------------
 2951|       |            /* store in unres for all disabled bits/enums to be removed */
 2952|  14.0k|            LY_CHECK_RET(lysc_unres_bitenum_add(ctx, leaf));
  ------------------
  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.0k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2953|  14.0k|            in_unres = 1;
 2954|  14.0k|        }
 2955|   646k|    }
 2956|       |
 2957|   590k|    return LY_SUCCESS;
 2958|   590k|}
schema_compile_node.c:lysc_unres_leafref_add:
  150|   590k|{
  151|   590k|    struct lysc_unres_leafref *l = NULL;
  152|   590k|    struct ly_set *leafrefs_set;
  153|   590k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   590k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  154|   590k|    int is_lref = 0;
  155|       |
  156|   590k|    if (ctx->compile_opts & LYS_COMPILE_GROUPING) {
  ------------------
  |  |  537|   590k|#define LYS_COMPILE_GROUPING        0x01            /**< Compiling (validation) of a non-instantiated grouping.
  ------------------
  |  Branch (156:9): [True: 0, False: 590k]
  ------------------
  157|       |        /* do not check leafrefs in groupings */
  158|      0|        return LY_SUCCESS;
  159|      0|    }
  160|       |
  161|       |    /* use special set for disabled leafrefs */
  162|   590k|    leafrefs_set = ctx->compile_opts & LYS_COMPILE_DISABLED ? &ctx->unres->disabled_leafrefs : &ctx->unres->leafrefs;
  ------------------
  |  |  542|   590k|#define LYS_COMPILE_DISABLED        0x02            /**< Compiling a disabled subtree (by its if-features). Meaning
  ------------------
  |  Branch (162:20): [True: 0, False: 590k]
  ------------------
  163|       |
  164|   590k|    if (leaf->type->basetype == LY_TYPE_LEAFREF) {
  ------------------
  |  Branch (164:9): [True: 70.2k, False: 520k]
  ------------------
  165|       |        /* leafref */
  166|  70.2k|        is_lref = 1;
  167|   520k|    } else if (leaf->type->basetype == LY_TYPE_UNION) {
  ------------------
  |  Branch (167:16): [True: 56.2k, False: 463k]
  ------------------
  168|       |        /* union with leafrefs */
  169|   112k|        LY_ARRAY_FOR(((struct lysc_type_union *)leaf->type)->types, u) {
  ------------------
  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  56.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  56.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   168k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   168k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 168k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 112k, False: 56.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|   112k|            if (((struct lysc_type_union *)leaf->type)->types[u]->basetype == LY_TYPE_LEAFREF) {
  ------------------
  |  Branch (170:17): [True: 0, False: 112k]
  ------------------
  171|      0|                is_lref = 1;
  172|      0|                break;
  173|      0|            }
  174|   112k|        }
  175|  56.2k|    }
  176|       |
  177|   590k|    if (is_lref) {
  ------------------
  |  Branch (177:9): [True: 70.2k, False: 520k]
  ------------------
  178|       |        /* add new unresolved leafref node */
  179|  70.2k|        l = calloc(1, sizeof *l);
  180|  70.2k|        LY_CHECK_ERR_RET(!l, LOGMEM(ctx->ctx), LY_EMEM);
  ------------------
  |  |  207|  70.2k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
  181|       |
  182|  70.2k|        l->node = &leaf->node;
  183|  70.2k|        l->local_mod = local_mod;
  184|  70.2k|        l->ext = ctx->ext;
  185|       |
  186|  70.2k|        LY_CHECK_ERR_RET(ly_set_add(leafrefs_set, l, 1, NULL), free(l); LOGMEM(ctx->ctx), LY_EMEM);
  ------------------
  |  |  207|  70.2k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
  187|  70.2k|    }
  188|       |
  189|   590k|    return LY_SUCCESS;
  190|   590k|}
schema_compile_node.c:lysc_unres_bitenum_add:
  293|  14.0k|{
  294|  14.0k|    if (ctx->compile_opts & (LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING)) {
  ------------------
  |  |  542|  14.0k|#define LYS_COMPILE_DISABLED        0x02            /**< Compiling a disabled subtree (by its if-features). Meaning
  ------------------
                  if (ctx->compile_opts & (LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING)) {
  ------------------
  |  |  537|  14.0k|#define LYS_COMPILE_GROUPING        0x01            /**< Compiling (validation) of a non-instantiated grouping.
  ------------------
  |  Branch (294:9): [True: 0, False: 14.0k]
  ------------------
  295|       |        /* skip groupings and redundant for disabled nodes */
  296|      0|        return LY_SUCCESS;
  297|      0|    }
  298|       |
  299|  14.0k|    LY_CHECK_RET(ly_set_add(&ctx->unres->disabled_bitenums, leaf, 1, NULL));
  ------------------
  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.0k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|       |
  301|  14.0k|    return LY_SUCCESS;
  302|  14.0k|}
schema_compile_node.c:lysc_unres_leaf_dflt_add:
  203|  14.0k|{
  204|  14.0k|    struct lysc_unres_dflt *r = NULL;
  205|  14.0k|    uint32_t i;
  206|       |
  207|  14.0k|    if (ctx->compile_opts & (LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING)) {
  ------------------
  |  |  542|  14.0k|#define LYS_COMPILE_DISABLED        0x02            /**< Compiling a disabled subtree (by its if-features). Meaning
  ------------------
                  if (ctx->compile_opts & (LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING)) {
  ------------------
  |  |  537|  14.0k|#define LYS_COMPILE_GROUPING        0x01            /**< Compiling (validation) of a non-instantiated grouping.
  ------------------
  |  Branch (207:9): [True: 0, False: 14.0k]
  ------------------
  208|      0|        return LY_SUCCESS;
  209|      0|    }
  210|       |
  211|  14.0k|    for (i = 0; i < ctx->unres->dflts.count; ++i) {
  ------------------
  |  Branch (211:17): [True: 0, False: 14.0k]
  ------------------
  212|      0|        if (((struct lysc_unres_dflt *)ctx->unres->dflts.objs[i])->leaf == leaf) {
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|       |            /* just replace the default */
  214|      0|            r = ctx->unres->dflts.objs[i];
  215|      0|            lysp_qname_free(ctx->ctx, r->dflt);
  216|      0|            free(r->dflt);
  217|      0|            break;
  218|      0|        }
  219|      0|    }
  220|  14.0k|    if (!r) {
  ------------------
  |  Branch (220:9): [True: 14.0k, False: 0]
  ------------------
  221|       |        /* add new unres item */
  222|  14.0k|        r = calloc(1, sizeof *r);
  223|  14.0k|        LY_CHECK_ERR_RET(!r, LOGMEM(ctx->ctx), LY_EMEM);
  ------------------
  |  |  207|  14.0k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  224|  14.0k|        r->leaf = leaf;
  225|       |
  226|  14.0k|        LY_CHECK_RET(ly_set_add(&ctx->unres->dflts, r, 1, NULL));
  ------------------
  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  14.0k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.0k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  14.0k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  227|  14.0k|    }
  228|       |
  229|  14.0k|    r->dflt = malloc(sizeof *r->dflt);
  230|  14.0k|    LY_CHECK_GOTO(!r->dflt, error);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  231|  14.0k|    LY_CHECK_GOTO(lysp_qname_dup(ctx->ctx, dflt, r->dflt), error);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  232|       |
  233|  14.0k|    return LY_SUCCESS;
  234|       |
  235|      0|error:
  236|      0|    free(r->dflt);
  237|      0|    LOGMEM(ctx->ctx);
  ------------------
  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  238|      0|    return LY_EMEM;
  239|  14.0k|}
schema_compile_node.c:lys_compile_node_list:
 3334|   168k|{
 3335|   168k|    struct lysp_node_list *list_p = (struct lysp_node_list *)pnode;
 3336|   168k|    struct lysc_node_list *list = (struct lysc_node_list *)node;
 3337|   168k|    struct lysp_node *child_p;
 3338|   168k|    struct lysc_node *parent;
 3339|   168k|    struct lysc_node_leaf *key, *prev_key = NULL;
 3340|   168k|    size_t len;
 3341|   168k|    const char *keystr, *delim;
 3342|   168k|    LY_ERR ret = LY_SUCCESS;
 3343|       |
 3344|   168k|    list->min = list_p->min;
 3345|   168k|    if (list->min) {
  ------------------
  |  Branch (3345:9): [True: 0, False: 168k]
  ------------------
 3346|      0|        list->flags |= LYS_MAND_TRUE;
  ------------------
  |  |  658|      0|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
 3347|      0|    }
 3348|   168k|    list->max = list_p->max ? list_p->max : (uint32_t)-1;
  ------------------
  |  Branch (3348:17): [True: 0, False: 168k]
  ------------------
 3349|       |
 3350|   492k|    LY_LIST_FOR(list_p->child, child_p) {
  ------------------
  |  |  181|   168k|    for ((ELEM) = (START); \
  |  |  182|   660k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 492k, False: 168k]
  |  |  ------------------
  |  |  183|   492k|         (ELEM) = (ELEM)->next)
  ------------------
 3351|   492k|        LY_CHECK_RET(lys_compile_node(ctx, child_p, node, 0, NULL));
  ------------------
  |  |  206|   492k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   492k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   492k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   492k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 492k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3352|   492k|    }
 3353|       |
 3354|   168k|    COMPILE_ARRAY_GOTO(ctx, list_p->musts, list->musts, lys_compile_must, ret, done);
  ------------------
  |  |  219|   168k|    if (ARRAY_P) { \
  |  |  ------------------
  |  |  |  Branch (219:9): [True: 0, False: 168k]
  |  |  ------------------
  |  |  220|      0|        LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (220:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  221|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, ARRAY_C, __u + LY_ARRAY_COUNT(ARRAY_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  222|      0|        LY_ARRAY_FOR(ARRAY_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  223|      0|            LY_ARRAY_INCREMENT(ARRAY_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  224|      0|            RET = FUNC(CTX, &(ARRAY_P)[__u], &(ARRAY_C)[LY_ARRAY_COUNT(ARRAY_C) - 1]); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  225|      0|            LY_CHECK_GOTO(RET, GOTO); \
  |  |  ------------------
  |  |  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  226|      0|        } \
  |  |  227|      0|    }
  ------------------
 3355|       |
 3356|       |    /* add must(s) to unres */
 3357|   168k|    ret = lysc_unres_must_add(ctx, node, pnode);
 3358|   168k|    LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|   168k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 168k]
  |  |  ------------------
  ------------------
 3359|       |
 3360|       |    /* keys */
 3361|   168k|    if (list->flags & LYS_CONFIG_W) {
  ------------------
  |  |  651|   168k|#define LYS_CONFIG_W     0x01        /**< config true; */
  ------------------
  |  Branch (3361:9): [True: 0, False: 168k]
  ------------------
 3362|      0|        parent = node;
 3363|      0|        if (ctx->compile_opts & LYS_COMPILE_GROUPING) {
  ------------------
  |  |  537|      0|#define LYS_COMPILE_GROUPING        0x01            /**< Compiling (validation) of a non-instantiated grouping.
  ------------------
  |  Branch (3363:13): [True: 0, False: 0]
  ------------------
 3364|       |            /* compiling individual grouping, we can check this only if there is an explicit config set */
 3365|      0|            while (parent) {
  ------------------
  |  Branch (3365:20): [True: 0, False: 0]
  ------------------
 3366|      0|                if (parent->flags & LYS_SET_CONFIG) {
  ------------------
  |  |  706|      0|#define LYS_SET_CONFIG   0x0800      /**< flag to know if the config property was set explicitly (flag set) or it is inherited. */
  ------------------
  |  Branch (3366:21): [True: 0, False: 0]
  ------------------
 3367|      0|                    break;
 3368|      0|                }
 3369|      0|                parent = parent->parent;
 3370|      0|            }
 3371|      0|        }
 3372|       |
 3373|      0|        if (parent && (!list_p->key || !list_p->key[0])) {
  ------------------
  |  Branch (3373:13): [True: 0, False: 0]
  |  Branch (3373:24): [True: 0, False: 0]
  |  Branch (3373:40): [True: 0, False: 0]
  ------------------
 3374|      0|            LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Missing key in list representing configuration data.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3375|      0|            return LY_EVALID;
 3376|      0|        }
 3377|      0|    }
 3378|       |
 3379|       |    /* find all the keys (must be direct children) */
 3380|   168k|    keystr = list_p->key;
 3381|   168k|    if (!keystr) {
  ------------------
  |  Branch (3381:9): [True: 0, False: 168k]
  ------------------
 3382|       |        /* keyless list */
 3383|      0|        list->flags &= ~LYS_ORDBY_SYSTEM;
  ------------------
  |  |  675|      0|#define LYS_ORDBY_SYSTEM 0x80        /**< ordered-by system configuration lists, applicable only to
  ------------------
 3384|      0|        list->flags |= LYS_KEYLESS | LYS_ORDBY_USER;
  ------------------
  |  |  672|      0|#define LYS_KEYLESS      0x0200      /**< flag for list without any key, applicable only to ::lysc_node_list */
  ------------------
                      list->flags |= LYS_KEYLESS | LYS_ORDBY_USER;
  ------------------
  |  |  677|      0|#define LYS_ORDBY_USER   0x40        /**< ordered-by user configuration lists, applicable only to
  ------------------
 3385|      0|    }
 3386|   407k|    while (keystr) {
  ------------------
  |  Branch (3386:12): [True: 238k, False: 168k]
  ------------------
 3387|   238k|        delim = strpbrk(keystr, " \t\n");
 3388|   238k|        if (delim) {
  ------------------
  |  Branch (3388:13): [True: 70.2k, False: 168k]
  ------------------
 3389|  70.2k|            len = delim - keystr;
 3390|  70.2k|            while (isspace(*delim)) {
 3391|  70.2k|                ++delim;
 3392|  70.2k|            }
 3393|   168k|        } else {
 3394|   168k|            len = strlen(keystr);
 3395|   168k|        }
 3396|       |
 3397|       |        /* key node must be present */
 3398|   238k|        key = (struct lysc_node_leaf *)lys_find_child(node, node->module, keystr, len, LYS_LEAF, LYS_GETNEXT_NOCHOICE);
  ------------------
  |  |  242|   238k|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
                      key = (struct lysc_node_leaf *)lys_find_child(node, node->module, keystr, len, LYS_LEAF, LYS_GETNEXT_NOCHOICE);
  ------------------
  |  | 2189|   238k|#define LYS_GETNEXT_NOCHOICE     0x02 /**< ::lys_getnext() option to ignore (kind of conditional) nodes within choice node */
  ------------------
 3399|   238k|        if (!key) {
  ------------------
  |  Branch (3399:13): [True: 0, False: 238k]
  ------------------
 3400|      0|            LOGVAL(ctx->ctx, LYVE_REFERENCE, "The list's key \"%.*s\" not found.", (int)len, keystr);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3401|      0|            return LY_EVALID;
 3402|      0|        }
 3403|       |        /* keys must be unique */
 3404|   238k|        if (key->flags & LYS_KEY) {
  ------------------
  |  |  671|   238k|#define LYS_KEY          0x0100      /**< flag for leafs being a key of a list, applicable only to ::lysc_node_leaf */
  ------------------
  |  Branch (3404:13): [True: 0, False: 238k]
  ------------------
 3405|       |            /* the node was already marked as a key */
 3406|      0|            LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Duplicated key identifier \"%.*s\".", (int)len, keystr);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3407|      0|            return LY_EVALID;
 3408|      0|        }
 3409|       |
 3410|   238k|        lysc_update_path(ctx, list->module, key->name);
 3411|       |        /* key must have the same config flag as the list itself */
 3412|   238k|        if ((list->flags & LYS_CONFIG_MASK) != (key->flags & LYS_CONFIG_MASK)) {
  ------------------
  |  |  653|   238k|#define LYS_CONFIG_MASK  0x03        /**< mask for config value */
  ------------------
                      if ((list->flags & LYS_CONFIG_MASK) != (key->flags & LYS_CONFIG_MASK)) {
  ------------------
  |  |  653|   238k|#define LYS_CONFIG_MASK  0x03        /**< mask for config value */
  ------------------
  |  Branch (3412:13): [True: 0, False: 238k]
  ------------------
 3413|      0|            LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Key of a configuration list must not be a state leaf.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3414|      0|            return LY_EVALID;
 3415|      0|        }
 3416|   238k|        if (ctx->pmod->version < LYS_VERSION_1_1) {
  ------------------
  |  Branch (3416:13): [True: 0, False: 238k]
  ------------------
 3417|       |            /* YANG 1.0 denies key to be of empty type */
 3418|      0|            if (key->type->basetype == LY_TYPE_EMPTY) {
  ------------------
  |  Branch (3418:17): [True: 0, False: 0]
  ------------------
 3419|      0|                LOGVAL(ctx->ctx, LYVE_SEMANTICS,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3420|      0|                        "List key of the \"empty\" type is allowed only in YANG 1.1 modules.");
 3421|      0|                return LY_EVALID;
 3422|      0|            }
 3423|   238k|        } else {
 3424|       |            /* when and if-feature are illegal on list keys */
 3425|   238k|            if (key->when) {
  ------------------
  |  Branch (3425:17): [True: 0, False: 238k]
  ------------------
 3426|      0|                LOGVAL(ctx->ctx, LYVE_SEMANTICS, "List's key must not have any \"when\" statement.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3427|      0|                return LY_EVALID;
 3428|      0|            }
 3429|       |            /* unable to check if-features but compilation would fail if disabled */
 3430|   238k|        }
 3431|       |
 3432|       |        /* check status */
 3433|   238k|        LY_CHECK_RET(lysc_check_status(ctx, list->flags, list->module, list->name, key->flags, key->module, key->name));
  ------------------
  |  |  206|   238k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   238k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   238k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   238k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 238k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3434|       |
 3435|       |        /* ignore default values of the key */
 3436|   238k|        if (key->dflt) {
  ------------------
  |  Branch (3436:13): [True: 0, False: 238k]
  ------------------
 3437|      0|            key->dflt->realtype->plugin->free(ctx->ctx, key->dflt);
 3438|      0|            lysc_type_free(&ctx->free_ctx, (struct lysc_type *)key->dflt->realtype);
 3439|      0|            free(key->dflt);
 3440|      0|            key->dflt = NULL;
 3441|      0|        }
 3442|       |        /* mark leaf as key */
 3443|   238k|        key->flags |= LYS_KEY;
  ------------------
  |  |  671|   238k|#define LYS_KEY          0x0100      /**< flag for leafs being a key of a list, applicable only to ::lysc_node_leaf */
  ------------------
 3444|       |
 3445|       |        /* move it to the correct position */
 3446|   238k|        if ((prev_key && ((struct lysc_node *)prev_key != key->prev)) || (!prev_key && key->prev->next)) {
  ------------------
  |  Branch (3446:14): [True: 70.2k, False: 168k]
  |  Branch (3446:26): [True: 0, False: 70.2k]
  |  Branch (3446:75): [True: 168k, False: 70.2k]
  |  Branch (3446:88): [True: 0, False: 168k]
  ------------------
 3447|       |            /* fix links in closest previous siblings of the key */
 3448|      0|            if (key->next) {
  ------------------
  |  Branch (3448:17): [True: 0, False: 0]
  ------------------
 3449|      0|                key->next->prev = key->prev;
 3450|      0|            } else {
 3451|       |                /* last child */
 3452|      0|                list->child->prev = key->prev;
 3453|      0|            }
 3454|      0|            if (key->prev->next) {
  ------------------
  |  Branch (3454:17): [True: 0, False: 0]
  ------------------
 3455|      0|                key->prev->next = key->next;
 3456|      0|            }
 3457|       |            /* fix links in the key */
 3458|      0|            if (prev_key) {
  ------------------
  |  Branch (3458:17): [True: 0, False: 0]
  ------------------
 3459|      0|                key->prev = &prev_key->node;
 3460|      0|                key->next = prev_key->next;
 3461|      0|            } else {
 3462|      0|                key->prev = list->child->prev;
 3463|      0|                key->next = list->child;
 3464|      0|            }
 3465|       |            /* fix links in closes future siblings of the key */
 3466|      0|            if (prev_key) {
  ------------------
  |  Branch (3466:17): [True: 0, False: 0]
  ------------------
 3467|      0|                if (prev_key->next) {
  ------------------
  |  Branch (3467:21): [True: 0, False: 0]
  ------------------
 3468|      0|                    prev_key->next->prev = &key->node;
 3469|      0|                } else {
 3470|      0|                    list->child->prev = &key->node;
 3471|      0|                }
 3472|      0|                prev_key->next = &key->node;
 3473|      0|            } else {
 3474|      0|                list->child->prev = &key->node;
 3475|      0|            }
 3476|       |            /* fix links in parent */
 3477|      0|            if (!key->prev->next) {
  ------------------
  |  Branch (3477:17): [True: 0, False: 0]
  ------------------
 3478|      0|                list->child = &key->node;
 3479|      0|            }
 3480|      0|        }
 3481|       |
 3482|       |        /* next key value */
 3483|   238k|        prev_key = key;
 3484|   238k|        keystr = delim;
 3485|   238k|        lysc_update_path(ctx, NULL, NULL);
 3486|   238k|    }
 3487|       |
 3488|       |    /* connect any augments */
 3489|   168k|    LY_CHECK_GOTO(ret = lys_compile_node_augments(ctx, node), done);
  ------------------
  |  |  202|   168k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 168k]
  |  |  ------------------
  ------------------
 3490|       |
 3491|       |    /* uniques */
 3492|   168k|    if (list_p->uniques) {
  ------------------
  |  Branch (3492:9): [True: 0, False: 168k]
  ------------------
 3493|      0|        LY_CHECK_RET(lys_compile_node_list_unique(ctx, list_p->uniques, list));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3494|      0|    }
 3495|       |
 3496|   168k|    LY_LIST_FOR((struct lysp_node *)list_p->actions, child_p) {
  ------------------
  |  |  181|   168k|    for ((ELEM) = (START); \
  |  |  182|   168k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 168k]
  |  |  ------------------
  |  |  183|   168k|         (ELEM) = (ELEM)->next)
  ------------------
 3497|      0|        ret = lys_compile_node(ctx, child_p, node, 0, NULL);
 3498|      0|        LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3499|      0|    }
 3500|   168k|    LY_LIST_FOR((struct lysp_node *)list_p->notifs, child_p) {
  ------------------
  |  |  181|   168k|    for ((ELEM) = (START); \
  |  |  182|   168k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 168k]
  |  |  ------------------
  |  |  183|   168k|         (ELEM) = (ELEM)->next)
  ------------------
 3501|      0|        ret = lys_compile_node(ctx, child_p, node, 0, NULL);
 3502|      0|        LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3503|      0|    }
 3504|       |
 3505|       |    /* checks */
 3506|   168k|    if (list->min > list->max) {
  ------------------
  |  Branch (3506:9): [True: 0, False: 168k]
  ------------------
 3507|      0|        LOGVAL(ctx->ctx, LYVE_SEMANTICS, "List min-elements %u is bigger than max-elements %u.", list->min, list->max);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3508|      0|        return LY_EVALID;
 3509|      0|    }
 3510|       |
 3511|   168k|done:
 3512|   168k|    return ret;
 3513|   168k|}
schema_compile_node.c:lys_compile_node_leaflist:
 3016|   126k|{
 3017|   126k|    struct lysp_node_leaflist *llist_p = (struct lysp_node_leaflist *)pnode;
 3018|   126k|    struct lysc_node_leaflist *llist = (struct lysc_node_leaflist *)node;
 3019|   126k|    LY_ERR ret = LY_SUCCESS;
 3020|       |
 3021|   126k|    COMPILE_ARRAY_GOTO(ctx, llist_p->musts, llist->musts, lys_compile_must, ret, done);
  ------------------
  |  |  219|   126k|    if (ARRAY_P) { \
  |  |  ------------------
  |  |  |  Branch (219:9): [True: 0, False: 126k]
  |  |  ------------------
  |  |  220|      0|        LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (220:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  221|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, ARRAY_C, __u + LY_ARRAY_COUNT(ARRAY_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  222|      0|        LY_ARRAY_FOR(ARRAY_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  223|      0|            LY_ARRAY_INCREMENT(ARRAY_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  224|      0|            RET = FUNC(CTX, &(ARRAY_P)[__u], &(ARRAY_C)[LY_ARRAY_COUNT(ARRAY_C) - 1]); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  225|      0|            LY_CHECK_GOTO(RET, GOTO); \
  |  |  ------------------
  |  |  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  226|      0|        } \
  |  |  227|      0|    }
  ------------------
 3022|       |
 3023|       |    /* add must(s) to unres */
 3024|   126k|    ret = lysc_unres_must_add(ctx, node, pnode);
 3025|   126k|    LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|   126k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
 3026|       |
 3027|   126k|    if (llist_p->units) {
  ------------------
  |  Branch (3027:9): [True: 0, False: 126k]
  ------------------
 3028|      0|        LY_CHECK_GOTO(ret = lydict_insert(ctx->ctx, llist_p->units, 0, &llist->units), done);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3029|      0|        llist->flags |= LYS_SET_UNITS;
  ------------------
  |  |  705|      0|#define LYS_SET_UNITS    0x0400      /**< flag to know if the leaf's/leaflist's units are their own (flag set) or it is taken from the type. */
  ------------------
 3030|      0|    }
 3031|       |
 3032|       |    /* compile type */
 3033|   126k|    ret = lys_compile_node_type(ctx, pnode, &llist_p->type, (struct lysc_node_leaf *)llist);
 3034|   126k|    LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|   126k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
 3035|       |
 3036|       |    /* store/update default values */
 3037|   126k|    if (llist_p->dflts) {
  ------------------
  |  Branch (3037:9): [True: 0, False: 126k]
  ------------------
 3038|      0|        if (ctx->pmod->version < LYS_VERSION_1_1) {
  ------------------
  |  Branch (3038:13): [True: 0, False: 0]
  ------------------
 3039|      0|            LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Leaf-list default values are allowed only in YANG 1.1 modules.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3040|      0|            return LY_EVALID;
 3041|      0|        }
 3042|       |
 3043|      0|        LY_CHECK_GOTO(lysc_unres_llist_dflts_add(ctx, llist, llist_p->dflts), done);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3044|      0|        llist->flags |= LYS_SET_DFLT;
  ------------------
  |  |  700|      0|#define LYS_SET_DFLT     0x0200      /**< flag to mark leaf/leaflist with own (or refined) default value, not a default value taken from its type, and default
  ------------------
 3045|      0|    }
 3046|       |
 3047|   126k|    llist->min = llist_p->min;
 3048|   126k|    if (llist->min) {
  ------------------
  |  Branch (3048:9): [True: 0, False: 126k]
  ------------------
 3049|      0|        llist->flags |= LYS_MAND_TRUE;
  ------------------
  |  |  658|      0|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
 3050|      0|    }
 3051|   126k|    llist->max = llist_p->max ? llist_p->max : UINT32_MAX;
  ------------------
  |  Branch (3051:18): [True: 0, False: 126k]
  ------------------
 3052|       |
 3053|   126k|    if (llist->flags & LYS_CONFIG_R) {
  ------------------
  |  |  652|   126k|#define LYS_CONFIG_R     0x02        /**< config false; */
  ------------------
  |  Branch (3053:9): [True: 126k, False: 0]
  ------------------
 3054|       |        /* state leaf-list is always ordered-by user */
 3055|   126k|        llist->flags &= ~LYS_ORDBY_SYSTEM;
  ------------------
  |  |  675|   126k|#define LYS_ORDBY_SYSTEM 0x80        /**< ordered-by system configuration lists, applicable only to
  ------------------
 3056|   126k|        llist->flags |= LYS_ORDBY_USER;
  ------------------
  |  |  677|   126k|#define LYS_ORDBY_USER   0x40        /**< ordered-by user configuration lists, applicable only to
  ------------------
 3057|   126k|    }
 3058|       |
 3059|       |    /* checks */
 3060|   126k|    if ((llist->flags & LYS_SET_DFLT) && (llist->flags & LYS_MAND_TRUE)) {
  ------------------
  |  |  700|   126k|#define LYS_SET_DFLT     0x0200      /**< flag to mark leaf/leaflist with own (or refined) default value, not a default value taken from its type, and default
  ------------------
                  if ((llist->flags & LYS_SET_DFLT) && (llist->flags & LYS_MAND_TRUE)) {
  ------------------
  |  |  658|      0|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
  |  Branch (3060:9): [True: 0, False: 126k]
  |  Branch (3060:42): [True: 0, False: 0]
  ------------------
 3061|      0|        LOGVAL(ctx->ctx, LYVE_SEMANTICS, "The default statement is present on leaf-list with a nonzero min-elements.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3062|      0|        return LY_EVALID;
 3063|      0|    }
 3064|       |
 3065|   126k|    if (llist->min > llist->max) {
  ------------------
  |  Branch (3065:9): [True: 0, False: 126k]
  ------------------
 3066|      0|        LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Leaf-list min-elements %u is bigger than max-elements %u.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3067|      0|                llist->min, llist->max);
 3068|      0|        return LY_EVALID;
 3069|      0|    }
 3070|       |
 3071|   126k|done:
 3072|   126k|    return ret;
 3073|   126k|}
schema_compile_node.c:lys_compile_node_choice:
 3651|  14.0k|{
 3652|  14.0k|    struct lysp_node_choice *ch_p = (struct lysp_node_choice *)pnode;
 3653|  14.0k|    struct lysc_node_choice *ch = (struct lysc_node_choice *)node;
 3654|  14.0k|    struct lysp_node *child_p;
 3655|  14.0k|    LY_ERR ret = LY_SUCCESS;
 3656|       |
 3657|  14.0k|    assert(node->nodetype == LYS_CHOICE);
 3658|       |
 3659|  28.1k|    LY_LIST_FOR(ch_p->child, child_p) {
  ------------------
  |  |  181|  14.0k|    for ((ELEM) = (START); \
  |  |  182|  42.1k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 28.1k, False: 14.0k]
  |  |  ------------------
  |  |  183|  28.1k|         (ELEM) = (ELEM)->next)
  ------------------
 3660|  28.1k|        LY_CHECK_GOTO(ret = lys_compile_node_choice_child(ctx, child_p, node, NULL), done);
  ------------------
  |  |  202|  28.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 3661|  28.1k|    }
 3662|       |
 3663|       |    /* connect any augments */
 3664|  14.0k|    LY_CHECK_GOTO(ret = lys_compile_node_augments(ctx, node), done);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 3665|       |
 3666|       |    /* default branch */
 3667|  14.0k|    if (ch_p->dflt.str) {
  ------------------
  |  Branch (3667:9): [True: 0, False: 14.0k]
  ------------------
 3668|      0|        LY_CHECK_GOTO(ret = lys_compile_node_choice_dflt(ctx, &ch_p->dflt, ch), done);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3669|      0|    }
 3670|       |
 3671|  14.0k|done:
 3672|  14.0k|    return ret;
 3673|  14.0k|}
schema_compile_node.c:lys_compile_node_case:
 3721|  28.1k|{
 3722|  28.1k|    LY_ERR ret = LY_SUCCESS;
 3723|  28.1k|    struct lysp_node *child_p;
 3724|  28.1k|    struct lysp_node_case *cs_p = (struct lysp_node_case *)pnode;
 3725|       |
 3726|  28.1k|    if (pnode->nodetype & (LYS_CHOICE | LYS_AUGMENT | LYS_GROUPING)) {
  ------------------
  |  |  241|  28.1k|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
                  if (pnode->nodetype & (LYS_CHOICE | LYS_AUGMENT | LYS_GROUPING)) {
  ------------------
  |  |  257|  28.1k|#define LYS_AUGMENT     0x8000
  ------------------
                  if (pnode->nodetype & (LYS_CHOICE | LYS_AUGMENT | LYS_GROUPING)) {
  ------------------
  |  |  256|  28.1k|#define LYS_GROUPING    0x4000
  ------------------
  |  Branch (3726:9): [True: 0, False: 28.1k]
  ------------------
 3727|       |        /* we have to add an implicit case node into the parent choice */
 3728|  28.1k|    } else if (pnode->nodetype == LYS_CASE) {
  ------------------
  |  |  247|  28.1k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
  |  Branch (3728:16): [True: 28.1k, False: 0]
  ------------------
 3729|       |        /* explicit parent case */
 3730|  28.1k|        LY_LIST_FOR(cs_p->child, child_p) {
  ------------------
  |  |  181|  28.1k|    for ((ELEM) = (START); \
  |  |  182|  56.2k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 28.1k, False: 28.1k]
  |  |  ------------------
  |  |  183|  28.1k|         (ELEM) = (ELEM)->next)
  ------------------
 3731|  28.1k|            LY_CHECK_GOTO(ret = lys_compile_node(ctx, child_p, node, 0, NULL), done);
  ------------------
  |  |  202|  28.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 3732|  28.1k|        }
 3733|  28.1k|    } else {
 3734|      0|        LOGINT_RET(ctx->ctx);
  ------------------
  |  |  196|      0|#define LOGINT_RET(CTX) LOGINT(CTX); return LY_EINT
  |  |  ------------------
  |  |  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3735|      0|    }
 3736|       |
 3737|       |    /* connect any augments */
 3738|  28.1k|    LY_CHECK_GOTO(ret = lys_compile_node_augments(ctx, node), done);
  ------------------
  |  |  202|  28.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 3739|       |
 3740|  28.1k|done:
 3741|  28.1k|    return ret;
 3742|  28.1k|}
schema_compile_node.c:lys_compile_node_notif:
 2830|  28.1k|{
 2831|  28.1k|    LY_ERR ret = LY_SUCCESS;
 2832|  28.1k|    struct lysp_node_notif *notif_p = (struct lysp_node_notif *)pnode;
 2833|  28.1k|    struct lysc_node_notif *notif = (struct lysc_node_notif *)node;
 2834|  28.1k|    struct lysp_node *child_p;
 2835|       |
 2836|  28.1k|    COMPILE_ARRAY_GOTO(ctx, notif_p->musts, notif->musts, lys_compile_must, ret, done);
  ------------------
  |  |  219|  28.1k|    if (ARRAY_P) { \
  |  |  ------------------
  |  |  |  Branch (219:9): [True: 0, False: 28.1k]
  |  |  ------------------
  |  |  220|      0|        LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (ARRAY_C) ? LY_ARRAY_COUNT(ARRAY_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (220:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  221|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, ARRAY_C, __u + LY_ARRAY_COUNT(ARRAY_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  222|      0|        LY_ARRAY_FOR(ARRAY_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  223|      0|            LY_ARRAY_INCREMENT(ARRAY_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  224|      0|            RET = FUNC(CTX, &(ARRAY_P)[__u], &(ARRAY_C)[LY_ARRAY_COUNT(ARRAY_C) - 1]); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  225|      0|            LY_CHECK_GOTO(RET, GOTO); \
  |  |  ------------------
  |  |  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  226|      0|        } \
  |  |  227|      0|    }
  ------------------
 2837|       |
 2838|       |    /* add must(s) to unres */
 2839|  28.1k|    ret = lysc_unres_must_add(ctx, node, pnode);
 2840|  28.1k|    LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|  28.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 2841|       |
 2842|  28.1k|    LY_LIST_FOR(notif_p->child, child_p) {
  ------------------
  |  |  181|  28.1k|    for ((ELEM) = (START); \
  |  |  182|  56.2k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 28.1k, False: 28.1k]
  |  |  ------------------
  |  |  183|  28.1k|         (ELEM) = (ELEM)->next)
  ------------------
 2843|  28.1k|        ret = lys_compile_node(ctx, child_p, node, 0, NULL);
 2844|  28.1k|        LY_CHECK_GOTO(ret, done);
  ------------------
  |  |  202|  28.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 2845|  28.1k|    }
 2846|       |
 2847|       |    /* connect any augments */
 2848|  28.1k|    LY_CHECK_GOTO(ret = lys_compile_node_augments(ctx, node), done);
  ------------------
  |  |  202|  28.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 2849|       |
 2850|  28.1k|done:
 2851|  28.1k|    return ret;
 2852|  28.1k|}
schema_compile_node.c:lys_compile_node_:
 2643|   899k|{
 2644|   899k|    LY_ERR ret = LY_SUCCESS;
 2645|   899k|    ly_bool not_supported, enabled;
 2646|   899k|    struct lysp_node *dev_pnode = NULL;
 2647|   899k|    struct lysp_when *pwhen = NULL;
 2648|   899k|    uint32_t prev_opts = ctx->compile_opts;
 2649|       |
 2650|   899k|    node->nodetype = pnode->nodetype;
 2651|   899k|    node->module = ctx->cur_mod;
 2652|   899k|    node->parent = parent;
 2653|   899k|    node->prev = node;
 2654|   899k|    node->priv = ctx->ctx->flags & LY_CTX_SET_PRIV_PARSED ? pnode : NULL;
  ------------------
  |  |  183|   899k|#define LY_CTX_SET_PRIV_PARSED 0x40 /**< For all compiled nodes, their private objects (::lysc_node.priv) are used
  ------------------
  |  Branch (2654:18): [True: 0, False: 899k]
  ------------------
 2655|       |
 2656|       |    /* compile any deviations for this node */
 2657|   899k|    LY_CHECK_GOTO(ret = lys_compile_node_deviations_refines(ctx, pnode, parent, &dev_pnode, &not_supported), error);
  ------------------
  |  |  202|   899k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 899k]
  |  |  ------------------
  ------------------
 2658|   899k|    if (not_supported && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  546|      0|#define LYS_COMPILE_NO_DISABLED     0x08            /**< ignore if-feature statements */
  ------------------
                  if (not_supported && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  542|      0|#define LYS_COMPILE_DISABLED        0x02            /**< Compiling a disabled subtree (by its if-features). Meaning
  ------------------
                  if (not_supported && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  537|      0|#define LYS_COMPILE_GROUPING        0x01            /**< Compiling (validation) of a non-instantiated grouping.
  ------------------
  |  Branch (2658:9): [True: 0, False: 899k]
  |  Branch (2658:26): [True: 0, False: 0]
  ------------------
 2659|       |        /* if not supported, keep it just like disabled nodes by if-feature */
 2660|      0|        ly_set_add(&ctx->unres->disabled, node, 1, NULL);
 2661|      0|        ctx->compile_opts |= LYS_COMPILE_DISABLED;
  ------------------
  |  |  542|      0|#define LYS_COMPILE_DISABLED        0x02            /**< Compiling a disabled subtree (by its if-features). Meaning
  ------------------
 2662|      0|    }
 2663|   899k|    if (dev_pnode) {
  ------------------
  |  Branch (2663:9): [True: 0, False: 899k]
  ------------------
 2664|      0|        pnode = dev_pnode;
 2665|      0|    }
 2666|       |
 2667|   899k|    DUP_STRING_GOTO(ctx->ctx, pnode->name, node->name, ret, error);
  ------------------
  |  |  169|   899k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|   899k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 899k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2668|   899k|    DUP_STRING_GOTO(ctx->ctx, pnode->dsc, node->dsc, ret, error);
  ------------------
  |  |  169|   899k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|   899k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 899k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2669|   899k|    DUP_STRING_GOTO(ctx->ctx, pnode->ref, node->ref, ret, error);
  ------------------
  |  |  169|   899k|#define DUP_STRING_GOTO(CTX, ORIG, DUP, RET, GOTO) LY_CHECK_GOTO(RET = lydict_insert(CTX, ORIG, 0, &(DUP)), GOTO)
  |  |  ------------------
  |  |  |  |  202|   899k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (202:39): [True: 0, False: 899k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2670|       |
 2671|       |    /* if-features */
 2672|   899k|    LY_CHECK_GOTO(ret = lys_eval_iffeatures(ctx->ctx, pnode->iffeatures, &enabled), error);
  ------------------
  |  |  202|   899k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 899k]
  |  |  ------------------
  ------------------
 2673|   899k|    if (!enabled && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  546|      0|#define LYS_COMPILE_NO_DISABLED     0x08            /**< ignore if-feature statements */
  ------------------
                  if (!enabled && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  542|      0|#define LYS_COMPILE_DISABLED        0x02            /**< Compiling a disabled subtree (by its if-features). Meaning
  ------------------
                  if (!enabled && !(ctx->compile_opts & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
  ------------------
  |  |  537|      0|#define LYS_COMPILE_GROUPING        0x01            /**< Compiling (validation) of a non-instantiated grouping.
  ------------------
  |  Branch (2673:9): [True: 0, False: 899k]
  |  Branch (2673:21): [True: 0, False: 0]
  ------------------
 2674|      0|        ly_set_add(&ctx->unres->disabled, node, 1, NULL);
 2675|      0|        ctx->compile_opts |= LYS_COMPILE_DISABLED;
  ------------------
  |  |  542|      0|#define LYS_COMPILE_DISABLED        0x02            /**< Compiling a disabled subtree (by its if-features). Meaning
  ------------------
 2676|      0|    }
 2677|       |
 2678|       |    /* config, status and other flags */
 2679|   899k|    LY_CHECK_GOTO(ret = lys_compile_node_flags(ctx, pnode->flags, inherited_flags, node), error);
  ------------------
  |  |  202|   899k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 899k]
  |  |  ------------------
  ------------------
 2680|       |
 2681|       |    /* list ordering */
 2682|   899k|    if (node->nodetype & (LYS_LIST | LYS_LEAFLIST)) {
  ------------------
  |  |  244|   899k|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
                  if (node->nodetype & (LYS_LIST | LYS_LEAFLIST)) {
  ------------------
  |  |  243|   899k|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (2682:9): [True: 295k, False: 604k]
  ------------------
 2683|   295k|        if ((node->flags & (LYS_CONFIG_R | LYS_IS_OUTPUT | LYS_IS_NOTIF)) && (node->flags & LYS_ORDBY_MASK)) {
  ------------------
  |  |  652|   295k|#define LYS_CONFIG_R     0x02        /**< config false; */
  ------------------
                      if ((node->flags & (LYS_CONFIG_R | LYS_IS_OUTPUT | LYS_IS_NOTIF)) && (node->flags & LYS_ORDBY_MASK)) {
  ------------------
  |  |  720|   295k|#define LYS_IS_OUTPUT    0x2000      /**< flag for nodes that are in the subtree of an output statement */
  ------------------
                      if ((node->flags & (LYS_CONFIG_R | LYS_IS_OUTPUT | LYS_IS_NOTIF)) && (node->flags & LYS_ORDBY_MASK)) {
  ------------------
  |  |  722|   295k|#define LYS_IS_NOTIF     0x4000      /**< flag for nodes that are in the subtree of a notification statement */
  ------------------
                      if ((node->flags & (LYS_CONFIG_R | LYS_IS_OUTPUT | LYS_IS_NOTIF)) && (node->flags & LYS_ORDBY_MASK)) {
  ------------------
  |  |  680|   295k|#define LYS_ORDBY_MASK   0x60        /**< mask for ordered-by values */
  ------------------
  |  Branch (2683:13): [True: 295k, False: 0]
  |  Branch (2683:78): [True: 0, False: 295k]
  ------------------
 2684|      0|            LOGVRB("The ordered-by statement is ignored in lists representing %s (%s).",
  ------------------
  |  |  156|      0|#define LOGVRB(...) ly_log(NULL, LY_LLVRB, 0, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (156:47): [True: 0, False: 0]
  |  |  |  Branch (156:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2685|      0|                    (node->flags & LYS_IS_OUTPUT) ? "RPC/action output parameters" :
 2686|      0|                    (ctx->compile_opts & LYS_IS_NOTIF) ? "notification content" : "state data", ctx->path);
 2687|      0|            node->flags &= ~LYS_ORDBY_MASK;
  ------------------
  |  |  680|      0|#define LYS_ORDBY_MASK   0x60        /**< mask for ordered-by values */
  ------------------
 2688|      0|            node->flags |= LYS_ORDBY_SYSTEM;
  ------------------
  |  |  675|      0|#define LYS_ORDBY_SYSTEM 0x80        /**< ordered-by system configuration lists, applicable only to
  ------------------
 2689|   295k|        } else if (!(node->flags & LYS_ORDBY_MASK)) {
  ------------------
  |  |  680|   295k|#define LYS_ORDBY_MASK   0x60        /**< mask for ordered-by values */
  ------------------
  |  Branch (2689:20): [True: 295k, False: 0]
  ------------------
 2690|       |            /* default ordering is system */
 2691|   295k|            node->flags |= LYS_ORDBY_SYSTEM;
  ------------------
  |  |  675|   295k|#define LYS_ORDBY_SYSTEM 0x80        /**< ordered-by system configuration lists, applicable only to
  ------------------
 2692|   295k|        }
 2693|   295k|    }
 2694|       |
 2695|       |    /* insert into parent's children/compiled module (we can no longer free the node separately on error) */
 2696|   899k|    LY_CHECK_GOTO(ret = lys_compile_node_connect(ctx, parent, node), cleanup);
  ------------------
  |  |  202|   899k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 899k]
  |  |  ------------------
  ------------------
 2697|       |
 2698|   899k|    if ((pwhen = lysp_node_when(pnode))) {
  ------------------
  |  Branch (2698:9): [True: 0, False: 899k]
  ------------------
 2699|       |        /* compile when */
 2700|      0|        ret = lys_compile_when(ctx, pwhen, pnode->flags, node, lysc_data_node(node), node, NULL);
 2701|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2702|      0|    }
 2703|       |
 2704|       |    /* nodetype-specific part */
 2705|   899k|    LY_CHECK_GOTO(ret = node_compile_spec(ctx, pnode, node), cleanup);
  ------------------
  |  |  202|   899k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 899k]
  |  |  ------------------
  ------------------
 2706|       |
 2707|       |    /* final compilation tasks that require the node to be connected */
 2708|   899k|    COMPILE_EXTS_GOTO(ctx, pnode->exts, node->exts, node, ret, cleanup);
  ------------------
  |  |  230|   899k|    if (EXTS_P) { \
  |  |  ------------------
  |  |  |  Branch (230:9): [True: 0, False: 899k]
  |  |  ------------------
  |  |  231|      0|        LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |                       LY_ARRAY_COUNT_TYPE __u = (EXT_C) ? LY_ARRAY_COUNT(EXT_C) : 0; \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (231:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  232|      0|        LY_ARRAY_CREATE_GOTO((CTX)->ctx, EXT_C, __u + LY_ARRAY_COUNT(EXTS_P), RET, GOTO); \
  |  |  ------------------
  |  |  |  |  187|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  |  |  ------------------
  |  |  |  |  |  |  133|      0|    { \
  |  |  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  |  |  141|      0|            } \
  |  |  |  |  |  |  142|      0|        } else { \
  |  |  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  |  |  147|      0|            } \
  |  |  |  |  |  |  148|      0|        } \
  |  |  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|        } \
  |  |  |  |  |  |  154|      0|    }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  233|      0|        LY_ARRAY_FOR(EXTS_P, __u) { \
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|      0|            LY_ARRAY_INCREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  235|      0|            RET = lys_compile_ext(CTX, &(EXTS_P)[__u], &(EXT_C)[LY_ARRAY_COUNT(EXT_C) - 1], PARENT); \
  |  |  ------------------
  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  236|      0|            if (RET == LY_ENOT) { \
  |  |  ------------------
  |  |  |  Branch (236:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  237|      0|                LY_ARRAY_DECREMENT(EXT_C); \
  |  |  ------------------
  |  |  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  |  |  ------------------
  |  |  238|      0|                RET = LY_SUCCESS; \
  |  |  239|      0|            } else if (RET) { \
  |  |  ------------------
  |  |  |  Branch (239:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|                goto GOTO; \
  |  |  241|      0|            } \
  |  |  242|      0|        } \
  |  |  243|      0|    }
  ------------------
 2709|   899k|    if (node->flags & LYS_MAND_TRUE) {
  ------------------
  |  |  658|   899k|#define LYS_MAND_TRUE    0x20        /**< mandatory true; applicable only to ::lysp_node_choice/::lysc_node_choice,
  ------------------
  |  Branch (2709:9): [True: 210k, False: 688k]
  ------------------
 2710|       |        /* inherit LYS_MAND_TRUE in parent containers */
 2711|   210k|        lys_compile_mandatory_parents(parent, 1);
 2712|   210k|    }
 2713|       |
 2714|   899k|    if (child_set) {
  ------------------
  |  Branch (2714:9): [True: 379k, False: 520k]
  ------------------
 2715|       |        /* add the new node into set */
 2716|   379k|        LY_CHECK_GOTO(ret = ly_set_add(child_set, node, 1, NULL), cleanup);
  ------------------
  |  |  202|   379k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 379k]
  |  |  ------------------
  ------------------
 2717|   379k|    }
 2718|       |
 2719|   899k|    goto cleanup;
 2720|       |
 2721|   899k|error:
 2722|      0|    lysc_node_free(&ctx->free_ctx, node, 0);
 2723|       |
 2724|   899k|cleanup:
 2725|   899k|    if (ret && dev_pnode) {
  ------------------
  |  Branch (2725:9): [True: 0, False: 899k]
  |  Branch (2725:16): [True: 0, False: 0]
  ------------------
 2726|      0|        LOGVAL(ctx->ctx, LYVE_OTHER, "Compilation of a deviated and/or refined node failed.");
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2727|      0|    }
 2728|   899k|    ctx->compile_opts = prev_opts;
 2729|   899k|    lysp_dev_node_free(ctx, dev_pnode);
 2730|   899k|    return ret;
 2731|      0|}

lysp_feature_next:
  146|   337k|{
  147|   337k|    struct lysp_feature *features;
  148|       |
  149|   337k|    if (!*idx) {
  ------------------
  |  Branch (149:9): [True: 168k, False: 168k]
  ------------------
  150|       |        /* module features */
  151|   168k|        features = pmod->features;
  152|   168k|    } else if ((*idx - 1) < LY_ARRAY_COUNT(pmod->includes)) {
  ------------------
  |  |  148|   168k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 168k]
  |  |  ------------------
  ------------------
  |  Branch (152:16): [True: 0, False: 168k]
  ------------------
  153|       |        /* submodule features */
  154|      0|        features = pmod->includes[*idx - 1].submodule->features;
  155|   168k|    } else {
  156|       |        /* no more features */
  157|   168k|        return NULL;
  158|   168k|    }
  159|       |
  160|       |    /* get the next feature */
  161|   168k|    if (features && (!last || (&features[LY_ARRAY_COUNT(features) - 1] != last))) {
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (161:9): [True: 0, False: 168k]
  |  Branch (161:22): [True: 0, False: 0]
  |  Branch (161:31): [True: 0, False: 0]
  ------------------
  162|      0|        return !last ? &features[0] : (struct lysp_feature *)last + 1;
  ------------------
  |  Branch (162:16): [True: 0, False: 0]
  ------------------
  163|      0|    }
  164|       |
  165|       |    /* no more features in current (sub)module */
  166|   168k|    ++(*idx);
  167|   168k|    return lysp_feature_next(NULL, pmod, idx);
  168|   168k|}
lys_eval_iffeatures:
  507|  1.64M|{
  508|  1.64M|    LY_ERR ret;
  509|  1.64M|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|  1.64M|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  510|  1.64M|    struct lysc_iffeature iff;
  511|  1.64M|    struct lysf_ctx fctx = {.ctx = (struct ly_ctx *)ctx};
  512|       |
  513|       |    /* enabled by default */
  514|  1.64M|    *enabled = 1;
  515|       |
  516|  1.64M|    if (!iffeatures) {
  ------------------
  |  Branch (516:9): [True: 1.64M, False: 0]
  ------------------
  517|  1.64M|        return LY_SUCCESS;
  518|  1.64M|    }
  519|       |
  520|       |    /* evaluate all if-feature conditions or until an unsatisfied one is found */
  521|      0|    LY_ARRAY_FOR(iffeatures, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  522|      0|        memset(&iff, 0, sizeof iff);
  523|      0|        LY_CHECK_RET(lys_compile_iffeature(ctx, &iffeatures[u], &iff));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  524|       |
  525|      0|        ret = lysc_iffeature_value(&iff);
  526|      0|        lysc_iffeature_free(&fctx, &iff);
  527|      0|        if (ret == LY_ENOT) {
  ------------------
  |  Branch (527:13): [True: 0, False: 0]
  ------------------
  528|      0|            *enabled = 0;
  529|      0|            break;
  530|      0|        } else if (ret) {
  ------------------
  |  Branch (530:20): [True: 0, False: 0]
  ------------------
  531|      0|            return ret;
  532|      0|        }
  533|      0|    }
  534|       |
  535|      0|    return LY_SUCCESS;
  536|      0|}
lys_check_features:
  540|  56.2k|{
  541|  56.2k|    LY_ERR r;
  542|  56.2k|    uint32_t i = 0;
  543|  56.2k|    struct lysp_feature *f = NULL;
  544|       |
  545|  56.2k|    while ((f = lysp_feature_next(f, pmod, &i))) {
  ------------------
  |  Branch (545:12): [True: 0, False: 56.2k]
  ------------------
  546|      0|        if (!(f->flags & LYS_FENABLED) || !f->iffeatures) {
  ------------------
  |  |  674|      0|#define LYS_FENABLED     0x20        /**< feature enabled flag, applicable only to ::lysp_feature. */
  ------------------
  |  Branch (546:13): [True: 0, False: 0]
  |  Branch (546:43): [True: 0, False: 0]
  ------------------
  547|       |            /* disabled feature or no if-features to check */
  548|      0|            continue;
  549|      0|        }
  550|       |
  551|      0|        assert(f->iffeatures_c);
  552|      0|        r = lysc_iffeature_value(f->iffeatures_c);
  553|      0|        if (r == LY_ENOT) {
  ------------------
  |  Branch (553:13): [True: 0, False: 0]
  ------------------
  554|      0|            LOGERR(pmod->mod->ctx, LY_EDENIED, "Feature \"%s\" cannot be enabled because its \"if-feature\" is not satisfied.",
  ------------------
  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  ------------------
  555|      0|                    f->name);
  556|      0|            return LY_EDENIED;
  557|      0|        } else if (r) {
  ------------------
  |  Branch (557:20): [True: 0, False: 0]
  ------------------
  558|      0|            return r;
  559|      0|        } /* else if-feature satisfied */
  560|      0|    }
  561|       |
  562|  56.2k|    return LY_SUCCESS;
  563|  56.2k|}
lys_set_features:
  567|  56.2k|{
  568|  56.2k|    uint32_t i = 0, j;
  569|  56.2k|    struct lysp_feature *f = 0;
  570|  56.2k|    ly_bool change = 0;
  571|       |
  572|  56.2k|    if (!features) {
  ------------------
  |  Branch (572:9): [True: 56.2k, False: 0]
  ------------------
  573|       |        /* do not touch the features */
  574|       |
  575|  56.2k|    } else if (!features[0]) {
  ------------------
  |  Branch (575:16): [True: 0, False: 0]
  ------------------
  576|       |        /* disable all the features */
  577|      0|        while ((f = lysp_feature_next(f, pmod, &i))) {
  ------------------
  |  Branch (577:16): [True: 0, False: 0]
  ------------------
  578|      0|            if (f->flags & LYS_FENABLED) {
  ------------------
  |  |  674|      0|#define LYS_FENABLED     0x20        /**< feature enabled flag, applicable only to ::lysp_feature. */
  ------------------
  |  Branch (578:17): [True: 0, False: 0]
  ------------------
  579|      0|                f->flags &= ~LYS_FENABLED;
  ------------------
  |  |  674|      0|#define LYS_FENABLED     0x20        /**< feature enabled flag, applicable only to ::lysp_feature. */
  ------------------
  580|      0|                change = 1;
  581|      0|            }
  582|      0|        }
  583|      0|    } else if (!strcmp(features[0], "*")) {
  ------------------
  |  Branch (583:16): [True: 0, False: 0]
  ------------------
  584|       |        /* enable all the features */
  585|      0|        while ((f = lysp_feature_next(f, pmod, &i))) {
  ------------------
  |  Branch (585:16): [True: 0, False: 0]
  ------------------
  586|      0|            if (!(f->flags & LYS_FENABLED)) {
  ------------------
  |  |  674|      0|#define LYS_FENABLED     0x20        /**< feature enabled flag, applicable only to ::lysp_feature. */
  ------------------
  |  Branch (586:17): [True: 0, False: 0]
  ------------------
  587|      0|                f->flags |= LYS_FENABLED;
  ------------------
  |  |  674|      0|#define LYS_FENABLED     0x20        /**< feature enabled flag, applicable only to ::lysp_feature. */
  ------------------
  588|      0|                change = 1;
  589|      0|            }
  590|      0|        }
  591|      0|    } else {
  592|       |        /* check that all the features exist */
  593|      0|        for (j = 0; features[j]; ++j) {
  ------------------
  |  Branch (593:21): [True: 0, False: 0]
  ------------------
  594|      0|            if (!lysp_feature_find(pmod, features[j], strlen(features[j]), 0)) {
  ------------------
  |  Branch (594:17): [True: 0, False: 0]
  ------------------
  595|      0|                LOGERR(pmod->mod->ctx, LY_EINVAL, "Feature \"%s\" not found in module \"%s\".", features[j], pmod->mod->name);
  ------------------
  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  ------------------
  596|      0|                return LY_EINVAL;
  597|      0|            }
  598|      0|        }
  599|       |
  600|       |        /* enable specific features, disable the rest */
  601|      0|        while ((f = lysp_feature_next(f, pmod, &i))) {
  ------------------
  |  Branch (601:16): [True: 0, False: 0]
  ------------------
  602|      0|            for (j = 0; features[j]; ++j) {
  ------------------
  |  Branch (602:25): [True: 0, False: 0]
  ------------------
  603|      0|                if (!strcmp(f->name, features[j])) {
  ------------------
  |  Branch (603:21): [True: 0, False: 0]
  ------------------
  604|      0|                    break;
  605|      0|                }
  606|      0|            }
  607|       |
  608|      0|            if (features[j] && !(f->flags & LYS_FENABLED)) {
  ------------------
  |  |  674|      0|#define LYS_FENABLED     0x20        /**< feature enabled flag, applicable only to ::lysp_feature. */
  ------------------
  |  Branch (608:17): [True: 0, False: 0]
  |  Branch (608:32): [True: 0, False: 0]
  ------------------
  609|       |                /* enable */
  610|      0|                f->flags |= LYS_FENABLED;
  ------------------
  |  |  674|      0|#define LYS_FENABLED     0x20        /**< feature enabled flag, applicable only to ::lysp_feature. */
  ------------------
  611|      0|                change = 1;
  612|      0|            } else if (!features[j] && (f->flags & LYS_FENABLED)) {
  ------------------
  |  |  674|      0|#define LYS_FENABLED     0x20        /**< feature enabled flag, applicable only to ::lysp_feature. */
  ------------------
  |  Branch (612:24): [True: 0, False: 0]
  |  Branch (612:40): [True: 0, False: 0]
  ------------------
  613|       |                /* disable */
  614|      0|                f->flags &= ~LYS_FENABLED;
  ------------------
  |  |  674|      0|#define LYS_FENABLED     0x20        /**< feature enabled flag, applicable only to ::lysp_feature. */
  ------------------
  615|      0|                change = 1;
  616|      0|            }
  617|      0|        }
  618|      0|    }
  619|       |
  620|  56.2k|    if (!change) {
  ------------------
  |  Branch (620:9): [True: 56.2k, False: 0]
  ------------------
  621|       |        /* features already set correctly */
  622|  56.2k|        return LY_EEXIST;
  623|  56.2k|    }
  624|       |
  625|      0|    return LY_SUCCESS;
  626|  56.2k|}
lys_compile_feature_iffeatures:
  682|   112k|{
  683|   112k|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  684|   112k|    struct lysp_feature *f = NULL, **df;
  685|   112k|    uint32_t idx = 0;
  686|       |
  687|   112k|    while ((f = lysp_feature_next(f, pmod, &idx))) {
  ------------------
  |  Branch (687:12): [True: 0, False: 112k]
  ------------------
  688|      0|        if (!f->iffeatures) {
  ------------------
  |  Branch (688:13): [True: 0, False: 0]
  ------------------
  689|      0|            continue;
  690|      0|        }
  691|       |
  692|       |        /* compile if-features */
  693|      0|        LY_ARRAY_CREATE_RET(pmod->mod->ctx, f->iffeatures_c, LY_ARRAY_COUNT(f->iffeatures), LY_EMEM);
  ------------------
  |  |  170|      0|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, return RETVAL)
  |  |  ------------------
  |  |  |  |  133|      0|    { \
  |  |  |  |  134|      0|        char *p__; \
  |  |  |  |  135|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (137:93): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  141|      0|            } \
  |  |  |  |  142|      0|        } else { \
  |  |  |  |  143|      0|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (143:68): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  144|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (144:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  147|      0|            } \
  |  |  |  |  148|      0|        } \
  |  |  |  |  149|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  150|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  151|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (151:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  152|      0|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (152:70): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  153|      0|        } \
  |  |  |  |  154|      0|    }
  |  |  ------------------
  ------------------
  694|      0|        LY_ARRAY_FOR(f->iffeatures, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  695|      0|            LY_ARRAY_INCREMENT(f->iffeatures_c);
  ------------------
  |  |  198|      0|        ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
  696|      0|            LY_CHECK_RET(lys_compile_iffeature(pmod->mod->ctx, &(f->iffeatures)[u], &(f->iffeatures_c)[u]));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  697|      0|        }
  698|      0|        LY_ARRAY_FOR(f->iffeatures_c, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  699|      0|            LY_ARRAY_FOR(f->iffeatures_c[u].features, v) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  700|       |                /* check for circular dependency - direct reference first,... */
  701|      0|                if (f == f->iffeatures_c[u].features[v]) {
  ------------------
  |  Branch (701:21): [True: 0, False: 0]
  ------------------
  702|      0|                    LOGVAL(pmod->mod->ctx, LYVE_REFERENCE, "Feature \"%s\" is referenced from itself.", f->name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  703|      0|                    return LY_EVALID;
  704|      0|                }
  705|       |                /* ... and indirect circular reference */
  706|      0|                LY_CHECK_RET(lys_compile_feature_circular_check(pmod->mod->ctx, f->iffeatures_c[u].features[v], f->depfeatures));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  707|       |
  708|       |                /* add itself into the dependants list */
  709|      0|                LY_ARRAY_NEW_RET(pmod->mod->ctx, f->iffeatures_c[u].features[v]->depfeatures, df, LY_EMEM);
  ------------------
  |  |   96|      0|    LY_ARRAY_NEW(CTX, ARRAY, return RETVAL); \
  |  |  ------------------
  |  |  |  |   61|      0|    { \
  |  |  |  |   62|      0|        char *p__; \
  |  |  |  |   63|      0|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   64|      0|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|      0|        } else { \
  |  |  |  |   73|      0|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|      0|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|      0|        } \
  |  |  |  |   80|      0|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|      0|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|      0|    }
  |  |  ------------------
  |  |   97|      0|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |   98|      0|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
  710|      0|                *df = f;
  711|      0|            }
  712|      0|        }
  713|      0|    }
  714|       |
  715|   112k|    return LY_SUCCESS;
  716|   112k|}

ly_set_new:
   26|   267k|{
   27|   267k|    LY_CHECK_ARG_RET(NULL, set_p, LY_EINVAL);
  ------------------
  |  |  226|   267k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   267k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   267k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|   267k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 267k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   267k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
   28|       |
   29|   267k|    *set_p = calloc(1, sizeof **set_p);
   30|   267k|    LY_CHECK_ERR_RET(!(*set_p), LOGMEM(NULL), LY_EMEM);
  ------------------
  |  |  207|   267k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 267k]
  |  |  ------------------
  ------------------
   31|       |
   32|   267k|    return LY_SUCCESS;
   33|   267k|}
ly_set_clean:
   37|  10.1M|{
   38|  10.1M|    uint32_t u;
   39|       |
   40|  10.1M|    if (!set) {
  ------------------
  |  Branch (40:9): [True: 0, False: 10.1M]
  ------------------
   41|      0|        return;
   42|      0|    }
   43|       |
   44|  10.1M|    if (destructor) {
  ------------------
  |  Branch (44:9): [True: 6.36M, False: 3.76M]
  ------------------
   45|  6.90M|        for (u = 0; u < set->count; ++u) {
  ------------------
  |  Branch (45:21): [True: 534k, False: 6.36M]
  ------------------
   46|   534k|            destructor(set->objs[u]);
   47|   534k|        }
   48|  6.36M|    }
   49|  10.1M|    set->count = 0;
   50|  10.1M|}
ly_set_erase:
   54|  10.1M|{
   55|  10.1M|    if (!set) {
  ------------------
  |  Branch (55:9): [True: 0, False: 10.1M]
  ------------------
   56|      0|        return;
   57|      0|    }
   58|       |
   59|  10.1M|    ly_set_clean(set, destructor);
   60|       |
   61|  10.1M|    free(set->objs);
   62|  10.1M|    set->size = 0;
   63|  10.1M|    set->objs = NULL;
   64|  10.1M|}
ly_set_free:
   68|   480k|{
   69|   480k|    if (!set) {
  ------------------
  |  Branch (69:9): [True: 199k, False: 281k]
  ------------------
   70|   199k|        return;
   71|   199k|    }
   72|       |
   73|   281k|    ly_set_erase(set, destructor);
   74|       |
   75|   281k|    free(set);
   76|   281k|}
ly_set_contains:
   80|  2.65M|{
   81|  2.65M|    LY_CHECK_ARG_RET(NULL, set, 0);
  ------------------
  |  |  226|  2.65M|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  2.65M|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  2.65M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  2.65M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 2.65M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  2.65M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
   82|       |
   83|  2.98M|    for (uint32_t i = 0; i < set->count; i++) {
  ------------------
  |  Branch (83:26): [True: 393k, False: 2.58M]
  ------------------
   84|   393k|        if (set->objs[i] == object) {
  ------------------
  |  Branch (84:13): [True: 70.2k, False: 323k]
  ------------------
   85|       |            /* object found */
   86|  70.2k|            if (index_p) {
  ------------------
  |  Branch (86:17): [True: 42.1k, False: 28.1k]
  ------------------
   87|  42.1k|                *index_p = i;
   88|  42.1k|            }
   89|  70.2k|            return 1;
   90|  70.2k|        }
   91|   393k|    }
   92|       |
   93|       |    /* object not found */
   94|  2.58M|    return 0;
   95|  2.65M|}
ly_set_dup:
   99|  14.0k|{
  100|  14.0k|    struct ly_set *newset;
  101|  14.0k|    uint32_t u;
  102|       |
  103|  14.0k|    LY_CHECK_ARG_RET(NULL, set, newset_p, LY_EINVAL);
  ------------------
  |  |  226|  14.0k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  14.0k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|  14.0k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  104|       |
  105|  14.0k|    newset = calloc(1, sizeof *newset);
  106|  14.0k|    LY_CHECK_ERR_RET(!newset, LOGMEM(NULL), LY_EMEM);
  ------------------
  |  |  207|  14.0k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  107|  14.0k|    if (!set->count) {
  ------------------
  |  Branch (107:9): [True: 0, False: 14.0k]
  ------------------
  108|      0|        *newset_p = newset;
  109|      0|        return LY_SUCCESS;
  110|      0|    }
  111|       |
  112|  14.0k|    newset->count = set->count;
  113|  14.0k|    newset->size = set->count; /* optimize the size */
  114|  14.0k|    newset->objs = malloc(newset->size * sizeof *(newset->objs));
  115|  14.0k|    LY_CHECK_ERR_RET(!newset->objs, LOGMEM(NULL); free(newset), LY_EMEM);
  ------------------
  |  |  207|  14.0k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
  116|  14.0k|    if (duplicator) {
  ------------------
  |  Branch (116:9): [True: 0, False: 14.0k]
  ------------------
  117|      0|        for (u = 0; u < set->count; ++u) {
  ------------------
  |  Branch (117:21): [True: 0, False: 0]
  ------------------
  118|      0|            newset->objs[u] = duplicator(set->objs[u]);
  119|      0|        }
  120|  14.0k|    } else {
  121|  14.0k|        memcpy(newset->objs, set->objs, newset->size * sizeof *(newset->objs));
  122|  14.0k|    }
  123|       |
  124|  14.0k|    *newset_p = newset;
  125|  14.0k|    return LY_SUCCESS;
  126|  14.0k|}
ly_set_add:
  130|  8.04M|{
  131|  8.04M|    void **new;
  132|       |
  133|  8.04M|    LY_CHECK_ARG_RET(NULL, set, LY_EINVAL);
  ------------------
  |  |  226|  8.04M|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  8.04M|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  8.04M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  8.04M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 8.04M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  8.04M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  134|       |
  135|  8.04M|    if (!list) {
  ------------------
  |  Branch (135:9): [True: 312k, False: 7.72M]
  ------------------
  136|       |        /* search for duplication */
  137|  2.44M|        for (uint32_t i = 0; i < set->count; i++) {
  ------------------
  |  Branch (137:30): [True: 2.14M, False: 292k]
  ------------------
  138|  2.14M|            if (set->objs[i] == object) {
  ------------------
  |  Branch (138:17): [True: 19.7k, False: 2.13M]
  ------------------
  139|       |                /* already in set */
  140|  19.7k|                if (index_p) {
  ------------------
  |  Branch (140:21): [True: 0, False: 19.7k]
  ------------------
  141|      0|                    *index_p = i;
  142|      0|                }
  143|  19.7k|                return LY_SUCCESS;
  144|  19.7k|            }
  145|  2.14M|        }
  146|   312k|    }
  147|       |
  148|  8.02M|    if (set->size == set->count) {
  ------------------
  |  Branch (148:9): [True: 6.43M, False: 1.59M]
  ------------------
  149|  6.43M|#define SET_SIZE_STEP 8
  150|  6.43M|        new = realloc(set->objs, (set->size + SET_SIZE_STEP) * sizeof *(set->objs));
  ------------------
  |  |  149|  6.43M|#define SET_SIZE_STEP 8
  ------------------
  151|  6.43M|        LY_CHECK_ERR_RET(!new, LOGMEM(NULL), LY_EMEM);
  ------------------
  |  |  207|  6.43M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 6.43M]
  |  |  ------------------
  ------------------
  152|  6.43M|        set->size += SET_SIZE_STEP;
  ------------------
  |  |  149|  6.43M|#define SET_SIZE_STEP 8
  ------------------
  153|  6.43M|        set->objs = new;
  154|  6.43M|#undef SET_SIZE_STEP
  155|  6.43M|    }
  156|       |
  157|  8.02M|    if (index_p) {
  ------------------
  |  Branch (157:9): [True: 0, False: 8.02M]
  ------------------
  158|      0|        *index_p = set->count;
  159|      0|    }
  160|  8.02M|    set->objs[set->count++] = (void *)object;
  161|       |
  162|  8.02M|    return LY_SUCCESS;
  163|  8.02M|}
ly_set_rm_index:
  192|  5.31M|{
  193|  5.31M|    LY_CHECK_ARG_RET(NULL, set, LY_EINVAL);
  ------------------
  |  |  226|  5.31M|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  5.31M|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  5.31M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  5.31M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 5.31M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  5.31M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  194|  5.31M|    LY_CHECK_ERR_RET(index >= set->count, LOGARG(NULL, index), LY_EINVAL);
  ------------------
  |  |  207|  5.31M|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 5.31M]
  |  |  ------------------
  ------------------
  195|       |
  196|  5.31M|    if (destructor) {
  ------------------
  |  Branch (196:9): [True: 4.82M, False: 492k]
  ------------------
  197|  4.82M|        destructor(set->objs[index]);
  198|  4.82M|    }
  199|  5.31M|    if (index == set->count - 1) {
  ------------------
  |  Branch (199:9): [True: 5.22M, False: 84.3k]
  ------------------
  200|       |        /* removing last item in set */
  201|  5.22M|        set->objs[index] = NULL;
  202|  5.22M|    } else {
  203|       |        /* removing item somewhere in a middle, so put there the last item */
  204|  84.3k|        set->objs[index] = set->objs[set->count - 1];
  205|  84.3k|        set->objs[set->count - 1] = NULL;
  206|  84.3k|    }
  207|  5.31M|    set->count--;
  208|       |
  209|  5.31M|    return LY_SUCCESS;
  210|  5.31M|}

ly_free_prefix_data:
 1291|  1.12M|{
 1292|  1.12M|    struct ly_set *ns_list;
 1293|  1.12M|    struct lysc_prefix *prefixes;
 1294|  1.12M|    uint32_t i;
 1295|  1.12M|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|  1.12M|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1296|       |
 1297|  1.12M|    if (!prefix_data) {
  ------------------
  |  Branch (1297:9): [True: 511, False: 1.12M]
  ------------------
 1298|    511|        return;
 1299|    511|    }
 1300|       |
 1301|  1.12M|    switch (format) {
  ------------------
  |  Branch (1301:13): [True: 0, False: 1.12M]
  ------------------
 1302|      0|    case LY_VALUE_XML:
  ------------------
  |  Branch (1302:5): [True: 0, False: 1.12M]
  ------------------
 1303|      0|    case LY_VALUE_STR_NS:
  ------------------
  |  Branch (1303:5): [True: 0, False: 1.12M]
  ------------------
 1304|      0|        ns_list = prefix_data;
 1305|      0|        for (i = 0; i < ns_list->count; ++i) {
  ------------------
  |  Branch (1305:21): [True: 0, False: 0]
  ------------------
 1306|      0|            free(((struct lyxml_ns *)ns_list->objs[i])->prefix);
 1307|      0|            free(((struct lyxml_ns *)ns_list->objs[i])->uri);
 1308|      0|        }
 1309|      0|        ly_set_free(ns_list, free);
 1310|      0|        break;
 1311|  70.2k|    case LY_VALUE_SCHEMA_RESOLVED:
  ------------------
  |  Branch (1311:5): [True: 70.2k, False: 1.05M]
  ------------------
 1312|  70.2k|        prefixes = prefix_data;
 1313|  98.4k|        LY_ARRAY_FOR(prefixes, u) {
  ------------------
  |  |  167|  70.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  70.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  70.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  70.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   168k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   168k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 168k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 98.4k, False: 70.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  98.4k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1314|  98.4k|            free(prefixes[u].prefix);
 1315|  98.4k|        }
 1316|  70.2k|        LY_ARRAY_FREE(prefixes);
  ------------------
  |  |  232|  70.2k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 70.2k, False: 0]
  |  |  ------------------
  ------------------
 1317|  70.2k|        break;
 1318|      0|    case LY_VALUE_CANON:
  ------------------
  |  Branch (1318:5): [True: 0, False: 1.12M]
  ------------------
 1319|  1.05M|    case LY_VALUE_SCHEMA:
  ------------------
  |  Branch (1319:5): [True: 1.05M, False: 70.2k]
  ------------------
 1320|  1.05M|    case LY_VALUE_JSON:
  ------------------
  |  Branch (1320:5): [True: 0, False: 1.12M]
  ------------------
 1321|  1.05M|    case LY_VALUE_LYB:
  ------------------
  |  Branch (1321:5): [True: 0, False: 1.12M]
  ------------------
 1322|  1.05M|        break;
 1323|  1.12M|    }
 1324|  1.12M|}
ly_store_prefix_data:
 1397|  70.2k|{
 1398|  70.2k|    LY_ERR ret = LY_SUCCESS;
 1399|  70.2k|    const struct lys_module *mod;
 1400|  70.2k|    const struct lyxml_ns *ns;
 1401|  70.2k|    struct lyxml_ns *new_ns;
 1402|  70.2k|    struct ly_set *ns_list;
 1403|  70.2k|    struct lysc_prefix *prefixes = NULL, *val_pref;
 1404|  70.2k|    const char *value_iter, *value_next, *value_end;
 1405|  70.2k|    uint32_t substr_len;
 1406|  70.2k|    ly_bool is_prefix;
 1407|       |
 1408|  70.2k|    switch (format) {
  ------------------
  |  Branch (1408:13): [True: 0, False: 70.2k]
  ------------------
 1409|  70.2k|    case LY_VALUE_SCHEMA:
  ------------------
  |  Branch (1409:5): [True: 70.2k, False: 0]
  ------------------
 1410|       |        /* copy all referenced modules as prefix - module pairs */
 1411|  70.2k|        if (!*prefix_data_p) {
  ------------------
  |  Branch (1411:13): [True: 70.2k, False: 0]
  ------------------
 1412|       |            /* new prefix data */
 1413|  70.2k|            LY_ARRAY_CREATE_GOTO(ctx, prefixes, 0, ret, cleanup);
  ------------------
  |  |  187|  70.2k|    LY_ARRAY_CREATE(CTX, ARRAY, SIZE, RET = LY_EMEM; goto GOTO)
  |  |  ------------------
  |  |  |  |  133|  70.2k|    { \
  |  |  |  |  134|  70.2k|        char *p__; \
  |  |  |  |  135|  70.2k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:13): [True: 0, False: 70.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |  137|      0|                    sizeof(LY_ARRAY_COUNT_TYPE) + ((*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) + (SIZE)) * sizeof *(ARRAY))); \
  |  |  |  |  138|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (138:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  139|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|      0|                EACTION; \
  |  |  |  |  141|      0|            } \
  |  |  |  |  142|  70.2k|        } else { \
  |  |  |  |  143|  70.2k|            p__ = (char *)calloc(1, sizeof(LY_ARRAY_COUNT_TYPE) + (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  144|  70.2k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (144:17): [True: 0, False: 70.2k]
  |  |  |  |  ------------------
  |  |  |  |  145|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  146|      0|                EACTION; \
  |  |  |  |  147|      0|            } \
  |  |  |  |  148|  70.2k|        } \
  |  |  |  |  149|  70.2k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |  150|  70.2k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |  151|  70.2k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (151:13): [True: 70.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  152|  70.2k|            memset(&(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(p__) - 1)], 0, (SIZE) * sizeof *(ARRAY)); \
  |  |  |  |  153|  70.2k|        } \
  |  |  |  |  154|  70.2k|    }
  |  |  ------------------
  ------------------
 1414|  70.2k|            *format_p = LY_VALUE_SCHEMA_RESOLVED;
 1415|  70.2k|            *prefix_data_p = prefixes;
 1416|  70.2k|        } else {
 1417|       |            /* reuse prefix data */
 1418|      0|            assert(*format_p == LY_VALUE_SCHEMA_RESOLVED);
 1419|      0|            prefixes = *prefix_data_p;
 1420|      0|        }
 1421|       |
 1422|       |        /* add current module for unprefixed values */
 1423|   140k|        LY_ARRAY_NEW_GOTO(ctx, prefixes, val_pref, ret, cleanup);
  ------------------
  |  |  113|  70.2k|    LY_ARRAY_NEW(CTX, ARRAY, RET = LY_EMEM; goto GOTO); \
  |  |  ------------------
  |  |  |  |   61|  70.2k|    { \
  |  |  |  |   62|  70.2k|        char *p__; \
  |  |  |  |   63|  70.2k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 70.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   64|  70.2k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  70.2k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  70.2k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  70.2k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 70.2k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  70.2k|        } else { \
  |  |  |  |   73|      0|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|      0|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|      0|        } \
  |  |  |  |   80|  70.2k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  70.2k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  70.2k|    }
  |  |  ------------------
  |  |  114|  70.2k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |  115|  70.2k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1424|   140k|        *prefix_data_p = prefixes;
 1425|       |
 1426|   140k|        val_pref->prefix = NULL;
 1427|   140k|        val_pref->mod = ((const struct lysp_module *)prefix_data)->mod;
 1428|       |
 1429|       |        /* add all used prefixes */
 1430|   140k|        value_end = (char *)value + value_len;
 1431|   253k|        for (value_iter = value; value_iter; value_iter = value_next) {
  ------------------
  |  Branch (1431:34): [True: 182k, False: 70.2k]
  ------------------
 1432|   182k|            LY_CHECK_GOTO(ret = ly_value_prefix_next(value_iter, value_end, &substr_len, &is_prefix, &value_next), cleanup);
  ------------------
  |  |  202|   182k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 182k]
  |  |  ------------------
  ------------------
 1433|   182k|            if (is_prefix) {
  ------------------
  |  Branch (1433:17): [True: 56.2k, False: 126k]
  ------------------
 1434|       |                /* we have a possible prefix. Do we already have the prefix? */
 1435|  56.2k|                mod = ly_resolve_prefix(ctx, value_iter, substr_len, *format_p, *prefix_data_p);
 1436|  56.2k|                if (!mod) {
  ------------------
  |  Branch (1436:21): [True: 28.1k, False: 28.1k]
  ------------------
 1437|  28.1k|                    mod = ly_resolve_prefix(ctx, value_iter, substr_len, format, prefix_data);
 1438|  28.1k|                    if (mod) {
  ------------------
  |  Branch (1438:25): [True: 28.1k, False: 0]
  ------------------
 1439|  28.1k|                        assert(*format_p == LY_VALUE_SCHEMA_RESOLVED);
 1440|       |                        /* store a new prefix - module pair */
 1441|  28.1k|                        LY_ARRAY_NEW_GOTO(ctx, prefixes, val_pref, ret, cleanup);
  ------------------
  |  |  113|  28.1k|    LY_ARRAY_NEW(CTX, ARRAY, RET = LY_EMEM; goto GOTO); \
  |  |  ------------------
  |  |  |  |   61|  28.1k|    { \
  |  |  |  |   62|  28.1k|        char *p__; \
  |  |  |  |   63|  28.1k|        if (ARRAY) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:13): [True: 28.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   64|  28.1k|            ++(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   65|  28.1k|            p__ = (char *)realloc(((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1), \
  |  |  |  |   66|  28.1k|                    sizeof(LY_ARRAY_COUNT_TYPE) + (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) * sizeof *(ARRAY))); \
  |  |  |  |   67|  28.1k|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:17): [True: 0, False: 28.1k]
  |  |  |  |  ------------------
  |  |  |  |   68|      0|                --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |   69|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|      0|                EACTION; \
  |  |  |  |   71|      0|            } \
  |  |  |  |   72|  28.1k|        } else { \
  |  |  |  |   73|      0|            p__ = (char *)malloc(sizeof(LY_ARRAY_COUNT_TYPE) + sizeof *(ARRAY)); \
  |  |  |  |   74|      0|            if (!p__) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   75|      0|                LOGMEM(CTX); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|                EACTION; \
  |  |  |  |   77|      0|            } \
  |  |  |  |   78|      0|            *((LY_ARRAY_COUNT_TYPE*)(p__)) = 1; \
  |  |  |  |   79|      0|        } \
  |  |  |  |   80|  28.1k|        p__ = (char *)((LY_ARRAY_COUNT_TYPE*)(p__) + 1); \
  |  |  |  |   81|  28.1k|        memcpy(&(ARRAY), &p__, sizeof p__); \
  |  |  |  |   82|  28.1k|    }
  |  |  ------------------
  |  |  114|  28.1k|    (NEW_ITEM) = &(ARRAY)[*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1) - 1]; \
  |  |  115|  28.1k|    memset(NEW_ITEM, 0, sizeof *(NEW_ITEM))
  ------------------
 1442|  28.1k|                        *prefix_data_p = prefixes;
 1443|       |
 1444|  28.1k|                        val_pref->prefix = strndup(value_iter, substr_len);
 1445|  28.1k|                        LY_CHECK_ERR_GOTO(!val_pref->prefix, LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|  28.1k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 1446|  28.1k|                        val_pref->mod = mod;
 1447|  28.1k|                    } /* else it is not even defined */
 1448|  28.1k|                } /* else the prefix is already present */
 1449|  56.2k|            }
 1450|   182k|        }
 1451|  70.2k|        break;
 1452|  70.2k|    case LY_VALUE_XML:
  ------------------
  |  Branch (1452:5): [True: 0, False: 70.2k]
  ------------------
 1453|      0|    case LY_VALUE_STR_NS:
  ------------------
  |  Branch (1453:5): [True: 0, False: 70.2k]
  ------------------
 1454|       |        /* copy all referenced namespaces as prefix - namespace pairs */
 1455|      0|        if (!*prefix_data_p) {
  ------------------
  |  Branch (1455:13): [True: 0, False: 0]
  ------------------
 1456|       |            /* new prefix data */
 1457|      0|            LY_CHECK_GOTO(ret = ly_set_new(&ns_list), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1458|      0|            *format_p = format;
 1459|      0|            *prefix_data_p = ns_list;
 1460|      0|        } else {
 1461|       |            /* reuse prefix data */
 1462|      0|            assert(*format_p == format);
 1463|      0|            ns_list = *prefix_data_p;
 1464|      0|        }
 1465|       |
 1466|       |        /* store default namespace */
 1467|      0|        ns = lyxml_ns_get(prefix_data, NULL, 0);
 1468|      0|        if (ns) {
  ------------------
  |  Branch (1468:13): [True: 0, False: 0]
  ------------------
 1469|      0|            new_ns = calloc(1, sizeof *new_ns);
 1470|      0|            LY_CHECK_ERR_GOTO(!new_ns, LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1471|      0|            LY_CHECK_GOTO(ret = ly_set_add(ns_list, new_ns, 1, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1472|       |
 1473|      0|            new_ns->prefix = NULL;
 1474|      0|            new_ns->uri = strdup(ns->uri);
 1475|      0|            LY_CHECK_ERR_GOTO(!new_ns->uri, LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1476|      0|        }
 1477|       |
 1478|       |        /* add all used prefixes */
 1479|      0|        value_end = (char *)value + value_len;
 1480|      0|        for (value_iter = value; value_iter; value_iter = value_next) {
  ------------------
  |  Branch (1480:34): [True: 0, False: 0]
  ------------------
 1481|      0|            LY_CHECK_GOTO(ret = ly_value_prefix_next(value_iter, value_end, &substr_len, &is_prefix, &value_next), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1482|      0|            if (is_prefix) {
  ------------------
  |  Branch (1482:17): [True: 0, False: 0]
  ------------------
 1483|       |                /* we have a possible prefix. Do we already have the prefix? */
 1484|      0|                ns = lyxml_ns_get(ns_list, value_iter, substr_len);
 1485|      0|                if (!ns) {
  ------------------
  |  Branch (1485:21): [True: 0, False: 0]
  ------------------
 1486|      0|                    ns = lyxml_ns_get(prefix_data, value_iter, substr_len);
 1487|      0|                    if (ns) {
  ------------------
  |  Branch (1487:25): [True: 0, False: 0]
  ------------------
 1488|       |                        /* store a new prefix - namespace pair */
 1489|      0|                        new_ns = calloc(1, sizeof *new_ns);
 1490|      0|                        LY_CHECK_ERR_GOTO(!new_ns, LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1491|      0|                        LY_CHECK_GOTO(ret = ly_set_add(ns_list, new_ns, 1, NULL), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1492|       |
 1493|      0|                        new_ns->prefix = strndup(value_iter, substr_len);
 1494|      0|                        LY_CHECK_ERR_GOTO(!new_ns->prefix, LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1495|      0|                        new_ns->uri = strdup(ns->uri);
 1496|      0|                        LY_CHECK_ERR_GOTO(!new_ns->uri, LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1497|      0|                    } /* else it is not even defined */
 1498|      0|                } /* else the prefix is already present */
 1499|      0|            }
 1500|      0|        }
 1501|      0|        break;
 1502|      0|    case LY_VALUE_CANON:
  ------------------
  |  Branch (1502:5): [True: 0, False: 70.2k]
  ------------------
 1503|      0|    case LY_VALUE_SCHEMA_RESOLVED:
  ------------------
  |  Branch (1503:5): [True: 0, False: 70.2k]
  ------------------
 1504|      0|    case LY_VALUE_JSON:
  ------------------
  |  Branch (1504:5): [True: 0, False: 70.2k]
  ------------------
 1505|      0|    case LY_VALUE_LYB:
  ------------------
  |  Branch (1505:5): [True: 0, False: 70.2k]
  ------------------
 1506|      0|        if (!*prefix_data_p) {
  ------------------
  |  Branch (1506:13): [True: 0, False: 0]
  ------------------
 1507|       |            /* new prefix data - simply copy all the prefix data */
 1508|      0|            *format_p = format;
 1509|      0|            LY_CHECK_GOTO(ret = ly_dup_prefix_data(ctx, format, prefix_data, prefix_data_p), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1510|      0|        } /* else reuse prefix data - the prefix data are always the same, nothing to do */
 1511|      0|        break;
 1512|  70.2k|    }
 1513|       |
 1514|  70.2k|cleanup:
 1515|  70.2k|    if (ret) {
  ------------------
  |  Branch (1515:9): [True: 0, False: 70.2k]
  ------------------
 1516|      0|        ly_free_prefix_data(*format_p, *prefix_data_p);
 1517|      0|        *prefix_data_p = NULL;
 1518|      0|    }
 1519|  70.2k|    return ret;
 1520|  70.2k|}

lys_getnext:
  363|  4.00M|{
  364|  4.00M|    return lys_getnext_(last, parent, module, NULL, options);
  365|  4.00M|}
lys_find_child:
  409|   520k|{
  410|   520k|    const struct lysc_node *node = NULL;
  411|       |
  412|   520k|    LY_CHECK_ARG_RET(NULL, module, name, NULL);
  ------------------
  |  |  226|   520k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   520k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   520k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|   520k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   520k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 520k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|   520k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 520k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   520k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  413|   520k|    LY_CHECK_CTX_EQUAL_RET(parent ? parent->module->ctx : NULL, module->ctx, NULL);
  ------------------
  |  |  233|   520k|#define LY_CHECK_CTX_EQUAL_RET(CTX, ...) GETMACRO3(__VA_ARGS__, LY_CHECK_CTX_EQUAL_RET3, LY_CHECK_CTX_EQUAL_RET2, \
  |  |  ------------------
  |  |  |  |   58|   520k|#define GETMACRO3(_1, _2, _3, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  233|   520k|#define LY_CHECK_CTX_EQUAL_RET(CTX, ...) GETMACRO3(__VA_ARGS__, LY_CHECK_CTX_EQUAL_RET3, LY_CHECK_CTX_EQUAL_RET2, \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  229|  1.04M|#define LY_CHECK_CTX_EQUAL_RET2(CTX1, CTX2, RETVAL) if ((CTX1) && (CTX2) && ((CTX1) != (CTX2))) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (229:57): [True: 463k, False: 56.2k]
  |  |  |  |  |  |  |  |  |  Branch (229:58): [True: 463k, False: 56.2k]
  |  |  |  |  |  |  |  |  |  Branch (229:67): [True: 463k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (229:77): [True: 0, False: 463k]
  |  |  |  |  |  |  |  |  |  Branch (229:79): [True: 463k, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|   520k|    {LOGERR(CTX1, LY_EINVAL, "Different contexts mixed in a single function call."); return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  234|   520k|    DUMMY) (CTX, __VA_ARGS__)
  ------------------
  414|   520k|    if (!nodetype) {
  ------------------
  |  Branch (414:9): [True: 281k, False: 238k]
  ------------------
  415|   281k|        nodetype = LYS_NODETYPE_MASK;
  ------------------
  |  |  259|   281k|#define LYS_NODETYPE_MASK 0xffff  /**< Mask for nodetypes, the value is limited for 16 bits */
  ------------------
  416|   281k|    }
  417|       |
  418|   759k|    while ((node = lys_getnext(node, parent, module->compiled, options))) {
  ------------------
  |  Branch (418:12): [True: 759k, False: 0]
  ------------------
  419|   759k|        if (!(node->nodetype & nodetype)) {
  ------------------
  |  Branch (419:13): [True: 0, False: 759k]
  ------------------
  420|      0|            continue;
  421|      0|        }
  422|   759k|        if (node->module != module) {
  ------------------
  |  Branch (422:13): [True: 0, False: 759k]
  ------------------
  423|      0|            continue;
  424|      0|        }
  425|       |
  426|   759k|        if (name_len) {
  ------------------
  |  Branch (426:13): [True: 759k, False: 0]
  ------------------
  427|   759k|            if (!ly_strncmp(node->name, name, name_len)) {
  ------------------
  |  Branch (427:17): [True: 520k, False: 238k]
  ------------------
  428|   520k|                return node;
  429|   520k|            }
  430|   759k|        } else {
  431|      0|            if (!strcmp(node->name, name)) {
  ------------------
  |  Branch (431:17): [True: 0, False: 0]
  ------------------
  432|      0|                return node;
  433|      0|            }
  434|      0|        }
  435|   759k|    }
  436|       |
  437|      0|    return NULL;
  438|   520k|}
lysc_path_until:
  692|  70.2k|{
  693|  70.2k|    const struct lysc_node *iter, *par, *key;
  694|  70.2k|    char *path = NULL;
  695|  70.2k|    int len = 0;
  696|  70.2k|    ly_bool skip_schema;
  697|       |
  698|  70.2k|    if (buffer) {
  ------------------
  |  Branch (698:9): [True: 70.2k, False: 0]
  ------------------
  699|  70.2k|        LY_CHECK_ARG_RET(node->module->ctx, buflen > 1, NULL);
  ------------------
  |  |  226|  70.2k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  70.2k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  70.2k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  70.2k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  70.2k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  700|  70.2k|        buffer[0] = '\0';
  701|  70.2k|    }
  702|       |
  703|  70.2k|    if ((pathtype == LYSC_PATH_DATA) || (pathtype == LYSC_PATH_DATA_PATTERN)) {
  ------------------
  |  Branch (703:9): [True: 0, False: 70.2k]
  |  Branch (703:41): [True: 0, False: 70.2k]
  ------------------
  704|       |        /* skip schema-only nodes */
  705|      0|        skip_schema = 1;
  706|  70.2k|    } else {
  707|  70.2k|        skip_schema = 0;
  708|  70.2k|    }
  709|       |
  710|   267k|    for (iter = node; iter && (iter != parent) && (len >= 0); iter = iter->parent) {
  ------------------
  |  Branch (710:23): [True: 196k, False: 70.2k]
  |  Branch (710:31): [True: 196k, False: 0]
  |  Branch (710:51): [True: 196k, False: 0]
  ------------------
  711|   196k|        char *s;
  712|   196k|        const char *slash;
  713|       |
  714|   196k|        if (skip_schema && (iter->nodetype & (LYS_CHOICE | LYS_CASE | LYS_INPUT | LYS_OUTPUT))) {
  ------------------
  |  |  241|      0|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
                      if (skip_schema && (iter->nodetype & (LYS_CHOICE | LYS_CASE | LYS_INPUT | LYS_OUTPUT))) {
  ------------------
  |  |  247|      0|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
                      if (skip_schema && (iter->nodetype & (LYS_CHOICE | LYS_CASE | LYS_INPUT | LYS_OUTPUT))) {
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
                      if (skip_schema && (iter->nodetype & (LYS_CHOICE | LYS_CASE | LYS_INPUT | LYS_OUTPUT))) {
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (714:13): [True: 0, False: 196k]
  |  Branch (714:28): [True: 0, False: 0]
  ------------------
  715|       |            /* schema-only node */
  716|      0|            continue;
  717|      0|        }
  718|       |
  719|   196k|        if ((pathtype == LYSC_PATH_DATA_PATTERN) && (iter->nodetype == LYS_LIST)) {
  ------------------
  |  |  244|      0|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (719:13): [True: 0, False: 196k]
  |  Branch (719:53): [True: 0, False: 0]
  ------------------
  720|      0|            key = NULL;
  721|      0|            while ((key = lys_getnext(key, iter, NULL, 0)) && lysc_is_key(key)) {
  ------------------
  |  | 1748|      0|    ((!lysc_node || (lysc_node->nodetype != LYS_LEAF) || !(lysc_node->flags & LYS_KEY)) ? 0 : 1)
  |  |  ------------------
  |  |  |  |  242|      0|#define LYS_LEAF        0x0004    /**< leaf statement node */
  |  |  ------------------
  |  |                   ((!lysc_node || (lysc_node->nodetype != LYS_LEAF) || !(lysc_node->flags & LYS_KEY)) ? 0 : 1)
  |  |  ------------------
  |  |  |  |  671|      0|#define LYS_KEY          0x0100      /**< flag for leafs being a key of a list, applicable only to ::lysc_node_leaf */
  |  |  ------------------
  |  |  |  Branch (1748:5): [True: 0, False: 0]
  |  |  |  Branch (1748:7): [True: 0, False: 0]
  |  |  |  Branch (1748:21): [True: 0, False: 0]
  |  |  |  Branch (1748:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (721:20): [True: 0, False: 0]
  ------------------
  722|      0|                s = buffer ? strdup(buffer) : path;
  ------------------
  |  Branch (722:21): [True: 0, False: 0]
  ------------------
  723|       |
  724|       |                /* print key predicate */
  725|      0|                if (buffer) {
  ------------------
  |  Branch (725:21): [True: 0, False: 0]
  ------------------
  726|      0|                    len = snprintf(buffer, buflen, "[%s='%%s']%s", key->name, s ? s : "");
  ------------------
  |  Branch (726:79): [True: 0, False: 0]
  ------------------
  727|      0|                } else {
  728|      0|                    len = asprintf(&path, "[%s='%%s']%s", key->name, s ? s : "");
  ------------------
  |  Branch (728:70): [True: 0, False: 0]
  ------------------
  729|      0|                }
  730|      0|                free(s);
  731|       |
  732|      0|                if (buffer && (buflen <= (size_t)len)) {
  ------------------
  |  Branch (732:21): [True: 0, False: 0]
  |  Branch (732:31): [True: 0, False: 0]
  ------------------
  733|       |                    /* not enough space in buffer */
  734|      0|                    break;
  735|      0|                }
  736|      0|            }
  737|      0|        }
  738|       |
  739|   196k|        s = buffer ? strdup(buffer) : path;
  ------------------
  |  Branch (739:13): [True: 196k, False: 0]
  ------------------
  740|   196k|        if (parent && (iter->parent == parent)) {
  ------------------
  |  Branch (740:13): [True: 0, False: 196k]
  |  Branch (740:23): [True: 0, False: 0]
  ------------------
  741|      0|            slash = "";
  742|   196k|        } else {
  743|   196k|            slash = "/";
  744|   196k|        }
  745|       |
  746|   196k|        if (skip_schema) {
  ------------------
  |  Branch (746:13): [True: 0, False: 196k]
  ------------------
  747|      0|            par = lysc_data_parent(iter);
  ------------------
  |  | 1780|      0|#define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
  |  |  ------------------
  |  |  |  Branch (1780:49): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  748|   196k|        } else {
  749|   196k|            par = iter->parent;
  750|   196k|        }
  751|       |
  752|   196k|        if (!par || (par->module != iter->module)) {
  ------------------
  |  Branch (752:13): [True: 70.2k, False: 126k]
  |  Branch (752:21): [True: 0, False: 126k]
  ------------------
  753|       |            /* print prefix */
  754|  70.2k|            if (buffer) {
  ------------------
  |  Branch (754:17): [True: 70.2k, False: 0]
  ------------------
  755|  70.2k|                len = snprintf(buffer, buflen, "%s%s:%s%s", slash, iter->module->name, iter->name, s ? s : "");
  ------------------
  |  Branch (755:100): [True: 70.2k, False: 0]
  ------------------
  756|  70.2k|            } else {
  757|      0|                len = asprintf(&path, "%s%s:%s%s", slash, iter->module->name, iter->name, s ? s : "");
  ------------------
  |  Branch (757:91): [True: 0, False: 0]
  ------------------
  758|      0|            }
  759|   126k|        } else {
  760|       |            /* prefix is the same as in parent */
  761|   126k|            if (buffer) {
  ------------------
  |  Branch (761:17): [True: 126k, False: 0]
  ------------------
  762|   126k|                len = snprintf(buffer, buflen, "%s%s%s", slash, iter->name, s ? s : "");
  ------------------
  |  Branch (762:77): [True: 126k, False: 0]
  ------------------
  763|   126k|            } else {
  764|      0|                len = asprintf(&path, "%s%s%s", slash, iter->name, s ? s : "");
  ------------------
  |  Branch (764:68): [True: 0, False: 0]
  ------------------
  765|      0|            }
  766|   126k|        }
  767|   196k|        free(s);
  768|       |
  769|   196k|        if (buffer && (buflen <= (size_t)len)) {
  ------------------
  |  Branch (769:13): [True: 196k, False: 0]
  |  Branch (769:23): [True: 0, False: 196k]
  ------------------
  770|       |            /* not enough space in buffer */
  771|      0|            break;
  772|      0|        }
  773|   196k|    }
  774|       |
  775|  70.2k|    if (len < 0) {
  ------------------
  |  Branch (775:9): [True: 0, False: 70.2k]
  ------------------
  776|      0|        free(path);
  777|      0|        path = NULL;
  778|  70.2k|    } else if (len == 0) {
  ------------------
  |  Branch (778:16): [True: 0, False: 70.2k]
  ------------------
  779|      0|        if (buffer) {
  ------------------
  |  Branch (779:13): [True: 0, False: 0]
  ------------------
  780|      0|            strcpy(buffer, "/");
  781|      0|        } else {
  782|      0|            path = strdup("/");
  783|      0|        }
  784|      0|    }
  785|       |
  786|  70.2k|    if (buffer) {
  ------------------
  |  Branch (786:9): [True: 70.2k, False: 0]
  ------------------
  787|  70.2k|        return buffer;
  788|  70.2k|    } else {
  789|      0|        return path;
  790|      0|    }
  791|  70.2k|}
lysc_path:
  795|  70.2k|{
  796|  70.2k|    return lysc_path_until(node, NULL, pathtype, buffer, buflen);
  797|  70.2k|}
lys_unres_dep_sets_create:
 1007|  14.0k|{
 1008|  14.0k|    LY_ERR ret = LY_SUCCESS;
 1009|  14.0k|    struct lys_module *m;
 1010|  14.0k|    struct ly_set *dep_set = NULL, *ctx_set = NULL, aux_set = {0};
 1011|  14.0k|    uint32_t i;
 1012|  14.0k|    ly_bool found;
 1013|       |
 1014|  14.0k|    assert(!main_set->count);
 1015|       |
 1016|       |    /* start with a duplicate set of modules that we will remove from */
 1017|  14.0k|    LY_CHECK_GOTO(ret = ly_set_dup(&ctx->list, NULL, &ctx_set), cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 1018|       |
 1019|       |    /* first create all dep sets with single modules */
 1020|  14.0k|    LY_CHECK_GOTO(ret = lys_unres_dep_sets_create_single(ctx_set, main_set), cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 1021|       |
 1022|  14.0k|    if (mod && !ly_set_contains(ctx_set, mod, NULL)) {
  ------------------
  |  Branch (1022:9): [True: 0, False: 14.0k]
  |  Branch (1022:16): [True: 0, False: 0]
  ------------------
 1023|       |        /* dep set for this module has already been created, nothing else to do */
 1024|      0|        goto cleanup;
 1025|      0|    }
 1026|       |
 1027|  56.2k|    while (ctx_set->count) {
  ------------------
  |  Branch (1027:12): [True: 42.1k, False: 14.0k]
  ------------------
 1028|       |        /* create new dep set */
 1029|  42.1k|        LY_CHECK_GOTO(ret = ly_set_new(&dep_set), cleanup);
  ------------------
  |  |  202|  42.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 42.1k]
  |  |  ------------------
  ------------------
 1030|       |
 1031|  42.1k|        if (mod) {
  ------------------
  |  Branch (1031:13): [True: 0, False: 42.1k]
  ------------------
 1032|       |            /* use the module create a dep set with the rest of its dependent modules */
 1033|      0|            LY_CHECK_GOTO(ret = lys_unres_dep_sets_create_mod_r(mod, ctx_set, dep_set, &aux_set), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1034|  42.1k|        } else {
 1035|       |            /* use first ctx mod to create a dep set with the rest of its dependent modules */
 1036|  42.1k|            LY_CHECK_GOTO(ret = lys_unres_dep_sets_create_mod_r(ctx_set->objs[0], ctx_set, dep_set, &aux_set), cleanup);
  ------------------
  |  |  202|  42.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 42.1k]
  |  |  ------------------
  ------------------
 1037|  42.1k|        }
 1038|  42.1k|        ly_set_erase(&aux_set, NULL);
 1039|  42.1k|        assert(dep_set->count);
 1040|       |
 1041|       |        /* check whether there is any module that will be (re)compiled */
 1042|      0|        found = 0;
 1043|  42.1k|        for (i = 0; i < dep_set->count; ++i) {
  ------------------
  |  Branch (1043:21): [True: 42.1k, False: 0]
  ------------------
 1044|  42.1k|            m = dep_set->objs[i];
 1045|  42.1k|            if (m->to_compile) {
  ------------------
  |  Branch (1045:17): [True: 42.1k, False: 0]
  ------------------
 1046|  42.1k|                found = 1;
 1047|  42.1k|                break;
 1048|  42.1k|            }
 1049|  42.1k|        }
 1050|       |
 1051|  42.1k|        if (found) {
  ------------------
  |  Branch (1051:13): [True: 42.1k, False: 0]
  ------------------
 1052|       |            /* if there is, all the implemented modules need to be recompiled */
 1053|  84.3k|            for (i = 0; i < dep_set->count; ++i) {
  ------------------
  |  Branch (1053:25): [True: 42.1k, False: 42.1k]
  ------------------
 1054|  42.1k|                m = dep_set->objs[i];
 1055|  42.1k|                if (m->implemented) {
  ------------------
  |  Branch (1055:21): [True: 42.1k, False: 0]
  ------------------
 1056|  42.1k|                    m->to_compile = 1;
 1057|  42.1k|                }
 1058|  42.1k|            }
 1059|  42.1k|        }
 1060|       |
 1061|       |        /* add the dep set into main set */
 1062|  42.1k|        LY_CHECK_GOTO(ret = ly_set_add(main_set, dep_set, 1, NULL), cleanup);
  ------------------
  |  |  202|  42.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 42.1k]
  |  |  ------------------
  ------------------
 1063|  42.1k|        dep_set = NULL;
 1064|       |
 1065|  42.1k|        if (mod) {
  ------------------
  |  Branch (1065:13): [True: 0, False: 42.1k]
  ------------------
 1066|       |            /* we need dep set only for this module */
 1067|      0|            break;
 1068|      0|        }
 1069|  42.1k|    }
 1070|       |
 1071|  14.0k|#ifndef NDEBUG
 1072|  14.0k|    LOGDBG(LY_LDGDEPSETS, "dep sets created (%" PRIu32 "):", main_set->count);
  ------------------
  |  |  162|  14.0k|#  define LOGDBG(dbg_group, ...) ly_log_dbg(dbg_group, __VA_ARGS__);
  ------------------
 1073|   126k|    for (i = 0; i < main_set->count; ++i) {
  ------------------
  |  Branch (1073:17): [True: 112k, False: 14.0k]
  ------------------
 1074|   112k|        struct ly_set *iter_set = main_set->objs[i];
 1075|       |
 1076|   112k|        LOGDBG(LY_LDGDEPSETS, "dep set #%" PRIu32 ":", i);
  ------------------
  |  |  162|   112k|#  define LOGDBG(dbg_group, ...) ly_log_dbg(dbg_group, __VA_ARGS__);
  ------------------
 1077|   224k|        for (uint32_t j = 0; j < iter_set->count; ++j) {
  ------------------
  |  Branch (1077:30): [True: 112k, False: 112k]
  ------------------
 1078|   112k|            m = iter_set->objs[j];
 1079|   112k|            LOGDBG(LY_LDGDEPSETS, "\t%s", m->name);
  ------------------
  |  |  162|   112k|#  define LOGDBG(dbg_group, ...) ly_log_dbg(dbg_group, __VA_ARGS__);
  ------------------
 1080|   112k|        }
 1081|   112k|    }
 1082|  14.0k|#endif
 1083|       |
 1084|  14.0k|cleanup:
 1085|  14.0k|    assert(ret || main_set->objs);
 1086|      0|    ly_set_erase(&aux_set, NULL);
 1087|  14.0k|    ly_set_free(dep_set, NULL);
 1088|  14.0k|    ly_set_free(ctx_set, NULL);
 1089|  14.0k|    return ret;
 1090|  14.0k|}
lys_unres_glob_revert:
 1094|  14.0k|{
 1095|  14.0k|    uint32_t i, j, idx, temp_lo = 0;
 1096|  14.0k|    struct lysf_ctx fctx = {.ctx = ctx};
 1097|  14.0k|    struct ly_set *dep_set;
 1098|  14.0k|    LY_ERR ret;
 1099|       |
 1100|  14.0k|    for (i = 0; i < unres->implementing.count; ++i) {
  ------------------
  |  Branch (1100:17): [True: 0, False: 14.0k]
  ------------------
 1101|      0|        fctx.mod = unres->implementing.objs[i];
 1102|      0|        assert(fctx.mod->implemented);
 1103|       |
 1104|       |        /* make the module correctly non-implemented again */
 1105|      0|        fctx.mod->implemented = 0;
 1106|      0|        lys_precompile_augments_deviations_revert(ctx, fctx.mod);
 1107|      0|        lysc_module_free(&fctx, fctx.mod->compiled);
 1108|      0|        fctx.mod->compiled = NULL;
 1109|       |
 1110|       |        /* should not be made implemented */
 1111|      0|        fctx.mod->to_compile = 0;
 1112|      0|    }
 1113|       |
 1114|  14.0k|    for (i = 0; i < unres->creating.count; ++i) {
  ------------------
  |  Branch (1114:17): [True: 0, False: 14.0k]
  ------------------
 1115|      0|        fctx.mod = unres->creating.objs[i];
 1116|       |
 1117|       |        /* remove the module from the context */
 1118|      0|        ly_set_rm(&ctx->list, fctx.mod, NULL);
 1119|       |
 1120|       |        /* remove it also from dep sets */
 1121|      0|        for (j = 0; j < unres->dep_sets.count; ++j) {
  ------------------
  |  Branch (1121:21): [True: 0, False: 0]
  ------------------
 1122|      0|            dep_set = unres->dep_sets.objs[j];
 1123|      0|            if (ly_set_contains(dep_set, fctx.mod, &idx)) {
  ------------------
  |  Branch (1123:17): [True: 0, False: 0]
  ------------------
 1124|      0|                ly_set_rm_index(dep_set, idx, NULL);
 1125|      0|                break;
 1126|      0|            }
 1127|      0|        }
 1128|       |
 1129|       |        /* free the module */
 1130|      0|        lys_module_free(&fctx, fctx.mod, 1);
 1131|      0|    }
 1132|       |
 1133|       |    /* remove the extensions as well */
 1134|  14.0k|    lysf_ctx_erase(&fctx);
 1135|       |
 1136|  14.0k|    if (unres->implementing.count) {
  ------------------
  |  Branch (1136:9): [True: 0, False: 14.0k]
  ------------------
 1137|       |        /* recompile previous context because some implemented modules are no longer implemented,
 1138|       |         * we can reuse the current to_compile flags */
 1139|      0|        ly_temp_log_options(&temp_lo);
 1140|      0|        ret = lys_compile_depset_all(ctx, &ctx->unres);
 1141|      0|        ly_temp_log_options(NULL);
 1142|      0|        if (ret) {
  ------------------
  |  Branch (1142:13): [True: 0, False: 0]
  ------------------
 1143|      0|            LOGINT(ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
 1144|      0|        }
 1145|      0|    }
 1146|  14.0k|}
lys_unres_glob_erase:
 1150|  56.2k|{
 1151|  56.2k|    uint32_t i;
 1152|       |
 1153|   168k|    for (i = 0; i < unres->dep_sets.count; ++i) {
  ------------------
  |  Branch (1153:17): [True: 112k, False: 56.2k]
  ------------------
 1154|   112k|        ly_set_free(unres->dep_sets.objs[i], NULL);
 1155|   112k|    }
 1156|  56.2k|    ly_set_erase(&unres->dep_sets, NULL);
 1157|  56.2k|    ly_set_erase(&unres->implementing, NULL);
 1158|  56.2k|    ly_set_erase(&unres->creating, NULL);
 1159|       |
 1160|  56.2k|    assert(!unres->ds_unres.whens.count);
 1161|      0|    assert(!unres->ds_unres.musts.count);
 1162|      0|    assert(!unres->ds_unres.leafrefs.count);
 1163|      0|    assert(!unres->ds_unres.disabled_leafrefs.count);
 1164|      0|    assert(!unres->ds_unres.dflts.count);
 1165|      0|    assert(!unres->ds_unres.disabled.count);
 1166|  56.2k|}
lys_parse_in:
 1747|   126k|{
 1748|   126k|    struct lys_module *mod = NULL, *latest, *mod_dup = NULL;
 1749|   126k|    LY_ERR ret;
 1750|   126k|    struct lysp_yang_ctx *yangctx = NULL;
 1751|   126k|    struct lysp_yin_ctx *yinctx = NULL;
 1752|   126k|    struct lysp_ctx *pctx = NULL;
 1753|   126k|    struct lysf_ctx fctx = {.ctx = ctx};
 1754|   126k|    char *filename, *rev, *dot;
 1755|   126k|    size_t len;
 1756|   126k|    ly_bool module_created = 0;
 1757|       |
 1758|   126k|    assert(ctx && in && new_mods);
 1759|       |
 1760|   126k|    if (module) {
  ------------------
  |  Branch (1760:9): [True: 126k, False: 0]
  ------------------
 1761|   126k|        *module = NULL;
 1762|   126k|    }
 1763|       |
 1764|   126k|    mod = calloc(1, sizeof *mod);
 1765|   126k|    LY_CHECK_ERR_RET(!mod, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|   126k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
 1766|   126k|    mod->ctx = ctx;
 1767|       |
 1768|       |    /* parse */
 1769|   126k|    switch (format) {
 1770|      0|    case LYS_IN_YIN:
  ------------------
  |  Branch (1770:5): [True: 0, False: 126k]
  ------------------
 1771|      0|        ret = yin_parse_module(&yinctx, in, mod);
 1772|      0|        pctx = (struct lysp_ctx *)yinctx;
 1773|      0|        break;
 1774|   126k|    case LYS_IN_YANG:
  ------------------
  |  Branch (1774:5): [True: 126k, False: 0]
  ------------------
 1775|   126k|        ret = yang_parse_module(&yangctx, in, mod);
 1776|   126k|        pctx = (struct lysp_ctx *)yangctx;
 1777|   126k|        break;
 1778|      0|    default:
  ------------------
  |  Branch (1778:5): [True: 0, False: 126k]
  ------------------
 1779|      0|        LOGERR(ctx, LY_EINVAL, "Invalid schema input format.");
  ------------------
  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  ------------------
 1780|      0|        ret = LY_EINVAL;
 1781|      0|        break;
 1782|   126k|    }
 1783|   126k|    LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   126k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 14.0k, False: 112k]
  |  |  ------------------
  ------------------
 1784|       |
 1785|       |    /* make sure that the newest revision is at position 0 */
 1786|   112k|    lysp_sort_revisions(mod->parsed->revs);
 1787|   112k|    if (mod->parsed->revs) {
  ------------------
  |  Branch (1787:9): [True: 112k, False: 0]
  ------------------
 1788|   112k|        LY_CHECK_GOTO(ret = lydict_insert(ctx, mod->parsed->revs[0].date, 0, &mod->revision), cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1789|   112k|    }
 1790|       |
 1791|       |    /* decide the latest revision */
 1792|   112k|    latest = ly_ctx_get_module_latest(ctx, mod->name);
 1793|   112k|    if (latest) {
  ------------------
  |  Branch (1793:9): [True: 0, False: 112k]
  ------------------
 1794|      0|        if (mod->revision) {
  ------------------
  |  Branch (1794:13): [True: 0, False: 0]
  ------------------
 1795|      0|            if (!latest->revision) {
  ------------------
  |  Branch (1795:17): [True: 0, False: 0]
  ------------------
 1796|       |                /* latest has no revision, so mod is anyway newer */
 1797|      0|                mod->latest_revision = latest->latest_revision & (LYS_MOD_LATEST_REV | LYS_MOD_LATEST_SEARCHDIRS);
  ------------------
  |  | 2122|      0|#define LYS_MOD_LATEST_REV          0x01 /**< This is the latest revision of the module in the current context. */
  ------------------
                              mod->latest_revision = latest->latest_revision & (LYS_MOD_LATEST_REV | LYS_MOD_LATEST_SEARCHDIRS);
  ------------------
  |  | 2123|      0|#define LYS_MOD_LATEST_SEARCHDIRS   0x02 /**< This is the latest revision of the module found in searchdirs. */
  ------------------
 1798|       |                /* the latest is zeroed later when the new module is being inserted into the context */
 1799|      0|            } else if (strcmp(mod->revision, latest->revision) > 0) {
  ------------------
  |  Branch (1799:24): [True: 0, False: 0]
  ------------------
 1800|      0|                mod->latest_revision = latest->latest_revision & (LYS_MOD_LATEST_REV | LYS_MOD_LATEST_SEARCHDIRS);
  ------------------
  |  | 2122|      0|#define LYS_MOD_LATEST_REV          0x01 /**< This is the latest revision of the module in the current context. */
  ------------------
                              mod->latest_revision = latest->latest_revision & (LYS_MOD_LATEST_REV | LYS_MOD_LATEST_SEARCHDIRS);
  ------------------
  |  | 2123|      0|#define LYS_MOD_LATEST_SEARCHDIRS   0x02 /**< This is the latest revision of the module found in searchdirs. */
  ------------------
 1801|       |                /* the latest is zeroed later when the new module is being inserted into the context */
 1802|      0|            } else {
 1803|      0|                latest = NULL;
 1804|      0|            }
 1805|      0|        } else {
 1806|      0|            latest = NULL;
 1807|      0|        }
 1808|   112k|    } else {
 1809|   112k|        mod->latest_revision = LYS_MOD_LATEST_REV;
  ------------------
  |  | 2122|   112k|#define LYS_MOD_LATEST_REV          0x01 /**< This is the latest revision of the module in the current context. */
  ------------------
 1810|   112k|    }
 1811|       |
 1812|   112k|    if (custom_check) {
  ------------------
  |  Branch (1812:9): [True: 0, False: 112k]
  ------------------
 1813|      0|        LY_CHECK_GOTO(ret = custom_check(ctx, mod->parsed, NULL, check_data), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1814|      0|    }
 1815|       |
 1816|       |    /* check whether it is not already in the context in the same revision */
 1817|   112k|    mod_dup = ly_ctx_get_module(ctx, mod->name, mod->revision);
 1818|   112k|    if (mod_dup) {
  ------------------
  |  Branch (1818:9): [True: 0, False: 112k]
  ------------------
 1819|       |        /* nothing to do */
 1820|      0|        LOGVRB("Module \"%s@%s\" is already present in the context.", mod_dup->name,
  ------------------
  |  |  156|      0|#define LOGVRB(...) ly_log(NULL, LY_LLVRB, 0, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (156:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1821|      0|                mod_dup->revision ? mod_dup->revision : "<none>");
 1822|      0|        goto cleanup;
 1823|      0|    }
 1824|       |
 1825|       |    /* check whether there is not a namespace collision */
 1826|   112k|    mod_dup = ly_ctx_get_module_latest_ns(ctx, mod->ns);
 1827|   112k|    if (mod_dup && (mod_dup->revision == mod->revision)) {
  ------------------
  |  Branch (1827:9): [True: 0, False: 112k]
  |  Branch (1827:20): [True: 0, False: 0]
  ------------------
 1828|      0|        LOGERR(ctx, LY_EINVAL, "Two different modules (\"%s\" and \"%s\") have the same namespace \"%s\".",
  ------------------
  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  ------------------
 1829|      0|                mod_dup->name, mod->name, mod->ns);
 1830|      0|        ret = LY_EINVAL;
 1831|      0|        goto cleanup;
 1832|      0|    }
 1833|       |
 1834|   112k|    switch (in->type) {
  ------------------
  |  Branch (1834:13): [True: 0, False: 112k]
  ------------------
 1835|      0|    case LY_IN_FILEPATH:
  ------------------
  |  Branch (1835:5): [True: 0, False: 112k]
  ------------------
 1836|       |        /* check that name and revision match filename */
 1837|      0|        filename = strrchr(in->method.fpath.filepath, '/');
 1838|      0|        if (!filename) {
  ------------------
  |  Branch (1838:13): [True: 0, False: 0]
  ------------------
 1839|      0|            filename = in->method.fpath.filepath;
 1840|      0|        } else {
 1841|      0|            filename++;
 1842|      0|        }
 1843|      0|        rev = strchr(filename, '@');
 1844|      0|        dot = strrchr(filename, '.');
 1845|       |
 1846|       |        /* name */
 1847|      0|        len = strlen(mod->name);
 1848|      0|        if (strncmp(filename, mod->name, len) ||
  ------------------
  |  Branch (1848:13): [True: 0, False: 0]
  ------------------
 1849|      0|                ((rev && (rev != &filename[len])) || (!rev && (dot != &filename[len])))) {
  ------------------
  |  Branch (1849:19): [True: 0, False: 0]
  |  Branch (1849:26): [True: 0, False: 0]
  |  Branch (1849:55): [True: 0, False: 0]
  |  Branch (1849:63): [True: 0, False: 0]
  ------------------
 1850|      0|            LOGWRN(ctx, "File name \"%s\" does not match module name \"%s\".", filename, mod->name);
  ------------------
  |  |  155|      0|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  ------------------
 1851|      0|        }
 1852|      0|        if (rev) {
  ------------------
  |  Branch (1852:13): [True: 0, False: 0]
  ------------------
 1853|      0|            len = dot - ++rev;
 1854|      0|            if (!mod->parsed->revs || (len != LY_REV_SIZE - 1) || strncmp(mod->parsed->revs[0].date, rev, len)) {
  ------------------
  |  |  232|      0|#define LY_REV_SIZE 11   /**< revision data string length (including terminating NULL byte) */
  ------------------
  |  Branch (1854:17): [True: 0, False: 0]
  |  Branch (1854:39): [True: 0, False: 0]
  |  Branch (1854:67): [True: 0, False: 0]
  ------------------
 1855|      0|                LOGWRN(ctx, "File name \"%s\" does not match module revision \"%s\".", filename,
  ------------------
  |  |  155|      0|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (155:51): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1856|      0|                        mod->parsed->revs ? mod->parsed->revs[0].date : "none");
 1857|      0|            }
 1858|      0|        }
 1859|       |
 1860|      0|        break;
 1861|      0|    case LY_IN_FD:
  ------------------
  |  Branch (1861:5): [True: 0, False: 112k]
  ------------------
 1862|      0|    case LY_IN_FILE:
  ------------------
  |  Branch (1862:5): [True: 0, False: 112k]
  ------------------
 1863|   112k|    case LY_IN_MEMORY:
  ------------------
  |  Branch (1863:5): [True: 112k, False: 0]
  ------------------
 1864|       |        /* nothing special to do */
 1865|   112k|        break;
 1866|      0|    case LY_IN_ERROR:
  ------------------
  |  Branch (1866:5): [True: 0, False: 112k]
  ------------------
 1867|      0|        LOGINT(ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
 1868|      0|        ret = LY_EINT;
 1869|      0|        goto cleanup;
 1870|   112k|    }
 1871|   112k|    lys_parser_fill_filepath(ctx, in, &mod->filepath);
 1872|       |
 1873|   112k|    if (latest) {
  ------------------
  |  Branch (1873:9): [True: 0, False: 112k]
  ------------------
 1874|      0|        latest->latest_revision &= ~(LYS_MOD_LATEST_REV | LYS_MOD_LATEST_SEARCHDIRS);
  ------------------
  |  | 2122|      0|#define LYS_MOD_LATEST_REV          0x01 /**< This is the latest revision of the module in the current context. */
  ------------------
                      latest->latest_revision &= ~(LYS_MOD_LATEST_REV | LYS_MOD_LATEST_SEARCHDIRS);
  ------------------
  |  | 2123|      0|#define LYS_MOD_LATEST_SEARCHDIRS   0x02 /**< This is the latest revision of the module found in searchdirs. */
  ------------------
 1875|      0|    }
 1876|       |
 1877|       |    /* add internal data in case specific modules were parsed */
 1878|   112k|    if (!strcmp(mod->name, "ietf-netconf")) {
  ------------------
  |  Branch (1878:9): [True: 0, False: 112k]
  ------------------
 1879|      0|        LY_CHECK_GOTO(ret = lysp_add_internal_ietf_netconf(pctx, mod->parsed), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1880|   112k|    } else if (!strcmp(mod->name, "ietf-netconf-with-defaults")) {
  ------------------
  |  Branch (1880:16): [True: 0, False: 112k]
  ------------------
 1881|      0|        LY_CHECK_GOTO(ret = lysp_add_internal_ietf_netconf_with_defaults(pctx, mod->parsed), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1882|      0|    }
 1883|       |
 1884|       |    /* add the module into newly created module set, will also be freed from there on any error */
 1885|   112k|    LY_CHECK_GOTO(ret = ly_set_add(new_mods, mod, 1, NULL), cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1886|   112k|    module_created = 1;
 1887|       |
 1888|       |    /* add into context */
 1889|   112k|    ret = ly_set_add(&ctx->list, mod, 1, NULL);
 1890|   112k|    LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1891|   112k|    ctx->change_count++;
 1892|       |
 1893|       |    /* resolve includes and all imports */
 1894|   112k|    LY_CHECK_GOTO(ret = lysp_resolve_import_include(pctx, mod->parsed, new_mods), cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1895|       |
 1896|       |    /* resolve extension instance plugin records */
 1897|   112k|    LY_CHECK_GOTO(ret = lysp_resolve_ext_instance_records(pctx), cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1898|       |
 1899|       |    /* check name collisions */
 1900|   112k|    LY_CHECK_GOTO(ret = lysp_check_dup_typedefs(pctx, mod->parsed), cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1901|   112k|    LY_CHECK_GOTO(ret = lysp_check_dup_groupings(pctx, mod->parsed), cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1902|   112k|    LY_CHECK_GOTO(ret = lysp_check_dup_features(pctx, mod->parsed), cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1903|   112k|    LY_CHECK_GOTO(ret = lysp_check_dup_identities(pctx, mod->parsed), cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1904|       |
 1905|       |    /* compile features */
 1906|   112k|    LY_CHECK_GOTO(ret = lys_compile_feature_iffeatures(mod->parsed), cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1907|       |
 1908|       |    /* compile identities */
 1909|   112k|    LY_CHECK_GOTO(ret = lys_compile_identities(mod), cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
 1910|       |
 1911|   126k|cleanup:
 1912|   126k|    if (ret && (ret != LY_EEXIST)) {
  ------------------
  |  Branch (1912:9): [True: 14.0k, False: 112k]
  |  Branch (1912:16): [True: 14.0k, False: 0]
  ------------------
 1913|  14.0k|        if (mod && mod->name) {
  ------------------
  |  Branch (1913:13): [True: 14.0k, False: 0]
  |  Branch (1913:20): [True: 11.2k, False: 2.78k]
  ------------------
 1914|       |            /* there are cases when path is not available for parsing error, so this additional
 1915|       |             * message tries to add information about the module where the error occurred */
 1916|  11.2k|            struct ly_err_item *e = ly_err_last(ctx);
 1917|       |
 1918|  11.2k|            if (e && (!e->path || !strncmp(e->path, "Line ", ly_strlen_const("Line ")))) {
  ------------------
  |  |  472|      0|#define ly_strlen_const(STR) (sizeof STR - 1)
  ------------------
  |  Branch (1918:17): [True: 0, False: 11.2k]
  |  Branch (1918:23): [True: 0, False: 0]
  |  Branch (1918:35): [True: 0, False: 0]
  ------------------
 1919|      0|                LOGERR(ctx, ret, "Parsing module \"%s\" failed.", mod->name);
  ------------------
  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  ------------------
 1920|      0|            }
 1921|  11.2k|        }
 1922|  14.0k|    }
 1923|   126k|    if (!module_created) {
  ------------------
  |  Branch (1923:9): [True: 14.0k, False: 112k]
  ------------------
 1924|  14.0k|        fctx.mod = mod;
 1925|  14.0k|        lys_module_free(&fctx, mod, 0);
 1926|  14.0k|        lysf_ctx_erase(&fctx);
 1927|       |
 1928|  14.0k|        mod = mod_dup;
 1929|  14.0k|    }
 1930|       |
 1931|   126k|    if (format == LYS_IN_YANG) {
  ------------------
  |  Branch (1931:9): [True: 126k, False: 0]
  ------------------
 1932|   126k|        lysp_yang_ctx_free(yangctx);
 1933|   126k|    } else {
 1934|      0|        lysp_yin_ctx_free(yinctx);
 1935|      0|    }
 1936|       |
 1937|   126k|    if (!ret && module) {
  ------------------
  |  Branch (1937:9): [True: 112k, False: 14.0k]
  |  Branch (1937:17): [True: 112k, False: 0]
  ------------------
 1938|   112k|        *module = mod;
 1939|   112k|    }
 1940|   126k|    return ret;
 1941|   112k|}
lys_parse:
 1968|  14.0k|{
 1969|  14.0k|    LY_ERR ret = LY_SUCCESS;
 1970|  14.0k|    struct lys_module *mod;
 1971|       |
 1972|  14.0k|    if (module) {
  ------------------
  |  Branch (1972:9): [True: 0, False: 14.0k]
  ------------------
 1973|      0|        *module = NULL;
 1974|      0|    }
 1975|  14.0k|    LY_CHECK_ARG_RET(NULL, ctx, in, LY_EINVAL);
  ------------------
  |  |  226|  14.0k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  14.0k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|  14.0k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
 1976|       |
 1977|  14.0k|    format = lys_parse_get_format(in, format);
 1978|  14.0k|    LY_CHECK_ARG_RET(ctx, format, LY_EINVAL);
  ------------------
  |  |  226|  14.0k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  14.0k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
 1979|       |
 1980|       |    /* remember input position */
 1981|  14.0k|    in->func_start = in->current;
 1982|       |
 1983|       |    /* parse */
 1984|  14.0k|    ret = lys_parse_in(ctx, in, format, NULL, NULL, &ctx->unres.creating, &mod);
 1985|  14.0k|    LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|  14.0k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 14.0k, False: 0]
  |  |  ------------------
  ------------------
 1986|       |
 1987|       |    /* implement */
 1988|      0|    ret = _lys_set_implemented(mod, features, &ctx->unres);
 1989|      0|    LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1990|       |
 1991|      0|    if (!(ctx->flags & LY_CTX_EXPLICIT_COMPILE)) {
  ------------------
  |  |  191|      0|#define LY_CTX_EXPLICIT_COMPILE 0x80 /**< If this flag is set, the compiled modules and their schema nodes are
  ------------------
  |  Branch (1991:9): [True: 0, False: 0]
  ------------------
 1992|       |        /* create dep set for the module and mark all the modules that will be (re)compiled */
 1993|      0|        LY_CHECK_GOTO(ret = lys_unres_dep_sets_create(ctx, &ctx->unres.dep_sets, mod), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1994|       |
 1995|       |        /* (re)compile the whole dep set (other dep sets will have no modules marked for compilation) */
 1996|      0|        LY_CHECK_GOTO(ret = lys_compile_depset_all(ctx, &ctx->unres), cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1997|       |
 1998|       |        /* unres resolved */
 1999|      0|        lys_unres_glob_erase(&ctx->unres);
 2000|      0|    }
 2001|       |
 2002|  14.0k|cleanup:
 2003|  14.0k|    if (ret) {
  ------------------
  |  Branch (2003:9): [True: 14.0k, False: 0]
  ------------------
 2004|  14.0k|        lys_unres_glob_revert(ctx, &ctx->unres);
 2005|  14.0k|        lys_unres_glob_erase(&ctx->unres);
 2006|  14.0k|    } else if (module) {
  ------------------
  |  Branch (2006:16): [True: 0, False: 0]
  ------------------
 2007|      0|        *module = mod;
 2008|      0|    }
 2009|  14.0k|    return ret;
 2010|      0|}
lys_parse_mem:
 2014|  14.0k|{
 2015|  14.0k|    LY_ERR ret;
 2016|  14.0k|    struct ly_in *in = NULL;
 2017|       |
 2018|  14.0k|    LY_CHECK_ARG_RET(ctx, data, format != LYS_IN_UNKNOWN, LY_EINVAL);
  ------------------
  |  |  226|  14.0k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  14.0k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  218|  14.0k|#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  217|  14.0k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  14.0k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
 2019|       |
 2020|  14.0k|    LY_CHECK_ERR_RET(ret = ly_in_new_memory(data, &in), LOGERR(ctx, ret, "Unable to create input handler."), ret);
  ------------------
  |  |  207|  14.0k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
 2021|       |
 2022|  14.0k|    ret = lys_parse(ctx, in, format, NULL, module);
 2023|  14.0k|    ly_in_free(in, 0);
 2024|       |
 2025|  14.0k|    return ret;
 2026|  14.0k|}
lys_search_localfile:
 2064|  28.1k|{
 2065|  28.1k|    LY_ERR ret = LY_EMEM;
 2066|  28.1k|    size_t len, flen, match_len = 0, dir_len;
 2067|  28.1k|    ly_bool implicit_cwd = 0;
 2068|  28.1k|    char *wd, *wn = NULL;
 2069|  28.1k|    DIR *dir = NULL;
 2070|  28.1k|    struct dirent *file;
 2071|  28.1k|    char *match_name = NULL;
 2072|  28.1k|    LYS_INFORMAT format_aux, match_format = 0;
 2073|  28.1k|    struct ly_set *dirs;
 2074|  28.1k|    struct stat st;
 2075|       |
 2076|  28.1k|    LY_CHECK_ARG_RET(NULL, localfile, LY_EINVAL);
  ------------------
  |  |  226|  28.1k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  28.1k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  28.1k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  28.1k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  28.1k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
 2077|       |
 2078|       |    /* start to fill the dir fifo with the context's search path (if set)
 2079|       |     * and the current working directory */
 2080|  28.1k|    LY_CHECK_RET(ly_set_new(&dirs));
  ------------------
  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2081|       |
 2082|  28.1k|    len = strlen(name);
 2083|  28.1k|    if (cwd) {
  ------------------
  |  Branch (2083:9): [True: 28.1k, False: 0]
  ------------------
 2084|  28.1k|        wd = get_current_dir_name();
 2085|  28.1k|        if (!wd) {
  ------------------
  |  Branch (2085:13): [True: 0, False: 28.1k]
  ------------------
 2086|      0|            LOGMEM(NULL);
  ------------------
  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
 2087|      0|            goto cleanup;
 2088|  28.1k|        } else {
 2089|       |            /* add implicit current working directory (./) to be searched,
 2090|       |             * this directory is not searched recursively */
 2091|  28.1k|            ret = ly_set_add(dirs, wd, 0, NULL);
 2092|  28.1k|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|  28.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
 2093|  28.1k|            implicit_cwd = 1;
 2094|  28.1k|        }
 2095|  28.1k|    }
 2096|  28.1k|    if (searchpaths) {
  ------------------
  |  Branch (2096:9): [True: 28.1k, False: 0]
  ------------------
 2097|  28.1k|        for (uint64_t i = 0; searchpaths[i]; i++) {
  ------------------
  |  Branch (2097:30): [True: 0, False: 28.1k]
  ------------------
 2098|       |            /* check for duplicities with the implicit current working directory */
 2099|      0|            if (implicit_cwd && !strcmp(dirs->objs[0], searchpaths[i])) {
  ------------------
  |  Branch (2099:17): [True: 0, False: 0]
  |  Branch (2099:33): [True: 0, False: 0]
  ------------------
 2100|      0|                implicit_cwd = 0;
 2101|      0|                continue;
 2102|      0|            }
 2103|      0|            wd = strdup(searchpaths[i]);
 2104|      0|            if (!wd) {
  ------------------
  |  Branch (2104:17): [True: 0, False: 0]
  ------------------
 2105|      0|                LOGMEM(NULL);
  ------------------
  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
 2106|      0|                goto cleanup;
 2107|      0|            } else {
 2108|      0|                ret = ly_set_add(dirs, wd, 0, NULL);
 2109|      0|                LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2110|      0|            }
 2111|      0|        }
 2112|  28.1k|    }
 2113|  28.1k|    wd = NULL;
 2114|       |
 2115|       |    /* start searching */
 2116|  56.2k|    while (dirs->count) {
  ------------------
  |  Branch (2116:12): [True: 28.1k, False: 28.1k]
  ------------------
 2117|  28.1k|        free(wd);
 2118|  28.1k|        free(wn); wn = NULL;
 2119|       |
 2120|  28.1k|        dirs->count--;
 2121|  28.1k|        wd = (char *)dirs->objs[dirs->count];
 2122|  28.1k|        dirs->objs[dirs->count] = NULL;
 2123|  28.1k|        LOGVRB("Searching for \"%s\" in \"%s\".", name, wd);
  ------------------
  |  |  156|  28.1k|#define LOGVRB(...) ly_log(NULL, LY_LLVRB, 0, __VA_ARGS__)
  ------------------
 2124|       |
 2125|  28.1k|        if (dir) {
  ------------------
  |  Branch (2125:13): [True: 0, False: 28.1k]
  ------------------
 2126|      0|            closedir(dir);
 2127|      0|        }
 2128|  28.1k|        dir = opendir(wd);
 2129|  28.1k|        dir_len = strlen(wd);
 2130|  28.1k|        if (!dir) {
  ------------------
  |  Branch (2130:13): [True: 0, False: 28.1k]
  ------------------
 2131|      0|            LOGWRN(NULL, "Unable to open directory \"%s\" for searching (sub)modules (%s).", wd, strerror(errno));
  ------------------
  |  |  155|      0|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  ------------------
 2132|  28.1k|        } else {
 2133|   734k|            while ((file = readdir(dir))) {
  ------------------
  |  Branch (2133:20): [True: 706k, False: 28.1k]
  ------------------
 2134|   706k|                if (!strcmp(".", file->d_name) || !strcmp("..", file->d_name)) {
  ------------------
  |  Branch (2134:21): [True: 28.1k, False: 678k]
  |  Branch (2134:51): [True: 28.1k, False: 650k]
  ------------------
 2135|       |                    /* skip . and .. */
 2136|  56.2k|                    continue;
 2137|  56.2k|                }
 2138|   650k|                free(wn);
 2139|   650k|                if (asprintf(&wn, "%s/%s", wd, file->d_name) == -1) {
  ------------------
  |  Branch (2139:21): [True: 0, False: 650k]
  ------------------
 2140|      0|                    LOGMEM(NULL);
  ------------------
  |  |  174|      0|#define LOGMEM(CTX) LOGERR(CTX, LY_EMEM, "Memory allocation failed (%s()).", __func__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
 2141|      0|                    goto cleanup;
 2142|      0|                }
 2143|   650k|                if (stat(wn, &st) == -1) {
  ------------------
  |  Branch (2143:21): [True: 0, False: 650k]
  ------------------
 2144|      0|                    LOGWRN(NULL, "Unable to get information about \"%s\" file in \"%s\" when searching for (sub)modules (%s)",
  ------------------
  |  |  155|      0|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  ------------------
 2145|      0|                            file->d_name, wd, strerror(errno));
 2146|      0|                    continue;
 2147|      0|                }
 2148|   650k|                if (S_ISDIR(st.st_mode) && (dirs->count || !implicit_cwd)) {
  ------------------
  |  Branch (2148:45): [True: 0, False: 365k]
  |  Branch (2148:60): [True: 0, False: 365k]
  ------------------
 2149|       |                    /* we have another subdirectory in searchpath to explore,
 2150|       |                     * subdirectories are not taken into account in current working dir (dirs->set.g[0]) */
 2151|      0|                    ret = ly_set_add(dirs, wn, 0, NULL);
 2152|      0|                    LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2153|       |
 2154|       |                    /* continue with the next item in current directory */
 2155|      0|                    wn = NULL;
 2156|      0|                    continue;
 2157|   650k|                } else if (!S_ISREG(st.st_mode)) {
  ------------------
  |  Branch (2157:28): [True: 365k, False: 284k]
  ------------------
 2158|       |                    /* not a regular file (note that we see the target of symlinks instead of symlinks */
 2159|   365k|                    continue;
 2160|   365k|                }
 2161|       |
 2162|       |                /* here we know that the item is a file which can contain a module */
 2163|   284k|                if (strncmp(name, file->d_name, len) ||
  ------------------
  |  Branch (2163:21): [True: 284k, False: 0]
  ------------------
 2164|   284k|                        ((file->d_name[len] != '.') && (file->d_name[len] != '@'))) {
  ------------------
  |  Branch (2164:26): [True: 0, False: 0]
  |  Branch (2164:56): [True: 0, False: 0]
  ------------------
 2165|       |                    /* different filename than the module we search for */
 2166|   284k|                    continue;
 2167|   284k|                }
 2168|       |
 2169|       |                /* get type according to filename suffix */
 2170|      0|                flen = strlen(file->d_name);
 2171|      0|                if ((flen >= LY_YANG_SUFFIX_LEN + 1) &&
  ------------------
  |  |   28|      0|#define LY_YANG_SUFFIX_LEN 5
  ------------------
  |  Branch (2171:21): [True: 0, False: 0]
  ------------------
 2172|      0|                        !strcmp(&file->d_name[flen - LY_YANG_SUFFIX_LEN], LY_YANG_SUFFIX)) {
  ------------------
  |  |   28|      0|#define LY_YANG_SUFFIX_LEN 5
  ------------------
                                      !strcmp(&file->d_name[flen - LY_YANG_SUFFIX_LEN], LY_YANG_SUFFIX)) {
  ------------------
  |  |   27|      0|#define LY_YANG_SUFFIX ".yang"
  ------------------
  |  Branch (2172:25): [True: 0, False: 0]
  ------------------
 2173|      0|                    format_aux = LYS_IN_YANG;
 2174|      0|                } else if ((flen >= LY_YIN_SUFFIX_LEN + 1) &&
  ------------------
  |  |   30|      0|#define LY_YIN_SUFFIX_LEN 4
  ------------------
  |  Branch (2174:28): [True: 0, False: 0]
  ------------------
 2175|      0|                        !strcmp(&file->d_name[flen - LY_YIN_SUFFIX_LEN], LY_YIN_SUFFIX)) {
  ------------------
  |  |   30|      0|#define LY_YIN_SUFFIX_LEN 4
  ------------------
                                      !strcmp(&file->d_name[flen - LY_YIN_SUFFIX_LEN], LY_YIN_SUFFIX)) {
  ------------------
  |  |   29|      0|#define LY_YIN_SUFFIX ".yin"
  ------------------
  |  Branch (2175:25): [True: 0, False: 0]
  ------------------
 2176|      0|                    format_aux = LYS_IN_YIN;
 2177|      0|                } else {
 2178|       |                    /* not supportde suffix/file format */
 2179|      0|                    continue;
 2180|      0|                }
 2181|       |
 2182|      0|                if (revision) {
  ------------------
  |  Branch (2182:21): [True: 0, False: 0]
  ------------------
 2183|       |                    /* we look for the specific revision, try to get it from the filename */
 2184|      0|                    if (file->d_name[len] == '@') {
  ------------------
  |  Branch (2184:25): [True: 0, False: 0]
  ------------------
 2185|       |                        /* check revision from the filename */
 2186|      0|                        if (strncmp(revision, &file->d_name[len + 1], strlen(revision))) {
  ------------------
  |  Branch (2186:29): [True: 0, False: 0]
  ------------------
 2187|       |                            /* another revision */
 2188|      0|                            continue;
 2189|      0|                        } else {
 2190|       |                            /* exact revision */
 2191|      0|                            free(match_name);
 2192|      0|                            match_name = wn;
 2193|      0|                            wn = NULL;
 2194|      0|                            match_len = dir_len + 1 + len;
 2195|      0|                            match_format = format_aux;
 2196|      0|                            goto success;
 2197|      0|                        }
 2198|      0|                    } else {
 2199|       |                        /* continue trying to find exact revision match, use this only if not found */
 2200|      0|                        free(match_name);
 2201|      0|                        match_name = wn;
 2202|      0|                        wn = NULL;
 2203|      0|                        match_len = dir_len + 1 + len;
 2204|      0|                        match_format = format_aux;
 2205|      0|                        continue;
 2206|      0|                    }
 2207|      0|                } else {
 2208|       |                    /* remember the revision and try to find the newest one */
 2209|      0|                    if (match_name) {
  ------------------
  |  Branch (2209:25): [True: 0, False: 0]
  ------------------
 2210|      0|                        if ((file->d_name[len] != '@') ||
  ------------------
  |  Branch (2210:29): [True: 0, False: 0]
  ------------------
 2211|      0|                                lysp_check_date(NULL, &file->d_name[len + 1],
  ------------------
  |  Branch (2211:33): [True: 0, False: 0]
  ------------------
 2212|      0|                                flen - ((format_aux == LYS_IN_YANG) ? LY_YANG_SUFFIX_LEN : LY_YIN_SUFFIX_LEN) - len - 1, NULL)) {
  ------------------
  |  |   28|      0|#define LY_YANG_SUFFIX_LEN 5
  ------------------
                                              flen - ((format_aux == LYS_IN_YANG) ? LY_YANG_SUFFIX_LEN : LY_YIN_SUFFIX_LEN) - len - 1, NULL)) {
  ------------------
  |  |   30|      0|#define LY_YIN_SUFFIX_LEN 4
  ------------------
  |  Branch (2212:41): [True: 0, False: 0]
  ------------------
 2213|      0|                            continue;
 2214|      0|                        } else if ((match_name[match_len] == '@') &&
  ------------------
  |  Branch (2214:36): [True: 0, False: 0]
  ------------------
 2215|      0|                                (strncmp(&match_name[match_len + 1], &file->d_name[len + 1], LY_REV_SIZE - 1) >= 0)) {
  ------------------
  |  |  232|      0|#define LY_REV_SIZE 11   /**< revision data string length (including terminating NULL byte) */
  ------------------
  |  Branch (2215:33): [True: 0, False: 0]
  ------------------
 2216|      0|                            continue;
 2217|      0|                        }
 2218|      0|                        free(match_name);
 2219|      0|                    }
 2220|       |
 2221|      0|                    match_name = wn;
 2222|      0|                    wn = NULL;
 2223|      0|                    match_len = dir_len + 1 + len;
 2224|      0|                    match_format = format_aux;
 2225|      0|                    continue;
 2226|      0|                }
 2227|      0|            }
 2228|  28.1k|        }
 2229|  28.1k|    }
 2230|       |
 2231|  28.1k|success:
 2232|  28.1k|    (*localfile) = match_name;
 2233|  28.1k|    match_name = NULL;
 2234|  28.1k|    if (format) {
  ------------------
  |  Branch (2234:9): [True: 28.1k, False: 0]
  ------------------
 2235|  28.1k|        (*format) = match_format;
 2236|  28.1k|    }
 2237|  28.1k|    ret = LY_SUCCESS;
 2238|       |
 2239|  28.1k|cleanup:
 2240|  28.1k|    free(wn);
 2241|  28.1k|    free(wd);
 2242|  28.1k|    if (dir) {
  ------------------
  |  Branch (2242:9): [True: 28.1k, False: 0]
  ------------------
 2243|  28.1k|        closedir(dir);
 2244|  28.1k|    }
 2245|  28.1k|    free(match_name);
 2246|  28.1k|    ly_set_free(dirs, free);
 2247|       |
 2248|  28.1k|    return ret;
 2249|  28.1k|}
tree_schema.c:lys_getnext_:
  166|  4.00M|{
  167|  4.00M|    const struct lysc_node *next = NULL;
  168|  4.00M|    ly_bool action_flag = 0, notif_flag = 0, sm_flag = options & LYS_GETNEXT_WITHSCHEMAMOUNT ? 0 : 1;
  ------------------
  |  | 2194|  4.00M|#define LYS_GETNEXT_WITHSCHEMAMOUNT 0x20    /**< ::lys_getnext() option to also traverse top-level nodes of all the mounted modules
  ------------------
  |  Branch (168:56): [True: 0, False: 4.00M]
  ------------------
  169|  4.00M|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|  4.00M|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  170|  4.00M|    struct ly_ctx *sm_ctx = NULL;
  171|  4.00M|    const struct lys_module *mod;
  172|  4.00M|    uint32_t idx;
  173|       |
  174|  4.00M|    LY_CHECK_ARG_RET(NULL, parent || module || ext, NULL);
  ------------------
  |  |  226|  4.00M|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|  4.00M|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  4.00M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|  8.32M|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:51): [True: 3.69M, False: 309k]
  |  |  |  |  |  |  |  |  |  Branch (217:51): [True: 309k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (217:51): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|  4.00M|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
  175|       |
  176|  4.04M|next:
  177|  4.04M|    if (!last) {
  ------------------
  |  Branch (177:9): [True: 1.43M, False: 2.61M]
  ------------------
  178|       |        /* first call */
  179|       |
  180|       |        /* learn where to start */
  181|  1.43M|        if (parent) {
  ------------------
  |  Branch (181:13): [True: 1.30M, False: 126k]
  ------------------
  182|       |            /* schema subtree */
  183|  1.30M|            next = last = lysc_node_child(parent);
  184|  1.30M|        } else {
  185|       |            /* top level data */
  186|   126k|            if (ext) {
  ------------------
  |  Branch (186:17): [True: 0, False: 126k]
  ------------------
  187|      0|                lyplg_ext_get_storage(ext, LY_STMT_DATA_NODE_MASK, sizeof last, (const void **)&last);
  ------------------
  |  |  126|      0|#define LY_STMT_DATA_NODE_MASK (LY_STMT_ANYDATA | LY_STMT_ANYXML | LY_STMT_CASE | LY_STMT_CHOICE | LY_STMT_CONTAINER |\
  |  |  127|      0|        LY_STMT_LEAF | LY_STMT_LEAF_LIST | LY_STMT_LIST)
  ------------------
  188|      0|                next = last;
  189|   126k|            } else {
  190|   126k|                next = last = module->data;
  191|   126k|            }
  192|   126k|        }
  193|  1.43M|        if (!next) {
  ------------------
  |  Branch (193:13): [True: 14.0k, False: 1.41M]
  ------------------
  194|       |            /* try to get action or notification */
  195|  14.0k|            goto repeat;
  196|  14.0k|        }
  197|       |        /* test if the next can be returned */
  198|  1.41M|        goto check;
  199|       |
  200|  2.61M|    } else if (last->nodetype & (LYS_RPC | LYS_ACTION)) {
  ------------------
  |  |  249|  2.61M|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
                  } else if (last->nodetype & (LYS_RPC | LYS_ACTION)) {
  ------------------
  |  |  250|  2.61M|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
  |  Branch (200:16): [True: 0, False: 2.61M]
  ------------------
  201|      0|        action_flag = 1;
  202|      0|        next = last->next;
  203|  2.61M|    } else if (last->nodetype == LYS_NOTIF) {
  ------------------
  |  |  251|  2.61M|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (203:16): [True: 42.1k, False: 2.57M]
  ------------------
  204|  42.1k|        action_flag = notif_flag = 1;
  205|  42.1k|        next = last->next;
  206|  2.57M|    } else {
  207|  2.57M|        next = last->next;
  208|  2.57M|    }
  209|       |
  210|  4.49M|repeat:
  211|  4.49M|    if (!next) {
  ------------------
  |  Branch (211:9): [True: 2.78M, False: 1.71M]
  ------------------
  212|  2.78M|        if (last && !sm_flag && parent && (last->module->ctx != parent->module->ctx)) {
  ------------------
  |  Branch (212:13): [True: 2.74M, False: 42.1k]
  |  Branch (212:21): [True: 0, False: 2.74M]
  |  Branch (212:33): [True: 0, False: 0]
  |  Branch (212:43): [True: 0, False: 0]
  ------------------
  213|      0|            sm_flag = 1;
  214|       |
  215|       |            /* find the module of last */
  216|      0|            sm_ctx = last->module->ctx;
  217|      0|            idx = 0;
  218|      0|            while ((mod = ly_ctx_get_module_iter(sm_ctx, &idx))) {
  ------------------
  |  Branch (218:20): [True: 0, False: 0]
  ------------------
  219|      0|                if (mod == last->module) {
  ------------------
  |  Branch (219:21): [True: 0, False: 0]
  ------------------
  220|      0|                    break;
  221|      0|                }
  222|      0|            }
  223|      0|            assert(mod);
  224|       |
  225|       |            /* get node from the next mounted module */
  226|      0|            while (!next && (mod = ly_ctx_get_module_iter(sm_ctx, &idx))) {
  ------------------
  |  Branch (226:20): [True: 0, False: 0]
  |  Branch (226:29): [True: 0, False: 0]
  ------------------
  227|      0|                if (!mod->implemented) {
  ------------------
  |  Branch (227:21): [True: 0, False: 0]
  ------------------
  228|      0|                    continue;
  229|      0|                }
  230|       |
  231|      0|                next = lys_getnext(NULL, NULL, mod->compiled, options & ~LYS_GETNEXT_WITHSCHEMAMOUNT);
  ------------------
  |  | 2194|      0|#define LYS_GETNEXT_WITHSCHEMAMOUNT 0x20    /**< ::lys_getnext() option to also traverse top-level nodes of all the mounted modules
  ------------------
  232|      0|            }
  233|  2.78M|        } else if (last && (last->parent != parent)) {
  ------------------
  |  Branch (233:20): [True: 2.74M, False: 42.1k]
  |  Branch (233:28): [True: 42.1k, False: 2.69M]
  ------------------
  234|       |            /* go back to parent */
  235|  42.1k|            last = last->parent;
  236|  42.1k|            goto next;
  237|  2.74M|        } else if (!action_flag) {
  ------------------
  |  Branch (237:20): [True: 913k, False: 1.82M]
  ------------------
  238|   913k|            action_flag = 1;
  239|   913k|            if (ext) {
  ------------------
  |  Branch (239:17): [True: 0, False: 913k]
  ------------------
  240|      0|                lyplg_ext_get_storage(ext, LY_STMT_OP_MASK, sizeof next, (const void **)&next);
  ------------------
  |  |  119|      0|#define LY_STMT_OP_MASK (LY_STMT_ACTION | LY_STMT_RPC)
  ------------------
  241|   913k|            } else if (parent) {
  ------------------
  |  Branch (241:24): [True: 843k, False: 70.2k]
  ------------------
  242|   843k|                next = (struct lysc_node *)lysc_node_actions(parent);
  243|   843k|            } else {
  244|  70.2k|                next = (struct lysc_node *)module->rpcs;
  245|  70.2k|            }
  246|  1.82M|        } else if (!notif_flag) {
  ------------------
  |  Branch (246:20): [True: 913k, False: 913k]
  ------------------
  247|   913k|            notif_flag = 1;
  248|   913k|            if (ext) {
  ------------------
  |  Branch (248:17): [True: 0, False: 913k]
  ------------------
  249|      0|                lyplg_ext_get_storage(ext, LY_STMT_NOTIFICATION, sizeof next, (const void **)&next);
  250|   913k|            } else if (parent) {
  ------------------
  |  Branch (250:24): [True: 843k, False: 70.2k]
  ------------------
  251|   843k|                next = (struct lysc_node *)lysc_node_notifs(parent);
  252|   843k|            } else {
  253|  70.2k|                next = (struct lysc_node *)module->notifs;
  254|  70.2k|            }
  255|   913k|        } else if (!sm_flag) {
  ------------------
  |  Branch (255:20): [True: 0, False: 913k]
  ------------------
  256|      0|            sm_flag = 1;
  257|      0|            if (parent) {
  ------------------
  |  Branch (257:17): [True: 0, False: 0]
  ------------------
  258|      0|                LY_ARRAY_FOR(parent->exts, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|      0|                    if (!strcmp(parent->exts[u].def->name, "mount-point") &&
  ------------------
  |  Branch (259:25): [True: 0, False: 0]
  ------------------
  260|      0|                            !strcmp(parent->exts[u].def->module->name, "ietf-yang-schema-mount")) {
  ------------------
  |  Branch (260:29): [True: 0, False: 0]
  ------------------
  261|      0|                        lyplg_ext_schema_mount_create_context(&parent->exts[u], &sm_ctx);
  262|      0|                        if (sm_ctx) {
  ------------------
  |  Branch (262:29): [True: 0, False: 0]
  ------------------
  263|       |                            /* some usable context created */
  264|      0|                            break;
  265|      0|                        }
  266|      0|                    }
  267|      0|                }
  268|      0|                if (sm_ctx) {
  ------------------
  |  Branch (268:21): [True: 0, False: 0]
  ------------------
  269|       |                    /* get the first node from the first usable module */
  270|      0|                    idx = 0;
  271|      0|                    while (!next && (mod = ly_ctx_get_module_iter(sm_ctx, &idx))) {
  ------------------
  |  Branch (271:28): [True: 0, False: 0]
  |  Branch (271:37): [True: 0, False: 0]
  ------------------
  272|      0|                        if (!mod->implemented) {
  ------------------
  |  Branch (272:29): [True: 0, False: 0]
  ------------------
  273|      0|                            continue;
  274|      0|                        }
  275|       |
  276|      0|                        next = lys_getnext(NULL, NULL, mod->compiled, options & ~LYS_GETNEXT_WITHSCHEMAMOUNT);
  ------------------
  |  | 2194|      0|#define LYS_GETNEXT_WITHSCHEMAMOUNT 0x20    /**< ::lys_getnext() option to also traverse top-level nodes of all the mounted modules
  ------------------
  277|      0|                    }
  278|      0|                    if (!next) {
  ------------------
  |  Branch (278:25): [True: 0, False: 0]
  ------------------
  279|       |                        /* no nodes found */
  280|      0|                        ly_ctx_destroy(sm_ctx);
  281|      0|                    }
  282|      0|                }
  283|      0|            }
  284|   913k|        } else {
  285|   913k|            return NULL;
  286|   913k|        }
  287|  1.82M|        goto repeat;
  288|  2.78M|    }
  289|  3.13M|check:
  290|  3.13M|    switch (next->nodetype) {
  291|      0|    case LYS_RPC:
  ------------------
  |  |  249|      0|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
  |  Branch (291:5): [True: 0, False: 3.13M]
  ------------------
  292|      0|    case LYS_ACTION:
  ------------------
  |  |  250|      0|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
  |  Branch (292:5): [True: 0, False: 3.13M]
  ------------------
  293|  42.1k|    case LYS_NOTIF:
  ------------------
  |  |  251|  42.1k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (293:5): [True: 42.1k, False: 3.09M]
  ------------------
  294|  2.03M|    case LYS_LEAF:
  ------------------
  |  |  242|  2.03M|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
  |  Branch (294:5): [True: 1.99M, False: 1.13M]
  ------------------
  295|  2.03M|    case LYS_ANYXML:
  ------------------
  |  |  245|  2.03M|#define LYS_ANYXML      0x0020    /**< anyxml statement node */
  ------------------
  |  Branch (295:5): [True: 0, False: 3.13M]
  ------------------
  296|  2.03M|    case LYS_ANYDATA:
  ------------------
  |  |  246|  2.03M|#define LYS_ANYDATA     0x0060    /**< anydata statement node, in tests it can be used for both #LYS_ANYXML and #LYS_ANYDATA */
  ------------------
  |  Branch (296:5): [True: 0, False: 3.13M]
  ------------------
  297|  2.57M|    case LYS_LIST:
  ------------------
  |  |  244|  2.57M|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (297:5): [True: 534k, False: 2.60M]
  ------------------
  298|  2.81M|    case LYS_LEAFLIST:
  ------------------
  |  |  243|  2.81M|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (298:5): [True: 238k, False: 2.89M]
  ------------------
  299|  2.81M|        break;
  300|  42.1k|    case LYS_CASE:
  ------------------
  |  |  247|  42.1k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
  |  Branch (300:5): [True: 42.1k, False: 3.09M]
  ------------------
  301|  42.1k|        if (options & LYS_GETNEXT_WITHCASE) {
  ------------------
  |  | 2190|  42.1k|#define LYS_GETNEXT_WITHCASE     0x04 /**< ::lys_getnext() option to allow returning #LYS_CASE nodes instead of looking into them */
  ------------------
  |  Branch (301:13): [True: 0, False: 42.1k]
  ------------------
  302|      0|            break;
  303|  42.1k|        } else {
  304|       |            /* go into */
  305|  42.1k|            lys_getnext_into_case((const struct lysc_node_case *)next, &last, &next);
  306|  42.1k|        }
  307|  42.1k|        goto repeat;
  308|   238k|    case LYS_CONTAINER:
  ------------------
  |  |  240|   238k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (308:5): [True: 238k, False: 2.89M]
  ------------------
  309|   238k|        if (!(next->flags & LYS_PRESENCE) && (options & LYS_GETNEXT_INTONPCONT)) {
  ------------------
  |  |  667|   238k|#define LYS_PRESENCE     0x80        /**< flag for presence property of a container, but it is not only for explicit presence
  ------------------
                      if (!(next->flags & LYS_PRESENCE) && (options & LYS_GETNEXT_INTONPCONT)) {
  ------------------
  |  | 2191|   224k|#define LYS_GETNEXT_INTONPCONT   0x08 /**< ::lys_getnext() option to look into non-presence container, instead of returning container itself */
  ------------------
  |  Branch (309:13): [True: 224k, False: 14.0k]
  |  Branch (309:46): [True: 0, False: 224k]
  ------------------
  310|      0|            if (lysc_node_child(next)) {
  ------------------
  |  Branch (310:17): [True: 0, False: 0]
  ------------------
  311|       |                /* go into */
  312|      0|                next = lysc_node_child(next);
  313|      0|            } else {
  314|      0|                last = next;
  315|      0|                next = next->next;
  316|      0|            }
  317|      0|            goto repeat;
  318|      0|        }
  319|   238k|        break;
  320|   238k|    case LYS_CHOICE:
  ------------------
  |  |  241|  42.1k|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
  |  Branch (320:5): [True: 42.1k, False: 3.09M]
  ------------------
  321|  42.1k|        if (options & LYS_GETNEXT_WITHCHOICE) {
  ------------------
  |  | 2188|  42.1k|#define LYS_GETNEXT_WITHCHOICE   0x01 /**< ::lys_getnext() option to allow returning #LYS_CHOICE nodes instead of looking into them */
  ------------------
  |  Branch (321:13): [True: 42.1k, False: 0]
  ------------------
  322|  42.1k|            break;
  323|  42.1k|        } else if ((options & LYS_GETNEXT_NOCHOICE) || !lysc_node_child(next)) {
  ------------------
  |  | 2189|      0|#define LYS_GETNEXT_NOCHOICE     0x02 /**< ::lys_getnext() option to ignore (kind of conditional) nodes within choice node */
  ------------------
  |  Branch (323:20): [True: 0, False: 0]
  |  Branch (323:56): [True: 0, False: 0]
  ------------------
  324|      0|            next = next->next;
  325|      0|        } else {
  326|      0|            if (options & LYS_GETNEXT_WITHCASE) {
  ------------------
  |  | 2190|      0|#define LYS_GETNEXT_WITHCASE     0x04 /**< ::lys_getnext() option to allow returning #LYS_CASE nodes instead of looking into them */
  ------------------
  |  Branch (326:17): [True: 0, False: 0]
  ------------------
  327|      0|                next = lysc_node_child(next);
  328|      0|            } else {
  329|       |                /* go into */
  330|      0|                lys_getnext_into_case(((struct lysc_node_choice *)next)->cases, &last, &next);
  331|      0|            }
  332|      0|        }
  333|      0|        goto repeat;
  334|      0|    case LYS_INPUT:
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
  |  Branch (334:5): [True: 0, False: 3.13M]
  ------------------
  335|      0|        if (options & LYS_GETNEXT_OUTPUT) {
  ------------------
  |  | 2192|      0|#define LYS_GETNEXT_OUTPUT       0x10 /**< ::lys_getnext() option to provide RPC's/action's output schema nodes instead of input schema nodes
  ------------------
  |  Branch (335:13): [True: 0, False: 0]
  ------------------
  336|       |            /* skip */
  337|      0|            next = next->next;
  338|      0|        } else {
  339|       |            /* go into */
  340|      0|            next = lysc_node_child(next);
  341|      0|        }
  342|      0|        goto repeat;
  343|      0|    case LYS_OUTPUT:
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (343:5): [True: 0, False: 3.13M]
  ------------------
  344|      0|        if (!(options & LYS_GETNEXT_OUTPUT)) {
  ------------------
  |  | 2192|      0|#define LYS_GETNEXT_OUTPUT       0x10 /**< ::lys_getnext() option to provide RPC's/action's output schema nodes instead of input schema nodes
  ------------------
  |  Branch (344:13): [True: 0, False: 0]
  ------------------
  345|       |            /* skip */
  346|      0|            next = next->next;
  347|      0|        } else {
  348|       |            /* go into */
  349|      0|            next = lysc_node_child(next);
  350|      0|        }
  351|      0|        goto repeat;
  352|      0|    default:
  ------------------
  |  Branch (352:5): [True: 0, False: 3.13M]
  ------------------
  353|       |        /* we should not be here */
  354|      0|        LOGINT(module ? module->mod->ctx : parent ? parent->module->ctx : ext->module->ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  355|      0|        return NULL;
  356|  3.13M|    }
  357|       |
  358|  3.09M|    return next;
  359|  3.13M|}
tree_schema.c:lys_getnext_into_case:
  123|  42.1k|{
  124|  42.1k|    for ( ; first_case; first_case = (const struct lysc_node_case *)first_case->next) {
  ------------------
  |  Branch (124:13): [True: 42.1k, False: 0]
  ------------------
  125|  42.1k|        if (first_case->child) {
  ------------------
  |  Branch (125:13): [True: 42.1k, False: 0]
  ------------------
  126|       |            /* there is something to return */
  127|  42.1k|            (*next) = first_case->child;
  128|  42.1k|            return;
  129|  42.1k|        }
  130|  42.1k|    }
  131|       |
  132|       |    /* no children in choice's cases, so go to the choice's sibling instead of into it */
  133|      0|    (*last) = (*next);
  134|      0|    (*next) = (*next)->next;
  135|      0|}
tree_schema.c:lys_unres_dep_sets_create_single:
  977|  14.0k|{
  978|  14.0k|    LY_ERR ret = LY_SUCCESS;
  979|  14.0k|    struct lys_module *m;
  980|  14.0k|    uint32_t i = 0;
  981|  14.0k|    struct ly_set *dep_set = NULL;
  982|       |
  983|   126k|    while (i < ctx_set->count) {
  ------------------
  |  Branch (983:12): [True: 112k, False: 14.0k]
  ------------------
  984|   112k|        m = ctx_set->objs[i];
  985|   112k|        if (LYS_IS_SINGLE_DEP_SET(m)) {
  ------------------
  |  |  721|   112k|        (!(mod)->parsed->features && (!lys_has_compiled(mod) || ((mod)->compiled && !lys_has_recompiled(mod))))
  |  |  ------------------
  |  |  |  Branch (721:10): [True: 112k, False: 0]
  |  |  |  Branch (721:39): [True: 70.2k, False: 42.1k]
  |  |  |  Branch (721:66): [True: 0, False: 42.1k]
  |  |  |  Branch (721:85): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  986|       |            /* remove it from the set, we are processing it now */
  987|  70.2k|            ly_set_rm_index(ctx_set, i, NULL);
  988|       |
  989|       |            /* this module can be in a separate dep set (but there still may be modules importing this one
  990|       |             * that depend on imports of this one in case it defines groupings) */
  991|  70.2k|            LY_CHECK_GOTO(ret = ly_set_new(&dep_set), cleanup);
  ------------------
  |  |  202|  70.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
  992|  70.2k|            LY_CHECK_GOTO(ret = ly_set_add(dep_set, m, 1, NULL), cleanup);
  ------------------
  |  |  202|  70.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
  993|  70.2k|            LY_CHECK_GOTO(ret = ly_set_add(main_set, dep_set, 1, NULL), cleanup);
  ------------------
  |  |  202|  70.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
  994|  70.2k|            dep_set = NULL;
  995|  70.2k|        } else {
  996|  42.1k|            ++i;
  997|  42.1k|        }
  998|   112k|    }
  999|       |
 1000|  14.0k|cleanup:
 1001|  14.0k|    ly_set_free(dep_set, NULL);
 1002|  14.0k|    return ret;
 1003|  14.0k|}
tree_schema.c:lys_unres_dep_sets_create_mod_r:
  878|   126k|{
  879|   126k|    struct lys_module *mod2;
  880|   126k|    struct lysp_import *imports;
  881|   126k|    uint32_t i;
  882|   126k|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  883|   126k|    ly_bool found;
  884|       |
  885|   126k|    if (LYS_IS_SINGLE_DEP_SET(mod)) {
  ------------------
  |  |  721|   126k|        (!(mod)->parsed->features && (!lys_has_compiled(mod) || ((mod)->compiled && !lys_has_recompiled(mod))))
  |  |  ------------------
  |  |  |  Branch (721:10): [True: 126k, False: 0]
  |  |  |  Branch (721:39): [True: 84.3k, False: 42.1k]
  |  |  |  Branch (721:66): [True: 0, False: 42.1k]
  |  |  |  Branch (721:85): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  886|       |        /* is already in a separate dep set */
  887|  84.3k|        if (!lys_has_dep_mods(mod)) {
  ------------------
  |  Branch (887:13): [True: 84.3k, False: 0]
  ------------------
  888|       |            /* break the dep set here, no modules depend on this one */
  889|  84.3k|            return LY_SUCCESS;
  890|  84.3k|        }
  891|       |
  892|      0|        if (ly_set_contains(aux_set, mod, NULL)) {
  ------------------
  |  Branch (892:13): [True: 0, False: 0]
  ------------------
  893|       |            /* it was traversed */
  894|      0|            return LY_SUCCESS;
  895|      0|        }
  896|       |
  897|       |        /* add a new auxiliary module */
  898|      0|        LY_CHECK_RET(ly_set_add(aux_set, mod, 1, NULL));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  899|  42.1k|    } else {
  900|  42.1k|        if (!ly_set_contains(ctx_set, mod, &i)) {
  ------------------
  |  Branch (900:13): [True: 0, False: 42.1k]
  ------------------
  901|       |            /* it was already processed */
  902|      0|            return LY_SUCCESS;
  903|      0|        }
  904|       |
  905|       |        /* remove it from the set, we are processing it now */
  906|  42.1k|        ly_set_rm_index(ctx_set, i, NULL);
  907|       |
  908|       |        /* add a new dependent module into the dep set */
  909|  42.1k|        LY_CHECK_RET(ly_set_add(dep_set, mod, 1, NULL));
  ------------------
  |  |  206|  42.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  42.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  42.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  42.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 42.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  910|  42.1k|    }
  911|       |
  912|       |    /* process imports of the module and submodules */
  913|  42.1k|    imports = mod->parsed->imports;
  914|  84.3k|    LY_ARRAY_FOR(imports, u) {
  ------------------
  |  |  167|  42.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  42.1k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  42.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  42.1k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   126k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   126k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 126k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 84.3k, False: 42.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  84.3k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  915|  84.3k|        mod2 = imports[u].module;
  916|  84.3k|        LY_CHECK_RET(lys_unres_dep_sets_create_mod_r(mod2, ctx_set, dep_set, aux_set));
  ------------------
  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  84.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  84.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 84.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  917|  84.3k|    }
  918|  42.1k|    LY_ARRAY_FOR(mod->parsed->includes, v) {
  ------------------
  |  |  167|  42.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  42.1k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  42.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  42.1k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  42.1k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  42.1k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 42.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 42.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  42.1k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  919|      0|        imports = mod->parsed->includes[v].submodule->imports;
  920|      0|        LY_ARRAY_FOR(imports, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  921|      0|            mod2 = imports[u].module;
  922|      0|            if (LYS_IS_SINGLE_DEP_SET(mod2) && !lys_has_dep_mods(mod2)) {
  ------------------
  |  |  721|      0|        (!(mod)->parsed->features && (!lys_has_compiled(mod) || ((mod)->compiled && !lys_has_recompiled(mod))))
  |  |  ------------------
  |  |  |  Branch (721:10): [True: 0, False: 0]
  |  |  |  Branch (721:39): [True: 0, False: 0]
  |  |  |  Branch (721:66): [True: 0, False: 0]
  |  |  |  Branch (721:85): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (922:48): [True: 0, False: 0]
  ------------------
  923|       |                /* break the dep set here, no modules depend on this one */
  924|      0|                continue;
  925|      0|            }
  926|       |
  927|      0|            LY_CHECK_RET(lys_unres_dep_sets_create_mod_r(imports[u].module, ctx_set, dep_set, aux_set));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  928|      0|        }
  929|      0|    }
  930|       |
  931|       |    /* process modules and submodules importing this module */
  932|   379k|    for (i = 0; i < mod->ctx->list.count; ++i) {
  ------------------
  |  Branch (932:17): [True: 337k, False: 42.1k]
  ------------------
  933|   337k|        mod2 = mod->ctx->list.objs[i];
  934|   337k|        found = 0;
  935|       |
  936|   337k|        imports = mod2->parsed->imports;
  937|   337k|        LY_ARRAY_FOR(imports, u) {
  ------------------
  |  |  167|   337k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   337k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   337k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   337k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   590k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   590k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 379k, False: 210k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 253k, False: 337k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   337k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  938|   253k|            if (imports[u].module == mod) {
  ------------------
  |  Branch (938:17): [True: 0, False: 253k]
  ------------------
  939|      0|                found = 1;
  940|      0|                break;
  941|      0|            }
  942|   253k|        }
  943|       |
  944|   337k|        if (!found) {
  ------------------
  |  Branch (944:13): [True: 337k, False: 0]
  ------------------
  945|   337k|            LY_ARRAY_FOR(mod2->parsed->includes, v) {
  ------------------
  |  |  167|   337k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   337k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   337k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   337k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   337k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   337k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 337k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 337k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   337k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  946|      0|                imports = mod2->parsed->includes[v].submodule->imports;
  947|      0|                LY_ARRAY_FOR(imports, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  948|      0|                    if (imports[u].module == mod) {
  ------------------
  |  Branch (948:25): [True: 0, False: 0]
  ------------------
  949|      0|                        found = 1;
  950|      0|                        break;
  951|      0|                    }
  952|      0|                }
  953|       |
  954|      0|                if (found) {
  ------------------
  |  Branch (954:21): [True: 0, False: 0]
  ------------------
  955|      0|                    break;
  956|      0|                }
  957|      0|            }
  958|   337k|        }
  959|       |
  960|   337k|        if (found) {
  ------------------
  |  Branch (960:13): [True: 0, False: 337k]
  ------------------
  961|      0|            LY_CHECK_RET(lys_unres_dep_sets_create_mod_r(mod2, ctx_set, dep_set, aux_set));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  962|      0|        }
  963|   337k|    }
  964|       |
  965|  42.1k|    return LY_SUCCESS;
  966|  42.1k|}
tree_schema.c:lysp_resolve_import_include:
 1209|   112k|{
 1210|   112k|    struct lysp_import *imp;
 1211|   112k|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1212|       |
 1213|   112k|    pmod->parsing = 1;
 1214|   112k|    LY_ARRAY_FOR(pmod->imports, u) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   196k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   196k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 126k, False: 70.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 84.3k, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1215|  84.3k|        imp = &pmod->imports[u];
 1216|  84.3k|        if (!imp->module) {
  ------------------
  |  Branch (1216:13): [True: 84.3k, False: 0]
  ------------------
 1217|  84.3k|            LY_CHECK_RET(lys_parse_load(PARSER_CTX(pctx), imp->name, imp->rev[0] ? imp->rev : NULL, new_mods, &imp->module));
  ------------------
  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  84.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   337k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 84.3k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 14.0k, False: 70.2k]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 84.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1218|       |
 1219|  84.3k|            if (!imp->rev[0]) {
  ------------------
  |  Branch (1219:17): [True: 70.2k, False: 14.0k]
  ------------------
 1220|       |                /* This module must be selected for the next similar
 1221|       |                 * import without revision-date to avoid incorrect
 1222|       |                 * derived identities in the ::lys_module.identities.
 1223|       |                 */
 1224|  70.2k|                imp->module->latest_revision |= LYS_MOD_IMPORTED_REV;
  ------------------
  |  | 2124|  70.2k|#define LYS_MOD_IMPORTED_REV        0x04 /**< This is the module revision used when importing the module without
  ------------------
 1225|  70.2k|            }
 1226|  84.3k|        }
 1227|       |        /* check for importing the same module twice */
 1228|   140k|        for (v = 0; v < u; ++v) {
  ------------------
  |  Branch (1228:21): [True: 56.2k, False: 84.3k]
  ------------------
 1229|  56.2k|            if (imp->module == pmod->imports[v].module) {
  ------------------
  |  Branch (1229:17): [True: 0, False: 56.2k]
  ------------------
 1230|      0|                LOGWRN(PARSER_CTX(pctx), "Single revision of the module \"%s\" imported twice.", imp->name);
  ------------------
  |  |  155|      0|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (155:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1231|      0|            }
 1232|  56.2k|        }
 1233|  84.3k|    }
 1234|   112k|    LY_CHECK_RET(lysp_load_submodules(pctx, pmod, new_mods));
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   112k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1235|       |
 1236|   112k|    pmod->parsing = 0;
 1237|       |
 1238|   112k|    return LY_SUCCESS;
 1239|   112k|}
tree_schema.c:lysp_resolve_ext_instance_records:
 1345|   112k|{
 1346|   112k|    LY_ERR r;
 1347|   112k|    struct lysf_ctx fctx = {.ctx = PARSER_CTX(pctx)};
  ------------------
  |  |  128|   112k|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|   112k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 112k, False: 0]
  |  |  ------------------
  ------------------
 1348|   112k|    struct lysp_ext_instance *exts, *ext;
 1349|   112k|    const struct lys_module *mod;
 1350|   112k|    uint32_t i;
 1351|   112k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1352|   112k|    char *path = NULL;
 1353|       |
 1354|       |    /* first finish parsing all extension instances ... */
 1355|   126k|    for (i = 0; i < pctx->ext_inst.count; ++i) {
  ------------------
  |  Branch (1355:17): [True: 14.0k, False: 112k]
  ------------------
 1356|  14.0k|        exts = pctx->ext_inst.objs[i];
 1357|   126k|        LY_ARRAY_FOR(exts, u) {
  ------------------
  |  |  167|  14.0k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  14.0k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  14.0k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  14.0k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   140k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   140k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 140k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 126k, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1358|   126k|            ext = &exts[u];
 1359|       |
 1360|       |            /* find the extension definition */
 1361|   126k|            LY_CHECK_RET(lysp_ext_find_definition(PARSER_CTX(pctx), ext, &mod, &ext->def));
  ------------------
  |  |  206|   126k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   126k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   126k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   253k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 126k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1362|       |
 1363|       |            /* resolve the argument, if needed */
 1364|   126k|            LY_CHECK_RET(lysp_ext_instance_resolve_argument(PARSER_CTX(pctx), ext));
  ------------------
  |  |  206|   126k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   126k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   126k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   253k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:47): [True: 126k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1365|       |
 1366|       |            /* find the extension record, if any */
 1367|   126k|            ext->record = lyplg_ext_record_find(mod->name, mod->revision, ext->def->name);
 1368|   126k|        }
 1369|  14.0k|    }
 1370|       |
 1371|       |    /* ... then call the parse callback */
 1372|   126k|    for (i = 0; i < pctx->ext_inst.count; ++i) {
  ------------------
  |  Branch (1372:17): [True: 14.0k, False: 112k]
  ------------------
 1373|  14.0k|        exts = pctx->ext_inst.objs[i];
 1374|  14.0k|        u = 0;
 1375|   140k|        while (u < LY_ARRAY_COUNT(exts)) {
  ------------------
  |  |  148|   140k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 140k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1375:16): [True: 126k, False: 14.0k]
  ------------------
 1376|   126k|            ext = &exts[u];
 1377|   126k|            if (!ext->record || !ext->record->plugin.parse) {
  ------------------
  |  Branch (1377:17): [True: 0, False: 126k]
  |  Branch (1377:33): [True: 0, False: 126k]
  ------------------
 1378|      0|                goto next_iter;
 1379|      0|            }
 1380|       |
 1381|       |            /* set up log path */
 1382|   126k|            if ((r = lysp_resolve_ext_instance_log_path(pctx, ext, &path))) {
  ------------------
  |  Branch (1382:17): [True: 0, False: 126k]
  ------------------
 1383|      0|                return r;
 1384|      0|            }
 1385|   126k|            LOG_LOCSET(NULL, NULL, path, NULL);
  ------------------
  |  |  141|   126k|    ly_log_location(SCNODE, DNODE, PATH, IN, 0)
  ------------------
 1386|       |
 1387|       |            /* parse */
 1388|   126k|            r = ext->record->plugin.parse(pctx, ext);
 1389|       |
 1390|   126k|            LOG_LOCBACK(0, 0, 1, 0);
  ------------------
  |  |  152|   126k|    ly_log_location_revert(SCNODE_STEPS, DNODE_STEPS, PATH_STEPS, IN_STEPS)
  ------------------
 1391|   126k|            free(path);
 1392|       |
 1393|   126k|            if (r == LY_ENOT) {
  ------------------
  |  Branch (1393:17): [True: 0, False: 126k]
  ------------------
 1394|       |                /* instance should be ignored, remove it */
 1395|      0|                lysp_ext_instance_free(&fctx, ext);
 1396|      0|                LY_ARRAY_DECREMENT(exts);
  ------------------
  |  |  209|      0|        --(*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1))
  ------------------
 1397|      0|                if (u < LY_ARRAY_COUNT(exts)) {
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1397:21): [True: 0, False: 0]
  ------------------
 1398|       |                    /* replace by the last item */
 1399|      0|                    *ext = exts[LY_ARRAY_COUNT(exts)];
  ------------------
  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1400|      0|                } /* else if there are no more items, leave the empty array, we are not able to free it */
 1401|      0|                continue;
 1402|   126k|            } else if (r) {
  ------------------
  |  Branch (1402:24): [True: 0, False: 126k]
  ------------------
 1403|       |                /* error */
 1404|      0|                return r;
 1405|      0|            }
 1406|       |
 1407|   126k|next_iter:
 1408|   126k|            ++u;
 1409|   126k|        }
 1410|  14.0k|    }
 1411|       |
 1412|   112k|    return LY_SUCCESS;
 1413|   112k|}
tree_schema.c:lysp_resolve_ext_instance_log_path:
 1296|   126k|{
 1297|   126k|    char *buf = NULL;
 1298|   126k|    uint32_t used = 0, size = 0;
 1299|       |
 1300|   126k|    if (ext->parent_stmt & LY_STMT_NODE_MASK) {
  ------------------
  |  |  135|   126k|#define LY_STMT_NODE_MASK 0xFFFF
  ------------------
  |  Branch (1300:9): [True: 0, False: 126k]
  ------------------
 1301|       |        /* parsed node path */
 1302|      0|        buf = lysp_path_until(ext->parent, NULL, PARSER_CUR_PMOD(pctx));
  ------------------
  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 1303|      0|        LY_CHECK_ERR_RET(!buf, LOGMEM(PARSER_CTX(pctx)), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1304|      0|        size = used = strlen(buf);
 1305|       |
 1306|       |        /* slash */
 1307|      0|        size += 1;
 1308|      0|        buf = realloc(buf, size + 1);
 1309|      0|        LY_CHECK_ERR_RET(!buf, LOGMEM(PARSER_CTX(pctx)), LY_EMEM);
  ------------------
  |  |  207|      0|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 0]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1310|      0|        used += sprintf(buf + used, "/");
 1311|   126k|    } else {
 1312|       |        /* module */
 1313|   126k|        size += 1 + strlen(PARSER_CUR_PMOD(pctx)->mod->name) + 1;
  ------------------
  |  |  127|   126k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 1314|   126k|        buf = realloc(buf, size + 1);
 1315|   126k|        LY_CHECK_ERR_RET(!buf, LOGMEM(PARSER_CTX(pctx)), LY_EMEM);
  ------------------
  |  |  207|   126k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 126k]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1316|   126k|        used += sprintf(buf + used, "/%s:", PARSER_CUR_PMOD(pctx)->mod->name);
  ------------------
  |  |  127|   126k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 1317|   126k|    }
 1318|       |
 1319|       |    /* extension name */
 1320|   126k|    size += 12 + strlen(ext->name) + 2;
 1321|   126k|    buf = realloc(buf, size + 1);
 1322|   126k|    LY_CHECK_ERR_RET(!buf, LOGMEM(PARSER_CTX(pctx)), LY_EMEM);
  ------------------
  |  |  207|   126k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 126k]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1323|   126k|    used += sprintf(buf + used, "{extension='%s'}", ext->name);
 1324|       |
 1325|       |    /* extension argument */
 1326|   126k|    if (ext->argument) {
  ------------------
  |  Branch (1326:9): [True: 126k, False: 0]
  ------------------
 1327|   126k|        size += 1 + strlen(ext->argument);
 1328|   126k|        buf = realloc(buf, size + 1);
 1329|   126k|        LY_CHECK_ERR_RET(!buf, LOGMEM(PARSER_CTX(pctx)), LY_EMEM);
  ------------------
  |  |  207|   126k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 126k]
  |  |  |  Branch (207:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1330|   126k|        used += sprintf(buf + used, "/%s", ext->argument);
 1331|   126k|    }
 1332|       |
 1333|   126k|    *path = buf;
 1334|   126k|    return LY_SUCCESS;
 1335|   126k|}
tree_schema.c:lys_parse_get_format:
 1945|  14.0k|{
 1946|  14.0k|    if (!format && (in->type == LY_IN_FILEPATH)) {
  ------------------
  |  Branch (1946:9): [True: 0, False: 14.0k]
  |  Branch (1946:20): [True: 0, False: 0]
  ------------------
 1947|       |        /* unknown format - try to detect it from filename's suffix */
 1948|      0|        const char *path = in->method.fpath.filepath;
 1949|      0|        size_t len = strlen(path);
 1950|       |
 1951|       |        /* ignore trailing whitespaces */
 1952|      0|        for ( ; len > 0 && isspace(path[len - 1]); len--) {}
  ------------------
  |  Branch (1952:17): [True: 0, False: 0]
  ------------------
 1953|       |
 1954|      0|        if ((len >= LY_YANG_SUFFIX_LEN + 1) &&
  ------------------
  |  |   28|      0|#define LY_YANG_SUFFIX_LEN 5
  ------------------
  |  Branch (1954:13): [True: 0, False: 0]
  ------------------
 1955|      0|                !strncmp(&path[len - LY_YANG_SUFFIX_LEN], LY_YANG_SUFFIX, LY_YANG_SUFFIX_LEN)) {
  ------------------
  |  |   28|      0|#define LY_YANG_SUFFIX_LEN 5
  ------------------
                              !strncmp(&path[len - LY_YANG_SUFFIX_LEN], LY_YANG_SUFFIX, LY_YANG_SUFFIX_LEN)) {
  ------------------
  |  |   27|      0|#define LY_YANG_SUFFIX ".yang"
  ------------------
                              !strncmp(&path[len - LY_YANG_SUFFIX_LEN], LY_YANG_SUFFIX, LY_YANG_SUFFIX_LEN)) {
  ------------------
  |  |   28|      0|#define LY_YANG_SUFFIX_LEN 5
  ------------------
  |  Branch (1955:17): [True: 0, False: 0]
  ------------------
 1956|      0|            format = LYS_IN_YANG;
 1957|      0|        } else if ((len >= LY_YIN_SUFFIX_LEN + 1) &&
  ------------------
  |  |   30|      0|#define LY_YIN_SUFFIX_LEN 4
  ------------------
  |  Branch (1957:20): [True: 0, False: 0]
  ------------------
 1958|      0|                !strncmp(&path[len - LY_YIN_SUFFIX_LEN], LY_YIN_SUFFIX, LY_YIN_SUFFIX_LEN)) {
  ------------------
  |  |   30|      0|#define LY_YIN_SUFFIX_LEN 4
  ------------------
                              !strncmp(&path[len - LY_YIN_SUFFIX_LEN], LY_YIN_SUFFIX, LY_YIN_SUFFIX_LEN)) {
  ------------------
  |  |   29|      0|#define LY_YIN_SUFFIX ".yin"
  ------------------
                              !strncmp(&path[len - LY_YIN_SUFFIX_LEN], LY_YIN_SUFFIX, LY_YIN_SUFFIX_LEN)) {
  ------------------
  |  |   30|      0|#define LY_YIN_SUFFIX_LEN 4
  ------------------
  |  Branch (1958:17): [True: 0, False: 0]
  ------------------
 1959|      0|            format = LYS_IN_YIN;
 1960|      0|        } /* else still unknown */
 1961|      0|    }
 1962|       |
 1963|  14.0k|    return format;
 1964|  14.0k|}

lysp_check_prefix:
   45|  84.7k|{
   46|  84.7k|    struct lysp_import *i;
   47|       |
   48|  84.7k|    if (module_prefix && (&module_prefix != value) && !strcmp(module_prefix, *value)) {
  ------------------
  |  Branch (48:9): [True: 84.4k, False: 297]
  |  Branch (48:26): [True: 84.4k, False: 0]
  |  Branch (48:55): [True: 1, False: 84.4k]
  ------------------
   49|      1|        LOGVAL_PARSER(ctx, LYVE_REFERENCE, "Prefix \"%s\" already used as module prefix.", *value);
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   50|      1|        return LY_EEXIST;
   51|      1|    }
   52|   141k|    LY_ARRAY_FOR(imports, struct lysp_import, i) {
  ------------------
  |  |  167|  84.7k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  84.7k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  84.7k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  126|  84.7k|    for (ITER = ARRAY; \
  |  |  |  |  |  |  |  |  127|   226k|         (ARRAY) && ((char *)ITER - (char *)ARRAY)/(sizeof(TYPE)) < (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (127:10): [True: 226k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (127:21): [True: 141k, False: 84.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  128|   141k|         ITER = (TYPE*)ITER + 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   53|   141k|        if (i->prefix && (&i->prefix != value) && !strcmp(i->prefix, *value)) {
  ------------------
  |  Branch (53:13): [True: 141k, False: 0]
  |  Branch (53:26): [True: 56.6k, False: 84.7k]
  |  Branch (53:51): [True: 1, False: 56.6k]
  ------------------
   54|      1|            LOGVAL_PARSER(ctx, LYVE_REFERENCE, "Prefix \"%s\" already used to import \"%s\" module.", *value, i->name);
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   55|      1|            return LY_EEXIST;
   56|      1|        }
   57|   141k|    }
   58|  84.7k|    return LY_SUCCESS;
   59|  84.7k|}
lysp_check_date:
   63|   231k|{
   64|   231k|    struct tm tm, tm_;
   65|   231k|    char *r;
   66|       |
   67|   231k|    LY_CHECK_ARG_RET(PARSER_CTX(ctx), date, LY_EINVAL);
  ------------------
  |  |  226|   231k|#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO7(__VA_ARGS__, LY_CHECK_ARG_RET6, LY_CHECK_ARG_RET5, LY_CHECK_ARG_RET4, \
  |  |  ------------------
  |  |  |  |   62|   231k|#define GETMACRO7(_1, _2, _3, _4, _5, _6, _7, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  227|   231k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  217|   231k|#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define LOGARG(CTX, ARG) LOGERR(CTX, LY_EINVAL, "Invalid argument %s (%s()).", #ARG, __func__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (154:40): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (217:49): [True: 0, False: 231k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  227|   231k|    LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1, DUMMY) (CTX, __VA_ARGS__)
  ------------------
   68|       |
   69|   231k|    if (date_len != LY_REV_SIZE - 1) {
  ------------------
  |  |  232|   231k|#define LY_REV_SIZE 11   /**< revision data string length (including terminating NULL byte) */
  ------------------
  |  Branch (69:9): [True: 31, False: 231k]
  ------------------
   70|     31|        LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Invalid length %" PRIu32 " of a date.", (uint32_t)date_len);
  ------------------
  |  |  129|     31|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     62|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 31, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   71|     31|        return LY_EINVAL;
   72|     31|    }
   73|       |
   74|       |    /* check format: YYYY-MM-DD */
   75|  2.54M|    for (uint8_t i = 0; i < date_len; i++) {
  ------------------
  |  Branch (75:25): [True: 2.31M, False: 231k]
  ------------------
   76|  2.31M|        if ((i == 4) || (i == 7)) {
  ------------------
  |  Branch (76:13): [True: 231k, False: 2.08M]
  |  Branch (76:25): [True: 231k, False: 1.85M]
  ------------------
   77|   463k|            if (date[i] != '-') {
  ------------------
  |  Branch (77:17): [True: 11, False: 463k]
  ------------------
   78|     11|                goto error;
   79|     11|            }
   80|  1.85M|        } else if (!isdigit(date[i])) {
  ------------------
  |  Branch (80:20): [True: 8, False: 1.85M]
  ------------------
   81|      8|            goto error;
   82|      8|        }
   83|  2.31M|    }
   84|       |
   85|       |    /* check content, e.g. 2018-02-31 */
   86|   231k|    memset(&tm, 0, sizeof tm);
   87|   231k|    r = strptime(date, "%Y-%m-%d", &tm);
   88|   231k|    if (!r || (r != &date[LY_REV_SIZE - 1])) {
  ------------------
  |  |  232|   231k|#define LY_REV_SIZE 11   /**< revision data string length (including terminating NULL byte) */
  ------------------
  |  Branch (88:9): [True: 1, False: 231k]
  |  Branch (88:15): [True: 1, False: 231k]
  ------------------
   89|      2|        goto error;
   90|      2|    }
   91|   231k|    memcpy(&tm_, &tm, sizeof tm);
   92|       |
   93|       |    /* DST may move the hour back resulting in a different day */
   94|   231k|    tm_.tm_hour = 1;
   95|       |
   96|   231k|    mktime(&tm_); /* mktime modifies tm_ if it refers invalid date */
   97|   231k|    if (tm.tm_mday != tm_.tm_mday) { /* e.g 2018-02-29 -> 2018-03-01 */
  ------------------
  |  Branch (97:9): [True: 1, False: 231k]
  ------------------
   98|       |        /* checking days is enough, since other errors
   99|       |         * have been checked by strptime() */
  100|      1|        goto error;
  101|      1|    }
  102|       |
  103|   231k|    return LY_SUCCESS;
  104|       |
  105|     22|error:
  106|     22|    if (stmt) {
  ------------------
  |  Branch (106:9): [True: 22, False: 0]
  ------------------
  107|     22|        LOGVAL_PARSER(ctx, LY_VCODE_INVAL, date_len, date, stmt);
  ------------------
  |  |  129|     22|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     44|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 22, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  108|     22|    }
  109|     22|    return LY_EINVAL;
  110|   231k|}
lysp_sort_revisions:
  114|   112k|{
  115|   112k|    LY_ARRAY_COUNT_TYPE i, r;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  116|   112k|    struct lysp_revision rev;
  117|       |
  118|   210k|    for (i = 1, r = 0; i < LY_ARRAY_COUNT(revs); i++) {
  ------------------
  |  |  148|   210k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  ------------------
  |  |  |  Branch (148:32): [True: 210k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (118:24): [True: 98.4k, False: 112k]
  ------------------
  119|  98.4k|        if (strcmp(revs[i].date, revs[r].date) > 0) {
  ------------------
  |  Branch (119:13): [True: 0, False: 98.4k]
  ------------------
  120|      0|            r = i;
  121|      0|        }
  122|  98.4k|    }
  123|       |
  124|   112k|    if (r) {
  ------------------
  |  Branch (124:9): [True: 0, False: 112k]
  ------------------
  125|       |        /* the newest revision is not on position 0, switch them */
  126|      0|        memcpy(&rev, &revs[0], sizeof rev);
  127|      0|        memcpy(&revs[0], &revs[r], sizeof rev);
  128|      0|        memcpy(&revs[r], &rev, sizeof rev);
  129|      0|    }
  130|   112k|}
lysp_check_enum_name:
  134|   190k|{
  135|   190k|    if (!name_len) {
  ------------------
  |  Branch (135:9): [True: 1, False: 190k]
  ------------------
  136|      1|        LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Enum name must not be zero-length.");
  ------------------
  |  |  129|      1|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      2|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  137|      1|        return LY_EVALID;
  138|   190k|    } else if (isspace(name[0]) || isspace(name[name_len - 1])) {
  139|      2|        LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Enum name must not have any leading or trailing whitespaces (\"%.*s\").",
  ------------------
  |  |  129|      2|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      4|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  140|      2|                (int)name_len, name);
  141|      2|        return LY_EVALID;
  142|   190k|    } else {
  143|  1.30M|        for (size_t u = 0; u < name_len; ++u) {
  ------------------
  |  Branch (143:28): [True: 1.11M, False: 188k]
  ------------------
  144|  1.11M|            if (iscntrl(name[u])) {
  145|  2.01k|                LOGWRN(PARSER_CTX(ctx), "Control characters in enum name should be avoided (\"%.*s\", character number %d).",
  ------------------
  |  |  155|  4.02k|#define LOGWRN(ctx, ...) ly_log(ctx, LY_LLWRN, 0, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (155:33): [True: 2.01k, False: 0]
  |  |  ------------------
  ------------------
  146|  2.01k|                        (int)name_len, name, u + 1);
  147|  2.01k|                break;
  148|  2.01k|            }
  149|  1.11M|        }
  150|   190k|    }
  151|       |
  152|   190k|    return LY_SUCCESS;
  153|   190k|}
lysp_type_find:
  260|  1.33M|{
  261|  1.33M|    const char *str, *name;
  262|  1.33M|    struct lysp_tpdf *typedefs;
  263|  1.33M|    const struct lysp_tpdf *ext_typedefs;
  264|  1.33M|    const struct lys_module *mod;
  265|  1.33M|    const struct lysp_module *local_module;
  266|  1.33M|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|  1.33M|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  267|       |
  268|  1.33M|    assert(id);
  269|      0|    assert(start_module);
  270|      0|    assert(tpdf);
  271|      0|    assert(node);
  272|       |
  273|      0|    *node = NULL;
  274|  1.33M|    str = strchr(id, ':');
  275|  1.33M|    if (str) {
  ------------------
  |  Branch (275:9): [True: 337k, False: 998k]
  ------------------
  276|   337k|        mod = ly_resolve_prefix(start_module->mod->ctx, id, str - id, LY_VALUE_SCHEMA, (void *)start_module);
  277|   337k|        local_module = mod ? mod->parsed : NULL;
  ------------------
  |  Branch (277:24): [True: 337k, False: 0]
  ------------------
  278|   337k|        name = str + 1;
  279|   337k|        *type = LY_TYPE_UNKNOWN;
  280|   998k|    } else {
  281|   998k|        local_module = start_module;
  282|   998k|        name = id;
  283|       |
  284|       |        /* check for built-in types */
  285|   998k|        *type = lysp_type_str2builtin(name, strlen(name));
  286|   998k|        if (*type) {
  ------------------
  |  Branch (286:13): [True: 871k, False: 126k]
  ------------------
  287|   871k|            *tpdf = NULL;
  288|   871k|            return LY_SUCCESS;
  289|   871k|        }
  290|   998k|    }
  291|   463k|    LY_CHECK_RET(!local_module, LY_ENOTFOUND);
  ------------------
  |  |  206|   463k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   463k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   463k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|   463k|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:41): [True: 0, False: 463k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  292|       |
  293|   463k|    if (local_module == start_module) {
  ------------------
  |  Branch (293:9): [True: 126k, False: 337k]
  ------------------
  294|   126k|        if (start_node) {
  ------------------
  |  Branch (294:13): [True: 98.4k, False: 28.1k]
  ------------------
  295|       |            /* search typedefs in parent's nodes */
  296|   351k|            for (*node = start_node; *node; *node = (*node)->parent) {
  ------------------
  |  Branch (296:38): [True: 253k, False: 98.4k]
  ------------------
  297|   253k|                *tpdf = lysp_typedef_match(name, lysp_node_typedefs(*node));
  298|   253k|                if (*tpdf) {
  ------------------
  |  Branch (298:21): [True: 0, False: 253k]
  ------------------
  299|       |                    /* match */
  300|      0|                    return LY_SUCCESS;
  301|      0|                }
  302|   253k|            }
  303|  98.4k|        }
  304|       |
  305|   126k|        if (ext) {
  ------------------
  |  Branch (305:13): [True: 28.1k, False: 98.4k]
  ------------------
  306|       |            /* search typedefs directly in the extension */
  307|  28.1k|            lyplg_ext_parsed_get_storage(ext, LY_STMT_TYPEDEF, sizeof ext_typedefs, (const void **)&ext_typedefs);
  308|  28.1k|            if ((*tpdf = lysp_typedef_match(name, ext_typedefs))) {
  ------------------
  |  Branch (308:17): [True: 0, False: 28.1k]
  ------------------
  309|       |                /* match */
  310|      0|                return LY_SUCCESS;
  311|      0|            }
  312|  28.1k|        }
  313|   126k|    }
  314|       |
  315|       |    /* go to main module if in submodule */
  316|   463k|    local_module = local_module->mod->parsed;
  317|       |
  318|       |    /* search in top-level typedefs */
  319|   463k|    if (local_module->typedefs) {
  ------------------
  |  Branch (319:9): [True: 463k, False: 0]
  ------------------
  320|  4.25M|        LY_ARRAY_FOR(local_module->typedefs, u) {
  ------------------
  |  |  167|   463k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   463k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   463k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   463k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  4.25M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  4.25M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 4.25M, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 4.25M, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  3.79M|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  321|  4.25M|            if (!strcmp(name, local_module->typedefs[u].name)) {
  ------------------
  |  Branch (321:17): [True: 463k, False: 3.79M]
  ------------------
  322|       |                /* match */
  323|   463k|                *tpdf = &local_module->typedefs[u];
  324|   463k|                return LY_SUCCESS;
  325|   463k|            }
  326|  4.25M|        }
  327|   463k|    }
  328|       |
  329|       |    /* search in all submodules' typedefs */
  330|      0|    LY_ARRAY_FOR(local_module->includes, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  331|      0|        typedefs = local_module->includes[u].submodule->typedefs;
  332|      0|        LY_ARRAY_FOR(typedefs, v) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  333|      0|            if (!strcmp(name, typedefs[v].name)) {
  ------------------
  |  Branch (333:17): [True: 0, False: 0]
  ------------------
  334|       |                /* match */
  335|      0|                *tpdf = &typedefs[v];
  336|      0|                return LY_SUCCESS;
  337|      0|            }
  338|      0|        }
  339|      0|    }
  340|       |
  341|      0|    return LY_ENOTFOUND;
  342|      0|}
lysp_check_dup_typedefs:
  470|   112k|{
  471|   112k|    struct ly_ht *ids_global;
  472|   112k|    const struct lysp_tpdf *typedefs;
  473|   112k|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  474|   112k|    uint32_t i;
  475|   112k|    LY_ERR ret = LY_SUCCESS;
  476|       |
  477|       |    /* check name collisions - typedefs and groupings */
  478|   112k|    ids_global = lyht_new(LYHT_MIN_SIZE, sizeof(char *), lysp_id_cmp, NULL, 1);
  ------------------
  |  |   42|   112k|#define LYHT_MIN_SIZE 8
  ------------------
  479|   534k|    LY_ARRAY_FOR(mod->typedefs, v) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   646k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   646k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 604k, False: 42.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 534k, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   534k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  480|   534k|        ret = lysp_check_dup_typedef(ctx, NULL, &mod->typedefs[v], ids_global);
  481|   534k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   534k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 534k]
  |  |  ------------------
  ------------------
  482|   534k|    }
  483|   112k|    LY_ARRAY_FOR(mod->includes, v) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   112k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   112k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  484|      0|        LY_ARRAY_FOR(mod->includes[v].submodule->typedefs, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|      0|            ret = lysp_check_dup_typedef(ctx, NULL, &mod->includes[v].submodule->typedefs[u], ids_global);
  486|      0|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  487|      0|        }
  488|      0|    }
  489|   112k|    for (i = 0; i < ctx->tpdfs_nodes.count; ++i) {
  ------------------
  |  Branch (489:17): [True: 0, False: 112k]
  ------------------
  490|      0|        typedefs = lysp_node_typedefs((struct lysp_node *)ctx->tpdfs_nodes.objs[i]);
  491|      0|        LY_ARRAY_FOR(typedefs, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  492|      0|            ret = lysp_check_dup_typedef(ctx, (struct lysp_node *)ctx->tpdfs_nodes.objs[i], &typedefs[u], ids_global);
  493|      0|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  494|      0|        }
  495|      0|    }
  496|       |
  497|   112k|cleanup:
  498|   112k|    lyht_free(ids_global, NULL);
  499|   112k|    return ret;
  500|   112k|}
lysp_check_dup_groupings:
  585|   112k|{
  586|   112k|    struct ly_ht *ids_global;
  587|   112k|    const struct lysp_node_grp *groupings, *grp_iter;
  588|   112k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  589|   112k|    uint32_t i;
  590|   112k|    LY_ERR ret = LY_SUCCESS;
  591|       |
  592|   112k|    ids_global = lyht_new(LYHT_MIN_SIZE, sizeof(char *), lysp_id_cmp, NULL, 1);
  ------------------
  |  |   42|   112k|#define LYHT_MIN_SIZE 8
  ------------------
  593|   112k|    LY_LIST_FOR(mod->groupings, grp_iter) {
  ------------------
  |  |  181|   112k|    for ((ELEM) = (START); \
  |  |  182|   196k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 84.3k, False: 112k]
  |  |  ------------------
  |  |  183|   112k|         (ELEM) = (ELEM)->next)
  ------------------
  594|  84.3k|        ret = lysp_check_dup_grouping(ctx, NULL, grp_iter, ids_global);
  595|  84.3k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|  84.3k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 84.3k]
  |  |  ------------------
  ------------------
  596|  84.3k|    }
  597|   112k|    LY_ARRAY_FOR(mod->includes, u) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   112k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   112k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  598|      0|        LY_LIST_FOR(mod->includes[u].submodule->groupings, grp_iter) {
  ------------------
  |  |  181|      0|    for ((ELEM) = (START); \
  |  |  182|      0|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  183|      0|         (ELEM) = (ELEM)->next)
  ------------------
  599|      0|            ret = lysp_check_dup_grouping(ctx, NULL, grp_iter, ids_global);
  600|      0|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  601|      0|        }
  602|      0|    }
  603|   126k|    for (i = 0; i < ctx->grps_nodes.count; ++i) {
  ------------------
  |  Branch (603:17): [True: 14.0k, False: 112k]
  ------------------
  604|  14.0k|        groupings = lysp_node_groupings((struct lysp_node *)ctx->grps_nodes.objs[i]);
  605|  28.1k|        LY_LIST_FOR(groupings, grp_iter) {
  ------------------
  |  |  181|  14.0k|    for ((ELEM) = (START); \
  |  |  182|  42.1k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 28.1k, False: 14.0k]
  |  |  ------------------
  |  |  183|  28.1k|         (ELEM) = (ELEM)->next)
  ------------------
  606|  28.1k|            ret = lysp_check_dup_grouping(ctx, (struct lysp_node *)ctx->grps_nodes.objs[i], grp_iter, ids_global);
  607|  28.1k|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|  28.1k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 28.1k]
  |  |  ------------------
  ------------------
  608|  28.1k|        }
  609|  14.0k|    }
  610|       |
  611|   112k|cleanup:
  612|   112k|    lyht_free(ids_global, NULL);
  613|   112k|    return ret;
  614|   112k|}
lysp_check_dup_features:
  626|   112k|{
  627|   112k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  628|   112k|    struct ly_ht *ht;
  629|   112k|    struct lysp_feature *f;
  630|   112k|    LY_ERR ret = LY_SUCCESS;
  631|       |
  632|   112k|    ht = lyht_new(LYHT_MIN_SIZE, sizeof(void *), ly_ptrequal_cb, NULL, 1);
  ------------------
  |  |   42|   112k|#define LYHT_MIN_SIZE 8
  ------------------
  633|   112k|    LY_CHECK_RET(!ht, LY_EMEM);
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|   112k|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:41): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  634|       |
  635|       |    /* add all module features into a hash table */
  636|   112k|    LY_ARRAY_FOR(mod->features, struct lysp_feature, f) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  126|   112k|    for (ITER = ARRAY; \
  |  |  |  |  |  |  |  |  127|   112k|         (ARRAY) && ((char *)ITER - (char *)ARRAY)/(sizeof(TYPE)) < (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (127:10): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  Branch (127:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  128|   112k|         ITER = (TYPE*)ITER + 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  637|      0|        ret = lysp_check_dup_ht_insert(ctx, ht, f->name, "feature",
  638|      0|                "name collision with another top-level feature");
  639|      0|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  640|      0|    }
  641|       |
  642|       |    /* add all submodule features into a hash table */
  643|   112k|    LY_ARRAY_FOR(mod->includes, u) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   112k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   112k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  644|      0|        LY_ARRAY_FOR(mod->includes[u].submodule->features, struct lysp_feature, f) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  126|      0|    for (ITER = ARRAY; \
  |  |  |  |  |  |  |  |  127|      0|         (ARRAY) && ((char *)ITER - (char *)ARRAY)/(sizeof(TYPE)) < (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (127:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (127:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  128|      0|         ITER = (TYPE*)ITER + 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  645|      0|            ret = lysp_check_dup_ht_insert(ctx, ht, f->name, "feature",
  646|      0|                    "name collision with another top-level feature");
  647|      0|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  648|      0|        }
  649|      0|    }
  650|       |
  651|   112k|cleanup:
  652|   112k|    lyht_free(ht, NULL);
  653|   112k|    return ret;
  654|   112k|}
lysp_check_dup_identities:
  658|   112k|{
  659|   112k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  660|   112k|    struct ly_ht *ht;
  661|   112k|    struct lysp_ident *i;
  662|   112k|    LY_ERR ret = LY_SUCCESS;
  663|       |
  664|   112k|    ht = lyht_new(LYHT_MIN_SIZE, sizeof(void *), ly_ptrequal_cb, NULL, 1);
  ------------------
  |  |   42|   112k|#define LYHT_MIN_SIZE 8
  ------------------
  665|   112k|    LY_CHECK_RET(!ht, LY_EMEM);
  ------------------
  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   112k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   112k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|   112k|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:41): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  666|       |
  667|       |    /* add all module identities into a hash table */
  668|   112k|    LY_ARRAY_FOR(mod->identities, struct lysp_ident, i) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  126|   112k|    for (ITER = ARRAY; \
  |  |  |  |  |  |  |  |  127|   224k|         (ARRAY) && ((char *)ITER - (char *)ARRAY)/(sizeof(TYPE)) < (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (127:10): [True: 126k, False: 98.4k]
  |  |  |  |  |  |  |  |  |  Branch (127:21): [True: 112k, False: 14.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  128|   112k|         ITER = (TYPE*)ITER + 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  669|   112k|        ret = lysp_check_dup_ht_insert(ctx, ht, i->name, "identity",
  670|   112k|                "name collision with another top-level identity");
  671|   112k|        LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|   112k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 112k]
  |  |  ------------------
  ------------------
  672|   112k|    }
  673|       |
  674|       |    /* add all submodule identities into a hash table */
  675|   112k|    LY_ARRAY_FOR(mod->includes, u) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   112k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   112k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  676|      0|        LY_ARRAY_FOR(mod->includes[u].submodule->identities, struct lysp_ident, i) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  126|      0|    for (ITER = ARRAY; \
  |  |  |  |  |  |  |  |  127|      0|         (ARRAY) && ((char *)ITER - (char *)ARRAY)/(sizeof(TYPE)) < (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (127:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (127:21): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  128|      0|         ITER = (TYPE*)ITER + 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  677|      0|            ret = lysp_check_dup_ht_insert(ctx, ht, i->name, "identity",
  678|      0|                    "name collision with another top-level identity");
  679|      0|            LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  680|      0|        }
  681|      0|    }
  682|       |
  683|   112k|cleanup:
  684|   112k|    lyht_free(ht, NULL);
  685|   112k|    return ret;
  686|   112k|}
lys_parse_load:
  971|  84.3k|{
  972|  84.3k|    struct lys_module *mod_latest = NULL;
  973|       |
  974|  84.3k|    assert(mod && new_mods);
  975|       |
  976|       |    /*
  977|       |     * Try to get the module from the context.
  978|       |     */
  979|  84.3k|    if (revision) {
  ------------------
  |  Branch (979:9): [True: 14.0k, False: 70.2k]
  ------------------
  980|       |        /* Get the specific revision. */
  981|  14.0k|        *mod = ly_ctx_get_module(ctx, name, revision);
  982|  70.2k|    } else {
  983|       |        /* Get the requested module in a suitable revision in the context. */
  984|  70.2k|        *mod = lys_get_module_without_revision(ctx, name);
  985|  70.2k|        if (*mod && !(*mod)->implemented && !((*mod)->latest_revision & LYS_MOD_IMPORTED_REV)) {
  ------------------
  |  | 2124|  56.2k|#define LYS_MOD_IMPORTED_REV        0x04 /**< This is the module revision used when importing the module without
  ------------------
  |  Branch (985:13): [True: 70.2k, False: 0]
  |  Branch (985:21): [True: 56.2k, False: 14.0k]
  |  Branch (985:45): [True: 28.1k, False: 28.1k]
  ------------------
  986|       |            /* Let us now search with callback and searchpaths to check
  987|       |             * if there is newer revision outside the context.
  988|       |             */
  989|  28.1k|            mod_latest = *mod;
  990|  28.1k|            *mod = NULL;
  991|  28.1k|        }
  992|  70.2k|    }
  993|       |
  994|  84.3k|    if (!*mod) {
  ------------------
  |  Branch (994:9): [True: 28.1k, False: 56.2k]
  ------------------
  995|       |        /* No suitable module in the context, try to load it. */
  996|  28.1k|        LY_CHECK_RET(lys_parse_load_from_clb_or_file(ctx, name, revision, mod_latest, new_mods, mod));
  ------------------
  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  997|  28.1k|        if (!*mod && !mod_latest) {
  ------------------
  |  Branch (997:13): [True: 28.1k, False: 0]
  |  Branch (997:22): [True: 0, False: 28.1k]
  ------------------
  998|      0|            LOGVAL(ctx, LYVE_REFERENCE, "Loading \"%s\" module failed.", name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  999|      0|            return LY_EVALID;
 1000|      0|        }
 1001|       |
 1002|       |        /* Update the latest_revision flag - here we have selected the latest available schema,
 1003|       |         * consider that even the callback provides correct latest revision.
 1004|       |         */
 1005|  28.1k|        if (!*mod) {
  ------------------
  |  Branch (1005:13): [True: 28.1k, False: 0]
  ------------------
 1006|  28.1k|            LOGVRB("Newer revision than \"%s@%s\" not found, using this as the latest revision.",
  ------------------
  |  |  156|  28.1k|#define LOGVRB(...) ly_log(NULL, LY_LLVRB, 0, __VA_ARGS__)
  ------------------
 1007|  28.1k|                    mod_latest->name, mod_latest->revision);
 1008|  28.1k|            assert(mod_latest->latest_revision & LYS_MOD_LATEST_REV);
 1009|  28.1k|            mod_latest->latest_revision |= LYS_MOD_LATEST_SEARCHDIRS;
  ------------------
  |  | 2123|  28.1k|#define LYS_MOD_LATEST_SEARCHDIRS   0x02 /**< This is the latest revision of the module found in searchdirs. */
  ------------------
 1010|  28.1k|            *mod = mod_latest;
 1011|  28.1k|        } else if (*mod && !revision && ((*mod)->latest_revision & LYS_MOD_LATEST_REV)) {
  ------------------
  |  | 2122|      0|#define LYS_MOD_LATEST_REV          0x01 /**< This is the latest revision of the module in the current context. */
  ------------------
  |  Branch (1011:20): [True: 0, False: 0]
  |  Branch (1011:28): [True: 0, False: 0]
  |  Branch (1011:41): [True: 0, False: 0]
  ------------------
 1012|      0|            (*mod)->latest_revision |= LYS_MOD_LATEST_SEARCHDIRS;
  ------------------
  |  | 2123|      0|#define LYS_MOD_LATEST_SEARCHDIRS   0x02 /**< This is the latest revision of the module found in searchdirs. */
  ------------------
 1013|      0|        }
 1014|  28.1k|    }
 1015|       |
 1016|       |    /* Checking the circular dependence of imported modules. */
 1017|  84.3k|    LY_CHECK_RET(lys_check_circular_dependency(ctx, mod));
  ------------------
  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  84.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  84.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 84.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1018|       |
 1019|  84.3k|    return LY_SUCCESS;
 1020|  84.3k|}
lysp_check_stringchar:
 1024|   829M|{
 1025|   829M|    if (!is_yangutf8char(c)) {
  ------------------
  |  |   64|   829M|#define is_yangutf8char(c) ((c >= 0x20 && c <= 0xd7ff) || c == 0x09 || c == 0x0a || c == 0x0d || \
  |  |  ------------------
  |  |  |  Branch (64:30): [True: 813M, False: 15.6M]
  |  |  |  Branch (64:43): [True: 813M, False: 25.7k]
  |  |  |  Branch (64:59): [True: 8.43k, False: 15.6M]
  |  |  |  Branch (64:72): [True: 15.6M, False: 30.4k]
  |  |  |  Branch (64:85): [True: 4.71k, False: 25.7k]
  |  |  ------------------
  |  |   65|   829M|                            (c >= 0xe000 && c <= 0xfdcf)   || (c >= 0xfdf0 && c <= 0xfffd)   || \
  |  |  ------------------
  |  |  |  Branch (65:30): [True: 25.7k, False: 1]
  |  |  |  Branch (65:45): [True: 244, False: 25.4k]
  |  |  |  Branch (65:64): [True: 25.4k, False: 5]
  |  |  |  Branch (65:79): [True: 700, False: 24.7k]
  |  |  ------------------
  |  |   66|   829M|                            (c >= 0x10000 && c <= 0x1fffd) || (c >= 0x20000 && c <= 0x2fffd) || \
  |  |  ------------------
  |  |  |  Branch (66:30): [True: 24.7k, False: 5]
  |  |  |  Branch (66:46): [True: 16.3k, False: 8.46k]
  |  |  |  Branch (66:64): [True: 8.46k, False: 5]
  |  |  |  Branch (66:80): [True: 274, False: 8.18k]
  |  |  ------------------
  |  |   67|   829M|                            (c >= 0x30000 && c <= 0x3fffd) || (c >= 0x40000 && c <= 0x2fffd) || \
  |  |  ------------------
  |  |  |  Branch (67:30): [True: 8.18k, False: 6]
  |  |  |  Branch (67:46): [True: 92, False: 8.09k]
  |  |  |  Branch (67:64): [True: 8.09k, False: 6]
  |  |  |  Branch (67:80): [True: 0, False: 8.09k]
  |  |  ------------------
  |  |   68|   829M|                            (c >= 0x50000 && c <= 0x5fffd) || (c >= 0x60000 && c <= 0x6fffd) || \
  |  |  ------------------
  |  |  |  Branch (68:30): [True: 8.08k, False: 14]
  |  |  |  Branch (68:46): [True: 1.52k, False: 6.55k]
  |  |  |  Branch (68:64): [True: 6.55k, False: 15]
  |  |  |  Branch (68:80): [True: 650, False: 5.90k]
  |  |  ------------------
  |  |   69|   829M|                            (c >= 0x70000 && c <= 0x7fffd) || (c >= 0x80000 && c <= 0x8fffd) || \
  |  |  ------------------
  |  |  |  Branch (69:30): [True: 5.90k, False: 16]
  |  |  |  Branch (69:46): [True: 363, False: 5.54k]
  |  |  |  Branch (69:64): [True: 5.54k, False: 17]
  |  |  |  Branch (69:80): [True: 336, False: 5.20k]
  |  |  ------------------
  |  |   70|   829M|                            (c >= 0x90000 && c <= 0x9fffd) || (c >= 0xa0000 && c <= 0xafffd) || \
  |  |  ------------------
  |  |  |  Branch (70:30): [True: 5.20k, False: 17]
  |  |  |  Branch (70:46): [True: 99, False: 5.10k]
  |  |  |  Branch (70:64): [True: 5.10k, False: 17]
  |  |  |  Branch (70:80): [True: 525, False: 4.58k]
  |  |  ------------------
  |  |   71|   829M|                            (c >= 0xb0000 && c <= 0xbfffd) || (c >= 0xc0000 && c <= 0xcfffd) || \
  |  |  ------------------
  |  |  |  Branch (71:30): [True: 4.57k, False: 18]
  |  |  |  Branch (71:46): [True: 175, False: 4.40k]
  |  |  |  Branch (71:64): [True: 4.40k, False: 18]
  |  |  |  Branch (71:80): [True: 26, False: 4.37k]
  |  |  ------------------
  |  |   72|   829M|                            (c >= 0xd0000 && c <= 0xdfffd) || (c >= 0xe0000 && c <= 0xefffd) || \
  |  |  ------------------
  |  |  |  Branch (72:30): [True: 4.37k, False: 19]
  |  |  |  Branch (72:46): [True: 1.10k, False: 3.27k]
  |  |  |  Branch (72:64): [True: 3.27k, False: 20]
  |  |  |  Branch (72:80): [True: 2.50k, False: 766]
  |  |  ------------------
  |  |   73|   829M|                            (c >= 0xf0000 && c <= 0xffffd) || (c >= 0x100000 && c <= 0x10fffd))
  |  |  ------------------
  |  |  |  Branch (73:30): [True: 765, False: 21]
  |  |  |  Branch (73:46): [True: 680, False: 85]
  |  |  |  Branch (73:64): [True: 84, False: 22]
  |  |  |  Branch (73:81): [True: 83, False: 1]
  |  |  ------------------
  ------------------
 1026|     23|        LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, c);
  ------------------
  |  |  129|     23|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|     46|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 23, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1027|     23|        return LY_EVALID;
 1028|     23|    }
 1029|   829M|    return LY_SUCCESS;
 1030|   829M|}
lysp_check_identifierchar:
 1034|  47.4M|{
 1035|  47.4M|    if (first || (prefix && ((*prefix) == 1))) {
  ------------------
  |  Branch (1035:9): [True: 4.20M, False: 43.2M]
  |  Branch (1035:19): [True: 21.0M, False: 22.1M]
  |  Branch (1035:29): [True: 793k, False: 20.2M]
  ------------------
 1036|  4.99M|        if (!is_yangidentstartchar(c)) {
  ------------------
  |  |   59|  4.99M|#define is_yangidentstartchar(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_')
  |  |  ------------------
  |  |  |  Branch (59:36): [True: 4.90M, False: 90.9k]
  |  |  |  Branch (59:48): [True: 4.90M, False: 134]
  |  |  |  Branch (59:62): [True: 90.6k, False: 339]
  |  |  |  Branch (59:74): [True: 88.1k, False: 2.52k]
  |  |  |  Branch (59:87): [True: 2.33k, False: 524]
  |  |  ------------------
  ------------------
 1037|    524|            if ((c < UCHAR_MAX) && isprint(c)) {
  ------------------
  |  Branch (1037:17): [True: 418, False: 106]
  ------------------
 1038|    399|                if (ctx) {
  ------------------
  |  Branch (1038:21): [True: 399, False: 0]
  ------------------
 1039|    399|                    LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Invalid identifier first character '%c' (0x%04x).", (char)c, c);
  ------------------
  |  |  129|    399|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    798|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 399, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|    399|                }
 1041|    399|            } else {
 1042|    125|                if (ctx) {
  ------------------
  |  Branch (1042:21): [True: 125, False: 0]
  ------------------
 1043|    125|                    LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Invalid identifier first character 0x%04x.", c);
  ------------------
  |  |  129|    125|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|    250|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 125, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1044|    125|                }
 1045|    125|            }
 1046|    524|            return LY_EVALID;
 1047|    524|        }
 1048|  4.99M|        if (prefix) {
  ------------------
  |  Branch (1048:13): [True: 2.83M, False: 2.16M]
  ------------------
 1049|  2.83M|            if (first) {
  ------------------
  |  Branch (1049:17): [True: 2.03M, False: 793k]
  ------------------
 1050|  2.03M|                (*prefix) = 0;
 1051|  2.03M|            } else {
 1052|   793k|                (*prefix) = 2;
 1053|   793k|            }
 1054|  2.83M|        }
 1055|  42.4M|    } else if ((c == ':') && prefix && ((*prefix) == 0)) {
  ------------------
  |  Branch (1055:16): [True: 784k, False: 41.7M]
  |  Branch (1055:30): [True: 784k, False: 9]
  |  Branch (1055:40): [True: 784k, False: 44]
  ------------------
 1056|   784k|        (*prefix) = 1;
 1057|  41.7M|    } else if (!is_yangidentchar(c)) {
  ------------------
  |  |   60|  41.7M|#define is_yangidentchar(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || \
  |  |  ------------------
  |  |  |  Branch (60:31): [True: 38.4M, False: 3.24M]
  |  |  |  Branch (60:43): [True: 38.4M, False: 204]
  |  |  |  Branch (60:57): [True: 88.1k, False: 3.15M]
  |  |  |  Branch (60:69): [True: 84.9k, False: 3.15k]
  |  |  |  Branch (60:83): [True: 871k, False: 2.28M]
  |  |  |  Branch (60:95): [True: 867k, False: 3.28k]
  |  |  ------------------
  |  |   61|  41.7M|                              c == '_' || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  Branch (61:31): [True: 2.83k, False: 2.28M]
  |  |  |  Branch (61:43): [True: 2.25M, False: 36.4k]
  |  |  |  Branch (61:55): [True: 35.7k, False: 700]
  |  |  ------------------
  ------------------
 1058|    700|        if (ctx) {
  ------------------
  |  Branch (1058:13): [True: 700, False: 0]
  ------------------
 1059|    700|            LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Invalid identifier character '%c' (0x%04x).", (char)c, c);
  ------------------
  |  |  129|    700|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|  1.40k|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 700, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1060|    700|        }
 1061|    700|        return LY_EVALID;
 1062|    700|    }
 1063|       |
 1064|  47.4M|    return LY_SUCCESS;
 1065|  47.4M|}
lysp_load_submodules:
 1194|   112k|{
 1195|   112k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1196|   112k|    struct ly_ctx *ctx = PARSER_CTX(pctx);
  ------------------
  |  |  128|   112k|#define PARSER_CTX(CTX) ((CTX) ? PARSER_CUR_PMOD(CTX)->mod->ctx : NULL)
  |  |  ------------------
  |  |  |  |  127|   112k|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  |  |  ------------------
  |  |  |  Branch (128:26): [True: 112k, False: 0]
  |  |  ------------------
  ------------------
 1197|       |
 1198|   112k|    LY_ARRAY_FOR(pmod->includes, u) {
  ------------------
  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   112k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   112k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|      0|        LY_ERR ret = LY_SUCCESS, r;
 1200|      0|        struct lysp_submodule *submod = NULL;
 1201|      0|        struct lysp_include *inc = &pmod->includes[u];
 1202|       |
 1203|      0|        if (inc->submodule) {
  ------------------
  |  Branch (1203:13): [True: 0, False: 0]
  ------------------
 1204|      0|            continue;
 1205|      0|        }
 1206|       |
 1207|      0|        if (pmod->is_submod) {
  ------------------
  |  Branch (1207:13): [True: 0, False: 0]
  ------------------
 1208|       |            /* try to find the submodule in the main module or its submodules */
 1209|      0|            ret = lysp_main_pmod_get_submodule(pctx, inc);
 1210|      0|            LY_CHECK_RET(ret != LY_ENOT, ret);
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|      0|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:41): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1211|      0|        }
 1212|       |
 1213|       |        /* try to use currently parsed submodule */
 1214|      0|        r = lysp_parsed_mods_get_submodule(pctx, inc);
 1215|      0|        LY_CHECK_RET(r != LY_ENOT, r);
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|      0|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:41): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1216|       |
 1217|       |        /* submodule not present in the main module, get the input data and parse it */
 1218|      0|        if (!(ctx->flags & LY_CTX_PREFER_SEARCHDIRS)) {
  ------------------
  |  |  182|      0|#define LY_CTX_PREFER_SEARCHDIRS 0x20 /**< When searching for schema, prefer searchdirs instead of user callback. */
  ------------------
  |  Branch (1218:13): [True: 0, False: 0]
  ------------------
 1219|      0|search_clb:
 1220|      0|            if (ctx->imp_clb) {
  ------------------
  |  Branch (1220:17): [True: 0, False: 0]
  ------------------
 1221|      0|                const char *submodule_data = NULL;
 1222|      0|                LYS_INFORMAT format = LYS_IN_UNKNOWN;
 1223|       |
 1224|      0|                void (*submodule_data_free)(void *module_data, void *user_data) = NULL;
 1225|      0|                struct lysp_load_module_check_data check_data = {0};
 1226|      0|                struct ly_in *in;
 1227|       |
 1228|      0|                if (ctx->imp_clb(PARSER_CUR_PMOD(pctx)->mod->name, NULL, inc->name,
  ------------------
  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
  |  Branch (1228:21): [True: 0, False: 0]
  ------------------
 1229|      0|                        inc->rev[0] ? inc->rev : NULL, ctx->imp_clb_data,
  ------------------
  |  Branch (1229:25): [True: 0, False: 0]
  ------------------
 1230|      0|                        &format, &submodule_data, &submodule_data_free) == LY_SUCCESS) {
 1231|      0|                    LY_CHECK_RET(ly_in_new_memory(submodule_data, &in));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1232|      0|                    check_data.name = inc->name;
 1233|      0|                    check_data.revision = inc->rev[0] ? inc->rev : NULL;
  ------------------
  |  Branch (1233:43): [True: 0, False: 0]
  ------------------
 1234|      0|                    check_data.submoduleof = PARSER_CUR_PMOD(pctx)->mod->name;
  ------------------
  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 1235|      0|                    lys_parse_submodule(ctx, in, format, pctx, lysp_load_module_check, &check_data, new_mods, &submod);
 1236|       |
 1237|       |                    /* update inc pointer - parsing another (YANG 1.0) submodule can cause injecting
 1238|       |                     * submodule's include into main module, where it is missing */
 1239|      0|                    inc = &pmod->includes[u];
 1240|       |
 1241|      0|                    ly_in_free(in, 0);
 1242|      0|                    if (submodule_data_free) {
  ------------------
  |  Branch (1242:25): [True: 0, False: 0]
  ------------------
 1243|      0|                        submodule_data_free((void *)submodule_data, ctx->imp_clb_data);
 1244|      0|                    }
 1245|      0|                }
 1246|      0|            }
 1247|      0|            if (!submod && !(ctx->flags & LY_CTX_PREFER_SEARCHDIRS)) {
  ------------------
  |  |  182|      0|#define LY_CTX_PREFER_SEARCHDIRS 0x20 /**< When searching for schema, prefer searchdirs instead of user callback. */
  ------------------
  |  Branch (1247:17): [True: 0, False: 0]
  |  Branch (1247:28): [True: 0, False: 0]
  ------------------
 1248|      0|                goto search_file;
 1249|      0|            }
 1250|      0|        } else {
 1251|      0|search_file:
 1252|      0|            if (!(ctx->flags & LY_CTX_DISABLE_SEARCHDIRS)) {
  ------------------
  |  |  175|      0|#define LY_CTX_DISABLE_SEARCHDIRS 0x08  /**< Do not search for schemas in context's searchdirs neither in current
  ------------------
  |  Branch (1252:17): [True: 0, False: 0]
  ------------------
 1253|       |                /* submodule was not received from the callback or there is no callback set */
 1254|      0|                lys_parse_localfile(ctx, inc->name, inc->rev[0] ? inc->rev : NULL, pctx->main_ctx,
  ------------------
  |  Branch (1254:53): [True: 0, False: 0]
  ------------------
 1255|      0|                        PARSER_CUR_PMOD(pctx->main_ctx)->mod->name, 1, new_mods, (void **)&submod);
  ------------------
  |  |  127|      0|#define PARSER_CUR_PMOD(CTX) ((struct lysp_module *)(CTX)->parsed_mods->objs[(CTX)->parsed_mods->count - 1])
  ------------------
 1256|       |
 1257|       |                /* update inc pointer - parsing another (YANG 1.0) submodule can cause injecting
 1258|       |                 * submodule's include into main module, where it is missing */
 1259|      0|                inc = &pmod->includes[u];
 1260|      0|            }
 1261|      0|            if (!submod && (ctx->flags & LY_CTX_PREFER_SEARCHDIRS)) {
  ------------------
  |  |  182|      0|#define LY_CTX_PREFER_SEARCHDIRS 0x20 /**< When searching for schema, prefer searchdirs instead of user callback. */
  ------------------
  |  Branch (1261:17): [True: 0, False: 0]
  |  Branch (1261:28): [True: 0, False: 0]
  ------------------
 1262|      0|                goto search_clb;
 1263|      0|            }
 1264|      0|        }
 1265|      0|        if (submod) {
  ------------------
  |  Branch (1265:13): [True: 0, False: 0]
  ------------------
 1266|      0|            if (!inc->rev[0] && (submod->latest_revision == 1)) {
  ------------------
  |  Branch (1266:17): [True: 0, False: 0]
  |  Branch (1266:33): [True: 0, False: 0]
  ------------------
 1267|       |                /* update the latest_revision flag - here we have selected the latest available schema,
 1268|       |                 * consider that even the callback provides correct latest revision */
 1269|      0|                submod->latest_revision = 2;
 1270|      0|            }
 1271|       |
 1272|      0|            inc->submodule = submod;
 1273|      0|            if (ret == LY_ENOT) {
  ------------------
  |  Branch (1273:17): [True: 0, False: 0]
  ------------------
 1274|       |                /* the submodule include is not present in YANG 1.0 main module - add it there */
 1275|      0|                LY_CHECK_RET(lysp_inject_submodule(pctx, &pmod->includes[u]));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1276|      0|            }
 1277|      0|        }
 1278|      0|        if (!inc->submodule) {
  ------------------
  |  Branch (1278:13): [True: 0, False: 0]
  ------------------
 1279|      0|            LOGVAL(ctx, LYVE_REFERENCE, "Including \"%s\" submodule into \"%s\" failed.", inc->name,
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1280|      0|                    PARSER_CUR_PMOD(pctx)->is_submod ? ((struct lysp_submodule *)PARSER_CUR_PMOD(pctx))->name :
 1281|      0|                    PARSER_CUR_PMOD(pctx)->mod->name);
 1282|      0|            return LY_EVALID;
 1283|      0|        }
 1284|      0|    }
 1285|       |
 1286|   112k|    return LY_SUCCESS;
 1287|   112k|}
lysp_node_typedefs:
 1402|   253k|{
 1403|   253k|    switch (node->nodetype) {
 1404|      0|    case LYS_CONTAINER:
  ------------------
  |  |  240|      0|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (1404:5): [True: 0, False: 253k]
  ------------------
 1405|      0|        return ((struct lysp_node_container *)node)->typedefs;
 1406|  14.0k|    case LYS_LIST:
  ------------------
  |  |  244|  14.0k|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (1406:5): [True: 14.0k, False: 238k]
  ------------------
 1407|  14.0k|        return ((struct lysp_node_list *)node)->typedefs;
 1408|   140k|    case LYS_GROUPING:
  ------------------
  |  |  256|   140k|#define LYS_GROUPING    0x4000
  ------------------
  |  Branch (1408:5): [True: 140k, False: 112k]
  ------------------
 1409|   140k|        return ((struct lysp_node_grp *)node)->typedefs;
 1410|      0|    case LYS_RPC:
  ------------------
  |  |  249|      0|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
  |  Branch (1410:5): [True: 0, False: 253k]
  ------------------
 1411|      0|    case LYS_ACTION:
  ------------------
  |  |  250|      0|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
  |  Branch (1411:5): [True: 0, False: 253k]
  ------------------
 1412|      0|        return ((struct lysp_node_action *)node)->typedefs;
 1413|      0|    case LYS_INPUT:
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
  |  Branch (1413:5): [True: 0, False: 253k]
  ------------------
 1414|      0|    case LYS_OUTPUT:
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (1414:5): [True: 0, False: 253k]
  ------------------
 1415|      0|        return ((struct lysp_node_action_inout *)node)->typedefs;
 1416|      0|    case LYS_NOTIF:
  ------------------
  |  |  251|      0|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (1416:5): [True: 0, False: 253k]
  ------------------
 1417|      0|        return ((struct lysp_node_notif *)node)->typedefs;
 1418|  98.4k|    default:
  ------------------
  |  Branch (1418:5): [True: 98.4k, False: 154k]
  ------------------
 1419|  98.4k|        return NULL;
 1420|   253k|    }
 1421|   253k|}
lysp_node_groupings:
 1425|   604k|{
 1426|   604k|    switch (node->nodetype) {
 1427|  70.2k|    case LYS_CONTAINER:
  ------------------
  |  |  240|  70.2k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (1427:5): [True: 70.2k, False: 534k]
  ------------------
 1428|  70.2k|        return ((struct lysp_node_container *)node)->groupings;
 1429|   295k|    case LYS_LIST:
  ------------------
  |  |  244|   295k|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (1429:5): [True: 295k, False: 309k]
  ------------------
 1430|   295k|        return ((struct lysp_node_list *)node)->groupings;
 1431|   238k|    case LYS_GROUPING:
  ------------------
  |  |  256|   238k|#define LYS_GROUPING    0x4000
  ------------------
  |  Branch (1431:5): [True: 238k, False: 365k]
  ------------------
 1432|   238k|        return ((struct lysp_node_grp *)node)->groupings;
 1433|      0|    case LYS_RPC:
  ------------------
  |  |  249|      0|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
  |  Branch (1433:5): [True: 0, False: 604k]
  ------------------
 1434|      0|    case LYS_ACTION:
  ------------------
  |  |  250|      0|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
  |  Branch (1434:5): [True: 0, False: 604k]
  ------------------
 1435|      0|        return ((struct lysp_node_action *)node)->groupings;
 1436|      0|    case LYS_INPUT:
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
  |  Branch (1436:5): [True: 0, False: 604k]
  ------------------
 1437|      0|    case LYS_OUTPUT:
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (1437:5): [True: 0, False: 604k]
  ------------------
 1438|      0|        return ((struct lysp_node_action_inout *)node)->groupings;
 1439|      0|    case LYS_NOTIF:
  ------------------
  |  |  251|      0|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (1439:5): [True: 0, False: 604k]
  ------------------
 1440|      0|        return ((struct lysp_node_notif *)node)->groupings;
 1441|      0|    default:
  ------------------
  |  Branch (1441:5): [True: 0, False: 604k]
  ------------------
 1442|      0|        return NULL;
 1443|   604k|    }
 1444|   604k|}
lysp_node_musts_p:
 1555|  2.12M|{
 1556|  2.12M|    if (!node) {
  ------------------
  |  Branch (1556:9): [True: 0, False: 2.12M]
  ------------------
 1557|      0|        return NULL;
 1558|      0|    }
 1559|       |
 1560|  2.12M|    switch (node->nodetype) {
 1561|   151k|    case LYS_CONTAINER:
  ------------------
  |  |  240|   151k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (1561:5): [True: 151k, False: 1.96M]
  ------------------
 1562|   151k|        return &((struct lysp_node_container *)node)->musts;
 1563|   820k|    case LYS_LEAF:
  ------------------
  |  |  242|   820k|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
  |  Branch (1563:5): [True: 820k, False: 1.30M]
  ------------------
 1564|   820k|        return &((struct lysp_node_leaf *)node)->musts;
 1565|   220k|    case LYS_LEAFLIST:
  ------------------
  |  |  243|   220k|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (1565:5): [True: 220k, False: 1.90M]
  ------------------
 1566|   220k|        return &((struct lysp_node_leaflist *)node)->musts;
 1567|   375k|    case LYS_LIST:
  ------------------
  |  |  244|   375k|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (1567:5): [True: 375k, False: 1.74M]
  ------------------
 1568|   375k|        return &((struct lysp_node_list *)node)->musts;
 1569|  9.94k|    case LYS_ANYXML:
  ------------------
  |  |  245|  9.94k|#define LYS_ANYXML      0x0020    /**< anyxml statement node */
  ------------------
  |  Branch (1569:5): [True: 9.94k, False: 2.11M]
  ------------------
 1570|  9.94k|    case LYS_ANYDATA:
  ------------------
  |  |  246|  9.94k|#define LYS_ANYDATA     0x0060    /**< anydata statement node, in tests it can be used for both #LYS_ANYXML and #LYS_ANYDATA */
  ------------------
  |  Branch (1570:5): [True: 0, False: 2.12M]
  ------------------
 1571|  9.94k|        return &((struct lysp_node_anydata *)node)->musts;
 1572|  58.9k|    case LYS_NOTIF:
  ------------------
  |  |  251|  58.9k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (1572:5): [True: 58.9k, False: 2.06M]
  ------------------
 1573|  58.9k|        return &((struct lysp_node_notif *)node)->musts;
 1574|  15.2k|    case LYS_INPUT:
  ------------------
  |  |  254|  15.2k|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
  |  Branch (1574:5): [True: 15.2k, False: 2.10M]
  ------------------
 1575|  30.3k|    case LYS_OUTPUT:
  ------------------
  |  |  255|  30.3k|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (1575:5): [True: 15.1k, False: 2.10M]
  ------------------
 1576|  30.3k|        return &((struct lysp_node_action_inout *)node)->musts;
 1577|   453k|    default:
  ------------------
  |  Branch (1577:5): [True: 453k, False: 1.66M]
  ------------------
 1578|   453k|        return NULL;
 1579|  2.12M|    }
 1580|  2.12M|}
lysp_node_musts:
 1584|  2.12M|{
 1585|  2.12M|    struct lysp_restr **musts;
 1586|       |
 1587|  2.12M|    musts = lysp_node_musts_p(node);
 1588|  2.12M|    if (musts) {
  ------------------
  |  Branch (1588:9): [True: 1.66M, False: 453k]
  ------------------
 1589|  1.66M|        return *musts;
 1590|  1.66M|    } else {
 1591|   453k|        return NULL;
 1592|   453k|    }
 1593|  2.12M|}
lysp_node_when_p:
 1597|  2.16M|{
 1598|  2.16M|    if (!node) {
  ------------------
  |  Branch (1598:9): [True: 0, False: 2.16M]
  ------------------
 1599|      0|        return NULL;
 1600|      0|    }
 1601|       |
 1602|  2.16M|    switch (node->nodetype) {
 1603|   151k|    case LYS_CONTAINER:
  ------------------
  |  |  240|   151k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (1603:5): [True: 151k, False: 2.01M]
  ------------------
 1604|   151k|        return &((struct lysp_node_container *)node)->when;
 1605|  44.4k|    case LYS_CHOICE:
  ------------------
  |  |  241|  44.4k|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
  |  Branch (1605:5): [True: 44.4k, False: 2.11M]
  ------------------
 1606|  44.4k|        return &((struct lysp_node_choice *)node)->when;
 1607|   820k|    case LYS_LEAF:
  ------------------
  |  |  242|   820k|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
  |  Branch (1607:5): [True: 820k, False: 1.34M]
  ------------------
 1608|   820k|        return &((struct lysp_node_leaf *)node)->when;
 1609|   220k|    case LYS_LEAFLIST:
  ------------------
  |  |  243|   220k|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (1609:5): [True: 220k, False: 1.94M]
  ------------------
 1610|   220k|        return &((struct lysp_node_leaflist *)node)->when;
 1611|   375k|    case LYS_LIST:
  ------------------
  |  |  244|   375k|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (1611:5): [True: 375k, False: 1.78M]
  ------------------
 1612|   375k|        return &((struct lysp_node_list *)node)->when;
 1613|  9.94k|    case LYS_ANYXML:
  ------------------
  |  |  245|  9.94k|#define LYS_ANYXML      0x0020    /**< anyxml statement node */
  ------------------
  |  Branch (1613:5): [True: 9.94k, False: 2.15M]
  ------------------
 1614|  9.94k|    case LYS_ANYDATA:
  ------------------
  |  |  246|  9.94k|#define LYS_ANYDATA     0x0060    /**< anydata statement node, in tests it can be used for both #LYS_ANYXML and #LYS_ANYDATA */
  ------------------
  |  Branch (1614:5): [True: 0, False: 2.16M]
  ------------------
 1615|  9.94k|        return &((struct lysp_node_anydata *)node)->when;
 1616|  62.2k|    case LYS_CASE:
  ------------------
  |  |  247|  62.2k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
  |  Branch (1616:5): [True: 62.2k, False: 2.10M]
  ------------------
 1617|  62.2k|        return &((struct lysp_node_case *)node)->when;
 1618|   240k|    case LYS_USES:
  ------------------
  |  |  253|   240k|#define LYS_USES        0x0800    /**< uses statement node */
  ------------------
  |  Branch (1618:5): [True: 240k, False: 1.92M]
  ------------------
 1619|   240k|        return &((struct lysp_node_uses *)node)->when;
 1620|  3.16k|    case LYS_AUGMENT:
  ------------------
  |  |  257|  3.16k|#define LYS_AUGMENT     0x8000
  ------------------
  |  Branch (1620:5): [True: 3.16k, False: 2.16M]
  ------------------
 1621|  3.16k|        return &((struct lysp_node_augment *)node)->when;
 1622|   234k|    default:
  ------------------
  |  Branch (1622:5): [True: 234k, False: 1.92M]
  ------------------
 1623|   234k|        return NULL;
 1624|  2.16M|    }
 1625|  2.16M|}
lysp_node_when:
 1629|  2.16M|{
 1630|  2.16M|    struct lysp_when **when;
 1631|       |
 1632|  2.16M|    when = lysp_node_when_p(node);
 1633|  2.16M|    if (when) {
  ------------------
  |  Branch (1633:9): [True: 1.92M, False: 234k]
  ------------------
 1634|  1.92M|        return *when;
 1635|  1.92M|    } else {
 1636|   234k|        return NULL;
 1637|   234k|    }
 1638|  2.16M|}
lysc_node_actions_p:
 1642|  1.64M|{
 1643|  1.64M|    assert(node);
 1644|      0|    switch (node->nodetype) {
 1645|   253k|    case LYS_CONTAINER:
  ------------------
  |  |  240|   253k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (1645:5): [True: 253k, False: 1.39M]
  ------------------
 1646|   253k|        return &((struct lysc_node_container *)node)->actions;
 1647|  1.29M|    case LYS_LIST:
  ------------------
  |  |  244|  1.29M|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (1647:5): [True: 1.29M, False: 351k]
  ------------------
 1648|  1.29M|        return &((struct lysc_node_list *)node)->actions;
 1649|  98.4k|    default:
  ------------------
  |  Branch (1649:5): [True: 98.4k, False: 1.54M]
  ------------------
 1650|  98.4k|        return NULL;
 1651|  1.64M|    }
 1652|  1.64M|}
lysc_node_actions:
 1656|  1.64M|{
 1657|  1.64M|    struct lysc_node_action **actions;
 1658|       |
 1659|  1.64M|    actions = lysc_node_actions_p((struct lysc_node *)node);
 1660|  1.64M|    if (actions) {
  ------------------
  |  Branch (1660:9): [True: 1.54M, False: 98.4k]
  ------------------
 1661|  1.54M|        return *actions;
 1662|  1.54M|    } else {
 1663|  98.4k|        return NULL;
 1664|  98.4k|    }
 1665|  1.64M|}
lysc_node_notifs_p:
 1669|  1.64M|{
 1670|  1.64M|    assert(node);
 1671|      0|    switch (node->nodetype) {
 1672|   253k|    case LYS_CONTAINER:
  ------------------
  |  |  240|   253k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (1672:5): [True: 253k, False: 1.39M]
  ------------------
 1673|   253k|        return &((struct lysc_node_container *)node)->notifs;
 1674|  1.29M|    case LYS_LIST:
  ------------------
  |  |  244|  1.29M|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (1674:5): [True: 1.29M, False: 351k]
  ------------------
 1675|  1.29M|        return &((struct lysc_node_list *)node)->notifs;
 1676|  98.4k|    default:
  ------------------
  |  Branch (1676:5): [True: 98.4k, False: 1.54M]
  ------------------
 1677|  98.4k|        return NULL;
 1678|  1.64M|    }
 1679|  1.64M|}
lysc_node_notifs:
 1683|  1.64M|{
 1684|  1.64M|    struct lysc_node_notif **notifs;
 1685|       |
 1686|  1.64M|    notifs = lysc_node_notifs_p((struct lysc_node *)node);
 1687|  1.64M|    if (notifs) {
  ------------------
  |  Branch (1687:9): [True: 1.54M, False: 98.4k]
  ------------------
 1688|  1.54M|        return *notifs;
 1689|  1.54M|    } else {
 1690|  98.4k|        return NULL;
 1691|  98.4k|    }
 1692|  1.64M|}
lysc_node_child_p:
 1696|  2.16M|{
 1697|  2.16M|    assert(node && !(node->nodetype & (LYS_RPC | LYS_ACTION)));
 1698|       |
 1699|      0|    switch (node->nodetype) {
 1700|   365k|    case LYS_CONTAINER:
  ------------------
  |  |  240|   365k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (1700:5): [True: 365k, False: 1.79M]
  ------------------
 1701|   365k|        return &((struct lysc_node_container *)node)->child;
 1702|  98.4k|    case LYS_CHOICE:
  ------------------
  |  |  241|  98.4k|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
  |  Branch (1702:5): [True: 98.4k, False: 2.06M]
  ------------------
 1703|  98.4k|        return (struct lysc_node **)&((struct lysc_node_choice *)node)->cases;
 1704|  28.1k|    case LYS_CASE:
  ------------------
  |  |  247|  28.1k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
  |  Branch (1704:5): [True: 28.1k, False: 2.13M]
  ------------------
 1705|  28.1k|        return &((struct lysc_node_case *)node)->child;
 1706|  1.61M|    case LYS_LIST:
  ------------------
  |  |  244|  1.61M|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (1706:5): [True: 1.61M, False: 548k]
  ------------------
 1707|  1.61M|        return &((struct lysc_node_list *)node)->child;
 1708|      0|    case LYS_INPUT:
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
  |  Branch (1708:5): [True: 0, False: 2.16M]
  ------------------
 1709|      0|    case LYS_OUTPUT:
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (1709:5): [True: 0, False: 2.16M]
  ------------------
 1710|      0|        return &((struct lysc_node_action_inout *)node)->child;
 1711|  56.2k|    case LYS_NOTIF:
  ------------------
  |  |  251|  56.2k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (1711:5): [True: 56.2k, False: 2.10M]
  ------------------
 1712|  56.2k|        return &((struct lysc_node_notif *)node)->child;
 1713|      0|    default:
  ------------------
  |  Branch (1713:5): [True: 0, False: 2.16M]
  ------------------
 1714|      0|        return NULL;
 1715|  2.16M|    }
 1716|  2.16M|}
lysc_node_child:
 1720|  1.33M|{
 1721|  1.33M|    struct lysc_node **child;
 1722|       |
 1723|  1.33M|    if (!node) {
  ------------------
  |  Branch (1723:9): [True: 0, False: 1.33M]
  ------------------
 1724|      0|        return NULL;
 1725|      0|    }
 1726|       |
 1727|  1.33M|    if (node->nodetype & (LYS_RPC | LYS_ACTION)) {
  ------------------
  |  |  249|  1.33M|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
                  if (node->nodetype & (LYS_RPC | LYS_ACTION)) {
  ------------------
  |  |  250|  1.33M|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
  |  Branch (1727:9): [True: 0, False: 1.33M]
  ------------------
 1728|      0|        return &((struct lysc_node_action *)node)->input.node;
 1729|  1.33M|    } else {
 1730|  1.33M|        child = lysc_node_child_p(node);
 1731|  1.33M|        if (child) {
  ------------------
  |  Branch (1731:13): [True: 1.33M, False: 0]
  ------------------
 1732|  1.33M|            return *child;
 1733|  1.33M|        }
 1734|  1.33M|    }
 1735|       |
 1736|      0|    return NULL;
 1737|  1.33M|}
lysc_node_musts_p:
 1741|   857k|{
 1742|   857k|    if (!node) {
  ------------------
  |  Branch (1742:9): [True: 0, False: 857k]
  ------------------
 1743|      0|        return NULL;
 1744|      0|    }
 1745|       |
 1746|   857k|    switch (node->nodetype) {
 1747|  70.2k|    case LYS_CONTAINER:
  ------------------
  |  |  240|  70.2k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (1747:5): [True: 70.2k, False: 787k]
  ------------------
 1748|  70.2k|        return &((struct lysc_node_container *)node)->musts;
 1749|   463k|    case LYS_LEAF:
  ------------------
  |  |  242|   463k|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
  |  Branch (1749:5): [True: 463k, False: 393k]
  ------------------
 1750|   463k|        return &((struct lysc_node_leaf *)node)->musts;
 1751|   126k|    case LYS_LEAFLIST:
  ------------------
  |  |  243|   126k|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (1751:5): [True: 126k, False: 731k]
  ------------------
 1752|   126k|        return &((struct lysc_node_leaflist *)node)->musts;
 1753|   168k|    case LYS_LIST:
  ------------------
  |  |  244|   168k|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (1753:5): [True: 168k, False: 688k]
  ------------------
 1754|   168k|        return &((struct lysc_node_list *)node)->musts;
 1755|      0|    case LYS_ANYXML:
  ------------------
  |  |  245|      0|#define LYS_ANYXML      0x0020    /**< anyxml statement node */
  ------------------
  |  Branch (1755:5): [True: 0, False: 857k]
  ------------------
 1756|      0|    case LYS_ANYDATA:
  ------------------
  |  |  246|      0|#define LYS_ANYDATA     0x0060    /**< anydata statement node, in tests it can be used for both #LYS_ANYXML and #LYS_ANYDATA */
  ------------------
  |  Branch (1756:5): [True: 0, False: 857k]
  ------------------
 1757|      0|        return &((struct lysc_node_anydata *)node)->musts;
 1758|  28.1k|    case LYS_NOTIF:
  ------------------
  |  |  251|  28.1k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (1758:5): [True: 28.1k, False: 829k]
  ------------------
 1759|  28.1k|        return &((struct lysc_node_notif *)node)->musts;
 1760|      0|    case LYS_INPUT:
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
  |  Branch (1760:5): [True: 0, False: 857k]
  ------------------
 1761|      0|    case LYS_OUTPUT:
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (1761:5): [True: 0, False: 857k]
  ------------------
 1762|      0|        return &((struct lysc_node_action_inout *)node)->musts;
 1763|      0|    default:
  ------------------
  |  Branch (1763:5): [True: 0, False: 857k]
  ------------------
 1764|      0|        return NULL;
 1765|   857k|    }
 1766|   857k|}
lysc_node_musts:
 1770|   857k|{
 1771|   857k|    struct lysc_must **must_p;
 1772|       |
 1773|   857k|    must_p = lysc_node_musts_p(node);
 1774|   857k|    if (must_p) {
  ------------------
  |  Branch (1774:9): [True: 857k, False: 0]
  ------------------
 1775|   857k|        return *must_p;
 1776|   857k|    } else {
 1777|      0|        return NULL;
 1778|      0|    }
 1779|   857k|}
lysp_match_kw:
 1829|  21.9M|{
 1830|       |/**
 1831|       | * @brief Move the input by COUNT items. Also updates the indent value in yang parser context
 1832|       | * @param[in] COUNT number of items for which the DATA pointer is supposed to move on.
 1833|       | *
 1834|       | * *INDENT-OFF*
 1835|       | */
 1836|  21.9M|#define MOVE_IN(COUNT) \
 1837|  21.9M|    ly_in_skip(in, COUNT); \
 1838|  21.9M|    if (indent) { \
 1839|  21.9M|        (*indent)+=COUNT; \
 1840|  21.9M|    }
 1841|  21.9M|#define IF_KW(STR, LEN, STMT) \
 1842|  21.9M|    if (!strncmp(in->current, STR, LEN)) { \
 1843|  21.9M|        MOVE_IN(LEN); \
 1844|  21.9M|        (*kw)=STMT; \
 1845|  21.9M|    }
 1846|  21.9M|#define IF_KW_PREFIX(STR, LEN) \
 1847|  21.9M|    if (!strncmp(in->current, STR, LEN)) { \
 1848|  21.9M|        MOVE_IN(LEN);
 1849|  21.9M|#define IF_KW_PREFIX_END \
 1850|  21.9M|    }
 1851|       |
 1852|  21.9M|    const char *start = in->current;
 1853|  21.9M|    enum ly_stmt result = LY_STMT_NONE;
 1854|  21.9M|    enum ly_stmt *kw = &result;
 1855|       |    /* read the keyword itself */
 1856|  21.9M|    switch (in->current[0]) {
 1857|  83.0k|    case 'a':
  ------------------
  |  Branch (1857:5): [True: 83.0k, False: 21.9M]
  ------------------
 1858|  83.0k|        MOVE_IN(1);
  ------------------
  |  | 1837|  83.0k|    ly_in_skip(in, COUNT); \
  |  | 1838|  83.0k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 83.0k, False: 0]
  |  |  ------------------
  |  | 1839|  83.0k|        (*indent)+=COUNT; \
  |  | 1840|  83.0k|    }
  ------------------
 1859|  83.0k|        IF_KW("rgument", 7, LY_STMT_ARGUMENT)
  ------------------
  |  | 1842|  83.0k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 57.9k, False: 25.1k]
  |  |  ------------------
  |  | 1843|  57.9k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  57.9k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  57.9k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 57.9k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  57.9k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  57.9k|    }
  |  |  ------------------
  |  | 1844|  57.9k|        (*kw)=STMT; \
  |  | 1845|  57.9k|    }
  ------------------
 1860|  25.1k|        else IF_KW("ugment", 6, LY_STMT_AUGMENT)
  ------------------
  |  | 1842|  25.1k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 3.21k, False: 21.9k]
  |  |  ------------------
  |  | 1843|  3.21k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  3.21k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  3.21k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 3.21k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  3.21k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  3.21k|    }
  |  |  ------------------
  |  | 1844|  3.21k|        (*kw)=STMT; \
  |  | 1845|  3.21k|    }
  ------------------
 1861|  21.9k|        else IF_KW("ction", 5, LY_STMT_ACTION)
  ------------------
  |  | 1842|  21.9k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 74, False: 21.8k]
  |  |  ------------------
  |  | 1843|     74|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|     74|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|     74|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 74, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|     74|        (*indent)+=COUNT; \
  |  |  |  | 1840|     74|    }
  |  |  ------------------
  |  | 1844|     74|        (*kw)=STMT; \
  |  | 1845|     74|    }
  ------------------
 1862|  32.6k|        else IF_KW_PREFIX("ny", 2)
  ------------------
  |  | 1847|  21.8k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 10.7k, False: 11.0k]
  |  |  ------------------
  |  | 1848|  10.7k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|  10.7k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  10.7k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 10.7k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  10.7k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  10.7k|    }
  |  |  ------------------
  ------------------
 1863|  32.6k|            IF_KW("data", 4, LY_STMT_ANYDATA)
  ------------------
  |  | 1842|  10.7k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 348, False: 10.4k]
  |  |  ------------------
  |  | 1843|    348|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|    348|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|    348|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 348, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|    348|        (*indent)+=COUNT; \
  |  |  |  | 1840|    348|    }
  |  |  ------------------
  |  | 1844|    348|        (*kw)=STMT; \
  |  | 1845|    348|    }
  ------------------
 1864|  10.4k|            else IF_KW("xml", 3, LY_STMT_ANYXML)
  ------------------
  |  | 1842|  10.4k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 10.2k, False: 146]
  |  |  ------------------
  |  | 1843|  10.2k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  10.2k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  10.2k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 10.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  10.2k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  10.2k|    }
  |  |  ------------------
  |  | 1844|  10.2k|        (*kw)=STMT; \
  |  | 1845|  10.2k|    }
  ------------------
 1865|  32.6k|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|  10.7k|    }
  ------------------
 1866|  83.0k|        break;
 1867|   127k|    case 'b':
  ------------------
  |  Branch (1867:5): [True: 127k, False: 21.8M]
  ------------------
 1868|   127k|        MOVE_IN(1);
  ------------------
  |  | 1837|   127k|    ly_in_skip(in, COUNT); \
  |  | 1838|   127k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 127k, False: 0]
  |  |  ------------------
  |  | 1839|   127k|        (*indent)+=COUNT; \
  |  | 1840|   127k|    }
  ------------------
 1869|   127k|        IF_KW("ase", 3, LY_STMT_BASE)
  ------------------
  |  | 1842|   127k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 119k, False: 8.11k]
  |  |  ------------------
  |  | 1843|   119k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   119k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   119k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 119k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   119k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   119k|    }
  |  |  ------------------
  |  | 1844|   119k|        (*kw)=STMT; \
  |  | 1845|   119k|    }
  ------------------
 1870|  8.11k|        else IF_KW("elongs-to", 9, LY_STMT_BELONGS_TO)
  ------------------
  |  | 1842|  8.11k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 444, False: 7.66k]
  |  |  ------------------
  |  | 1843|    444|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|    444|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|    444|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 444, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|    444|        (*indent)+=COUNT; \
  |  |  |  | 1840|    444|    }
  |  |  ------------------
  |  | 1844|    444|        (*kw)=STMT; \
  |  | 1845|    444|    }
  ------------------
 1871|  7.66k|        else IF_KW("it", 2, LY_STMT_BIT)
  ------------------
  |  | 1842|  7.66k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 6.60k, False: 1.06k]
  |  |  ------------------
  |  | 1843|  6.60k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  6.60k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  6.60k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 6.60k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  6.60k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  6.60k|    }
  |  |  ------------------
  |  | 1844|  6.60k|        (*kw)=STMT; \
  |  | 1845|  6.60k|    }
  ------------------
 1872|   127k|        break;
 1873|   299k|    case 'c':
  ------------------
  |  Branch (1873:5): [True: 299k, False: 21.6M]
  ------------------
 1874|   299k|        MOVE_IN(1);
  ------------------
  |  | 1837|   299k|    ly_in_skip(in, COUNT); \
  |  | 1838|   299k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 299k, False: 0]
  |  |  ------------------
  |  | 1839|   299k|        (*indent)+=COUNT; \
  |  | 1840|   299k|    }
  ------------------
 1875|   299k|        IF_KW("ase", 3, LY_STMT_CASE)
  ------------------
  |  | 1842|   299k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 6.10k, False: 293k]
  |  |  ------------------
  |  | 1843|  6.10k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  6.10k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  6.10k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 6.10k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  6.10k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  6.10k|    }
  |  |  ------------------
  |  | 1844|  6.10k|        (*kw)=STMT; \
  |  | 1845|  6.10k|    }
  ------------------
 1876|   293k|        else IF_KW("hoice", 5, LY_STMT_CHOICE)
  ------------------
  |  | 1842|   293k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 34.1k, False: 259k]
  |  |  ------------------
  |  | 1843|  34.1k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  34.1k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  34.1k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 34.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  34.1k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  34.1k|    }
  |  |  ------------------
  |  | 1844|  34.1k|        (*kw)=STMT; \
  |  | 1845|  34.1k|    }
  ------------------
 1877|   502k|        else IF_KW_PREFIX("on", 2)
  ------------------
  |  | 1847|   259k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 243k, False: 16.3k]
  |  |  ------------------
  |  | 1848|   243k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|   243k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   243k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 243k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   243k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   243k|    }
  |  |  ------------------
  ------------------
 1878|   502k|            IF_KW("fig", 3, LY_STMT_CONFIG)
  ------------------
  |  | 1842|   243k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 44.2k, False: 198k]
  |  |  ------------------
  |  | 1843|  44.2k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  44.2k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  44.2k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 44.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  44.2k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  44.2k|    }
  |  |  ------------------
  |  | 1844|  44.2k|        (*kw)=STMT; \
  |  | 1845|  44.2k|    }
  ------------------
 1879|   396k|            else IF_KW_PREFIX("ta", 2)
  ------------------
  |  | 1847|   198k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 197k, False: 1.43k]
  |  |  ------------------
  |  | 1848|   197k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|   197k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   197k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 197k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   197k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   197k|    }
  |  |  ------------------
  ------------------
 1880|   396k|                IF_KW("ct", 2, LY_STMT_CONTACT)
  ------------------
  |  | 1842|   197k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 112k, False: 84.9k]
  |  |  ------------------
  |  | 1843|   112k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   112k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   112k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 112k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   112k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   112k|    }
  |  |  ------------------
  |  | 1844|   112k|        (*kw)=STMT; \
  |  | 1845|   112k|    }
  ------------------
 1881|  84.9k|                else IF_KW("iner", 4, LY_STMT_CONTAINER)
  ------------------
  |  | 1842|  84.9k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 82.2k, False: 2.73k]
  |  |  ------------------
  |  | 1843|  82.2k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  82.2k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  82.2k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 82.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  82.2k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  82.2k|    }
  |  |  ------------------
  |  | 1844|  82.2k|        (*kw)=STMT; \
  |  | 1845|  82.2k|    }
  ------------------
 1882|   396k|            IF_KW_PREFIX_END
  ------------------
  |  | 1850|   197k|    }
  ------------------
 1883|   502k|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|   243k|    }
  ------------------
 1884|   299k|        break;
 1885|  2.15M|    case 'd':
  ------------------
  |  Branch (1885:5): [True: 2.15M, False: 19.8M]
  ------------------
 1886|  2.15M|        MOVE_IN(1);
  ------------------
  |  | 1837|  2.15M|    ly_in_skip(in, COUNT); \
  |  | 1838|  2.15M|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 2.15M, False: 0]
  |  |  ------------------
  |  | 1839|  2.15M|        (*indent)+=COUNT; \
  |  | 1840|  2.15M|    }
  ------------------
 1887|  2.15M|        IF_KW_PREFIX("e", 1)
  ------------------
  |  | 1847|  2.15M|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 2.15M, False: 2.23k]
  |  |  ------------------
  |  | 1848|  2.15M|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|  2.15M|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  2.15M|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 2.15M, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  2.15M|        (*indent)+=COUNT; \
  |  |  |  | 1840|  2.15M|    }
  |  |  ------------------
  ------------------
 1888|  2.15M|            IF_KW("fault", 5, LY_STMT_DEFAULT)
  ------------------
  |  | 1842|  2.15M|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 44.1k, False: 2.10M]
  |  |  ------------------
  |  | 1843|  44.1k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  44.1k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  44.1k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 44.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  44.1k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  44.1k|    }
  |  |  ------------------
  |  | 1844|  44.1k|        (*kw)=STMT; \
  |  | 1845|  44.1k|    }
  ------------------
 1889|  2.10M|            else IF_KW("scription", 9, LY_STMT_DESCRIPTION)
  ------------------
  |  | 1842|  2.10M|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 2.09M, False: 7.54k]
  |  |  ------------------
  |  | 1843|  2.09M|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  2.09M|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  2.09M|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 2.09M, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  2.09M|        (*indent)+=COUNT; \
  |  |  |  | 1840|  2.09M|    }
  |  |  ------------------
  |  | 1844|  2.09M|        (*kw)=STMT; \
  |  | 1845|  2.09M|    }
  ------------------
 1890|  13.4k|            else IF_KW_PREFIX("viat", 4)
  ------------------
  |  | 1847|  7.54k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 5.90k, False: 1.63k]
  |  |  ------------------
  |  | 1848|  5.90k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|  5.90k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  5.90k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 5.90k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  5.90k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  5.90k|    }
  |  |  ------------------
  ------------------
 1891|  13.4k|                IF_KW("e", 1, LY_STMT_DEVIATE)
  ------------------
  |  | 1842|  5.90k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 4.13k, False: 1.77k]
  |  |  ------------------
  |  | 1843|  4.13k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  4.13k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  4.13k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 4.13k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  4.13k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  4.13k|    }
  |  |  ------------------
  |  | 1844|  4.13k|        (*kw)=STMT; \
  |  | 1845|  4.13k|    }
  ------------------
 1892|  1.77k|                else IF_KW("ion", 3, LY_STMT_DEVIATION)
  ------------------
  |  | 1842|  1.77k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 1.56k, False: 210]
  |  |  ------------------
  |  | 1843|  1.56k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  1.56k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  1.56k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 1.56k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  1.56k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  1.56k|    }
  |  |  ------------------
  |  | 1844|  1.56k|        (*kw)=STMT; \
  |  | 1845|  1.56k|    }
  ------------------
 1893|  13.4k|            IF_KW_PREFIX_END
  ------------------
  |  | 1850|  5.90k|    }
  ------------------
 1894|  2.15M|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|  2.15M|    }
  ------------------
 1895|  2.15M|        break;
 1896|   263k|    case 'e':
  ------------------
  |  Branch (1896:5): [True: 263k, False: 21.7M]
  ------------------
 1897|   263k|        MOVE_IN(1);
  ------------------
  |  | 1837|   263k|    ly_in_skip(in, COUNT); \
  |  | 1838|   263k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 263k, False: 0]
  |  |  ------------------
  |  | 1839|   263k|        (*indent)+=COUNT; \
  |  | 1840|   263k|    }
  ------------------
 1898|   263k|        IF_KW("num", 3, LY_STMT_ENUM)
  ------------------
  |  | 1842|   263k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 191k, False: 72.6k]
  |  |  ------------------
  |  | 1843|   191k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   191k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   191k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 191k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   191k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   191k|    }
  |  |  ------------------
  |  | 1844|   191k|        (*kw)=STMT; \
  |  | 1845|   191k|    }
  ------------------
 1899|  72.6k|        else IF_KW_PREFIX("rror-", 5)
  ------------------
  |  | 1847|  72.6k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 592, False: 72.0k]
  |  |  ------------------
  |  | 1848|    592|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|    592|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|    592|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 592, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|    592|        (*indent)+=COUNT; \
  |  |  |  | 1840|    592|    }
  |  |  ------------------
  ------------------
 1900|    592|            IF_KW("app-tag", 7, LY_STMT_ERROR_APP_TAG)
  ------------------
  |  | 1842|    592|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 110, False: 482]
  |  |  ------------------
  |  | 1843|    110|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|    110|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|    110|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 110, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|    110|        (*indent)+=COUNT; \
  |  |  |  | 1840|    110|    }
  |  |  ------------------
  |  | 1844|    110|        (*kw)=STMT; \
  |  | 1845|    110|    }
  ------------------
 1901|    482|            else IF_KW("message", 7, LY_STMT_ERROR_MESSAGE)
  ------------------
  |  | 1842|    482|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 252, False: 230]
  |  |  ------------------
  |  | 1843|    252|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|    252|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|    252|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 252, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|    252|        (*indent)+=COUNT; \
  |  |  |  | 1840|    252|    }
  |  |  ------------------
  |  | 1844|    252|        (*kw)=STMT; \
  |  | 1845|    252|    }
  ------------------
 1902|    592|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|    592|    }
  ------------------
 1903|  72.0k|        else IF_KW("xtension", 8, LY_STMT_EXTENSION)
  ------------------
  |  | 1842|  72.0k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 63.3k, False: 8.72k]
  |  |  ------------------
  |  | 1843|  63.3k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  63.3k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  63.3k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 63.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  63.3k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  63.3k|    }
  |  |  ------------------
  |  | 1844|  63.3k|        (*kw)=STMT; \
  |  | 1845|  63.3k|    }
  ------------------
 1904|   263k|        break;
 1905|  5.74k|    case 'f':
  ------------------
  |  Branch (1905:5): [True: 5.74k, False: 21.9M]
  ------------------
 1906|  5.74k|        MOVE_IN(1);
  ------------------
  |  | 1837|  5.74k|    ly_in_skip(in, COUNT); \
  |  | 1838|  5.74k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 5.74k, False: 0]
  |  |  ------------------
  |  | 1839|  5.74k|        (*indent)+=COUNT; \
  |  | 1840|  5.74k|    }
  ------------------
 1907|  5.74k|        IF_KW("eature", 6, LY_STMT_FEATURE)
  ------------------
  |  | 1842|  5.74k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 1.25k, False: 4.48k]
  |  |  ------------------
  |  | 1843|  1.25k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  1.25k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  1.25k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 1.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  1.25k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  1.25k|    }
  |  |  ------------------
  |  | 1844|  1.25k|        (*kw)=STMT; \
  |  | 1845|  1.25k|    }
  ------------------
 1908|  4.48k|        else IF_KW("raction-digits", 14, LY_STMT_FRACTION_DIGITS)
  ------------------
  |  | 1842|  4.48k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 2.12k, False: 2.35k]
  |  |  ------------------
  |  | 1843|  2.12k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  2.12k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  2.12k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 2.12k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  2.12k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  2.12k|    }
  |  |  ------------------
  |  | 1844|  2.12k|        (*kw)=STMT; \
  |  | 1845|  2.12k|    }
  ------------------
 1909|  5.74k|        break;
 1910|   135k|    case 'g':
  ------------------
  |  Branch (1910:5): [True: 135k, False: 21.8M]
  ------------------
 1911|   135k|        MOVE_IN(1);
  ------------------
  |  | 1837|   135k|    ly_in_skip(in, COUNT); \
  |  | 1838|   135k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 135k, False: 0]
  |  |  ------------------
  |  | 1839|   135k|        (*indent)+=COUNT; \
  |  | 1840|   135k|    }
  ------------------
 1912|   135k|        IF_KW("rouping", 7, LY_STMT_GROUPING)
  ------------------
  |  | 1842|   135k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 132k, False: 3.51k]
  |  |  ------------------
  |  | 1843|   132k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   132k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   132k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 132k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   132k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   132k|    }
  |  |  ------------------
  |  | 1844|   132k|        (*kw)=STMT; \
  |  | 1845|   132k|    }
  ------------------
 1913|   135k|        break;
 1914|   237k|    case 'i':
  ------------------
  |  Branch (1914:5): [True: 237k, False: 21.7M]
  ------------------
 1915|   237k|        MOVE_IN(1);
  ------------------
  |  | 1837|   237k|    ly_in_skip(in, COUNT); \
  |  | 1838|   237k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 237k, False: 0]
  |  |  ------------------
  |  | 1839|   237k|        (*indent)+=COUNT; \
  |  | 1840|   237k|    }
  ------------------
 1916|   237k|        IF_KW("dentity", 7, LY_STMT_IDENTITY)
  ------------------
  |  | 1842|   237k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 120k, False: 117k]
  |  |  ------------------
  |  | 1843|   120k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   120k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   120k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 120k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   120k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   120k|    }
  |  |  ------------------
  |  | 1844|   120k|        (*kw)=STMT; \
  |  | 1845|   120k|    }
  ------------------
 1917|   117k|        else IF_KW("f-feature", 9, LY_STMT_IF_FEATURE)
  ------------------
  |  | 1842|   117k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 12.6k, False: 104k]
  |  |  ------------------
  |  | 1843|  12.6k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  12.6k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  12.6k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 12.6k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  12.6k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  12.6k|    }
  |  |  ------------------
  |  | 1844|  12.6k|        (*kw)=STMT; \
  |  | 1845|  12.6k|    }
  ------------------
 1918|   104k|        else IF_KW("mport", 5, LY_STMT_IMPORT)
  ------------------
  |  | 1842|   104k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 85.7k, False: 18.8k]
  |  |  ------------------
  |  | 1843|  85.7k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  85.7k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  85.7k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 85.7k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  85.7k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  85.7k|    }
  |  |  ------------------
  |  | 1844|  85.7k|        (*kw)=STMT; \
  |  | 1845|  85.7k|    }
  ------------------
 1919|  26.6k|        else IF_KW_PREFIX("n", 1)
  ------------------
  |  | 1847|  18.8k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 7.78k, False: 11.1k]
  |  |  ------------------
  |  | 1848|  7.78k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|  7.78k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  7.78k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 7.78k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  7.78k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  7.78k|    }
  |  |  ------------------
  ------------------
 1920|  26.6k|            IF_KW("clude", 5, LY_STMT_INCLUDE)
  ------------------
  |  | 1842|  7.78k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 3.42k, False: 4.36k]
  |  |  ------------------
  |  | 1843|  3.42k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  3.42k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  3.42k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 3.42k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  3.42k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  3.42k|    }
  |  |  ------------------
  |  | 1844|  3.42k|        (*kw)=STMT; \
  |  | 1845|  3.42k|    }
  ------------------
 1921|  4.36k|            else IF_KW("put", 3, LY_STMT_INPUT)
  ------------------
  |  | 1842|  4.36k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 4.14k, False: 213]
  |  |  ------------------
  |  | 1843|  4.14k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  4.14k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  4.14k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 4.14k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  4.14k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  4.14k|    }
  |  |  ------------------
  |  | 1844|  4.14k|        (*kw)=STMT; \
  |  | 1845|  4.14k|    }
  ------------------
 1922|  26.6k|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|  7.78k|    }
  ------------------
 1923|   237k|        break;
 1924|   172k|    case 'k':
  ------------------
  |  Branch (1924:5): [True: 172k, False: 21.8M]
  ------------------
 1925|   172k|        MOVE_IN(1);
  ------------------
  |  | 1837|   172k|    ly_in_skip(in, COUNT); \
  |  | 1838|   172k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 172k, False: 0]
  |  |  ------------------
  |  | 1839|   172k|        (*indent)+=COUNT; \
  |  | 1840|   172k|    }
  ------------------
 1926|   172k|        IF_KW("ey", 2, LY_STMT_KEY)
  ------------------
  |  | 1842|   172k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 170k, False: 2.27k]
  |  |  ------------------
  |  | 1843|   170k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   170k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   170k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 170k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   170k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   170k|    }
  |  |  ------------------
  |  | 1844|   170k|        (*kw)=STMT; \
  |  | 1845|   170k|    }
  ------------------
 1927|   172k|        break;
 1928|   725k|    case 'l':
  ------------------
  |  Branch (1928:5): [True: 725k, False: 21.2M]
  ------------------
 1929|   725k|        MOVE_IN(1);
  ------------------
  |  | 1837|   725k|    ly_in_skip(in, COUNT); \
  |  | 1838|   725k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 725k, False: 0]
  |  |  ------------------
  |  | 1839|   725k|        (*indent)+=COUNT; \
  |  | 1840|   725k|    }
  ------------------
 1930|   725k|        IF_KW_PREFIX("e", 1)
  ------------------
  |  | 1847|   725k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 509k, False: 216k]
  |  |  ------------------
  |  | 1848|   509k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|   509k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   509k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 509k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   509k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   509k|    }
  |  |  ------------------
  ------------------
 1931|   509k|            IF_KW("af-list", 7, LY_STMT_LEAF_LIST)
  ------------------
  |  | 1842|   509k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 94.3k, False: 415k]
  |  |  ------------------
  |  | 1843|  94.3k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  94.3k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  94.3k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 94.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  94.3k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  94.3k|    }
  |  |  ------------------
  |  | 1844|  94.3k|        (*kw)=STMT; \
  |  | 1845|  94.3k|    }
  ------------------
 1932|   415k|            else IF_KW("af", 2, LY_STMT_LEAF)
  ------------------
  |  | 1842|   415k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 357k, False: 57.8k]
  |  |  ------------------
  |  | 1843|   357k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   357k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   357k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 357k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   357k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   357k|    }
  |  |  ------------------
  |  | 1844|   357k|        (*kw)=STMT; \
  |  | 1845|   357k|    }
  ------------------
 1933|  57.8k|            else IF_KW("ngth", 4, LY_STMT_LENGTH)
  ------------------
  |  | 1842|  57.8k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 56.2k, False: 1.63k]
  |  |  ------------------
  |  | 1843|  56.2k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  56.2k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  56.2k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 56.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  56.2k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  56.2k|    }
  |  |  ------------------
  |  | 1844|  56.2k|        (*kw)=STMT; \
  |  | 1845|  56.2k|    }
  ------------------
 1934|   509k|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|   509k|    }
  ------------------
 1935|   216k|        else IF_KW("ist", 3, LY_STMT_LIST)
  ------------------
  |  | 1842|   216k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 211k, False: 4.51k]
  |  |  ------------------
  |  | 1843|   211k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   211k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   211k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 211k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   211k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   211k|    }
  |  |  ------------------
  |  | 1844|   211k|        (*kw)=STMT; \
  |  | 1845|   211k|    }
  ------------------
 1936|   725k|        break;
 1937|   443k|    case 'm':
  ------------------
  |  Branch (1937:5): [True: 443k, False: 21.5M]
  ------------------
 1938|   443k|        MOVE_IN(1);
  ------------------
  |  | 1837|   443k|    ly_in_skip(in, COUNT); \
  |  | 1838|   443k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 443k, False: 0]
  |  |  ------------------
  |  | 1839|   443k|        (*indent)+=COUNT; \
  |  | 1840|   443k|    }
  ------------------
 1939|   443k|        IF_KW_PREFIX("a", 1)
  ------------------
  |  | 1847|   443k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 165k, False: 278k]
  |  |  ------------------
  |  | 1848|   165k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|   165k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   165k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 165k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   165k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   165k|    }
  |  |  ------------------
  ------------------
 1940|   165k|            IF_KW("ndatory", 7, LY_STMT_MANDATORY)
  ------------------
  |  | 1842|   165k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 158k, False: 6.05k]
  |  |  ------------------
  |  | 1843|   158k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   158k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   158k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 158k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   158k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   158k|    }
  |  |  ------------------
  |  | 1844|   158k|        (*kw)=STMT; \
  |  | 1845|   158k|    }
  ------------------
 1941|  6.05k|            else IF_KW("x-elements", 10, LY_STMT_MAX_ELEMENTS)
  ------------------
  |  | 1842|  6.05k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 3.25k, False: 2.80k]
  |  |  ------------------
  |  | 1843|  3.25k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  3.25k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  3.25k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 3.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  3.25k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  3.25k|    }
  |  |  ------------------
  |  | 1844|  3.25k|        (*kw)=STMT; \
  |  | 1845|  3.25k|    }
  ------------------
 1942|   165k|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|   165k|    }
  ------------------
 1943|   278k|        else IF_KW("in-elements", 11, LY_STMT_MIN_ELEMENTS)
  ------------------
  |  | 1842|   278k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 771, False: 277k]
  |  |  ------------------
  |  | 1843|    771|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|    771|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|    771|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 771, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|    771|        (*indent)+=COUNT; \
  |  |  |  | 1840|    771|    }
  |  |  ------------------
  |  | 1844|    771|        (*kw)=STMT; \
  |  | 1845|    771|    }
  ------------------
 1944|   277k|        else IF_KW("ust", 3, LY_STMT_MUST)
  ------------------
  |  | 1842|   277k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 10.4k, False: 266k]
  |  |  ------------------
  |  | 1843|  10.4k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  10.4k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  10.4k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 10.4k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  10.4k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  10.4k|    }
  |  |  ------------------
  |  | 1844|  10.4k|        (*kw)=STMT; \
  |  | 1845|  10.4k|    }
  ------------------
 1945|   393k|        else IF_KW_PREFIX("od", 2)
  ------------------
  |  | 1847|   266k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 126k, False: 140k]
  |  |  ------------------
  |  | 1848|   126k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|   126k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   126k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 126k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   126k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   126k|    }
  |  |  ------------------
  ------------------
 1946|   393k|            IF_KW("ule", 3, LY_STMT_MODULE)
  ------------------
  |  | 1842|   126k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 125k, False: 1.38k]
  |  |  ------------------
  |  | 1843|   125k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   125k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   125k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 125k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   125k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   125k|    }
  |  |  ------------------
  |  | 1844|   125k|        (*kw)=STMT; \
  |  | 1845|   125k|    }
  ------------------
 1947|  1.38k|            else IF_KW("ifier", 5, LY_STMT_MODIFIER)
  ------------------
  |  | 1842|  1.38k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 70, False: 1.31k]
  |  |  ------------------
  |  | 1843|     70|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|     70|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|     70|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 70, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|     70|        (*indent)+=COUNT; \
  |  |  |  | 1840|     70|    }
  |  |  ------------------
  |  | 1844|     70|        (*kw)=STMT; \
  |  | 1845|     70|    }
  ------------------
 1948|   393k|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|   126k|    }
  ------------------
 1949|   443k|        break;
 1950|   149k|    case 'n':
  ------------------
  |  Branch (1950:5): [True: 149k, False: 21.8M]
  ------------------
 1951|   149k|        MOVE_IN(1);
  ------------------
  |  | 1837|   149k|    ly_in_skip(in, COUNT); \
  |  | 1838|   149k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 149k, False: 0]
  |  |  ------------------
  |  | 1839|   149k|        (*indent)+=COUNT; \
  |  | 1840|   149k|    }
  ------------------
 1952|   149k|        IF_KW("amespace", 8, LY_STMT_NAMESPACE)
  ------------------
  |  | 1842|   149k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 113k, False: 35.7k]
  |  |  ------------------
  |  | 1843|   113k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   113k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   113k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 113k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   113k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   113k|    }
  |  |  ------------------
  |  | 1844|   113k|        (*kw)=STMT; \
  |  | 1845|   113k|    }
  ------------------
 1953|  35.7k|        else IF_KW("otification", 11, LY_STMT_NOTIFICATION)
  ------------------
  |  | 1842|  35.7k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 30.8k, False: 4.90k]
  |  |  ------------------
  |  | 1843|  30.8k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  30.8k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  30.8k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 30.8k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  30.8k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  30.8k|    }
  |  |  ------------------
  |  | 1844|  30.8k|        (*kw)=STMT; \
  |  | 1845|  30.8k|    }
  ------------------
 1954|   149k|        break;
 1955|   119k|    case 'o':
  ------------------
  |  Branch (1955:5): [True: 119k, False: 21.8M]
  ------------------
 1956|   119k|        MOVE_IN(1);
  ------------------
  |  | 1837|   119k|    ly_in_skip(in, COUNT); \
  |  | 1838|   119k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 119k, False: 0]
  |  |  ------------------
  |  | 1839|   119k|        (*indent)+=COUNT; \
  |  | 1840|   119k|    }
  ------------------
 1957|   119k|        IF_KW_PREFIX("r", 1)
  ------------------
  |  | 1847|   119k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 116k, False: 3.78k]
  |  |  ------------------
  |  | 1848|   116k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|   116k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   116k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 116k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   116k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   116k|    }
  |  |  ------------------
  ------------------
 1958|   116k|            IF_KW("dered-by", 8, LY_STMT_ORDERED_BY)
  ------------------
  |  | 1842|   116k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 533, False: 115k]
  |  |  ------------------
  |  | 1843|    533|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|    533|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|    533|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 533, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|    533|        (*indent)+=COUNT; \
  |  |  |  | 1840|    533|    }
  |  |  ------------------
  |  | 1844|    533|        (*kw)=STMT; \
  |  | 1845|    533|    }
  ------------------
 1959|   115k|            else IF_KW("ganization", 10, LY_STMT_ORGANIZATION)
  ------------------
  |  | 1842|   115k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 113k, False: 1.77k]
  |  |  ------------------
  |  | 1843|   113k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   113k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   113k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 113k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   113k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   113k|    }
  |  |  ------------------
  |  | 1844|   113k|        (*kw)=STMT; \
  |  | 1845|   113k|    }
  ------------------
 1960|   116k|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|   116k|    }
  ------------------
 1961|  3.78k|        else IF_KW("utput", 5, LY_STMT_OUTPUT)
  ------------------
  |  | 1842|  3.78k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 91, False: 3.69k]
  |  |  ------------------
  |  | 1843|     91|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|     91|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|     91|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 91, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|     91|        (*indent)+=COUNT; \
  |  |  |  | 1840|     91|    }
  |  |  ------------------
  |  | 1844|     91|        (*kw)=STMT; \
  |  | 1845|     91|    }
  ------------------
 1962|   119k|        break;
 1963|   603k|    case 'p':
  ------------------
  |  Branch (1963:5): [True: 603k, False: 21.3M]
  ------------------
 1964|   603k|        MOVE_IN(1);
  ------------------
  |  | 1837|   603k|    ly_in_skip(in, COUNT); \
  |  | 1838|   603k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 603k, False: 0]
  |  |  ------------------
  |  | 1839|   603k|        (*indent)+=COUNT; \
  |  | 1840|   603k|    }
  ------------------
 1965|   603k|        IF_KW("ath", 3, LY_STMT_PATH)
  ------------------
  |  | 1842|   603k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 74.6k, False: 528k]
  |  |  ------------------
  |  | 1843|  74.6k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  74.6k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  74.6k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 74.6k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  74.6k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  74.6k|    }
  |  |  ------------------
  |  | 1844|  74.6k|        (*kw)=STMT; \
  |  | 1845|  74.6k|    }
  ------------------
 1966|   528k|        else IF_KW("attern", 6, LY_STMT_PATTERN)
  ------------------
  |  | 1842|   528k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 289k, False: 239k]
  |  |  ------------------
  |  | 1843|   289k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   289k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   289k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 289k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   289k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   289k|    }
  |  |  ------------------
  |  | 1844|   289k|        (*kw)=STMT; \
  |  | 1845|   289k|    }
  ------------------
 1967|   239k|        else IF_KW("osition", 7, LY_STMT_POSITION)
  ------------------
  |  | 1842|   239k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 4.23k, False: 235k]
  |  |  ------------------
  |  | 1843|  4.23k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  4.23k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  4.23k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 4.23k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  4.23k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  4.23k|    }
  |  |  ------------------
  |  | 1844|  4.23k|        (*kw)=STMT; \
  |  | 1845|  4.23k|    }
  ------------------
 1968|   465k|        else IF_KW_PREFIX("re", 2)
  ------------------
  |  | 1847|   235k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 229k, False: 5.61k]
  |  |  ------------------
  |  | 1848|   229k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|   229k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   229k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 229k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   229k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   229k|    }
  |  |  ------------------
  ------------------
 1969|   465k|            IF_KW("fix", 3, LY_STMT_PREFIX)
  ------------------
  |  | 1842|   229k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 198k, False: 30.8k]
  |  |  ------------------
  |  | 1843|   198k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   198k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   198k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 198k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   198k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   198k|    }
  |  |  ------------------
  |  | 1844|   198k|        (*kw)=STMT; \
  |  | 1845|   198k|    }
  ------------------
 1970|  30.8k|            else IF_KW("sence", 5, LY_STMT_PRESENCE)
  ------------------
  |  | 1842|  30.8k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 29.1k, False: 1.74k]
  |  |  ------------------
  |  | 1843|  29.1k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  29.1k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  29.1k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 29.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  29.1k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  29.1k|    }
  |  |  ------------------
  |  | 1844|  29.1k|        (*kw)=STMT; \
  |  | 1845|  29.1k|    }
  ------------------
 1971|   465k|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|   229k|    }
  ------------------
 1972|   603k|        break;
 1973|  1.05M|    case 'r':
  ------------------
  |  Branch (1973:5): [True: 1.05M, False: 20.9M]
  ------------------
 1974|  1.05M|        MOVE_IN(1);
  ------------------
  |  | 1837|  1.05M|    ly_in_skip(in, COUNT); \
  |  | 1838|  1.05M|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 1.05M, False: 0]
  |  |  ------------------
  |  | 1839|  1.05M|        (*indent)+=COUNT; \
  |  | 1840|  1.05M|    }
  ------------------
 1975|  1.05M|        IF_KW("ange", 4, LY_STMT_RANGE)
  ------------------
  |  | 1842|  1.05M|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 70.3k, False: 982k]
  |  |  ------------------
  |  | 1843|  70.3k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  70.3k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  70.3k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 70.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  70.3k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  70.3k|    }
  |  |  ------------------
  |  | 1844|  70.3k|        (*kw)=STMT; \
  |  | 1845|  70.3k|    }
  ------------------
 1976|   982k|        else IF_KW_PREFIX("e", 1)
  ------------------
  |  | 1847|   982k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 964k, False: 17.8k]
  |  |  ------------------
  |  | 1848|   964k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|   964k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   964k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 964k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   964k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   964k|    }
  |  |  ------------------
  ------------------
 1977|   964k|            IF_KW_PREFIX("f", 1)
  ------------------
  |  | 1847|   964k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 730k, False: 233k]
  |  |  ------------------
  |  | 1848|   730k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|   730k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   730k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 730k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   730k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   730k|    }
  |  |  ------------------
  ------------------
 1978|   730k|                IF_KW("erence", 6, LY_STMT_REFERENCE)
  ------------------
  |  | 1842|   730k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 724k, False: 5.95k]
  |  |  ------------------
  |  | 1843|   724k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   724k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   724k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 724k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   724k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   724k|    }
  |  |  ------------------
  |  | 1844|   724k|        (*kw)=STMT; \
  |  | 1845|   724k|    }
  ------------------
 1979|  5.95k|                else IF_KW("ine", 3, LY_STMT_REFINE)
  ------------------
  |  | 1842|  5.95k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 3.92k, False: 2.02k]
  |  |  ------------------
  |  | 1843|  3.92k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  3.92k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  3.92k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 3.92k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  3.92k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  3.92k|    }
  |  |  ------------------
  |  | 1844|  3.92k|        (*kw)=STMT; \
  |  | 1845|  3.92k|    }
  ------------------
 1980|   730k|            IF_KW_PREFIX_END
  ------------------
  |  | 1850|   730k|    }
  ------------------
 1981|   233k|            else IF_KW("quire-instance", 14, LY_STMT_REQUIRE_INSTANCE)
  ------------------
  |  | 1842|   233k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 400, False: 233k]
  |  |  ------------------
  |  | 1843|    400|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|    400|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|    400|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 400, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|    400|        (*indent)+=COUNT; \
  |  |  |  | 1840|    400|    }
  |  |  ------------------
  |  | 1844|    400|        (*kw)=STMT; \
  |  | 1845|    400|    }
  ------------------
 1982|   233k|            else IF_KW("vision-date", 11, LY_STMT_REVISION_DATE)
  ------------------
  |  | 1842|   233k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 14.2k, False: 219k]
  |  |  ------------------
  |  | 1843|  14.2k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  14.2k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  14.2k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 14.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  14.2k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  14.2k|    }
  |  |  ------------------
  |  | 1844|  14.2k|        (*kw)=STMT; \
  |  | 1845|  14.2k|    }
  ------------------
 1983|   219k|            else IF_KW("vision", 6, LY_STMT_REVISION)
  ------------------
  |  | 1842|   219k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 217k, False: 1.85k]
  |  |  ------------------
  |  | 1843|   217k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   217k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   217k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 217k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   217k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   217k|    }
  |  |  ------------------
  |  | 1844|   217k|        (*kw)=STMT; \
  |  | 1845|   217k|    }
  ------------------
 1984|   964k|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|   964k|    }
  ------------------
 1985|  17.8k|        else IF_KW("pc", 2, LY_STMT_RPC)
  ------------------
  |  | 1842|  17.8k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 15.5k, False: 2.32k]
  |  |  ------------------
  |  | 1843|  15.5k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  15.5k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  15.5k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 15.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  15.5k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  15.5k|    }
  |  |  ------------------
  |  | 1844|  15.5k|        (*kw)=STMT; \
  |  | 1845|  15.5k|    }
  ------------------
 1986|  1.05M|        break;
 1987|   312k|    case 's':
  ------------------
  |  Branch (1987:5): [True: 312k, False: 21.6M]
  ------------------
 1988|   312k|        MOVE_IN(1);
  ------------------
  |  | 1837|   312k|    ly_in_skip(in, COUNT); \
  |  | 1838|   312k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 312k, False: 0]
  |  |  ------------------
  |  | 1839|   312k|        (*indent)+=COUNT; \
  |  | 1840|   312k|    }
  ------------------
 1989|   312k|        IF_KW("tatus", 5, LY_STMT_STATUS)
  ------------------
  |  | 1842|   312k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 307k, False: 4.47k]
  |  |  ------------------
  |  | 1843|   307k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   307k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   307k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 307k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   307k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   307k|    }
  |  |  ------------------
  |  | 1844|   307k|        (*kw)=STMT; \
  |  | 1845|   307k|    }
  ------------------
 1990|  4.47k|        else IF_KW("ubmodule", 8, LY_STMT_SUBMODULE)
  ------------------
  |  | 1842|  4.47k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 225, False: 4.24k]
  |  |  ------------------
  |  | 1843|    225|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|    225|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|    225|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 225, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|    225|        (*indent)+=COUNT; \
  |  |  |  | 1840|    225|    }
  |  |  ------------------
  |  | 1844|    225|        (*kw)=STMT; \
  |  | 1845|    225|    }
  ------------------
 1991|   312k|        break;
 1992|  2.00M|    case 't':
  ------------------
  |  Branch (1992:5): [True: 2.00M, False: 19.9M]
  ------------------
 1993|  2.00M|        MOVE_IN(1);
  ------------------
  |  | 1837|  2.00M|    ly_in_skip(in, COUNT); \
  |  | 1838|  2.00M|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 2.00M, False: 0]
  |  |  ------------------
  |  | 1839|  2.00M|        (*indent)+=COUNT; \
  |  | 1840|  2.00M|    }
  ------------------
 1994|  2.00M|        IF_KW("ypedef", 6, LY_STMT_TYPEDEF)
  ------------------
  |  | 1842|  2.00M|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 546k, False: 1.46M]
  |  |  ------------------
  |  | 1843|   546k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   546k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   546k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 546k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   546k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   546k|    }
  |  |  ------------------
  |  | 1844|   546k|        (*kw)=STMT; \
  |  | 1845|   546k|    }
  ------------------
 1995|  1.46M|        else IF_KW("ype", 3, LY_STMT_TYPE)
  ------------------
  |  | 1842|  1.46M|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 1.45M, False: 4.60k]
  |  |  ------------------
  |  | 1843|  1.45M|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  1.45M|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  1.45M|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 1.45M, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  1.45M|        (*indent)+=COUNT; \
  |  |  |  | 1840|  1.45M|    }
  |  |  ------------------
  |  | 1844|  1.45M|        (*kw)=STMT; \
  |  | 1845|  1.45M|    }
  ------------------
 1996|  2.00M|        break;
 1997|   304k|    case 'u':
  ------------------
  |  Branch (1997:5): [True: 304k, False: 21.6M]
  ------------------
 1998|   304k|        MOVE_IN(1);
  ------------------
  |  | 1837|   304k|    ly_in_skip(in, COUNT); \
  |  | 1838|   304k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 304k, False: 0]
  |  |  ------------------
  |  | 1839|   304k|        (*indent)+=COUNT; \
  |  | 1840|   304k|    }
  ------------------
 1999|   304k|        IF_KW_PREFIX("ni", 2)
  ------------------
  |  | 1847|   304k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1847:9): [True: 7.02k, False: 297k]
  |  |  ------------------
  |  | 1848|  7.02k|        MOVE_IN(LEN);
  |  |  ------------------
  |  |  |  | 1837|  7.02k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  7.02k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 7.02k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  7.02k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  7.02k|    }
  |  |  ------------------
  ------------------
 2000|  7.02k|            IF_KW("que", 3, LY_STMT_UNIQUE)
  ------------------
  |  | 1842|  7.02k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 917, False: 6.10k]
  |  |  ------------------
  |  | 1843|    917|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|    917|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|    917|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 917, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|    917|        (*indent)+=COUNT; \
  |  |  |  | 1840|    917|    }
  |  |  ------------------
  |  | 1844|    917|        (*kw)=STMT; \
  |  | 1845|    917|    }
  ------------------
 2001|  6.10k|            else IF_KW("ts", 2, LY_STMT_UNITS)
  ------------------
  |  | 1842|  6.10k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 5.57k, False: 535]
  |  |  ------------------
  |  | 1843|  5.57k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  5.57k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  5.57k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 5.57k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  5.57k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  5.57k|    }
  |  |  ------------------
  |  | 1844|  5.57k|        (*kw)=STMT; \
  |  | 1845|  5.57k|    }
  ------------------
 2002|  7.02k|        IF_KW_PREFIX_END
  ------------------
  |  | 1850|  7.02k|    }
  ------------------
 2003|   297k|        else IF_KW("ses", 3, LY_STMT_USES)
  ------------------
  |  | 1842|   297k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 240k, False: 56.5k]
  |  |  ------------------
  |  | 1843|   240k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|   240k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|   240k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 240k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|   240k|        (*indent)+=COUNT; \
  |  |  |  | 1840|   240k|    }
  |  |  ------------------
  |  | 1844|   240k|        (*kw)=STMT; \
  |  | 1845|   240k|    }
  ------------------
 2004|   304k|        break;
 2005|  61.7k|    case 'v':
  ------------------
  |  Branch (2005:5): [True: 61.7k, False: 21.9M]
  ------------------
 2006|  61.7k|        MOVE_IN(1);
  ------------------
  |  | 1837|  61.7k|    ly_in_skip(in, COUNT); \
  |  | 1838|  61.7k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 61.7k, False: 0]
  |  |  ------------------
  |  | 1839|  61.7k|        (*indent)+=COUNT; \
  |  | 1840|  61.7k|    }
  ------------------
 2007|  61.7k|        IF_KW("alue", 4, LY_STMT_VALUE)
  ------------------
  |  | 1842|  61.7k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 44.7k, False: 16.9k]
  |  |  ------------------
  |  | 1843|  44.7k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  44.7k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  44.7k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 44.7k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  44.7k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  44.7k|    }
  |  |  ------------------
  |  | 1844|  44.7k|        (*kw)=STMT; \
  |  | 1845|  44.7k|    }
  ------------------
 2008|  61.7k|        break;
 2009|  9.53k|    case 'w':
  ------------------
  |  Branch (2009:5): [True: 9.53k, False: 21.9M]
  ------------------
 2010|  9.53k|        MOVE_IN(1);
  ------------------
  |  | 1837|  9.53k|    ly_in_skip(in, COUNT); \
  |  | 1838|  9.53k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 9.53k, False: 0]
  |  |  ------------------
  |  | 1839|  9.53k|        (*indent)+=COUNT; \
  |  | 1840|  9.53k|    }
  ------------------
 2011|  9.53k|        IF_KW("hen", 3, LY_STMT_WHEN)
  ------------------
  |  | 1842|  9.53k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 3.26k, False: 6.27k]
  |  |  ------------------
  |  | 1843|  3.26k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  3.26k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  3.26k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 3.26k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  3.26k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  3.26k|    }
  |  |  ------------------
  |  | 1844|  3.26k|        (*kw)=STMT; \
  |  | 1845|  3.26k|    }
  ------------------
 2012|  9.53k|        break;
 2013|   100k|    case 'y':
  ------------------
  |  Branch (2013:5): [True: 100k, False: 21.8M]
  ------------------
 2014|   100k|        MOVE_IN(1);
  ------------------
  |  | 1837|   100k|    ly_in_skip(in, COUNT); \
  |  | 1838|   100k|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 100k, False: 0]
  |  |  ------------------
  |  | 1839|   100k|        (*indent)+=COUNT; \
  |  | 1840|   100k|    }
  ------------------
 2015|   100k|        IF_KW("ang-version", 11, LY_STMT_YANG_VERSION)
  ------------------
  |  | 1842|   100k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 70.3k, False: 30.0k]
  |  |  ------------------
  |  | 1843|  70.3k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  70.3k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  70.3k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 70.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  70.3k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  70.3k|    }
  |  |  ------------------
  |  | 1844|  70.3k|        (*kw)=STMT; \
  |  | 1845|  70.3k|    }
  ------------------
 2016|  30.0k|        else IF_KW("in-element", 10, LY_STMT_YIN_ELEMENT)
  ------------------
  |  | 1842|  30.0k|    if (!strncmp(in->current, STR, LEN)) { \
  |  |  ------------------
  |  |  |  Branch (1842:9): [True: 28.4k, False: 1.56k]
  |  |  ------------------
  |  | 1843|  28.4k|        MOVE_IN(LEN); \
  |  |  ------------------
  |  |  |  | 1837|  28.4k|    ly_in_skip(in, COUNT); \
  |  |  |  | 1838|  28.4k|    if (indent) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1838:9): [True: 28.4k, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1839|  28.4k|        (*indent)+=COUNT; \
  |  |  |  | 1840|  28.4k|    }
  |  |  ------------------
  |  | 1844|  28.4k|        (*kw)=STMT; \
  |  | 1845|  28.4k|    }
  ------------------
 2017|   100k|        break;
 2018|  12.6M|    default:
  ------------------
  |  Branch (2018:5): [True: 12.6M, False: 9.36M]
  ------------------
 2019|       |        /* if indent is not NULL we are matching keyword from YANG data */
 2020|  12.6M|        if (indent) {
  ------------------
  |  Branch (2020:13): [True: 12.6M, False: 0]
  ------------------
 2021|  12.6M|            if (in->current[0] == ';') {
  ------------------
  |  Branch (2021:17): [True: 6.12M, False: 6.50M]
  ------------------
 2022|  6.12M|                MOVE_IN(1);
  ------------------
  |  | 1837|  6.12M|    ly_in_skip(in, COUNT); \
  |  | 1838|  6.12M|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 6.12M, False: 0]
  |  |  ------------------
  |  | 1839|  6.12M|        (*indent)+=COUNT; \
  |  | 1840|  6.12M|    }
  ------------------
 2023|  6.12M|                *kw = LY_STMT_SYNTAX_SEMICOLON;
 2024|  6.50M|            } else if (in->current[0] == '{') {
  ------------------
  |  Branch (2024:24): [True: 3.33M, False: 3.17M]
  ------------------
 2025|  3.33M|                MOVE_IN(1);
  ------------------
  |  | 1837|  3.33M|    ly_in_skip(in, COUNT); \
  |  | 1838|  3.33M|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 3.33M, False: 0]
  |  |  ------------------
  |  | 1839|  3.33M|        (*indent)+=COUNT; \
  |  | 1840|  3.33M|    }
  ------------------
 2026|  3.33M|                *kw = LY_STMT_SYNTAX_LEFT_BRACE;
 2027|  3.33M|            } else if (in->current[0] == '}') {
  ------------------
  |  Branch (2027:24): [True: 3.13M, False: 33.5k]
  ------------------
 2028|  3.13M|                MOVE_IN(1);
  ------------------
  |  | 1837|  3.13M|    ly_in_skip(in, COUNT); \
  |  | 1838|  3.13M|    if (indent) { \
  |  |  ------------------
  |  |  |  Branch (1838:9): [True: 3.13M, False: 0]
  |  |  ------------------
  |  | 1839|  3.13M|        (*indent)+=COUNT; \
  |  | 1840|  3.13M|    }
  ------------------
 2029|  3.13M|                *kw = LY_STMT_SYNTAX_RIGHT_BRACE;
 2030|  3.13M|            }
 2031|  12.6M|        }
 2032|  12.6M|        break;
 2033|  21.9M|    }
 2034|       |
 2035|  21.9M|    if ((*kw < LY_STMT_SYNTAX_SEMICOLON) && isalnum(in->current[0])) {
  ------------------
  |  Branch (2035:9): [True: 9.40M, False: 12.5M]
  ------------------
 2036|       |        /* the keyword is not terminated */
 2037|   237k|        *kw = LY_STMT_NONE;
 2038|   237k|        in->current = start;
 2039|   237k|    }
 2040|       |
 2041|  21.9M|#undef IF_KW
 2042|  21.9M|#undef IF_KW_PREFIX
 2043|  21.9M|#undef IF_KW_PREFIX_END
 2044|  21.9M|#undef MOVE_IN
 2045|       |    /* *INDENT-ON* */
 2046|       |
 2047|  21.9M|    return result;
 2048|  21.9M|}
lysp_ext_find_definition:
 2053|   140k|{
 2054|   140k|    const char *tmp, *name, *prefix;
 2055|   140k|    size_t pref_len, name_len;
 2056|   140k|    LY_ARRAY_COUNT_TYPE u, v;
  ------------------
  |  |  104|   140k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 2057|   140k|    const struct lys_module *mod = NULL;
 2058|   140k|    const struct lysp_submodule *submod;
 2059|       |
 2060|   140k|    if (ext_def) {
  ------------------
  |  Branch (2060:9): [True: 126k, False: 14.0k]
  ------------------
 2061|   126k|        *ext_def = NULL;
 2062|   126k|    }
 2063|       |
 2064|       |    /* parse the prefix, the nodeid was previously already parsed and checked */
 2065|   140k|    tmp = ext->name;
 2066|   140k|    ly_parse_nodeid(&tmp, &prefix, &pref_len, &name, &name_len);
 2067|       |
 2068|       |    /* get module where the extension definition should be placed */
 2069|   140k|    *ext_mod = mod = ly_resolve_prefix(ctx, prefix, pref_len, ext->format, ext->prefix_data);
 2070|   140k|    if (!mod) {
  ------------------
  |  Branch (2070:9): [True: 0, False: 140k]
  ------------------
 2071|      0|        LOGVAL(ctx, LYVE_REFERENCE, "Invalid prefix \"%.*s\" used for extension instance identifier.", (int)pref_len, prefix);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2072|      0|        return LY_EVALID;
 2073|   140k|    } else if (!mod->parsed->extensions) {
  ------------------
  |  Branch (2073:16): [True: 0, False: 140k]
  ------------------
 2074|      0|        LOGVAL(ctx, LYVE_REFERENCE, "Extension instance \"%s\" refers \"%s\" module that does not contain extension definitions.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2075|      0|                ext->name, mod->name);
 2076|      0|        return LY_EVALID;
 2077|      0|    }
 2078|       |
 2079|   140k|    if (!ext_def) {
  ------------------
  |  Branch (2079:9): [True: 14.0k, False: 126k]
  ------------------
 2080|       |        /* we are done */
 2081|  14.0k|        return LY_SUCCESS;
 2082|  14.0k|    }
 2083|       |
 2084|       |    /* find the parsed extension definition there */
 2085|   126k|    LY_ARRAY_FOR(mod->parsed->extensions, v) {
  ------------------
  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   126k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   126k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 126k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 126k, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2086|   126k|        if (!strcmp(name, mod->parsed->extensions[v].name)) {
  ------------------
  |  Branch (2086:13): [True: 126k, False: 0]
  ------------------
 2087|   126k|            *ext_def = &mod->parsed->extensions[v];
 2088|   126k|            break;
 2089|   126k|        }
 2090|   126k|    }
 2091|   126k|    if (!*ext_def) {
  ------------------
  |  Branch (2091:9): [True: 0, False: 126k]
  ------------------
 2092|      0|        LY_ARRAY_FOR(mod->parsed->includes, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2093|      0|            submod = mod->parsed->includes[u].submodule;
 2094|      0|            LY_ARRAY_FOR(submod->extensions, v) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2095|      0|                if (!strcmp(name, submod->extensions[v].name)) {
  ------------------
  |  Branch (2095:21): [True: 0, False: 0]
  ------------------
 2096|      0|                    *ext_def = &submod->extensions[v];
 2097|      0|                    break;
 2098|      0|                }
 2099|      0|            }
 2100|      0|        }
 2101|      0|    }
 2102|       |
 2103|   126k|    if (!*ext_def) {
  ------------------
  |  Branch (2103:9): [True: 0, False: 126k]
  ------------------
 2104|      0|        LOGVAL(ctx, LYVE_REFERENCE, "Extension definition of extension instance \"%s\" not found.", ext->name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2105|      0|        return LY_EVALID;
 2106|      0|    }
 2107|       |
 2108|   126k|    return LY_SUCCESS;
 2109|   126k|}
lysp_ext_instance_resolve_argument:
 2113|   126k|{
 2114|   126k|    assert(ext_p->def);
 2115|       |
 2116|   126k|    if (!ext_p->def->argname || ext_p->argument) {
  ------------------
  |  Branch (2116:9): [True: 0, False: 126k]
  |  Branch (2116:33): [True: 126k, False: 0]
  ------------------
 2117|       |        /* nothing to do */
 2118|   126k|        return LY_SUCCESS;
 2119|   126k|    }
 2120|       |
 2121|      0|    if (ext_p->format == LY_VALUE_XML) {
  ------------------
  |  Branch (2121:9): [True: 0, False: 0]
  ------------------
 2122|       |        /* schema was parsed from YIN and an argument is expected, ... */
 2123|      0|        struct lysp_stmt *stmt = NULL;
 2124|       |
 2125|      0|        if (ext_p->def->flags & LYS_YINELEM_TRUE) {
  ------------------
  |  |  681|      0|#define LYS_YINELEM_TRUE 0x80        /**< yin-element true for extension's argument */
  ------------------
  |  Branch (2125:13): [True: 0, False: 0]
  ------------------
 2126|       |            /* ... argument was the first XML child element */
 2127|      0|            for (stmt = ext_p->child; stmt && (stmt->flags & LYS_YIN_ATTR); stmt = stmt->next) {}
  ------------------
  |  |  711|      0|#define LYS_YIN_ATTR     0x0400      /**< flag to identify YIN attribute parsed as extension's substatement, only when the source is YIN */
  ------------------
  |  Branch (2127:39): [True: 0, False: 0]
  |  Branch (2127:47): [True: 0, False: 0]
  ------------------
 2128|      0|            if (stmt) {
  ------------------
  |  Branch (2128:17): [True: 0, False: 0]
  ------------------
 2129|      0|                const char *arg, *ext, *name_arg, *name_ext, *prefix_arg, *prefix_ext;
 2130|      0|                size_t name_arg_len, name_ext_len, prefix_arg_len, prefix_ext_len;
 2131|       |
 2132|      0|                stmt = ext_p->child;
 2133|       |
 2134|      0|                arg = stmt->stmt;
 2135|      0|                ly_parse_nodeid(&arg, &prefix_arg, &prefix_arg_len, &name_arg, &name_arg_len);
 2136|      0|                if (ly_strncmp(ext_p->def->argname, name_arg, name_arg_len)) {
  ------------------
  |  Branch (2136:21): [True: 0, False: 0]
  ------------------
 2137|      0|                    LOGVAL(ctx, LYVE_SEMANTICS, "Extension instance \"%s\" expects argument element \"%s\" as its first XML child, "
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2138|      0|                            "but \"%.*s\" element found.", ext_p->name, ext_p->def->argname, (int)name_arg_len, name_arg);
 2139|      0|                    return LY_EVALID;
 2140|      0|                }
 2141|       |
 2142|       |                /* check namespace - all the extension instances must be qualified and argument element is expected in the same
 2143|       |                 * namespace. Do not check just prefixes, there can be different prefixes pointing to the same namespace */
 2144|      0|                ext = ext_p->name; /* include prefix */
 2145|      0|                ly_parse_nodeid(&ext, &prefix_ext, &prefix_ext_len, &name_ext, &name_ext_len);
 2146|       |
 2147|      0|                if (ly_resolve_prefix(ctx, prefix_ext, prefix_ext_len, ext_p->format, ext_p->prefix_data) !=
  ------------------
  |  Branch (2147:21): [True: 0, False: 0]
  ------------------
 2148|      0|                        ly_resolve_prefix(ctx, prefix_arg, prefix_arg_len, stmt->format, stmt->prefix_data)) {
 2149|      0|                    LOGVAL(ctx, LYVE_SEMANTICS, "Extension instance \"%s\" element and its argument element \"%s\" are "
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2150|      0|                            "expected in the same namespace, but they differ.", ext_p->name, ext_p->def->argname);
 2151|      0|                    return LY_EVALID;
 2152|      0|                }
 2153|      0|            }
 2154|      0|        } else {
 2155|       |            /* ... argument was one of the XML attributes which are represented as child stmt with LYS_YIN_ATTR flag */
 2156|      0|            for (stmt = ext_p->child; stmt && (stmt->flags & LYS_YIN_ATTR); stmt = stmt->next) {
  ------------------
  |  |  711|      0|#define LYS_YIN_ATTR     0x0400      /**< flag to identify YIN attribute parsed as extension's substatement, only when the source is YIN */
  ------------------
  |  Branch (2156:39): [True: 0, False: 0]
  |  Branch (2156:47): [True: 0, False: 0]
  ------------------
 2157|      0|                if (!strcmp(stmt->stmt, ext_p->def->argname)) {
  ------------------
  |  Branch (2157:21): [True: 0, False: 0]
  ------------------
 2158|       |                    /* this is the extension's argument */
 2159|      0|                    break;
 2160|      0|                }
 2161|      0|            }
 2162|      0|        }
 2163|       |
 2164|      0|        if (stmt) {
  ------------------
  |  Branch (2164:13): [True: 0, False: 0]
  ------------------
 2165|      0|            LY_CHECK_RET(lydict_insert(ctx, stmt->arg, 0, &ext_p->argument));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2166|      0|            stmt->flags |= LYS_YIN_ARGUMENT;
  ------------------
  |  |  712|      0|#define LYS_YIN_ARGUMENT 0x0800      /**< flag to identify statement representing extension's argument, only when the source is YIN */
  ------------------
 2167|      0|        }
 2168|      0|    }
 2169|       |
 2170|      0|    if (!ext_p->argument) {
  ------------------
  |  Branch (2170:9): [True: 0, False: 0]
  ------------------
 2171|       |        /* missing extension's argument */
 2172|      0|        LOGVAL(ctx, LYVE_SEMANTICS, "Extension instance \"%s\" missing argument %s\"%s\".",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (178:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2173|      0|                ext_p->name, (ext_p->def->flags & LYS_YINELEM_TRUE) ? "element " : "", ext_p->def->argname);
 2174|      0|        return LY_EVALID;
 2175|      0|    }
 2176|       |
 2177|      0|    return LY_SUCCESS;
 2178|      0|}
lysc_data_node:
 2196|   196k|{
 2197|   196k|    const struct lysc_node *parent;
 2198|       |
 2199|   196k|    parent = schema;
 2200|   224k|    while (parent && !(parent->nodetype & (LYS_CONTAINER | LYS_LEAF | LYS_LEAFLIST | LYS_LIST | LYS_ANYDATA | LYS_RPC |
  ------------------
  |  |  240|   224k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
                  while (parent && !(parent->nodetype & (LYS_CONTAINER | LYS_LEAF | LYS_LEAFLIST | LYS_LIST | LYS_ANYDATA | LYS_RPC |
  ------------------
  |  |  242|   224k|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
                  while (parent && !(parent->nodetype & (LYS_CONTAINER | LYS_LEAF | LYS_LEAFLIST | LYS_LIST | LYS_ANYDATA | LYS_RPC |
  ------------------
  |  |  243|   224k|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
                  while (parent && !(parent->nodetype & (LYS_CONTAINER | LYS_LEAF | LYS_LEAFLIST | LYS_LIST | LYS_ANYDATA | LYS_RPC |
  ------------------
  |  |  244|   224k|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
                  while (parent && !(parent->nodetype & (LYS_CONTAINER | LYS_LEAF | LYS_LEAFLIST | LYS_LIST | LYS_ANYDATA | LYS_RPC |
  ------------------
  |  |  246|   224k|#define LYS_ANYDATA     0x0060    /**< anydata statement node, in tests it can be used for both #LYS_ANYXML and #LYS_ANYDATA */
  ------------------
                  while (parent && !(parent->nodetype & (LYS_CONTAINER | LYS_LEAF | LYS_LEAFLIST | LYS_LIST | LYS_ANYDATA | LYS_RPC |
  ------------------
  |  |  249|   224k|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
  |  Branch (2200:12): [True: 224k, False: 0]
  |  Branch (2200:22): [True: 28.1k, False: 196k]
  ------------------
 2201|   224k|            LYS_ACTION | LYS_NOTIF))) {
  ------------------
  |  |  250|   224k|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
                          LYS_ACTION | LYS_NOTIF))) {
  ------------------
  |  |  251|   224k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
 2202|  28.1k|        parent = parent->parent;
 2203|  28.1k|    }
 2204|       |
 2205|   196k|    return parent;
 2206|   196k|}
lys_has_compiled:
 2228|   238k|{
 2229|   238k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   238k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 2230|       |
 2231|   238k|    if (LYSP_HAS_COMPILED(mod->parsed)) {
  ------------------
  |  |  672|   238k|        (LYSP_HAS_RECOMPILED(PMOD) || PMOD->augments || PMOD->deviations)
  |  |  ------------------
  |  |  |  |  655|   477k|        (PMOD->data || PMOD->rpcs || PMOD->notifs || PMOD->exts)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (655:10): [True: 56.2k, False: 182k]
  |  |  |  |  |  Branch (655:24): [True: 0, False: 182k]
  |  |  |  |  |  Branch (655:38): [True: 0, False: 182k]
  |  |  |  |  |  Branch (655:54): [True: 28.1k, False: 154k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (672:39): [True: 0, False: 154k]
  |  |  |  Branch (672:57): [True: 0, False: 154k]
  |  |  ------------------
  ------------------
 2232|  84.3k|        return 1;
 2233|  84.3k|    }
 2234|       |
 2235|   154k|    LY_ARRAY_FOR(mod->parsed->includes, u) {
  ------------------
  |  |  167|   154k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   154k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   154k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   154k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   154k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   154k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 154k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 154k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   154k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2236|      0|        if (LYSP_HAS_COMPILED(mod->parsed->includes[u].submodule)) {
  ------------------
  |  |  672|      0|        (LYSP_HAS_RECOMPILED(PMOD) || PMOD->augments || PMOD->deviations)
  |  |  ------------------
  |  |  |  |  655|      0|        (PMOD->data || PMOD->rpcs || PMOD->notifs || PMOD->exts)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (655:10): [True: 0, False: 0]
  |  |  |  |  |  Branch (655:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (655:38): [True: 0, False: 0]
  |  |  |  |  |  Branch (655:54): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (672:39): [True: 0, False: 0]
  |  |  |  Branch (672:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2237|      0|            return 1;
 2238|      0|        }
 2239|      0|    }
 2240|       |
 2241|   154k|    return 0;
 2242|   154k|}
lys_has_dep_mods:
 2246|  84.3k|{
 2247|  84.3k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|  84.3k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 2248|       |
 2249|       |    /* features */
 2250|  84.3k|    if (mod->parsed->features) {
  ------------------
  |  Branch (2250:9): [True: 0, False: 84.3k]
  ------------------
 2251|      0|        return 1;
 2252|      0|    }
 2253|       |
 2254|       |    /* groupings */
 2255|  84.3k|    if (mod->parsed->groupings) {
  ------------------
  |  Branch (2255:9): [True: 0, False: 84.3k]
  ------------------
 2256|      0|        return 1;
 2257|      0|    }
 2258|  84.3k|    LY_ARRAY_FOR(mod->parsed->includes, u) {
  ------------------
  |  |  167|  84.3k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  84.3k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  84.3k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  84.3k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  84.3k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  84.3k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 84.3k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 84.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  84.3k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2259|      0|        if (mod->parsed->includes[u].submodule->groupings) {
  ------------------
  |  Branch (2259:13): [True: 0, False: 0]
  ------------------
 2260|      0|            return 1;
 2261|      0|        }
 2262|      0|    }
 2263|       |
 2264|       |    /* augments (adding nodes with leafrefs) */
 2265|  84.3k|    if (mod->parsed->augments) {
  ------------------
  |  Branch (2265:9): [True: 0, False: 84.3k]
  ------------------
 2266|      0|        return 1;
 2267|      0|    }
 2268|  84.3k|    LY_ARRAY_FOR(mod->parsed->includes, u) {
  ------------------
  |  |  167|  84.3k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|  84.3k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|  84.3k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|  84.3k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|  84.3k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|  84.3k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 84.3k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 84.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|  84.3k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2269|      0|        if (mod->parsed->includes[u].submodule->augments) {
  ------------------
  |  Branch (2269:13): [True: 0, False: 0]
  ------------------
 2270|      0|            return 1;
 2271|      0|        }
 2272|      0|    }
 2273|       |
 2274|  84.3k|    return 0;
 2275|  84.3k|}
lys_stmt_str:
 2279|  1.79k|{
 2280|  1.79k|    switch (stmt) {
  ------------------
  |  Branch (2280:13): [True: 0, False: 1.79k]
  ------------------
 2281|      0|    case LY_STMT_NONE:
  ------------------
  |  Branch (2281:5): [True: 0, False: 1.79k]
  ------------------
 2282|      0|        return NULL;
 2283|      1|    case LY_STMT_ACTION:
  ------------------
  |  Branch (2283:5): [True: 1, False: 1.79k]
  ------------------
 2284|      1|        return "action";
 2285|      2|    case LY_STMT_ANYDATA:
  ------------------
  |  Branch (2285:5): [True: 2, False: 1.79k]
  ------------------
 2286|      2|        return "anydata";
 2287|     27|    case LY_STMT_ANYXML:
  ------------------
  |  Branch (2287:5): [True: 27, False: 1.76k]
  ------------------
 2288|     27|        return "anyxml";
 2289|     13|    case LY_STMT_ARGUMENT:
  ------------------
  |  Branch (2289:5): [True: 13, False: 1.78k]
  ------------------
 2290|     13|        return "argument";
 2291|      0|    case LY_STMT_ARG_TEXT:
  ------------------
  |  Branch (2291:5): [True: 0, False: 1.79k]
  ------------------
 2292|      0|        return "text";
 2293|      0|    case LY_STMT_ARG_VALUE:
  ------------------
  |  Branch (2293:5): [True: 0, False: 1.79k]
  ------------------
 2294|      0|        return "value";
 2295|      2|    case LY_STMT_AUGMENT:
  ------------------
  |  Branch (2295:5): [True: 2, False: 1.79k]
  ------------------
 2296|      2|        return "augment";
 2297|     29|    case LY_STMT_BASE:
  ------------------
  |  Branch (2297:5): [True: 29, False: 1.76k]
  ------------------
 2298|     29|        return "base";
 2299|      2|    case LY_STMT_BELONGS_TO:
  ------------------
  |  Branch (2299:5): [True: 2, False: 1.79k]
  ------------------
 2300|      2|        return "belongs-to";
 2301|     26|    case LY_STMT_BIT:
  ------------------
  |  Branch (2301:5): [True: 26, False: 1.77k]
  ------------------
 2302|     26|        return "bit";
 2303|     29|    case LY_STMT_CASE:
  ------------------
  |  Branch (2303:5): [True: 29, False: 1.76k]
  ------------------
 2304|     29|        return "case";
 2305|     22|    case LY_STMT_CHOICE:
  ------------------
  |  Branch (2305:5): [True: 22, False: 1.77k]
  ------------------
 2306|     22|        return "choice";
 2307|      5|    case LY_STMT_CONFIG:
  ------------------
  |  Branch (2307:5): [True: 5, False: 1.79k]
  ------------------
 2308|      5|        return "config";
 2309|      5|    case LY_STMT_CONTACT:
  ------------------
  |  Branch (2309:5): [True: 5, False: 1.79k]
  ------------------
 2310|      5|        return "contact";
 2311|     18|    case LY_STMT_CONTAINER:
  ------------------
  |  Branch (2311:5): [True: 18, False: 1.77k]
  ------------------
 2312|     18|        return "container";
 2313|     16|    case LY_STMT_DEFAULT:
  ------------------
  |  Branch (2313:5): [True: 16, False: 1.78k]
  ------------------
 2314|     16|        return "default";
 2315|     10|    case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (2315:5): [True: 10, False: 1.78k]
  ------------------
 2316|     10|        return "description";
 2317|     11|    case LY_STMT_DEVIATE:
  ------------------
  |  Branch (2317:5): [True: 11, False: 1.78k]
  ------------------
 2318|     11|        return "deviate";
 2319|     32|    case LY_STMT_DEVIATION:
  ------------------
  |  Branch (2319:5): [True: 32, False: 1.76k]
  ------------------
 2320|     32|        return "deviation";
 2321|     58|    case LY_STMT_ENUM:
  ------------------
  |  Branch (2321:5): [True: 58, False: 1.73k]
  ------------------
 2322|     58|        return "enum";
 2323|      3|    case LY_STMT_ERROR_APP_TAG:
  ------------------
  |  Branch (2323:5): [True: 3, False: 1.79k]
  ------------------
 2324|      3|        return "error-app-tag";
 2325|      5|    case LY_STMT_ERROR_MESSAGE:
  ------------------
  |  Branch (2325:5): [True: 5, False: 1.79k]
  ------------------
 2326|      5|        return "error-message";
 2327|     12|    case LY_STMT_EXTENSION:
  ------------------
  |  Branch (2327:5): [True: 12, False: 1.78k]
  ------------------
 2328|     12|        return "extension";
 2329|      0|    case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (2329:5): [True: 0, False: 1.79k]
  ------------------
 2330|      0|        return NULL;
 2331|     13|    case LY_STMT_FEATURE:
  ------------------
  |  Branch (2331:5): [True: 13, False: 1.78k]
  ------------------
 2332|     13|        return "feature";
 2333|      5|    case LY_STMT_FRACTION_DIGITS:
  ------------------
  |  Branch (2333:5): [True: 5, False: 1.79k]
  ------------------
 2334|      5|        return "fraction-digits";
 2335|     16|    case LY_STMT_GROUPING:
  ------------------
  |  Branch (2335:5): [True: 16, False: 1.78k]
  ------------------
 2336|     16|        return "grouping";
 2337|     16|    case LY_STMT_IDENTITY:
  ------------------
  |  Branch (2337:5): [True: 16, False: 1.78k]
  ------------------
 2338|     16|        return "identity";
 2339|      8|    case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (2339:5): [True: 8, False: 1.78k]
  ------------------
 2340|      8|        return "if-feature";
 2341|     12|    case LY_STMT_IMPORT:
  ------------------
  |  Branch (2341:5): [True: 12, False: 1.78k]
  ------------------
 2342|     12|        return "import";
 2343|     14|    case LY_STMT_INCLUDE:
  ------------------
  |  Branch (2343:5): [True: 14, False: 1.78k]
  ------------------
 2344|     14|        return "include";
 2345|     16|    case LY_STMT_INPUT:
  ------------------
  |  Branch (2345:5): [True: 16, False: 1.78k]
  ------------------
 2346|     16|        return "input";
 2347|      3|    case LY_STMT_KEY:
  ------------------
  |  Branch (2347:5): [True: 3, False: 1.79k]
  ------------------
 2348|      3|        return "key";
 2349|     26|    case LY_STMT_LEAF:
  ------------------
  |  Branch (2349:5): [True: 26, False: 1.77k]
  ------------------
 2350|     26|        return "leaf";
 2351|     14|    case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (2351:5): [True: 14, False: 1.78k]
  ------------------
 2352|     14|        return "leaf-list";
 2353|      2|    case LY_STMT_LENGTH:
  ------------------
  |  Branch (2353:5): [True: 2, False: 1.79k]
  ------------------
 2354|      2|        return "length";
 2355|     43|    case LY_STMT_LIST:
  ------------------
  |  Branch (2355:5): [True: 43, False: 1.75k]
  ------------------
 2356|     43|        return "list";
 2357|      9|    case LY_STMT_MANDATORY:
  ------------------
  |  Branch (2357:5): [True: 9, False: 1.78k]
  ------------------
 2358|      9|        return "mandatory";
 2359|      7|    case LY_STMT_MAX_ELEMENTS:
  ------------------
  |  Branch (2359:5): [True: 7, False: 1.78k]
  ------------------
 2360|      7|        return "max-elements";
 2361|      7|    case LY_STMT_MIN_ELEMENTS:
  ------------------
  |  Branch (2361:5): [True: 7, False: 1.78k]
  ------------------
 2362|      7|        return "min-elements";
 2363|      2|    case LY_STMT_MODIFIER:
  ------------------
  |  Branch (2363:5): [True: 2, False: 1.79k]
  ------------------
 2364|      2|        return "modifier";
 2365|    110|    case LY_STMT_MODULE:
  ------------------
  |  Branch (2365:5): [True: 110, False: 1.68k]
  ------------------
 2366|    110|        return "module";
 2367|    391|    case LY_STMT_MUST:
  ------------------
  |  Branch (2367:5): [True: 391, False: 1.40k]
  ------------------
 2368|    391|        return "must";
 2369|      4|    case LY_STMT_NAMESPACE:
  ------------------
  |  Branch (2369:5): [True: 4, False: 1.79k]
  ------------------
 2370|      4|        return "namespace";
 2371|      1|    case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (2371:5): [True: 1, False: 1.79k]
  ------------------
 2372|      1|        return "notification";
 2373|      6|    case LY_STMT_ORDERED_BY:
  ------------------
  |  Branch (2373:5): [True: 6, False: 1.79k]
  ------------------
 2374|      6|        return "ordered-by";
 2375|      3|    case LY_STMT_ORGANIZATION:
  ------------------
  |  Branch (2375:5): [True: 3, False: 1.79k]
  ------------------
 2376|      3|        return "organization";
 2377|      6|    case LY_STMT_OUTPUT:
  ------------------
  |  Branch (2377:5): [True: 6, False: 1.79k]
  ------------------
 2378|      6|        return "output";
 2379|     23|    case LY_STMT_PATH:
  ------------------
  |  Branch (2379:5): [True: 23, False: 1.77k]
  ------------------
 2380|     23|        return "path";
 2381|      9|    case LY_STMT_PATTERN:
  ------------------
  |  Branch (2381:5): [True: 9, False: 1.78k]
  ------------------
 2382|      9|        return "pattern";
 2383|     78|    case LY_STMT_POSITION:
  ------------------
  |  Branch (2383:5): [True: 78, False: 1.71k]
  ------------------
 2384|     78|        return "position";
 2385|     11|    case LY_STMT_PREFIX:
  ------------------
  |  Branch (2385:5): [True: 11, False: 1.78k]
  ------------------
 2386|     11|        return "prefix";
 2387|     14|    case LY_STMT_PRESENCE:
  ------------------
  |  Branch (2387:5): [True: 14, False: 1.78k]
  ------------------
 2388|     14|        return "presence";
 2389|      4|    case LY_STMT_RANGE:
  ------------------
  |  Branch (2389:5): [True: 4, False: 1.79k]
  ------------------
 2390|      4|        return "range";
 2391|     15|    case LY_STMT_REFERENCE:
  ------------------
  |  Branch (2391:5): [True: 15, False: 1.78k]
  ------------------
 2392|     15|        return "reference";
 2393|     32|    case LY_STMT_REFINE:
  ------------------
  |  Branch (2393:5): [True: 32, False: 1.76k]
  ------------------
 2394|     32|        return "refine";
 2395|      6|    case LY_STMT_REQUIRE_INSTANCE:
  ------------------
  |  Branch (2395:5): [True: 6, False: 1.79k]
  ------------------
 2396|      6|        return "require-instance";
 2397|     17|    case LY_STMT_REVISION:
  ------------------
  |  Branch (2397:5): [True: 17, False: 1.77k]
  ------------------
 2398|     17|        return "revision";
 2399|      4|    case LY_STMT_REVISION_DATE:
  ------------------
  |  Branch (2399:5): [True: 4, False: 1.79k]
  ------------------
 2400|      4|        return "revision-date";
 2401|      9|    case LY_STMT_RPC:
  ------------------
  |  Branch (2401:5): [True: 9, False: 1.78k]
  ------------------
 2402|      9|        return "rpc";
 2403|     23|    case LY_STMT_STATUS:
  ------------------
  |  Branch (2403:5): [True: 23, False: 1.77k]
  ------------------
 2404|     23|        return "status";
 2405|      6|    case LY_STMT_SUBMODULE:
  ------------------
  |  Branch (2405:5): [True: 6, False: 1.79k]
  ------------------
 2406|      6|        return "submodule";
 2407|     45|    case LY_STMT_SYNTAX_LEFT_BRACE:
  ------------------
  |  Branch (2407:5): [True: 45, False: 1.75k]
  ------------------
 2408|     45|        return "{";
 2409|     21|    case LY_STMT_SYNTAX_RIGHT_BRACE:
  ------------------
  |  Branch (2409:5): [True: 21, False: 1.77k]
  ------------------
 2410|     21|        return "}";
 2411|    134|    case LY_STMT_SYNTAX_SEMICOLON:
  ------------------
  |  Branch (2411:5): [True: 134, False: 1.66k]
  ------------------
 2412|    134|        return ";";
 2413|     67|    case LY_STMT_TYPE:
  ------------------
  |  Branch (2413:5): [True: 67, False: 1.72k]
  ------------------
 2414|     67|        return "type";
 2415|     10|    case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (2415:5): [True: 10, False: 1.78k]
  ------------------
 2416|     10|        return "typedef";
 2417|     24|    case LY_STMT_UNIQUE:
  ------------------
  |  Branch (2417:5): [True: 24, False: 1.77k]
  ------------------
 2418|     24|        return "unique";
 2419|      8|    case LY_STMT_UNITS:
  ------------------
  |  Branch (2419:5): [True: 8, False: 1.78k]
  ------------------
 2420|      8|        return "units";
 2421|     25|    case LY_STMT_USES:
  ------------------
  |  Branch (2421:5): [True: 25, False: 1.77k]
  ------------------
 2422|     25|        return "uses";
 2423|     80|    case LY_STMT_VALUE:
  ------------------
  |  Branch (2423:5): [True: 80, False: 1.71k]
  ------------------
 2424|     80|        return "value";
 2425|     46|    case LY_STMT_WHEN:
  ------------------
  |  Branch (2425:5): [True: 46, False: 1.75k]
  ------------------
 2426|     46|        return "when";
 2427|     19|    case LY_STMT_YANG_VERSION:
  ------------------
  |  Branch (2427:5): [True: 19, False: 1.77k]
  ------------------
 2428|     19|        return "yang-version";
 2429|      4|    case LY_STMT_YIN_ELEMENT:
  ------------------
  |  Branch (2429:5): [True: 4, False: 1.79k]
  ------------------
 2430|      4|        return "yin-element";
 2431|  1.79k|    }
 2432|       |
 2433|      0|    return NULL;
 2434|  1.79k|}
tree_schema_common.c:lysp_type_str2builtin:
  164|  1.53M|{
  165|  1.53M|    if (len >= 4) { /* otherwise it does not match any built-in type */
  ------------------
  |  Branch (165:9): [True: 1.51M, False: 14.0k]
  ------------------
  166|  1.51M|        if (name[0] == 'b') {
  ------------------
  |  Branch (166:13): [True: 28.1k, False: 1.49M]
  ------------------
  167|  28.1k|            if (name[1] == 'i') {
  ------------------
  |  Branch (167:17): [True: 0, False: 28.1k]
  ------------------
  168|      0|                if ((len == 6) && !strncmp(&name[2], "nary", 4)) {
  ------------------
  |  Branch (168:21): [True: 0, False: 0]
  |  Branch (168:35): [True: 0, False: 0]
  ------------------
  169|      0|                    return LY_TYPE_BINARY;
  170|      0|                } else if ((len == 4) && !strncmp(&name[2], "ts", 2)) {
  ------------------
  |  Branch (170:28): [True: 0, False: 0]
  |  Branch (170:42): [True: 0, False: 0]
  ------------------
  171|      0|                    return LY_TYPE_BITS;
  172|      0|                }
  173|  28.1k|            } else if ((len == 7) && !strncmp(&name[1], "oolean", 6)) {
  ------------------
  |  Branch (173:24): [True: 28.1k, False: 0]
  |  Branch (173:38): [True: 28.1k, False: 0]
  ------------------
  174|  28.1k|                return LY_TYPE_BOOL;
  175|  28.1k|            }
  176|  1.49M|        } else if (name[0] == 'd') {
  ------------------
  |  Branch (176:20): [True: 70.2k, False: 1.41M]
  ------------------
  177|  70.2k|            if ((len == 9) && !strncmp(&name[1], "ecimal64", 8)) {
  ------------------
  |  Branch (177:17): [True: 0, False: 70.2k]
  |  Branch (177:31): [True: 0, False: 0]
  ------------------
  178|      0|                return LY_TYPE_DEC64;
  179|      0|            }
  180|  1.41M|        } else if (name[0] == 'e') {
  ------------------
  |  Branch (180:20): [True: 98.4k, False: 1.32M]
  ------------------
  181|  98.4k|            if ((len == 5) && !strncmp(&name[1], "mpty", 4)) {
  ------------------
  |  Branch (181:17): [True: 56.2k, False: 42.1k]
  |  Branch (181:31): [True: 56.2k, False: 0]
  ------------------
  182|  56.2k|                return LY_TYPE_EMPTY;
  183|  56.2k|            } else if ((len == 11) && !strncmp(&name[1], "numeration", 10)) {
  ------------------
  |  Branch (183:24): [True: 42.1k, False: 0]
  |  Branch (183:39): [True: 42.1k, False: 0]
  ------------------
  184|  42.1k|                return LY_TYPE_ENUM;
  185|  42.1k|            }
  186|  1.32M|        } else if (name[0] == 'i') {
  ------------------
  |  Branch (186:20): [True: 210k, False: 1.11M]
  ------------------
  187|   210k|            if (name[1] == 'n') {
  ------------------
  |  Branch (187:17): [True: 42.1k, False: 168k]
  ------------------
  188|  42.1k|                if ((len == 4) && !strncmp(&name[2], "t8", 2)) {
  ------------------
  |  Branch (188:21): [True: 0, False: 42.1k]
  |  Branch (188:35): [True: 0, False: 0]
  ------------------
  189|      0|                    return LY_TYPE_INT8;
  190|  42.1k|                } else if (len == 5) {
  ------------------
  |  Branch (190:28): [True: 0, False: 42.1k]
  ------------------
  191|      0|                    if (!strncmp(&name[2], "t16", 3)) {
  ------------------
  |  Branch (191:25): [True: 0, False: 0]
  ------------------
  192|      0|                        return LY_TYPE_INT16;
  193|      0|                    } else if (!strncmp(&name[2], "t32", 3)) {
  ------------------
  |  Branch (193:32): [True: 0, False: 0]
  ------------------
  194|      0|                        return LY_TYPE_INT32;
  195|      0|                    } else if (!strncmp(&name[2], "t64", 3)) {
  ------------------
  |  Branch (195:32): [True: 0, False: 0]
  ------------------
  196|      0|                        return LY_TYPE_INT64;
  197|      0|                    }
  198|  42.1k|                } else if ((len == 19) && !strncmp(&name[2], "stance-identifier", 17)) {
  ------------------
  |  Branch (198:28): [True: 0, False: 42.1k]
  |  Branch (198:43): [True: 0, False: 0]
  ------------------
  199|      0|                    return LY_TYPE_INST;
  200|      0|                }
  201|   168k|            } else if ((len == 11) && !strncmp(&name[1], "dentityref", 10)) {
  ------------------
  |  Branch (201:24): [True: 42.1k, False: 126k]
  |  Branch (201:39): [True: 14.0k, False: 28.1k]
  ------------------
  202|  14.0k|                return LY_TYPE_IDENT;
  203|  14.0k|            }
  204|  1.11M|        } else if (name[0] == 'l') {
  ------------------
  |  Branch (204:20): [True: 70.2k, False: 1.04M]
  ------------------
  205|  70.2k|            if ((len == 7) && !strncmp(&name[1], "eafref", 6)) {
  ------------------
  |  Branch (205:17): [True: 70.2k, False: 0]
  |  Branch (205:31): [True: 70.2k, False: 0]
  ------------------
  206|  70.2k|                return LY_TYPE_LEAFREF;
  207|  70.2k|            }
  208|  1.04M|        } else if (name[0] == 's') {
  ------------------
  |  Branch (208:20): [True: 520k, False: 520k]
  ------------------
  209|   520k|            if ((len == 6) && !strncmp(&name[1], "tring", 5)) {
  ------------------
  |  Branch (209:17): [True: 520k, False: 0]
  |  Branch (209:31): [True: 520k, False: 0]
  ------------------
  210|   520k|                return LY_TYPE_STRING;
  211|   520k|            }
  212|   520k|        } else if (name[0] == 'u') {
  ------------------
  |  Branch (212:20): [True: 154k, False: 365k]
  ------------------
  213|   154k|            if (name[1] == 'n') {
  ------------------
  |  Branch (213:17): [True: 112k, False: 42.1k]
  ------------------
  214|   112k|                if ((len == 5) && !strncmp(&name[2], "ion", 3)) {
  ------------------
  |  Branch (214:21): [True: 112k, False: 0]
  |  Branch (214:35): [True: 112k, False: 0]
  ------------------
  215|   112k|                    return LY_TYPE_UNION;
  216|   112k|                }
  217|   112k|            } else if ((name[1] == 'i') && (name[2] == 'n') && (name[3] == 't')) {
  ------------------
  |  Branch (217:24): [True: 28.1k, False: 14.0k]
  |  Branch (217:44): [True: 28.1k, False: 0]
  |  Branch (217:64): [True: 28.1k, False: 0]
  ------------------
  218|  28.1k|                if ((len == 5) && (name[4] == '8')) {
  ------------------
  |  Branch (218:21): [True: 0, False: 28.1k]
  |  Branch (218:35): [True: 0, False: 0]
  ------------------
  219|      0|                    return LY_TYPE_UINT8;
  220|  28.1k|                } else if (len == 6) {
  ------------------
  |  Branch (220:28): [True: 28.1k, False: 0]
  ------------------
  221|  28.1k|                    if (!strncmp(&name[4], "16", 2)) {
  ------------------
  |  Branch (221:25): [True: 0, False: 28.1k]
  ------------------
  222|      0|                        return LY_TYPE_UINT16;
  223|  28.1k|                    } else if (!strncmp(&name[4], "32", 2)) {
  ------------------
  |  Branch (223:32): [True: 28.1k, False: 0]
  ------------------
  224|  28.1k|                        return LY_TYPE_UINT32;
  225|  28.1k|                    } else if (!strncmp(&name[4], "64", 2)) {
  ------------------
  |  Branch (225:32): [True: 0, False: 0]
  ------------------
  226|      0|                        return LY_TYPE_UINT64;
  227|      0|                    }
  228|  28.1k|                }
  229|  28.1k|            }
  230|   154k|        }
  231|  1.51M|    }
  232|       |
  233|   660k|    return LY_TYPE_UNKNOWN;
  234|  1.53M|}
tree_schema_common.c:lysp_typedef_match:
  245|   281k|{
  246|   281k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   281k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  247|       |
  248|   281k|    LY_ARRAY_FOR(typedefs, u) {
  ------------------
  |  |  167|   281k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   281k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   281k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   281k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   281k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   281k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 281k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 281k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   281k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|      0|        if (!strcmp(name, typedefs[u].name)) {
  ------------------
  |  Branch (249:13): [True: 0, False: 0]
  ------------------
  250|       |            /* match */
  251|      0|            return &typedefs[u];
  252|      0|        }
  253|      0|    }
  254|   281k|    return NULL;
  255|   281k|}
tree_schema_common.c:lysp_check_dup_typedef:
  391|   534k|{
  392|   534k|    struct lysp_node *parent;
  393|   534k|    uint32_t hash;
  394|   534k|    size_t name_len;
  395|   534k|    const char *name;
  396|   534k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   534k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
  397|   534k|    const struct lysp_tpdf *typedefs;
  398|       |
  399|   534k|    assert(ctx);
  400|      0|    assert(tpdf);
  401|       |
  402|      0|    name = tpdf->name;
  403|   534k|    name_len = strlen(name);
  404|       |
  405|   534k|    if (lysp_type_str2builtin(name, name_len)) {
  ------------------
  |  Branch (405:9): [True: 0, False: 534k]
  ------------------
  406|      0|        LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  407|      0|                "Duplicate identifier \"%s\" of typedef statement - name collision with a built-in type.", name);
  408|      0|        return LY_EVALID;
  409|      0|    }
  410|       |
  411|       |    /* check locally scoped typedefs (avoid name shadowing) */
  412|   534k|    if (node) {
  ------------------
  |  Branch (412:9): [True: 0, False: 534k]
  ------------------
  413|      0|        typedefs = lysp_node_typedefs(node);
  414|      0|        LY_ARRAY_FOR(typedefs, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  415|      0|            if (&typedefs[u] == tpdf) {
  ------------------
  |  Branch (415:17): [True: 0, False: 0]
  ------------------
  416|      0|                break;
  417|      0|            }
  418|      0|            if (!strcmp(name, typedefs[u].name)) {
  ------------------
  |  Branch (418:17): [True: 0, False: 0]
  ------------------
  419|      0|                LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  420|      0|                        "Duplicate identifier \"%s\" of typedef statement - name collision with sibling type.", name);
  421|      0|                return LY_EVALID;
  422|      0|            }
  423|      0|        }
  424|       |        /* search typedefs in parent's nodes */
  425|      0|        for (parent = node->parent; parent; parent = parent->parent) {
  ------------------
  |  Branch (425:37): [True: 0, False: 0]
  ------------------
  426|      0|            if (lysp_typedef_match(name, lysp_node_typedefs(parent))) {
  ------------------
  |  Branch (426:17): [True: 0, False: 0]
  ------------------
  427|      0|                LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  428|      0|                        "Duplicate identifier \"%s\" of typedef statement - name collision with another scoped type.", name);
  429|      0|                return LY_EVALID;
  430|      0|            }
  431|      0|        }
  432|      0|    }
  433|       |
  434|       |    /* check collision with the top-level typedefs */
  435|   534k|    if (node) {
  ------------------
  |  Branch (435:9): [True: 0, False: 534k]
  ------------------
  436|      0|        hash = lyht_hash(name, name_len);
  437|      0|        if (!lyht_find(tpdfs_global, &name, hash, NULL)) {
  ------------------
  |  Branch (437:13): [True: 0, False: 0]
  ------------------
  438|      0|            LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  439|      0|                    "Duplicate identifier \"%s\" of typedef statement - scoped type collide with a top-level type.", name);
  440|      0|            return LY_EVALID;
  441|      0|        }
  442|   534k|    } else {
  443|   534k|        LY_CHECK_RET(lysp_check_dup_ht_insert(ctx, tpdfs_global, name, "typedef",
  ------------------
  |  |  206|   534k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   534k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   534k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|   534k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 534k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  444|   534k|                "name collision with another top-level type"));
  445|       |        /* it is not necessary to test collision with the scoped types - in lysp_check_typedefs, all the
  446|       |         * top-level typedefs are inserted into the tables before the scoped typedefs, so the collision
  447|       |         * is detected in the first branch few lines above */
  448|   534k|    }
  449|       |
  450|   534k|    return LY_SUCCESS;
  451|   534k|}
tree_schema_common.c:lysp_check_dup_grouping:
  531|   112k|{
  532|   112k|    struct lysp_node *parent;
  533|   112k|    uint32_t hash;
  534|   112k|    size_t name_len;
  535|   112k|    const char *name;
  536|   112k|    const struct lysp_node_grp *groupings, *grp_iter;
  537|       |
  538|   112k|    assert(ctx);
  539|      0|    assert(grp);
  540|       |
  541|      0|    name = grp->name;
  542|   112k|    name_len = strlen(name);
  543|       |
  544|       |    /* check locally scoped groupings (avoid name shadowing) */
  545|   112k|    if (node) {
  ------------------
  |  Branch (545:9): [True: 28.1k, False: 84.3k]
  ------------------
  546|  28.1k|        groupings = lysp_node_groupings(node);
  547|  42.1k|        LY_LIST_FOR(groupings, grp_iter) {
  ------------------
  |  |  181|  28.1k|    for ((ELEM) = (START); \
  |  |  182|  42.1k|         (ELEM); \
  |  |  ------------------
  |  |  |  Branch (182:10): [True: 42.1k, False: 0]
  |  |  ------------------
  |  |  183|  28.1k|         (ELEM) = (ELEM)->next)
  ------------------
  548|  42.1k|            if (grp_iter == grp) {
  ------------------
  |  Branch (548:17): [True: 28.1k, False: 14.0k]
  ------------------
  549|  28.1k|                break;
  550|  28.1k|            }
  551|  14.0k|            if (!strcmp(name, grp_iter->name)) {
  ------------------
  |  Branch (551:17): [True: 0, False: 14.0k]
  ------------------
  552|      0|                LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  553|      0|                        "Duplicate identifier \"%s\" of grouping statement - name collision with sibling grouping.", name);
  554|      0|                return LY_EVALID;
  555|      0|            }
  556|  14.0k|        }
  557|       |        /* search grouping in parent's nodes */
  558|  28.1k|        for (parent = node->parent; parent; parent = parent->parent) {
  ------------------
  |  Branch (558:37): [True: 0, False: 28.1k]
  ------------------
  559|      0|            if (lysp_grouping_match(name, parent)) {
  ------------------
  |  Branch (559:17): [True: 0, False: 0]
  ------------------
  560|      0|                LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  561|      0|                        "Duplicate identifier \"%s\" of grouping statement - name collision with another scoped grouping.", name);
  562|      0|                return LY_EVALID;
  563|      0|            }
  564|      0|        }
  565|  28.1k|    }
  566|       |
  567|       |    /* check collision with the top-level groupings */
  568|   112k|    if (node) {
  ------------------
  |  Branch (568:9): [True: 28.1k, False: 84.3k]
  ------------------
  569|  28.1k|        hash = lyht_hash(name, name_len);
  570|  28.1k|        if (!lyht_find(grps_global, &name, hash, NULL)) {
  ------------------
  |  Branch (570:13): [True: 0, False: 28.1k]
  ------------------
  571|      0|            LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG,
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  572|      0|                    "Duplicate identifier \"%s\" of grouping statement - scoped grouping collide with a top-level grouping.", name);
  573|      0|            return LY_EVALID;
  574|      0|        }
  575|  84.3k|    } else {
  576|  84.3k|        LY_CHECK_RET(lysp_check_dup_ht_insert(ctx, grps_global, name, "grouping",
  ------------------
  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  84.3k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.3k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  84.3k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 84.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  577|  84.3k|                "name collision with another top-level grouping"));
  578|  84.3k|    }
  579|       |
  580|   112k|    return LY_SUCCESS;
  581|   112k|}
tree_schema_common.c:lysp_check_dup_ht_insert:
  360|   731k|{
  361|   731k|    LY_ERR ret;
  362|   731k|    uint32_t hash;
  363|       |
  364|   731k|    hash = lyht_hash(name, strlen(name));
  365|   731k|    ret = lyht_insert(ht, &name, hash, NULL);
  366|   731k|    if (ret == LY_EEXIST) {
  ------------------
  |  Branch (366:9): [True: 0, False: 731k]
  ------------------
  367|      0|        if (err_detail) {
  ------------------
  |  Branch (367:13): [True: 0, False: 0]
  ------------------
  368|      0|            LOGVAL_PARSER(ctx, LY_VCODE_DUPIDENT2, name, statement, err_detail);
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|      0|        } else {
  370|      0|            LOGVAL_PARSER(ctx, LY_VCODE_DUPIDENT, name, statement);
  ------------------
  |  |  129|      0|#define LOGVAL_PARSER(CTX, ...) LOGVAL(PARSER_CTX(CTX), __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  371|      0|        }
  372|      0|        ret = LY_EVALID;
  373|      0|    }
  374|       |
  375|   731k|    return ret;
  376|   731k|}
tree_schema_common.c:lys_get_module_without_revision:
  919|  70.2k|{
  920|  70.2k|    struct lys_module *mod, *mod_impl;
  921|  70.2k|    uint32_t index;
  922|       |
  923|       |    /* try to find module with LYS_MOD_IMPORTED_REV flag */
  924|  70.2k|    index = 0;
  925|   393k|    while ((mod = ly_ctx_get_module_iter(ctx, &index))) {
  ------------------
  |  Branch (925:12): [True: 351k, False: 42.1k]
  ------------------
  926|   351k|        if (!strcmp(mod->name, name) && (mod->latest_revision & LYS_MOD_IMPORTED_REV)) {
  ------------------
  |  | 2124|  70.2k|#define LYS_MOD_IMPORTED_REV        0x04 /**< This is the module revision used when importing the module without
  ------------------
  |  Branch (926:13): [True: 70.2k, False: 281k]
  |  Branch (926:41): [True: 28.1k, False: 42.1k]
  ------------------
  927|  28.1k|            break;
  928|  28.1k|        }
  929|   351k|    }
  930|       |
  931|       |    /* try to find the implemented module */
  932|  70.2k|    mod_impl = ly_ctx_get_module_implemented(ctx, name);
  933|  70.2k|    if (mod) {
  ------------------
  |  Branch (933:9): [True: 28.1k, False: 42.1k]
  ------------------
  934|  28.1k|        if (mod_impl && (mod != mod_impl)) {
  ------------------
  |  Branch (934:13): [True: 0, False: 28.1k]
  |  Branch (934:25): [True: 0, False: 0]
  ------------------
  935|      0|            LOGVRB("Implemented module \"%s@%s\" is not used for import, revision \"%s\" is imported instead.",
  ------------------
  |  |  156|      0|#define LOGVRB(...) ly_log(NULL, LY_LLVRB, 0, __VA_ARGS__)
  ------------------
  936|      0|                    mod_impl->name, mod_impl->revision, mod->revision);
  937|      0|        }
  938|  28.1k|        return mod;
  939|  42.1k|    } else if (mod_impl) {
  ------------------
  |  Branch (939:16): [True: 14.0k, False: 28.1k]
  ------------------
  940|  14.0k|        return mod_impl;
  941|  14.0k|    }
  942|       |
  943|       |    /* try to find the latest module in the current context */
  944|  28.1k|    mod = ly_ctx_get_module_latest(ctx, name);
  945|       |
  946|  28.1k|    return mod;
  947|  70.2k|}
tree_schema_common.c:lys_parse_load_from_clb_or_file:
  851|  28.1k|{
  852|  28.1k|    const char *module_data = NULL;
  853|  28.1k|    LYS_INFORMAT format = LYS_IN_UNKNOWN;
  854|       |
  855|  28.1k|    void (*module_data_free)(void *module_data, void *user_data) = NULL;
  856|  28.1k|    struct lysp_load_module_check_data check_data = {0};
  857|  28.1k|    struct ly_in *in;
  858|       |
  859|  28.1k|    *mod = NULL;
  860|       |
  861|  28.1k|    if (mod_latest && (!ctx->imp_clb || (mod_latest->latest_revision & LYS_MOD_LATEST_IMPCLB)) &&
  ------------------
  |  | 2127|      0|#define LYS_MOD_LATEST_IMPCLB       0x08 /**< This is the latest revision of the module obtained from import callback. */
  ------------------
  |  Branch (861:9): [True: 28.1k, False: 0]
  |  Branch (861:24): [True: 28.1k, False: 0]
  |  Branch (861:41): [True: 0, False: 0]
  ------------------
  862|  28.1k|            ((ctx->flags & LY_CTX_DISABLE_SEARCHDIRS) || (mod_latest->latest_revision & LYS_MOD_LATEST_SEARCHDIRS))) {
  ------------------
  |  |  175|  28.1k|#define LY_CTX_DISABLE_SEARCHDIRS 0x08  /**< Do not search for schemas in context's searchdirs neither in current
  ------------------
                          ((ctx->flags & LY_CTX_DISABLE_SEARCHDIRS) || (mod_latest->latest_revision & LYS_MOD_LATEST_SEARCHDIRS))) {
  ------------------
  |  | 2123|  28.1k|#define LYS_MOD_LATEST_SEARCHDIRS   0x02 /**< This is the latest revision of the module found in searchdirs. */
  ------------------
  |  Branch (862:14): [True: 0, False: 28.1k]
  |  Branch (862:58): [True: 0, False: 28.1k]
  ------------------
  863|       |        /* we are not able to find a newer revision */
  864|      0|        return LY_SUCCESS;
  865|      0|    }
  866|       |
  867|  28.1k|    if (!(ctx->flags & LY_CTX_PREFER_SEARCHDIRS)) {
  ------------------
  |  |  182|  28.1k|#define LY_CTX_PREFER_SEARCHDIRS 0x20 /**< When searching for schema, prefer searchdirs instead of user callback. */
  ------------------
  |  Branch (867:9): [True: 28.1k, False: 0]
  ------------------
  868|  28.1k|search_clb:
  869|       |        /* check there is a callback and should be called */
  870|  28.1k|        if (ctx->imp_clb && (!mod_latest || !(mod_latest->latest_revision & LYS_MOD_LATEST_IMPCLB))) {
  ------------------
  |  | 2127|      0|#define LYS_MOD_LATEST_IMPCLB       0x08 /**< This is the latest revision of the module obtained from import callback. */
  ------------------
  |  Branch (870:13): [True: 0, False: 28.1k]
  |  Branch (870:30): [True: 0, False: 0]
  |  Branch (870:45): [True: 0, False: 0]
  ------------------
  871|      0|            if (!ctx->imp_clb(name, revision, NULL, NULL, ctx->imp_clb_data, &format, &module_data, &module_data_free)) {
  ------------------
  |  Branch (871:17): [True: 0, False: 0]
  ------------------
  872|      0|                LY_CHECK_RET(ly_in_new_memory(module_data, &in));
  ------------------
  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|      0|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|      0|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|      0|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  873|      0|                check_data.name = name;
  874|      0|                check_data.revision = revision;
  875|      0|                lys_parse_in(ctx, in, format, lysp_load_module_check, &check_data, new_mods, mod);
  876|      0|                ly_in_free(in, 0);
  877|      0|                if (module_data_free) {
  ------------------
  |  Branch (877:21): [True: 0, False: 0]
  ------------------
  878|      0|                    module_data_free((void *)module_data, ctx->imp_clb_data);
  879|      0|                }
  880|      0|            }
  881|      0|        }
  882|  28.1k|        if (*mod && !revision) {
  ------------------
  |  Branch (882:13): [True: 0, False: 28.1k]
  |  Branch (882:21): [True: 0, False: 0]
  ------------------
  883|       |            /* we got the latest revision module from the callback */
  884|      0|            (*mod)->latest_revision |= LYS_MOD_LATEST_IMPCLB;
  ------------------
  |  | 2127|      0|#define LYS_MOD_LATEST_IMPCLB       0x08 /**< This is the latest revision of the module obtained from import callback. */
  ------------------
  885|  28.1k|        } else if (!*mod && !(ctx->flags & LY_CTX_PREFER_SEARCHDIRS)) {
  ------------------
  |  |  182|  28.1k|#define LY_CTX_PREFER_SEARCHDIRS 0x20 /**< When searching for schema, prefer searchdirs instead of user callback. */
  ------------------
  |  Branch (885:20): [True: 28.1k, False: 0]
  |  Branch (885:29): [True: 28.1k, False: 0]
  ------------------
  886|  28.1k|            goto search_file;
  887|  28.1k|        }
  888|  28.1k|    } else {
  889|  28.1k|search_file:
  890|       |        /* check we can use searchdirs and that we should */
  891|  28.1k|        if (!(ctx->flags & LY_CTX_DISABLE_SEARCHDIRS) &&
  ------------------
  |  |  175|  28.1k|#define LY_CTX_DISABLE_SEARCHDIRS 0x08  /**< Do not search for schemas in context's searchdirs neither in current
  ------------------
  |  Branch (891:13): [True: 28.1k, False: 0]
  ------------------
  892|  28.1k|                (!mod_latest || !(mod_latest->latest_revision & LYS_MOD_LATEST_SEARCHDIRS))) {
  ------------------
  |  | 2123|  28.1k|#define LYS_MOD_LATEST_SEARCHDIRS   0x02 /**< This is the latest revision of the module found in searchdirs. */
  ------------------
  |  Branch (892:18): [True: 0, False: 28.1k]
  |  Branch (892:33): [True: 28.1k, False: 0]
  ------------------
  893|  28.1k|            lys_parse_localfile(ctx, name, revision, NULL, NULL, mod_latest ? 0 : 1, new_mods, (void **)mod);
  ------------------
  |  Branch (893:66): [True: 28.1k, False: 0]
  ------------------
  894|  28.1k|        }
  895|  28.1k|        if (*mod && !revision) {
  ------------------
  |  Branch (895:13): [True: 0, False: 28.1k]
  |  Branch (895:21): [True: 0, False: 0]
  ------------------
  896|       |            /* we got the latest revision module in the searchdirs */
  897|      0|            (*mod)->latest_revision |= LYS_MOD_LATEST_IMPCLB;
  ------------------
  |  | 2127|      0|#define LYS_MOD_LATEST_IMPCLB       0x08 /**< This is the latest revision of the module obtained from import callback. */
  ------------------
  898|  28.1k|        } else if (!*mod && (ctx->flags & LY_CTX_PREFER_SEARCHDIRS)) {
  ------------------
  |  |  182|  28.1k|#define LY_CTX_PREFER_SEARCHDIRS 0x20 /**< When searching for schema, prefer searchdirs instead of user callback. */
  ------------------
  |  Branch (898:20): [True: 28.1k, False: 0]
  |  Branch (898:29): [True: 0, False: 28.1k]
  ------------------
  899|      0|            goto search_clb;
  900|      0|        }
  901|  28.1k|    }
  902|       |
  903|  28.1k|    return LY_SUCCESS;
  904|  28.1k|}
tree_schema_common.c:lys_check_circular_dependency:
  958|  84.3k|{
  959|  84.3k|    if ((*mod) && (*mod)->parsed->parsing) {
  ------------------
  |  Branch (959:9): [True: 84.3k, False: 0]
  |  Branch (959:19): [True: 0, False: 84.3k]
  ------------------
  960|      0|        LOGVAL(ctx, LYVE_REFERENCE, "A circular dependency (import) for module \"%s\".", (*mod)->name);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
  961|      0|        *mod = NULL;
  962|      0|        return LY_EVALID;
  963|      0|    }
  964|       |
  965|  84.3k|    return LY_SUCCESS;
  966|  84.3k|}
tree_schema_common.c:lys_parse_localfile:
  790|  28.1k|{
  791|  28.1k|    struct ly_in *in;
  792|  28.1k|    char *filepath = NULL;
  793|  28.1k|    LYS_INFORMAT format;
  794|  28.1k|    void *mod = NULL;
  795|  28.1k|    LY_ERR ret = LY_SUCCESS;
  796|  28.1k|    struct lysp_load_module_check_data check_data = {0};
  797|       |
  798|  28.1k|    LY_CHECK_RET(lys_search_localfile(ly_ctx_get_searchdirs(ctx), !(ctx->flags & LY_CTX_DISABLE_SEARCHDIR_CWD), name,
  ------------------
  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  28.1k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.1k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  28.1k|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  799|  28.1k|            revision, &filepath, &format));
  800|  28.1k|    if (!filepath) {
  ------------------
  |  Branch (800:9): [True: 28.1k, False: 0]
  ------------------
  801|  28.1k|        if (required) {
  ------------------
  |  Branch (801:13): [True: 0, False: 28.1k]
  ------------------
  802|      0|            LOGERR(ctx, LY_ENOTFOUND, "Data model \"%s%s%s\" not found in local searchdirs.", name, revision ? "@" : "",
  ------------------
  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (154:62): [True: 0, False: 0]
  |  |  |  Branch (154:62): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  803|      0|                    revision ? revision : "");
  804|      0|        }
  805|  28.1k|        return LY_ENOTFOUND;
  806|  28.1k|    }
  807|       |
  808|      0|    LOGVRB("Loading schema from \"%s\" file.", filepath);
  ------------------
  |  |  156|      0|#define LOGVRB(...) ly_log(NULL, LY_LLVRB, 0, __VA_ARGS__)
  ------------------
  809|       |
  810|       |    /* get the (sub)module */
  811|      0|    LY_CHECK_ERR_GOTO(ret = ly_in_new_filepath(filepath, 0, &in),
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  812|      0|            LOGERR(ctx, ret, "Unable to create input handler for filepath %s.", filepath), cleanup);
  813|      0|    check_data.name = name;
  814|      0|    check_data.revision = revision;
  815|      0|    check_data.path = filepath;
  816|      0|    check_data.submoduleof = main_name;
  817|      0|    if (main_ctx) {
  ------------------
  |  Branch (817:9): [True: 0, False: 0]
  ------------------
  818|      0|        ret = lys_parse_submodule(ctx, in, format, main_ctx, lysp_load_module_check, &check_data, new_mods,
  819|      0|                (struct lysp_submodule **)&mod);
  820|      0|    } else {
  821|      0|        ret = lys_parse_in(ctx, in, format, lysp_load_module_check, &check_data, new_mods, (struct lys_module **)&mod);
  822|       |
  823|      0|    }
  824|      0|    ly_in_free(in, 1);
  825|      0|    LY_CHECK_GOTO(ret, cleanup);
  ------------------
  |  |  202|      0|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  826|       |
  827|      0|    *result = mod;
  828|       |
  829|       |    /* success */
  830|       |
  831|      0|cleanup:
  832|      0|    free(filepath);
  833|      0|    return ret;
  834|      0|}

lysp_qname_free:
   40|  28.3k|{
   41|  28.3k|    if (qname) {
  ------------------
  |  Branch (41:9): [True: 28.3k, False: 0]
  ------------------
   42|  28.3k|        lydict_remove(ctx, qname->str);
   43|  28.3k|    }
   44|  28.3k|}
lysp_ext_instance_free:
   70|   307k|{
   71|   307k|    struct lysp_stmt *stmt, *next;
   72|       |
   73|   307k|    lydict_remove(ctx->ctx, ext->name);
   74|   307k|    lydict_remove(ctx->ctx, ext->argument);
   75|   307k|    ly_free_prefix_data(ext->format, ext->prefix_data);
   76|   307k|    if (ext->record && ext->record->plugin.pfree) {
  ------------------
  |  Branch (76:9): [True: 126k, False: 180k]
  |  Branch (76:24): [True: 126k, False: 0]
  ------------------
   77|   126k|        ext->record->plugin.pfree(ctx->ctx, ext);
   78|   126k|    }
   79|       |
   80|   337k|    LY_LIST_FOR_SAFE(ext->child, next, stmt) {
  ------------------
  |  |  195|   307k|    for ((ELEM) = (START); \
  |  |  196|   644k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 337k, False: 307k]
  |  |  |  Branch (196:10): [True: 337k, False: 307k]
  |  |  ------------------
  |  |  197|   337k|         (ELEM) = (NEXT))
  ------------------
   81|   337k|        lysp_stmt_free(ctx->ctx, stmt);
   82|   337k|    }
   83|   307k|}
lysp_restr_free:
  243|   425k|{
  244|   425k|    lydict_remove(ctx->ctx, restr->arg.str);
  245|   425k|    lydict_remove(ctx->ctx, restr->emsg);
  246|   425k|    lydict_remove(ctx->ctx, restr->eapptag);
  247|   425k|    lydict_remove(ctx->ctx, restr->dsc);
  248|   425k|    lydict_remove(ctx->ctx, restr->ref);
  249|   425k|    FREE_ARRAY(ctx, restr->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|   425k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   425k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   425k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   425k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   425k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   425k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   427k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   427k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 3.25k, False: 424k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 1.87k, False: 425k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   425k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   425k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 1.37k, False: 424k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  250|   425k|}
lysp_type_free:
  270|  1.44M|{
  271|  1.44M|    if (!type) {
  ------------------
  |  Branch (271:9): [True: 0, False: 1.44M]
  ------------------
  272|      0|        return;
  273|      0|    }
  274|       |
  275|  1.44M|    lydict_remove(ctx->ctx, type->name);
  276|  1.44M|    FREE_MEMBER(ctx, type->range, lysp_restr_free);
  ------------------
  |  |   39|  1.44M|#define FREE_MEMBER(CTX, MEMBER, FUNC) if (MEMBER) {(FUNC)(CTX, MEMBER);free(MEMBER);}
  |  |  ------------------
  |  |  |  Branch (39:44): [True: 70.2k, False: 1.37M]
  |  |  ------------------
  ------------------
  277|  1.44M|    FREE_MEMBER(ctx, type->length, lysp_restr_free);
  ------------------
  |  |   39|  1.44M|#define FREE_MEMBER(CTX, MEMBER, FUNC) if (MEMBER) {(FUNC)(CTX, MEMBER);free(MEMBER);}
  |  |  ------------------
  |  |  |  Branch (39:44): [True: 56.2k, False: 1.38M]
  |  |  ------------------
  ------------------
  278|  1.44M|    FREE_ARRAY(ctx, type->patterns, lysp_restr_free);
  ------------------
  |  |   34|  1.44M|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.44M|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.44M|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.44M|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.73M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.73M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 529k, False: 1.20M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 289k, False: 1.44M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.44M|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.44M|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 240k, False: 1.20M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  279|  1.44M|    FREE_ARRAY(ctx, type->enums, lysp_type_enum_free);
  ------------------
  |  |   34|  1.44M|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.44M|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.44M|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.44M|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.63M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.63M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 254k, False: 1.37M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 190k, False: 1.44M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.44M|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.44M|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 64.0k, False: 1.37M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  280|  1.44M|    FREE_ARRAY(ctx, type->bits, lysp_type_enum_free);
  ------------------
  |  |   34|  1.44M|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.44M|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.44M|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.44M|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.44M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.44M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 9.31k, False: 1.44M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 6.36k, False: 1.44M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.44M|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.44M|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 2.94k, False: 1.44M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  281|  1.44M|    lyxp_expr_free(ctx->ctx, type->path);
  282|  1.44M|    FREE_STRINGS(ctx->ctx, type->bases);
  ------------------
  |  |   45|  1.44M|#define FREE_STRINGS(CTX, ARRAY) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){lydict_remove(CTX, ARRAY[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.44M|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_STRINGS(CTX, ARRAY) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){lydict_remove(CTX, ARRAY[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.44M|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.44M|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.46M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.46M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 37.5k, False: 1.42M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 20.0k, False: 1.44M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.44M|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_STRINGS(CTX, ARRAY) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){lydict_remove(CTX, ARRAY[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.44M|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 17.5k, False: 1.42M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  283|  1.44M|    FREE_ARRAY(ctx, type->types, lysp_type_free);
  ------------------
  |  |   34|  1.44M|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.44M|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.44M|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.44M|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.76M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.76M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 486k, False: 1.27M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 319k, False: 1.44M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.44M|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.44M|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 166k, False: 1.27M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  284|  1.44M|    FREE_ARRAY(ctx, type->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|  1.44M|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.44M|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.44M|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.44M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.44M|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.45M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.45M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 15.4k, False: 1.43M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 12.1k, False: 1.44M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.44M|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.44M|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 3.25k, False: 1.43M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  285|  1.44M|    if (type->compiled) {
  ------------------
  |  Branch (285:9): [True: 84.3k, False: 1.35M]
  ------------------
  286|  84.3k|        lysc_type_free(ctx, type->compiled);
  287|  84.3k|    }
  288|  1.44M|}
lysp_when_free:
  338|  2.18k|{
  339|  2.18k|    lydict_remove(ctx->ctx, when->cond);
  340|  2.18k|    lydict_remove(ctx->ctx, when->dsc);
  341|  2.18k|    lydict_remove(ctx->ctx, when->ref);
  342|  2.18k|    FREE_ARRAY(ctx, when->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|  3.64k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  2.18k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  2.18k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  2.18k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  2.18k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  2.18k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  5.82k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  5.82k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 4.37k, False: 1.45k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 3.64k, False: 2.18k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  3.64k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  2.18k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 734, False: 1.45k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  343|  2.18k|}
lysp_deviate_free:
  369|  4.10k|{
  370|  4.10k|    struct lysp_deviate_add *add = (struct lysp_deviate_add *)d;
  371|  4.10k|    struct lysp_deviate_rpl *rpl = (struct lysp_deviate_rpl *)d;
  372|       |
  373|  4.10k|    if (!d) {
  ------------------
  |  Branch (373:9): [True: 140, False: 3.96k]
  ------------------
  374|    140|        return;
  375|    140|    }
  376|       |
  377|  3.96k|    FREE_ARRAY(ctx, d->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|  3.96k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  3.96k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  3.96k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  3.96k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  3.96k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  3.96k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  7.03k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  7.03k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 4.88k, False: 2.14k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 3.06k, False: 3.96k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  3.96k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  3.96k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 1.82k, False: 2.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  378|  3.96k|    switch (d->mod) {
  379|    325|    case LYS_DEV_NOT_SUPPORTED:
  ------------------
  |  |  470|    325|#define LYS_DEV_NOT_SUPPORTED 1      /**< deviate type not-supported */
  ------------------
  |  Branch (379:5): [True: 325, False: 3.64k]
  ------------------
  380|       |        /* nothing to do */
  381|    325|        break;
  382|  3.12k|    case LYS_DEV_ADD:
  ------------------
  |  |  471|  3.12k|#define LYS_DEV_ADD 2                /**< deviate type add */
  ------------------
  |  Branch (382:5): [True: 3.12k, False: 843]
  ------------------
  383|  3.24k|    case LYS_DEV_DELETE: /* compatible for dynamically allocated data */
  ------------------
  |  |  472|  3.24k|#define LYS_DEV_DELETE 3             /**< deviate type delete */
  ------------------
  |  Branch (383:5): [True: 121, False: 3.84k]
  ------------------
  384|  3.24k|        lydict_remove(ctx->ctx, add->units);
  385|  3.24k|        FREE_ARRAY(ctx, add->musts, lysp_restr_free);
  ------------------
  |  |   34|  3.24k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  3.24k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  3.24k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  3.24k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  3.24k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  3.24k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  3.90k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  3.90k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 1.03k, False: 2.87k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 660, False: 3.24k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  3.24k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  3.24k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 371, False: 2.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  386|  3.24k|        FREE_ARRAY(ctx->ctx, add->uniques, lysp_qname_free);
  ------------------
  |  |   34|  3.24k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  3.24k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  3.24k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  3.24k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  3.24k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  3.24k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  3.81k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  3.81k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 662, False: 3.15k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 573, False: 3.24k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  3.24k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  3.24k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 89, False: 3.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  387|  3.24k|        FREE_ARRAY(ctx->ctx, add->dflts, lysp_qname_free);
  ------------------
  |  |   34|  3.24k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  3.24k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  3.24k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  3.24k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  3.24k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  3.24k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  3.38k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  3.38k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 151, False: 3.22k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 134, False: 3.24k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  3.24k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  3.24k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 17, False: 3.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  388|  3.24k|        break;
  389|    397|    case LYS_DEV_REPLACE:
  ------------------
  |  |  473|    397|#define LYS_DEV_REPLACE 4            /**< deviate type replace */
  ------------------
  |  Branch (389:5): [True: 397, False: 3.57k]
  ------------------
  390|    397|        FREE_MEMBER(ctx, rpl->type, lysp_type_free);
  ------------------
  |  |   39|    397|#define FREE_MEMBER(CTX, MEMBER, FUNC) if (MEMBER) {(FUNC)(CTX, MEMBER);free(MEMBER);}
  |  |  ------------------
  |  |  |  Branch (39:44): [True: 79, False: 318]
  |  |  ------------------
  ------------------
  391|    397|        lydict_remove(ctx->ctx, rpl->units);
  392|    397|        lysp_qname_free(ctx->ctx, &rpl->dflt);
  393|    397|        break;
  394|      0|    default:
  ------------------
  |  Branch (394:5): [True: 0, False: 3.96k]
  ------------------
  395|      0|        LOGINT(ctx->ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  396|      0|        break;
  397|  3.96k|    }
  398|  3.96k|}
lysp_deviation_free:
  402|  1.51k|{
  403|  1.51k|    struct lysp_deviate *next, *iter;
  404|       |
  405|  1.51k|    lydict_remove(ctx->ctx, dev->nodeid);
  406|  1.51k|    lydict_remove(ctx->ctx, dev->dsc);
  407|  1.51k|    lydict_remove(ctx->ctx, dev->ref);
  408|  3.86k|    LY_LIST_FOR_SAFE(dev->deviates, next, iter) {
  ------------------
  |  |  195|  1.51k|    for ((ELEM) = (START); \
  |  |  196|  5.37k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 3.86k, False: 1.51k]
  |  |  |  Branch (196:10): [True: 3.86k, False: 1.51k]
  |  |  ------------------
  |  |  197|  3.86k|         (ELEM) = (NEXT))
  ------------------
  409|  3.86k|        lysp_deviate_free(ctx, iter);
  410|  3.86k|        free(iter);
  411|  3.86k|    }
  412|  1.51k|    FREE_ARRAY(ctx, dev->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|  1.58k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.51k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.51k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.51k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.51k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.51k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  3.10k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  3.10k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 2.28k, False: 821]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 1.58k, False: 1.51k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.58k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.51k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 698, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  413|  1.51k|}
lysp_node_free:
  436|  1.26M|{
  437|  1.26M|    struct lysp_node *child, *next;
  438|  1.26M|    struct lysp_node_container *cont;
  439|  1.26M|    struct lysp_node_leaf *leaf;
  440|  1.26M|    struct lysp_node_leaflist *llist;
  441|  1.26M|    struct lysp_node_list *list;
  442|  1.26M|    struct lysp_node_choice *choice;
  443|  1.26M|    struct lysp_node_case *cas;
  444|  1.26M|    struct lysp_node_uses *uses;
  445|  1.26M|    struct lysp_node_action *act;
  446|  1.26M|    struct lysp_node_action_inout *inout;
  447|  1.26M|    struct lysp_node_notif *notif;
  448|  1.26M|    struct lysp_restr *musts = lysp_node_musts(node);
  449|  1.26M|    struct lysp_when *when = lysp_node_when(node);
  450|       |
  451|  1.26M|    lydict_remove(ctx->ctx, node->name);
  452|  1.26M|    lydict_remove(ctx->ctx, node->dsc);
  453|  1.26M|    lydict_remove(ctx->ctx, node->ref);
  454|  1.26M|    FREE_ARRAY(ctx->ctx, node->iffeatures, lysp_qname_free);
  ------------------
  |  |   34|  1.26M|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.26M|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.26M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.26M|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.26M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.26M|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.27M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.27M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 12.6k, False: 1.26M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 11.8k, False: 1.26M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.26M|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.26M|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 849, False: 1.26M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  455|  1.26M|    FREE_ARRAY(ctx, node->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|  1.26M|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.26M|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.26M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.26M|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.26M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.26M|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.38M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.38M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 152k, False: 1.22M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 117k, False: 1.26M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.26M|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.26M|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 35.1k, False: 1.22M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  456|       |
  457|  1.26M|    FREE_MEMBER(ctx, when, lysp_when_free);
  ------------------
  |  |   39|  1.26M|#define FREE_MEMBER(CTX, MEMBER, FUNC) if (MEMBER) {(FUNC)(CTX, MEMBER);free(MEMBER);}
  |  |  ------------------
  |  |  |  Branch (39:44): [True: 2.10k, False: 1.26M]
  |  |  ------------------
  ------------------
  458|  1.26M|    FREE_ARRAY(ctx, musts, lysp_restr_free);
  ------------------
  |  |   34|  1.26M|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.26M|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.26M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.26M|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.26M|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.26M|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.27M|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.27M|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 9.70k, False: 1.26M]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 8.22k, False: 1.26M]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.26M|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.26M|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 1.47k, False: 1.26M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  459|       |
  460|  1.26M|    switch (node->nodetype) {
  461|  81.6k|    case LYS_CONTAINER:
  ------------------
  |  |  240|  81.6k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (461:5): [True: 81.6k, False: 1.18M]
  ------------------
  462|  81.6k|        cont = (struct lysp_node_container *)node;
  463|       |
  464|  81.6k|        lydict_remove(ctx->ctx, cont->presence);
  465|  81.6k|        FREE_ARRAY(ctx, cont->typedefs, lysp_tpdf_free);
  ------------------
  |  |   34|  81.6k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  81.6k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  81.6k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  81.6k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  81.6k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  81.6k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  81.8k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  81.8k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 251, False: 81.6k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 222, False: 81.6k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  81.6k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  81.6k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 29, False: 81.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  466|  81.6k|        if (cont->groupings) {
  ------------------
  |  Branch (466:13): [True: 709, False: 80.9k]
  ------------------
  467|    907|            LY_LIST_FOR_SAFE(&cont->groupings->node, next, child) {
  ------------------
  |  |  195|    709|    for ((ELEM) = (START); \
  |  |  196|  1.61k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 907, False: 709]
  |  |  |  Branch (196:10): [True: 907, False: 709]
  |  |  ------------------
  |  |  197|    907|         (ELEM) = (NEXT))
  ------------------
  468|    907|                lysp_node_free(ctx, child);
  469|    907|            }
  470|    709|        }
  471|   116k|        LY_LIST_FOR_SAFE(cont->child, next, child) {
  ------------------
  |  |  195|  81.6k|    for ((ELEM) = (START); \
  |  |  196|   198k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 116k, False: 81.6k]
  |  |  |  Branch (196:10): [True: 116k, False: 81.6k]
  |  |  ------------------
  |  |  197|   116k|         (ELEM) = (NEXT))
  ------------------
  472|   116k|            lysp_node_free(ctx, child);
  473|   116k|        }
  474|  81.6k|        if (cont->actions) {
  ------------------
  |  Branch (474:13): [True: 0, False: 81.6k]
  ------------------
  475|      0|            LY_LIST_FOR_SAFE(&cont->actions->node, next, child) {
  ------------------
  |  |  195|      0|    for ((ELEM) = (START); \
  |  |  196|      0|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  197|      0|         (ELEM) = (NEXT))
  ------------------
  476|      0|                lysp_node_free(ctx, child);
  477|      0|            }
  478|      0|        }
  479|  81.6k|        if (cont->notifs) {
  ------------------
  |  Branch (479:13): [True: 0, False: 81.6k]
  ------------------
  480|      0|            LY_LIST_FOR_SAFE(&cont->notifs->node, next, child) {
  ------------------
  |  |  195|      0|    for ((ELEM) = (START); \
  |  |  196|      0|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  197|      0|         (ELEM) = (NEXT))
  ------------------
  481|      0|                lysp_node_free(ctx, child);
  482|      0|            }
  483|      0|        }
  484|  81.6k|        break;
  485|   356k|    case LYS_LEAF:
  ------------------
  |  |  242|   356k|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
  |  Branch (485:5): [True: 356k, False: 907k]
  ------------------
  486|   356k|        leaf = (struct lysp_node_leaf *)node;
  487|       |
  488|   356k|        lysp_type_free(ctx, &leaf->type);
  489|   356k|        lydict_remove(ctx->ctx, leaf->units);
  490|   356k|        lydict_remove(ctx->ctx, leaf->dflt.str);
  491|   356k|        break;
  492|  94.2k|    case LYS_LEAFLIST:
  ------------------
  |  |  243|  94.2k|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (492:5): [True: 94.2k, False: 1.16M]
  ------------------
  493|  94.2k|        llist = (struct lysp_node_leaflist *)node;
  494|       |
  495|  94.2k|        lysp_type_free(ctx, &llist->type);
  496|  94.2k|        lydict_remove(ctx->ctx, llist->units);
  497|  94.2k|        FREE_ARRAY(ctx->ctx, llist->dflts, lysp_qname_free);
  ------------------
  |  |   34|  94.2k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  94.2k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  94.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  94.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  94.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  94.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  94.2k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  94.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 94.2k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 94.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  94.2k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  94.2k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 94.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  498|  94.2k|        break;
  499|   207k|    case LYS_LIST:
  ------------------
  |  |  244|   207k|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (499:5): [True: 207k, False: 1.05M]
  ------------------
  500|   207k|        list = (struct lysp_node_list *)node;
  501|       |
  502|   207k|        lydict_remove(ctx->ctx, list->key);
  503|   207k|        FREE_ARRAY(ctx, list->typedefs, lysp_tpdf_free);
  ------------------
  |  |   34|   207k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   207k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   207k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   207k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   207k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   207k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   207k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   207k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 972, False: 206k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 560, False: 207k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   207k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   207k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 412, False: 206k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  504|   207k|        if (list->groupings) {
  ------------------
  |  Branch (504:13): [True: 582, False: 206k]
  ------------------
  505|    664|            LY_LIST_FOR_SAFE(&list->groupings->node, next, child) {
  ------------------
  |  |  195|    582|    for ((ELEM) = (START); \
  |  |  196|  1.24k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 664, False: 582]
  |  |  |  Branch (196:10): [True: 664, False: 582]
  |  |  ------------------
  |  |  197|    664|         (ELEM) = (NEXT))
  ------------------
  506|    664|                lysp_node_free(ctx, child);
  507|    664|            }
  508|    582|        }
  509|   540k|        LY_LIST_FOR_SAFE(list->child, next, child) {
  ------------------
  |  |  195|   207k|    for ((ELEM) = (START); \
  |  |  196|   748k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 540k, False: 207k]
  |  |  |  Branch (196:10): [True: 540k, False: 207k]
  |  |  ------------------
  |  |  197|   540k|         (ELEM) = (NEXT))
  ------------------
  510|   540k|            lysp_node_free(ctx, child);
  511|   540k|        }
  512|   207k|        if (list->actions) {
  ------------------
  |  Branch (512:13): [True: 0, False: 207k]
  ------------------
  513|      0|            LY_LIST_FOR_SAFE(&list->actions->node, next, child) {
  ------------------
  |  |  195|      0|    for ((ELEM) = (START); \
  |  |  196|      0|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  197|      0|         (ELEM) = (NEXT))
  ------------------
  514|      0|                lysp_node_free(ctx, child);
  515|      0|            }
  516|      0|        }
  517|   207k|        if (list->notifs) {
  ------------------
  |  Branch (517:13): [True: 0, False: 207k]
  ------------------
  518|      0|            LY_LIST_FOR_SAFE(&list->notifs->node, next, child) {
  ------------------
  |  |  195|      0|    for ((ELEM) = (START); \
  |  |  196|      0|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  197|      0|         (ELEM) = (NEXT))
  ------------------
  519|      0|                lysp_node_free(ctx, child);
  520|      0|            }
  521|      0|        }
  522|   207k|        FREE_ARRAY(ctx->ctx, list->uniques, lysp_qname_free);
  ------------------
  |  |   34|   207k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   207k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   207k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   207k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   207k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   207k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   207k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   207k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 605, False: 206k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 320, False: 207k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   207k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   207k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 285, False: 206k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  523|   207k|        break;
  524|  30.3k|    case LYS_CHOICE:
  ------------------
  |  |  241|  30.3k|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
  |  Branch (524:5): [True: 30.3k, False: 1.23M]
  ------------------
  525|  30.3k|        choice = (struct lysp_node_choice *)node;
  526|       |
  527|  39.3k|        LY_LIST_FOR_SAFE(choice->child, next, child) {
  ------------------
  |  |  195|  30.3k|    for ((ELEM) = (START); \
  |  |  196|  69.7k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 39.3k, False: 30.3k]
  |  |  |  Branch (196:10): [True: 39.3k, False: 30.3k]
  |  |  ------------------
  |  |  197|  39.3k|         (ELEM) = (NEXT))
  ------------------
  528|  39.3k|            lysp_node_free(ctx, child);
  529|  39.3k|        }
  530|  30.3k|        lydict_remove(ctx->ctx, choice->dflt.str);
  531|  30.3k|        break;
  532|  34.1k|    case LYS_CASE:
  ------------------
  |  |  247|  34.1k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
  |  Branch (532:5): [True: 34.1k, False: 1.23M]
  ------------------
  533|  34.1k|        cas = (struct lysp_node_case *)node;
  534|       |
  535|  34.1k|        LY_LIST_FOR_SAFE(cas->child, next, child) {
  ------------------
  |  |  195|  34.1k|    for ((ELEM) = (START); \
  |  |  196|  38.7k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 4.55k, False: 34.1k]
  |  |  |  Branch (196:10): [True: 4.55k, False: 34.1k]
  |  |  ------------------
  |  |  197|  34.1k|         (ELEM) = (NEXT))
  ------------------
  536|  4.55k|            lysp_node_free(ctx, child);
  537|  4.55k|        }
  538|  34.1k|        break;
  539|      0|    case LYS_ANYDATA:
  ------------------
  |  |  246|      0|#define LYS_ANYDATA     0x0060    /**< anydata statement node, in tests it can be used for both #LYS_ANYXML and #LYS_ANYDATA */
  ------------------
  |  Branch (539:5): [True: 0, False: 1.26M]
  ------------------
  540|  9.94k|    case LYS_ANYXML:
  ------------------
  |  |  245|  9.94k|#define LYS_ANYXML      0x0020    /**< anyxml statement node */
  ------------------
  |  Branch (540:5): [True: 9.94k, False: 1.25M]
  ------------------
  541|       |        /* nothing special to do */
  542|  9.94k|        break;
  543|   240k|    case LYS_USES:
  ------------------
  |  |  253|   240k|#define LYS_USES        0x0800    /**< uses statement node */
  ------------------
  |  Branch (543:5): [True: 240k, False: 1.02M]
  ------------------
  544|   240k|        uses = (struct lysp_node_uses *)node;
  545|       |
  546|   240k|        FREE_ARRAY(ctx, uses->refines, lysp_refine_free);
  ------------------
  |  |   34|   240k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   240k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   240k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   240k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   240k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   240k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   244k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   244k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 4.21k, False: 239k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 3.88k, False: 240k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   240k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   240k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 332, False: 239k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  547|   240k|        if (uses->augments) {
  ------------------
  |  Branch (547:13): [True: 2.03k, False: 238k]
  ------------------
  548|  2.25k|            LY_LIST_FOR_SAFE(&uses->augments->node, next, child) {
  ------------------
  |  |  195|  2.03k|    for ((ELEM) = (START); \
  |  |  196|  4.28k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 2.25k, False: 2.03k]
  |  |  |  Branch (196:10): [True: 2.25k, False: 2.03k]
  |  |  ------------------
  |  |  197|  2.25k|         (ELEM) = (NEXT))
  ------------------
  549|  2.25k|                lysp_node_free(ctx, child);
  550|  2.25k|            }
  551|  2.03k|        }
  552|   240k|        break;
  553|  15.4k|    case LYS_RPC:
  ------------------
  |  |  249|  15.4k|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
  |  Branch (553:5): [True: 15.4k, False: 1.24M]
  ------------------
  554|  15.4k|    case LYS_ACTION:
  ------------------
  |  |  250|  15.4k|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
  |  Branch (554:5): [True: 0, False: 1.26M]
  ------------------
  555|  15.4k|        act = (struct lysp_node_action *)node;
  556|       |
  557|  15.4k|        FREE_ARRAY(ctx, act->typedefs, lysp_tpdf_free);
  ------------------
  |  |   34|  15.4k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  15.4k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  15.4k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  15.4k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  15.4k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  15.4k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  15.8k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  15.8k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 406, False: 15.4k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 366, False: 15.4k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  15.4k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  15.4k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 40, False: 15.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  558|  15.4k|        if (act->groupings) {
  ------------------
  |  Branch (558:13): [True: 377, False: 15.0k]
  ------------------
  559|    509|            LY_LIST_FOR_SAFE(&act->groupings->node, next, child) {
  ------------------
  |  |  195|    377|    for ((ELEM) = (START); \
  |  |  196|    886|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 509, False: 377]
  |  |  |  Branch (196:10): [True: 509, False: 377]
  |  |  ------------------
  |  |  197|    509|         (ELEM) = (NEXT))
  ------------------
  560|    509|                lysp_node_free(ctx, child);
  561|    509|            }
  562|    377|        }
  563|  15.4k|        if (act->input.nodetype) {
  ------------------
  |  Branch (563:13): [True: 15.2k, False: 214]
  ------------------
  564|  15.2k|            lysp_node_free(ctx, &act->input.node);
  565|  15.2k|        }
  566|  15.4k|        if (act->output.nodetype) {
  ------------------
  |  Branch (566:13): [True: 15.1k, False: 356]
  ------------------
  567|  15.1k|            lysp_node_free(ctx, &act->output.node);
  568|  15.1k|        }
  569|  15.4k|        break;
  570|  15.2k|    case LYS_INPUT:
  ------------------
  |  |  254|  15.2k|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
  |  Branch (570:5): [True: 15.2k, False: 1.24M]
  ------------------
  571|  30.3k|    case LYS_OUTPUT:
  ------------------
  |  |  255|  30.3k|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (571:5): [True: 15.1k, False: 1.24M]
  ------------------
  572|  30.3k|        inout = (struct lysp_node_action_inout *)node;
  573|       |
  574|  30.3k|        FREE_ARRAY(ctx, inout->typedefs, lysp_tpdf_free);
  ------------------
  |  |   34|  30.3k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  30.3k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  30.3k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  30.3k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  30.3k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  30.3k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  35.8k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  35.8k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 8.78k, False: 27.0k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 5.44k, False: 30.3k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  30.3k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  30.3k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 3.33k, False: 27.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  575|  30.3k|        if (inout->groupings) {
  ------------------
  |  Branch (575:13): [True: 3.26k, False: 27.0k]
  ------------------
  576|  5.50k|            LY_LIST_FOR_SAFE(&inout->groupings->node, next, child) {
  ------------------
  |  |  195|  3.26k|    for ((ELEM) = (START); \
  |  |  196|  8.77k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 5.50k, False: 3.26k]
  |  |  |  Branch (196:10): [True: 5.50k, False: 3.26k]
  |  |  ------------------
  |  |  197|  5.50k|         (ELEM) = (NEXT))
  ------------------
  577|  5.50k|                lysp_node_free(ctx, child);
  578|  5.50k|            }
  579|  3.26k|        }
  580|  30.3k|        LY_LIST_FOR_SAFE(inout->child, next, child) {
  ------------------
  |  |  195|  30.3k|    for ((ELEM) = (START); \
  |  |  196|  39.4k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 9.13k, False: 30.3k]
  |  |  |  Branch (196:10): [True: 9.13k, False: 30.3k]
  |  |  ------------------
  |  |  197|  30.3k|         (ELEM) = (NEXT))
  ------------------
  581|  9.13k|            lysp_node_free(ctx, child);
  582|  9.13k|        }
  583|       |        /* do not free the node, it is never standalone but part of the action node */
  584|  30.3k|        return;
  585|  30.8k|    case LYS_NOTIF:
  ------------------
  |  |  251|  30.8k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (585:5): [True: 30.8k, False: 1.23M]
  ------------------
  586|  30.8k|        notif = (struct lysp_node_notif *)node;
  587|       |
  588|  30.8k|        FREE_ARRAY(ctx, notif->typedefs, lysp_tpdf_free);
  ------------------
  |  |   34|  30.8k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  30.8k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  30.8k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  30.8k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  30.8k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  30.8k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  30.9k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  30.9k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 177, False: 30.7k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 154, False: 30.8k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  30.8k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  30.8k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 23, False: 30.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  589|  30.8k|        if (notif->groupings) {
  ------------------
  |  Branch (589:13): [True: 1.71k, False: 29.0k]
  ------------------
  590|  1.74k|            LY_LIST_FOR_SAFE(&notif->groupings->node, next, child) {
  ------------------
  |  |  195|  1.71k|    for ((ELEM) = (START); \
  |  |  196|  3.46k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 1.74k, False: 1.71k]
  |  |  |  Branch (196:10): [True: 1.74k, False: 1.71k]
  |  |  ------------------
  |  |  197|  1.74k|         (ELEM) = (NEXT))
  ------------------
  591|  1.74k|                lysp_node_free(ctx, child);
  592|  1.74k|            }
  593|  1.71k|        }
  594|  32.1k|        LY_LIST_FOR_SAFE(notif->child, next, child) {
  ------------------
  |  |  195|  30.8k|    for ((ELEM) = (START); \
  |  |  196|  62.9k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 32.1k, False: 30.8k]
  |  |  |  Branch (196:10): [True: 32.1k, False: 30.8k]
  |  |  ------------------
  |  |  197|  32.1k|         (ELEM) = (NEXT))
  ------------------
  595|  32.1k|            lysp_node_free(ctx, child);
  596|  32.1k|        }
  597|  30.8k|        break;
  598|   129k|    case LYS_GROUPING:
  ------------------
  |  |  256|   129k|#define LYS_GROUPING    0x4000
  ------------------
  |  Branch (598:5): [True: 129k, False: 1.13M]
  ------------------
  599|   129k|        lysp_grp_free(ctx, (struct lysp_node_grp *)node);
  600|   129k|        break;
  601|  3.16k|    case LYS_AUGMENT:
  ------------------
  |  |  257|  3.16k|#define LYS_AUGMENT     0x8000
  ------------------
  |  Branch (601:5): [True: 3.16k, False: 1.26M]
  ------------------
  602|  3.16k|        lysp_augment_free(ctx, ((struct lysp_node_augment *)node));
  603|  3.16k|        break;
  604|    104|    default:
  ------------------
  |  Branch (604:5): [True: 104, False: 1.26M]
  ------------------
  605|    104|        LOGINT(ctx->ctx);
  ------------------
  |  |  176|    104|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|    104|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  606|  1.26M|    }
  607|       |
  608|  1.23M|    free(node);
  609|  1.23M|}
lysp_module_free:
  613|   140k|{
  614|   140k|    struct lysp_node *node, *next;
  615|       |
  616|   140k|    if (!module) {
  ------------------
  |  Branch (616:9): [True: 14.0k, False: 126k]
  ------------------
  617|  14.0k|        return;
  618|  14.0k|    }
  619|       |
  620|   126k|    FREE_ARRAY(ctx, module->imports, lysp_import_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   211k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   211k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 127k, False: 84.1k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 84.7k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 42.4k, False: 84.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  621|   126k|    FREE_ARRAY(ctx, module->includes, module->is_submod ? lysp_include_free_submodule : lysp_include_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   129k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   129k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 3.72k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 3.40k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 320, False: 126k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (34:90): [True: 0, False: 3.40k]
  |  |  ------------------
  ------------------
  622|       |
  623|   126k|    FREE_ARRAY(ctx, module->revs, lysp_revision_free);
  ------------------
  |  |   34|   217k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   343k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   343k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 329k, False: 13.9k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 217k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   217k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 112k, False: 13.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  624|   126k|    FREE_ARRAY(ctx, module->extensions, lysp_ext_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   189k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   189k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 105k, False: 84.0k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 63.2k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 42.4k, False: 84.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  625|   126k|    FREE_ARRAY(ctx, module->features, lysp_feature_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   127k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   127k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 1.37k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 1.23k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 137, False: 126k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  626|   126k|    FREE_ARRAY(ctx, module->identities, lysp_ident_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   246k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   246k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 134k, False: 112k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 120k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 14.1k, False: 112k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  627|   126k|    FREE_ARRAY(ctx, module->typedefs, lysp_tpdf_free);
  ------------------
  |  |   34|   538k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   665k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   665k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 609k, False: 56.1k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 538k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   538k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 70.4k, False: 56.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   126k|    LY_LIST_FOR_SAFE((struct lysp_node *)module->groupings, next, node) {
  ------------------
  |  |  195|   126k|    for ((ELEM) = (START); \
  |  |  196|   213k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 86.7k, False: 126k]
  |  |  |  Branch (196:10): [True: 86.7k, False: 126k]
  |  |  ------------------
  |  |  197|   126k|         (ELEM) = (NEXT))
  ------------------
  629|  86.7k|        lysp_node_free(ctx, node);
  630|  86.7k|    }
  631|   126k|    LY_LIST_FOR_SAFE(module->data, next, node) {
  ------------------
  |  |  195|   126k|    for ((ELEM) = (START); \
  |  |  196|   186k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 60.1k, False: 126k]
  |  |  |  Branch (196:10): [True: 60.1k, False: 126k]
  |  |  ------------------
  |  |  197|   126k|         (ELEM) = (NEXT))
  ------------------
  632|  60.1k|        lysp_node_free(ctx, node);
  633|  60.1k|    }
  634|   126k|    LY_LIST_FOR_SAFE((struct lysp_node *)module->augments, next, node) {
  ------------------
  |  |  195|   126k|    for ((ELEM) = (START); \
  |  |  196|   127k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 940, False: 126k]
  |  |  |  Branch (196:10): [True: 940, False: 126k]
  |  |  ------------------
  |  |  197|   126k|         (ELEM) = (NEXT))
  ------------------
  635|    940|        lysp_node_free(ctx, node);
  636|    940|    }
  637|   126k|    LY_LIST_FOR_SAFE((struct lysp_node *)module->rpcs, next, node) {
  ------------------
  |  |  195|   126k|    for ((ELEM) = (START); \
  |  |  196|   142k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 15.5k, False: 126k]
  |  |  |  Branch (196:10): [True: 15.5k, False: 126k]
  |  |  ------------------
  |  |  197|   126k|         (ELEM) = (NEXT))
  ------------------
  638|  15.5k|        lysp_node_free(ctx, node);
  639|  15.5k|    }
  640|   126k|    LY_LIST_FOR_SAFE((struct lysp_node *)module->notifs, next, node) {
  ------------------
  |  |  195|   126k|    for ((ELEM) = (START); \
  |  |  196|   157k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 30.8k, False: 126k]
  |  |  |  Branch (196:10): [True: 30.8k, False: 126k]
  |  |  ------------------
  |  |  197|   126k|         (ELEM) = (NEXT))
  ------------------
  641|  30.8k|        lysp_node_free(ctx, node);
  642|  30.8k|    }
  643|   126k|    FREE_ARRAY(ctx, module->deviations, lysp_deviation_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   127k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   127k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 1.18k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 1.13k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 51, False: 126k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  644|   126k|    FREE_ARRAY(ctx, module->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|   145k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   272k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   272k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 161k, False: 110k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 145k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   145k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 15.9k, False: 110k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  645|       |
  646|   126k|    if (module->is_submod) {
  ------------------
  |  Branch (646:9): [True: 0, False: 126k]
  ------------------
  647|      0|        struct lysp_submodule *submod = (struct lysp_submodule *)module;
  648|       |
  649|      0|        lydict_remove(ctx->ctx, submod->name);
  650|      0|        lydict_remove(ctx->ctx, submod->filepath);
  651|      0|        lydict_remove(ctx->ctx, submod->prefix);
  652|      0|        lydict_remove(ctx->ctx, submod->org);
  653|      0|        lydict_remove(ctx->ctx, submod->contact);
  654|      0|        lydict_remove(ctx->ctx, submod->dsc);
  655|      0|        lydict_remove(ctx->ctx, submod->ref);
  656|      0|    }
  657|       |
  658|   126k|    free(module);
  659|   126k|}
lysc_ext_instance_free:
  663|   126k|{
  664|   126k|    if (ext->def && ext->def->plugin && ext->def->plugin->cfree) {
  ------------------
  |  Branch (664:9): [True: 126k, False: 0]
  |  Branch (664:21): [True: 126k, False: 0]
  |  Branch (664:41): [True: 126k, False: 0]
  ------------------
  665|   126k|        ext->def->plugin->cfree(ctx->ctx, ext);
  666|   126k|    }
  667|   126k|    lydict_remove(ctx->ctx, ext->argument);
  668|   126k|    FREE_ARRAY(ctx, ext->exts, lysc_ext_instance_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   126k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   126k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 126k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  669|   126k|}
lysc_pattern_free:
  846|  42.1k|{
  847|  42.1k|    if (--(*pattern)->refcount) {
  ------------------
  |  Branch (847:9): [True: 0, False: 42.1k]
  ------------------
  848|      0|        return;
  849|      0|    }
  850|  42.1k|    pcre2_code_free((*pattern)->code);
  851|  42.1k|    lydict_remove(ctx->ctx, (*pattern)->expr);
  852|  42.1k|    lydict_remove(ctx->ctx, (*pattern)->eapptag);
  853|  42.1k|    lydict_remove(ctx->ctx, (*pattern)->emsg);
  854|  42.1k|    lydict_remove(ctx->ctx, (*pattern)->dsc);
  855|  42.1k|    lydict_remove(ctx->ctx, (*pattern)->ref);
  856|  42.1k|    FREE_ARRAY(ctx, (*pattern)->exts, lysc_ext_instance_free);
  ------------------
  |  |   34|  42.1k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  42.1k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  42.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  42.1k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  42.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  42.1k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  42.1k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  42.1k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 42.1k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 42.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  42.1k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  42.1k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 42.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  42.1k|    free(*pattern);
  858|  42.1k|}
lysc_enum_item_free:
  862|   140k|{
  863|   140k|    lydict_remove(ctx->ctx, item->name);
  864|   140k|    lydict_remove(ctx->ctx, item->dsc);
  865|   140k|    lydict_remove(ctx->ctx, item->ref);
  866|   140k|    FREE_ARRAY(ctx, item->exts, lysc_ext_instance_free);
  ------------------
  |  |   34|   140k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   140k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   140k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   140k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   140k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   140k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   140k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   140k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 140k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 140k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   140k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   140k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 140k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  867|   140k|}
lysc_type_free:
  884|  1.18M|{
  885|  1.18M|    if (!type || (LY_ATOMIC_DEC_BARRIER(type->refcount) > 1)) {
  ------------------
  |  |   36|  1.18M|# define LY_ATOMIC_DEC_BARRIER(var) __sync_fetch_and_sub(&(var), 1)
  ------------------
  |  Branch (885:9): [True: 0, False: 1.18M]
  |  Branch (885:18): [True: 618k, False: 562k]
  ------------------
  886|   618k|        return;
  887|   618k|    }
  888|       |
  889|   562k|    switch (type->basetype) {
  ------------------
  |  Branch (889:13): [True: 0, False: 562k]
  ------------------
  890|      0|    case LY_TYPE_BINARY:
  ------------------
  |  Branch (890:5): [True: 0, False: 562k]
  ------------------
  891|      0|        FREE_MEMBER(ctx, ((struct lysc_type_bin *)type)->length, lysc_range_free);
  ------------------
  |  |   39|      0|#define FREE_MEMBER(CTX, MEMBER, FUNC) if (MEMBER) {(FUNC)(CTX, MEMBER);free(MEMBER);}
  |  |  ------------------
  |  |  |  Branch (39:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  892|      0|        break;
  893|      0|    case LY_TYPE_BITS:
  ------------------
  |  Branch (893:5): [True: 0, False: 562k]
  ------------------
  894|      0|        FREE_ARRAY(ctx, (struct lysc_type_bitenum_item *)((struct lysc_type_bits *)type)->bits, lysc_enum_item_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  895|      0|        break;
  896|      0|    case LY_TYPE_DEC64:
  ------------------
  |  Branch (896:5): [True: 0, False: 562k]
  ------------------
  897|      0|        FREE_MEMBER(ctx, ((struct lysc_type_dec *)type)->range, lysc_range_free);
  ------------------
  |  |   39|      0|#define FREE_MEMBER(CTX, MEMBER, FUNC) if (MEMBER) {(FUNC)(CTX, MEMBER);free(MEMBER);}
  |  |  ------------------
  |  |  |  Branch (39:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  898|      0|        break;
  899|   210k|    case LY_TYPE_STRING:
  ------------------
  |  Branch (899:5): [True: 210k, False: 351k]
  ------------------
  900|   210k|        FREE_MEMBER(ctx, ((struct lysc_type_str *)type)->length, lysc_range_free);
  ------------------
  |  |   39|   210k|#define FREE_MEMBER(CTX, MEMBER, FUNC) if (MEMBER) {(FUNC)(CTX, MEMBER);free(MEMBER);}
  |  |  ------------------
  |  |  |  Branch (39:44): [True: 70.2k, False: 140k]
  |  |  ------------------
  ------------------
  901|   210k|        FREE_ARRAY(ctx, ((struct lysc_type_str *)type)->patterns, lysc_pattern_free);
  ------------------
  |  |   34|   210k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   210k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   210k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   210k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   210k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   210k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   253k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   253k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 70.2k, False: 182k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 42.1k, False: 210k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   210k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   210k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 28.1k, False: 182k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  902|   210k|        break;
  903|  42.1k|    case LY_TYPE_ENUM:
  ------------------
  |  Branch (903:5): [True: 42.1k, False: 520k]
  ------------------
  904|  42.1k|        FREE_ARRAY(ctx, ((struct lysc_type_enum *)type)->enums, lysc_enum_item_free);
  ------------------
  |  |   34|   140k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  42.1k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  42.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  42.1k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  42.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  42.1k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   182k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   182k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 182k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 140k, False: 42.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   140k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  42.1k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 42.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  905|  42.1k|        break;
  906|      0|    case LY_TYPE_INT8:
  ------------------
  |  Branch (906:5): [True: 0, False: 562k]
  ------------------
  907|      0|    case LY_TYPE_UINT8:
  ------------------
  |  Branch (907:5): [True: 0, False: 562k]
  ------------------
  908|      0|    case LY_TYPE_INT16:
  ------------------
  |  Branch (908:5): [True: 0, False: 562k]
  ------------------
  909|      0|    case LY_TYPE_UINT16:
  ------------------
  |  Branch (909:5): [True: 0, False: 562k]
  ------------------
  910|      0|    case LY_TYPE_INT32:
  ------------------
  |  Branch (910:5): [True: 0, False: 562k]
  ------------------
  911|  28.1k|    case LY_TYPE_UINT32:
  ------------------
  |  Branch (911:5): [True: 28.1k, False: 534k]
  ------------------
  912|  28.1k|    case LY_TYPE_INT64:
  ------------------
  |  Branch (912:5): [True: 0, False: 562k]
  ------------------
  913|  28.1k|    case LY_TYPE_UINT64:
  ------------------
  |  Branch (913:5): [True: 0, False: 562k]
  ------------------
  914|  28.1k|        FREE_MEMBER(ctx, ((struct lysc_type_num *)type)->range, lysc_range_free);
  ------------------
  |  |   39|  28.1k|#define FREE_MEMBER(CTX, MEMBER, FUNC) if (MEMBER) {(FUNC)(CTX, MEMBER);free(MEMBER);}
  |  |  ------------------
  |  |  |  Branch (39:44): [True: 28.1k, False: 0]
  |  |  ------------------
  ------------------
  915|  28.1k|        break;
  916|  14.0k|    case LY_TYPE_IDENT:
  ------------------
  |  Branch (916:5): [True: 14.0k, False: 548k]
  ------------------
  917|  14.0k|        LY_ARRAY_FREE(((struct lysc_type_identityref *)type)->bases);
  ------------------
  |  |  232|  14.0k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 14.0k, False: 0]
  |  |  ------------------
  ------------------
  918|  14.0k|        break;
  919|   112k|    case LY_TYPE_UNION:
  ------------------
  |  Branch (919:5): [True: 112k, False: 449k]
  ------------------
  920|   112k|        FREE_ARRAY(ctx, ((struct lysc_type_union *)type)->types, lysc_type2_free);
  ------------------
  |  |   34|   224k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   337k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   337k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 337k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 224k, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   224k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   112k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 112k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  921|   112k|        break;
  922|  70.2k|    case LY_TYPE_LEAFREF:
  ------------------
  |  Branch (922:5): [True: 70.2k, False: 492k]
  ------------------
  923|  70.2k|        lyxp_expr_free(ctx->ctx, ((struct lysc_type_leafref *)type)->path);
  924|  70.2k|        ly_free_prefix_data(LY_VALUE_SCHEMA_RESOLVED, ((struct lysc_type_leafref *)type)->prefixes);
  925|  70.2k|        lysc_type_free(ctx, ((struct lysc_type_leafref *)type)->realtype);
  926|  70.2k|        break;
  927|      0|    case LY_TYPE_INST:
  ------------------
  |  Branch (927:5): [True: 0, False: 562k]
  ------------------
  928|  28.1k|    case LY_TYPE_BOOL:
  ------------------
  |  Branch (928:5): [True: 28.1k, False: 534k]
  ------------------
  929|  84.3k|    case LY_TYPE_EMPTY:
  ------------------
  |  Branch (929:5): [True: 56.2k, False: 506k]
  ------------------
  930|  84.3k|    case LY_TYPE_UNKNOWN:
  ------------------
  |  Branch (930:5): [True: 0, False: 562k]
  ------------------
  931|       |        /* nothing to do */
  932|  84.3k|        break;
  933|   562k|    }
  934|       |
  935|   562k|    FREE_ARRAY(ctx, type->exts, lysc_ext_instance_free);
  ------------------
  |  |   34|   562k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   562k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   562k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   562k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   562k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   562k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   562k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   562k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 562k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 562k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   562k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   562k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 562k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  936|   562k|    free(type);
  937|   562k|}
lysc_node_container_free:
  997|  70.2k|{
  998|  70.2k|    struct lysc_node *child, *child_next;
  999|       |
 1000|   126k|    LY_LIST_FOR_SAFE(node->child, child_next, child) {
  ------------------
  |  |  195|  70.2k|    for ((ELEM) = (START); \
  |  |  196|   196k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 126k, False: 70.2k]
  |  |  |  Branch (196:10): [True: 126k, False: 70.2k]
  |  |  ------------------
  |  |  197|   126k|         (ELEM) = (NEXT))
  ------------------
 1001|   126k|        lysc_node_free_(ctx, child);
 1002|   126k|    }
 1003|  70.2k|    LY_LIST_FOR_SAFE((struct lysc_node *)node->actions, child_next, child) {
  ------------------
  |  |  195|  70.2k|    for ((ELEM) = (START); \
  |  |  196|  70.2k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 70.2k]
  |  |  |  Branch (196:10): [True: 0, False: 70.2k]
  |  |  ------------------
  |  |  197|  70.2k|         (ELEM) = (NEXT))
  ------------------
 1004|      0|        lysc_node_free_(ctx, child);
 1005|      0|    }
 1006|  70.2k|    LY_LIST_FOR_SAFE((struct lysc_node *)node->notifs, child_next, child) {
  ------------------
  |  |  195|  70.2k|    for ((ELEM) = (START); \
  |  |  196|  70.2k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 70.2k]
  |  |  |  Branch (196:10): [True: 0, False: 70.2k]
  |  |  ------------------
  |  |  197|  70.2k|         (ELEM) = (NEXT))
  ------------------
 1007|      0|        lysc_node_free_(ctx, child);
 1008|      0|    }
 1009|  70.2k|    FREE_ARRAY(ctx, node->when, lysc_when_free);
  ------------------
  |  |   34|  70.2k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  70.2k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  70.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  70.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  70.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  70.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  70.2k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  70.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  70.2k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  70.2k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 70.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1010|  70.2k|    FREE_ARRAY(ctx, node->musts, lysc_must_free);
  ------------------
  |  |   34|  70.2k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  70.2k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  70.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  70.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  70.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  70.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  70.2k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  70.2k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 70.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  70.2k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  70.2k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 70.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1011|  70.2k|}
lysc_module_free:
 1280|   112k|{
 1281|   112k|    struct lysc_node *node, *node_next;
 1282|       |
 1283|   112k|    if (!module) {
  ------------------
  |  Branch (1283:9): [True: 56.2k, False: 56.2k]
  ------------------
 1284|  56.2k|        return;
 1285|  56.2k|    }
 1286|       |
 1287|  56.2k|    LY_LIST_FOR_SAFE(module->data, node_next, node) {
  ------------------
  |  |  195|  56.2k|    for ((ELEM) = (START); \
  |  |  196|  98.4k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 42.1k, False: 56.2k]
  |  |  |  Branch (196:10): [True: 42.1k, False: 56.2k]
  |  |  ------------------
  |  |  197|  56.2k|         (ELEM) = (NEXT))
  ------------------
 1288|  42.1k|        lysc_node_free_(ctx, node);
 1289|  42.1k|    }
 1290|  56.2k|    LY_LIST_FOR_SAFE((struct lysc_node *)module->rpcs, node_next, node) {
  ------------------
  |  |  195|  56.2k|    for ((ELEM) = (START); \
  |  |  196|  56.2k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 56.2k]
  |  |  |  Branch (196:10): [True: 0, False: 56.2k]
  |  |  ------------------
  |  |  197|  56.2k|         (ELEM) = (NEXT))
  ------------------
 1291|      0|        lysc_node_free_(ctx, node);
 1292|      0|    }
 1293|  56.2k|    LY_LIST_FOR_SAFE((struct lysc_node *)module->notifs, node_next, node) {
  ------------------
  |  |  195|  56.2k|    for ((ELEM) = (START); \
  |  |  196|  84.3k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 28.1k, False: 56.2k]
  |  |  |  Branch (196:10): [True: 28.1k, False: 56.2k]
  |  |  ------------------
  |  |  197|  56.2k|         (ELEM) = (NEXT))
  ------------------
 1294|  28.1k|        lysc_node_free_(ctx, node);
 1295|  28.1k|    }
 1296|  56.2k|    FREE_ARRAY(ctx, module->exts, lysc_ext_instance_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  56.2k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  56.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  56.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  56.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   182k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   182k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 140k, False: 42.1k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 126k, False: 56.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  56.2k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 14.0k, False: 42.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1297|       |
 1298|  56.2k|    free(module);
 1299|  56.2k|}
lys_module_free:
 1303|   126k|{
 1304|   126k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1305|       |
 1306|   126k|    if (!module) {
  ------------------
  |  Branch (1306:9): [True: 0, False: 126k]
  ------------------
 1307|      0|        return;
 1308|      0|    }
 1309|       |
 1310|   126k|    assert(!module->implemented);
 1311|      0|    assert(!module->compiled);
 1312|       |
 1313|   126k|    if (remove_links) {
  ------------------
  |  Branch (1313:9): [True: 0, False: 126k]
  ------------------
 1314|       |        /* remove derived identity links */
 1315|      0|        LY_ARRAY_FOR(module->identities, u) {
  ------------------
  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1316|      0|            lysc_ident_derived_unlink(&module->identities[u]);
 1317|      0|        }
 1318|      0|    }
 1319|   126k|    FREE_ARRAY(ctx, module->identities, lysc_ident_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   238k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   238k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 126k, False: 112k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 112k, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 14.0k, False: 112k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1320|   126k|    lysp_module_free(ctx, module->parsed);
 1321|       |
 1322|   126k|    LY_ARRAY_FREE(module->augmented_by);
  ------------------
  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
 1323|   126k|    LY_ARRAY_FREE(module->deviated_by);
  ------------------
  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
 1324|       |
 1325|   126k|    lydict_remove(ctx->ctx, module->name);
 1326|   126k|    lydict_remove(ctx->ctx, module->revision);
 1327|   126k|    lydict_remove(ctx->ctx, module->ns);
 1328|   126k|    lydict_remove(ctx->ctx, module->prefix);
 1329|   126k|    lydict_remove(ctx->ctx, module->filepath);
 1330|   126k|    lydict_remove(ctx->ctx, module->org);
 1331|   126k|    lydict_remove(ctx->ctx, module->contact);
 1332|   126k|    lydict_remove(ctx->ctx, module->dsc);
 1333|   126k|    lydict_remove(ctx->ctx, module->ref);
 1334|       |
 1335|   126k|    free(module);
 1336|   126k|}
lysf_ctx_erase:
 1340|   267k|{
 1341|   267k|    struct lysc_ext *ext;
 1342|   267k|    uint32_t i;
 1343|       |
 1344|   281k|    for (i = 0; i < ctx->ext_set.count; ++i) {
  ------------------
  |  Branch (1344:17): [True: 14.0k, False: 267k]
  ------------------
 1345|  14.0k|        ext = ctx->ext_set.objs[i];
 1346|       |
 1347|  14.0k|        lydict_remove(ctx->ctx, ext->name);
 1348|  14.0k|        lydict_remove(ctx->ctx, ext->argname);
 1349|  14.0k|        free(ext);
 1350|  14.0k|    }
 1351|   267k|    ly_set_erase(&ctx->ext_set, NULL);
 1352|   267k|}
lyplg_ext_pfree_instance_substatements:
 1356|   126k|{
 1357|   126k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1358|   126k|    struct lysf_ctx fctx = {.ctx = (struct ly_ctx *)ctx};
 1359|   126k|    ly_bool node_free;
 1360|       |
 1361|   759k|    LY_ARRAY_FOR(substmts, u) {
  ------------------
  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   885k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   885k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 885k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 759k, False: 126k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   759k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1362|   759k|        if (!substmts[u].storage) {
  ------------------
  |  Branch (1362:13): [True: 0, False: 759k]
  ------------------
 1363|      0|            continue;
 1364|      0|        }
 1365|       |
 1366|   759k|        switch (substmts[u].stmt) {
 1367|      0|        case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (1367:9): [True: 0, False: 759k]
  ------------------
 1368|      0|        case LY_STMT_INPUT:
  ------------------
  |  Branch (1368:9): [True: 0, False: 759k]
  ------------------
 1369|      0|        case LY_STMT_OUTPUT:
  ------------------
  |  Branch (1369:9): [True: 0, False: 759k]
  ------------------
 1370|      0|        case LY_STMT_ACTION:
  ------------------
  |  Branch (1370:9): [True: 0, False: 759k]
  ------------------
 1371|      0|        case LY_STMT_RPC:
  ------------------
  |  Branch (1371:9): [True: 0, False: 759k]
  ------------------
 1372|      0|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (1372:9): [True: 0, False: 759k]
  ------------------
 1373|      0|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (1373:9): [True: 0, False: 759k]
  ------------------
 1374|      0|        case LY_STMT_AUGMENT:
  ------------------
  |  Branch (1374:9): [True: 0, False: 759k]
  ------------------
 1375|      0|        case LY_STMT_CASE:
  ------------------
  |  Branch (1375:9): [True: 0, False: 759k]
  ------------------
 1376|      0|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (1376:9): [True: 0, False: 759k]
  ------------------
 1377|      0|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (1377:9): [True: 0, False: 759k]
  ------------------
 1378|      0|        case LY_STMT_GROUPING:
  ------------------
  |  Branch (1378:9): [True: 0, False: 759k]
  ------------------
 1379|      0|        case LY_STMT_LEAF:
  ------------------
  |  Branch (1379:9): [True: 0, False: 759k]
  ------------------
 1380|      0|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (1380:9): [True: 0, False: 759k]
  ------------------
 1381|      0|        case LY_STMT_LIST:
  ------------------
  |  Branch (1381:9): [True: 0, False: 759k]
  ------------------
 1382|      0|        case LY_STMT_USES: {
  ------------------
  |  Branch (1382:9): [True: 0, False: 759k]
  ------------------
 1383|      0|            struct lysp_node *child, *child_next;
 1384|       |
 1385|      0|            LY_LIST_FOR_SAFE(*((struct lysp_node **)substmts[u].storage), child_next, child) {
  ------------------
  |  |  195|      0|    for ((ELEM) = (START); \
  |  |  196|      0|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  197|      0|         (ELEM) = (NEXT))
  ------------------
 1386|      0|                node_free = (child->nodetype & (LYS_INPUT | LYS_OUTPUT)) ? 1 : 0;
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
                              node_free = (child->nodetype & (LYS_INPUT | LYS_OUTPUT)) ? 1 : 0;
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (1386:29): [True: 0, False: 0]
  ------------------
 1387|      0|                lysp_node_free(&fctx, child);
 1388|      0|                if (node_free) {
  ------------------
  |  Branch (1388:21): [True: 0, False: 0]
  ------------------
 1389|      0|                    free(child);
 1390|      0|                }
 1391|      0|            }
 1392|      0|            *((struct lysc_node **)substmts[u].storage) = NULL;
 1393|      0|            break;
 1394|      0|        }
 1395|      0|        case LY_STMT_BASE:
  ------------------
  |  Branch (1395:9): [True: 0, False: 759k]
  ------------------
 1396|       |            /* multiple strings */
 1397|      0|            FREE_ARRAY(ctx, **(const char ***)substmts[u].storage, lydict_remove);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1398|      0|            break;
 1399|       |
 1400|      0|        case LY_STMT_BIT:
  ------------------
  |  Branch (1400:9): [True: 0, False: 759k]
  ------------------
 1401|      0|        case LY_STMT_ENUM:
  ------------------
  |  Branch (1401:9): [True: 0, False: 759k]
  ------------------
 1402|       |            /* single enum */
 1403|      0|            lysp_type_enum_free(&fctx, *(struct lysp_type_enum **)substmts[u].storage);
 1404|      0|            break;
 1405|       |
 1406|      0|        case LY_STMT_DEVIATE:
  ------------------
  |  Branch (1406:9): [True: 0, False: 759k]
  ------------------
 1407|       |            /* single deviate */
 1408|      0|            lysp_deviate_free(&fctx, *(struct lysp_deviate **)substmts[u].storage);
 1409|      0|            break;
 1410|       |
 1411|      0|        case LY_STMT_DEVIATION:
  ------------------
  |  Branch (1411:9): [True: 0, False: 759k]
  ------------------
 1412|       |            /* single deviation */
 1413|      0|            lysp_deviation_free(&fctx, *(struct lysp_deviation **)substmts[u].storage);
 1414|      0|            break;
 1415|       |
 1416|      0|        case LY_STMT_EXTENSION:
  ------------------
  |  Branch (1416:9): [True: 0, False: 759k]
  ------------------
 1417|       |            /* single extension */
 1418|      0|            lysp_ext_free(&fctx, *(struct lysp_ext **)substmts[u].storage);
 1419|      0|            break;
 1420|       |
 1421|      0|        case LY_STMT_EXTENSION_INSTANCE:
  ------------------
  |  Branch (1421:9): [True: 0, False: 759k]
  ------------------
 1422|       |            /* multiple extension instances */
 1423|      0|            FREE_ARRAY(&fctx, *(struct lysp_ext_instance **)substmts[u].storage, lysp_ext_instance_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1424|      0|            break;
 1425|       |
 1426|      0|        case LY_STMT_FEATURE:
  ------------------
  |  Branch (1426:9): [True: 0, False: 759k]
  ------------------
 1427|       |            /* multiple features */
 1428|      0|            FREE_ARRAY(&fctx, *(struct lysp_feature **)substmts[u].storage, lysp_feature_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1429|      0|            break;
 1430|       |
 1431|      0|        case LY_STMT_IDENTITY:
  ------------------
  |  Branch (1431:9): [True: 0, False: 759k]
  ------------------
 1432|       |            /* multiple identities */
 1433|      0|            FREE_ARRAY(&fctx, *(struct lysp_ident **)substmts[u].storage, lysp_ident_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1434|      0|            break;
 1435|       |
 1436|      0|        case LY_STMT_IMPORT:
  ------------------
  |  Branch (1436:9): [True: 0, False: 759k]
  ------------------
 1437|       |            /* multiple imports */
 1438|      0|            FREE_ARRAY(&fctx, *(struct lysp_import **)substmts[u].storage, lysp_import_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1439|      0|            break;
 1440|       |
 1441|      0|        case LY_STMT_INCLUDE:
  ------------------
  |  Branch (1441:9): [True: 0, False: 759k]
  ------------------
 1442|       |            /* multiple includes */
 1443|      0|            FREE_ARRAY(&fctx, *(struct lysp_include **)substmts[u].storage, lysp_include_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1444|      0|            break;
 1445|       |
 1446|      0|        case LY_STMT_REFINE:
  ------------------
  |  Branch (1446:9): [True: 0, False: 759k]
  ------------------
 1447|       |            /* multiple refines */
 1448|      0|            FREE_ARRAY(&fctx, *(struct lysp_refine **)substmts[u].storage, lysp_refine_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1449|      0|            break;
 1450|       |
 1451|      0|        case LY_STMT_REVISION:
  ------------------
  |  Branch (1451:9): [True: 0, False: 759k]
  ------------------
 1452|       |            /* multiple revisions */
 1453|      0|            FREE_ARRAY(&fctx, *(struct lysp_revision **)substmts[u].storage, lysp_revision_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1454|      0|            break;
 1455|       |
 1456|      0|        case LY_STMT_CONFIG:
  ------------------
  |  Branch (1456:9): [True: 0, False: 759k]
  ------------------
 1457|      0|        case LY_STMT_FRACTION_DIGITS:
  ------------------
  |  Branch (1457:9): [True: 0, False: 759k]
  ------------------
 1458|      0|        case LY_STMT_MANDATORY:
  ------------------
  |  Branch (1458:9): [True: 0, False: 759k]
  ------------------
 1459|      0|        case LY_STMT_MAX_ELEMENTS:
  ------------------
  |  Branch (1459:9): [True: 0, False: 759k]
  ------------------
 1460|      0|        case LY_STMT_MIN_ELEMENTS:
  ------------------
  |  Branch (1460:9): [True: 0, False: 759k]
  ------------------
 1461|      0|        case LY_STMT_ORDERED_BY:
  ------------------
  |  Branch (1461:9): [True: 0, False: 759k]
  ------------------
 1462|      0|        case LY_STMT_POSITION:
  ------------------
  |  Branch (1462:9): [True: 0, False: 759k]
  ------------------
 1463|      0|        case LY_STMT_REQUIRE_INSTANCE:
  ------------------
  |  Branch (1463:9): [True: 0, False: 759k]
  ------------------
 1464|   126k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (1464:9): [True: 126k, False: 632k]
  ------------------
 1465|   126k|        case LY_STMT_VALUE:
  ------------------
  |  Branch (1465:9): [True: 0, False: 759k]
  ------------------
 1466|   126k|        case LY_STMT_YANG_VERSION:
  ------------------
  |  Branch (1466:9): [True: 0, False: 759k]
  ------------------
 1467|   126k|        case LY_STMT_YIN_ELEMENT:
  ------------------
  |  Branch (1467:9): [True: 0, False: 759k]
  ------------------
 1468|       |            /* nothing to do */
 1469|   126k|            break;
 1470|       |
 1471|      0|        case LY_STMT_ARGUMENT:
  ------------------
  |  Branch (1471:9): [True: 0, False: 759k]
  ------------------
 1472|      0|        case LY_STMT_BELONGS_TO:
  ------------------
  |  Branch (1472:9): [True: 0, False: 759k]
  ------------------
 1473|      0|        case LY_STMT_CONTACT:
  ------------------
  |  Branch (1473:9): [True: 0, False: 759k]
  ------------------
 1474|   126k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (1474:9): [True: 126k, False: 632k]
  ------------------
 1475|   126k|        case LY_STMT_ERROR_APP_TAG:
  ------------------
  |  Branch (1475:9): [True: 0, False: 759k]
  ------------------
 1476|   126k|        case LY_STMT_ERROR_MESSAGE:
  ------------------
  |  Branch (1476:9): [True: 0, False: 759k]
  ------------------
 1477|   126k|        case LY_STMT_KEY:
  ------------------
  |  Branch (1477:9): [True: 0, False: 759k]
  ------------------
 1478|   126k|        case LY_STMT_MODIFIER:
  ------------------
  |  Branch (1478:9): [True: 0, False: 759k]
  ------------------
 1479|   126k|        case LY_STMT_NAMESPACE:
  ------------------
  |  Branch (1479:9): [True: 0, False: 759k]
  ------------------
 1480|   126k|        case LY_STMT_ORGANIZATION:
  ------------------
  |  Branch (1480:9): [True: 0, False: 759k]
  ------------------
 1481|   126k|        case LY_STMT_PREFIX:
  ------------------
  |  Branch (1481:9): [True: 0, False: 759k]
  ------------------
 1482|   126k|        case LY_STMT_PRESENCE:
  ------------------
  |  Branch (1482:9): [True: 0, False: 759k]
  ------------------
 1483|   253k|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (1483:9): [True: 126k, False: 632k]
  ------------------
 1484|   253k|        case LY_STMT_REVISION_DATE:
  ------------------
  |  Branch (1484:9): [True: 0, False: 759k]
  ------------------
 1485|   379k|        case LY_STMT_UNITS:
  ------------------
  |  Branch (1485:9): [True: 126k, False: 632k]
  ------------------
 1486|       |            /* single string */
 1487|   379k|            lydict_remove(ctx, *(const char **)substmts[u].storage);
 1488|   379k|            break;
 1489|       |
 1490|      0|        case LY_STMT_LENGTH:
  ------------------
  |  Branch (1490:9): [True: 0, False: 759k]
  ------------------
 1491|      0|        case LY_STMT_MUST:
  ------------------
  |  Branch (1491:9): [True: 0, False: 759k]
  ------------------
 1492|      0|        case LY_STMT_PATTERN:
  ------------------
  |  Branch (1492:9): [True: 0, False: 759k]
  ------------------
 1493|      0|        case LY_STMT_RANGE:
  ------------------
  |  Branch (1493:9): [True: 0, False: 759k]
  ------------------
 1494|       |            /* multiple restrictions */
 1495|      0|            FREE_ARRAY(&fctx, *(struct lysp_restr **)substmts[u].storage, lysp_restr_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1496|      0|            break;
 1497|       |
 1498|      0|        case LY_STMT_WHEN:
  ------------------
  |  Branch (1498:9): [True: 0, False: 759k]
  ------------------
 1499|       |            /* multiple whens */
 1500|      0|            FREE_ARRAY(&fctx, *(struct lysp_when **)substmts[u].storage, lysp_when_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1501|      0|            break;
 1502|       |
 1503|      0|        case LY_STMT_PATH:
  ------------------
  |  Branch (1503:9): [True: 0, False: 759k]
  ------------------
 1504|       |            /* single expression */
 1505|      0|            lyxp_expr_free(ctx, *(struct lyxp_expr **)substmts[u].storage);
 1506|      0|            break;
 1507|       |
 1508|      0|        case LY_STMT_DEFAULT:
  ------------------
  |  Branch (1508:9): [True: 0, False: 759k]
  ------------------
 1509|   126k|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (1509:9): [True: 126k, False: 632k]
  ------------------
 1510|   126k|        case LY_STMT_UNIQUE:
  ------------------
  |  Branch (1510:9): [True: 0, False: 759k]
  ------------------
 1511|       |            /* multiple qnames */
 1512|   126k|            FREE_ARRAY(ctx, *(struct lysp_qname **)substmts[u].storage, lysp_qname_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   126k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   126k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 126k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1513|   126k|            break;
 1514|       |
 1515|      0|        case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (1515:9): [True: 0, False: 759k]
  ------------------
 1516|       |            /* multiple typedefs */
 1517|      0|            FREE_ARRAY(&fctx, *(struct lysp_tpdf **)substmts[u].storage, lysp_tpdf_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1518|      0|            break;
 1519|       |
 1520|   126k|        case LY_STMT_TYPE: {
  ------------------
  |  Branch (1520:9): [True: 126k, False: 632k]
  ------------------
 1521|       |            /* single type */
 1522|   126k|            struct lysp_type **type_p = substmts[u].storage;
 1523|       |
 1524|   126k|            lysp_type_free(&fctx, *type_p);
 1525|   126k|            free(*type_p);
 1526|   126k|            break;
 1527|   126k|        }
 1528|      0|        case LY_STMT_MODULE:
  ------------------
  |  Branch (1528:9): [True: 0, False: 759k]
  ------------------
 1529|      0|        case LY_STMT_SUBMODULE:
  ------------------
  |  Branch (1529:9): [True: 0, False: 759k]
  ------------------
 1530|       |            /* single (sub)module */
 1531|      0|            lysp_module_free(&fctx, *(struct lysp_module **)substmts[u].storage);
 1532|      0|            break;
 1533|       |
 1534|      0|        default:
  ------------------
  |  Branch (1534:9): [True: 0, False: 759k]
  ------------------
 1535|      0|            LOGINT(ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
 1536|   759k|        }
 1537|   759k|    }
 1538|       |
 1539|   126k|    LY_ARRAY_FREE(substmts);
  ------------------
  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 126k, False: 0]
  |  |  ------------------
  ------------------
 1540|   126k|}
lyplg_ext_cfree_instance_substatements:
 1544|   126k|{
 1545|   126k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1546|   126k|    struct lysf_ctx fctx = {.ctx = (struct ly_ctx *)ctx};
 1547|   126k|    ly_bool node_free;
 1548|       |
 1549|   759k|    LY_ARRAY_FOR(substmts, u) {
  ------------------
  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   885k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   885k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 885k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 759k, False: 126k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   759k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1550|   759k|        if (!substmts[u].storage) {
  ------------------
  |  Branch (1550:13): [True: 126k, False: 632k]
  ------------------
 1551|   126k|            continue;
 1552|   126k|        }
 1553|       |
 1554|   632k|        switch (substmts[u].stmt) {
 1555|      0|        case LY_STMT_NOTIFICATION:
  ------------------
  |  Branch (1555:9): [True: 0, False: 632k]
  ------------------
 1556|      0|        case LY_STMT_INPUT:
  ------------------
  |  Branch (1556:9): [True: 0, False: 632k]
  ------------------
 1557|      0|        case LY_STMT_OUTPUT:
  ------------------
  |  Branch (1557:9): [True: 0, False: 632k]
  ------------------
 1558|      0|        case LY_STMT_ACTION:
  ------------------
  |  Branch (1558:9): [True: 0, False: 632k]
  ------------------
 1559|      0|        case LY_STMT_RPC:
  ------------------
  |  Branch (1559:9): [True: 0, False: 632k]
  ------------------
 1560|      0|        case LY_STMT_ANYDATA:
  ------------------
  |  Branch (1560:9): [True: 0, False: 632k]
  ------------------
 1561|      0|        case LY_STMT_ANYXML:
  ------------------
  |  Branch (1561:9): [True: 0, False: 632k]
  ------------------
 1562|      0|        case LY_STMT_CASE:
  ------------------
  |  Branch (1562:9): [True: 0, False: 632k]
  ------------------
 1563|      0|        case LY_STMT_CHOICE:
  ------------------
  |  Branch (1563:9): [True: 0, False: 632k]
  ------------------
 1564|      0|        case LY_STMT_CONTAINER:
  ------------------
  |  Branch (1564:9): [True: 0, False: 632k]
  ------------------
 1565|      0|        case LY_STMT_LEAF:
  ------------------
  |  Branch (1565:9): [True: 0, False: 632k]
  ------------------
 1566|      0|        case LY_STMT_LEAF_LIST:
  ------------------
  |  Branch (1566:9): [True: 0, False: 632k]
  ------------------
 1567|      0|        case LY_STMT_LIST: {
  ------------------
  |  Branch (1567:9): [True: 0, False: 632k]
  ------------------
 1568|      0|            struct lysc_node *child, *child_next;
 1569|       |
 1570|      0|            LY_LIST_FOR_SAFE(*((struct lysc_node **)substmts[u].storage), child_next, child) {
  ------------------
  |  |  195|      0|    for ((ELEM) = (START); \
  |  |  196|      0|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  |  Branch (196:10): [True: 0, False: 0]
  |  |  ------------------
  |  |  197|      0|         (ELEM) = (NEXT))
  ------------------
 1571|      0|                node_free = (child->nodetype & (LYS_INPUT | LYS_OUTPUT)) ? 1 : 0;
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
                              node_free = (child->nodetype & (LYS_INPUT | LYS_OUTPUT)) ? 1 : 0;
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (1571:29): [True: 0, False: 0]
  ------------------
 1572|      0|                lysc_node_free_(&fctx, child);
 1573|      0|                if (node_free) {
  ------------------
  |  Branch (1573:21): [True: 0, False: 0]
  ------------------
 1574|      0|                    free(child);
 1575|      0|                }
 1576|      0|            }
 1577|      0|            *((struct lysc_node **)substmts[u].storage) = NULL;
 1578|      0|            break;
 1579|      0|        }
 1580|      0|        case LY_STMT_USES:
  ------------------
  |  Branch (1580:9): [True: 0, False: 632k]
  ------------------
 1581|      0|        case LY_STMT_CONFIG:
  ------------------
  |  Branch (1581:9): [True: 0, False: 632k]
  ------------------
 1582|      0|        case LY_STMT_FRACTION_DIGITS:
  ------------------
  |  Branch (1582:9): [True: 0, False: 632k]
  ------------------
 1583|      0|        case LY_STMT_MANDATORY:
  ------------------
  |  Branch (1583:9): [True: 0, False: 632k]
  ------------------
 1584|      0|        case LY_STMT_MAX_ELEMENTS:
  ------------------
  |  Branch (1584:9): [True: 0, False: 632k]
  ------------------
 1585|      0|        case LY_STMT_MIN_ELEMENTS:
  ------------------
  |  Branch (1585:9): [True: 0, False: 632k]
  ------------------
 1586|      0|        case LY_STMT_ORDERED_BY:
  ------------------
  |  Branch (1586:9): [True: 0, False: 632k]
  ------------------
 1587|      0|        case LY_STMT_POSITION:
  ------------------
  |  Branch (1587:9): [True: 0, False: 632k]
  ------------------
 1588|      0|        case LY_STMT_REQUIRE_INSTANCE:
  ------------------
  |  Branch (1588:9): [True: 0, False: 632k]
  ------------------
 1589|   126k|        case LY_STMT_STATUS:
  ------------------
  |  Branch (1589:9): [True: 126k, False: 506k]
  ------------------
 1590|   126k|        case LY_STMT_VALUE:
  ------------------
  |  Branch (1590:9): [True: 0, False: 632k]
  ------------------
 1591|       |            /* nothing to do */
 1592|   126k|            break;
 1593|       |
 1594|      0|        case LY_STMT_ARGUMENT:
  ------------------
  |  Branch (1594:9): [True: 0, False: 632k]
  ------------------
 1595|      0|        case LY_STMT_CONTACT:
  ------------------
  |  Branch (1595:9): [True: 0, False: 632k]
  ------------------
 1596|   126k|        case LY_STMT_DESCRIPTION:
  ------------------
  |  Branch (1596:9): [True: 126k, False: 506k]
  ------------------
 1597|   126k|        case LY_STMT_ERROR_APP_TAG:
  ------------------
  |  Branch (1597:9): [True: 0, False: 632k]
  ------------------
 1598|   126k|        case LY_STMT_ERROR_MESSAGE:
  ------------------
  |  Branch (1598:9): [True: 0, False: 632k]
  ------------------
 1599|   126k|        case LY_STMT_KEY:
  ------------------
  |  Branch (1599:9): [True: 0, False: 632k]
  ------------------
 1600|   126k|        case LY_STMT_MODIFIER:
  ------------------
  |  Branch (1600:9): [True: 0, False: 632k]
  ------------------
 1601|   126k|        case LY_STMT_NAMESPACE:
  ------------------
  |  Branch (1601:9): [True: 0, False: 632k]
  ------------------
 1602|   126k|        case LY_STMT_ORGANIZATION:
  ------------------
  |  Branch (1602:9): [True: 0, False: 632k]
  ------------------
 1603|   126k|        case LY_STMT_PRESENCE:
  ------------------
  |  Branch (1603:9): [True: 0, False: 632k]
  ------------------
 1604|   253k|        case LY_STMT_REFERENCE:
  ------------------
  |  Branch (1604:9): [True: 126k, False: 506k]
  ------------------
 1605|   379k|        case LY_STMT_UNITS: {
  ------------------
  |  Branch (1605:9): [True: 126k, False: 506k]
  ------------------
 1606|       |            /* single item */
 1607|   379k|            const char *str = *((const char **)substmts[u].storage);
 1608|       |
 1609|   379k|            lydict_remove(ctx, str);
 1610|   379k|            break;
 1611|   253k|        }
 1612|      0|        case LY_STMT_BIT:
  ------------------
  |  Branch (1612:9): [True: 0, False: 632k]
  ------------------
 1613|      0|        case LY_STMT_ENUM: {
  ------------------
  |  Branch (1613:9): [True: 0, False: 632k]
  ------------------
 1614|       |            /* sized array */
 1615|      0|            struct lysc_type_bitenum_item *items = *((struct lysc_type_bitenum_item **)substmts[u].storage);
 1616|       |
 1617|      0|            FREE_ARRAY(&fctx, items, lysc_enum_item_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1618|      0|            break;
 1619|      0|        }
 1620|      0|        case LY_STMT_LENGTH:
  ------------------
  |  Branch (1620:9): [True: 0, False: 632k]
  ------------------
 1621|      0|        case LY_STMT_RANGE: {
  ------------------
  |  Branch (1621:9): [True: 0, False: 632k]
  ------------------
 1622|       |            /* single item */
 1623|      0|            struct lysc_range *range = *((struct lysc_range **)substmts[u].storage);
 1624|       |
 1625|      0|            lysc_range_free(&fctx, range);
 1626|      0|            break;
 1627|      0|        }
 1628|      0|        case LY_STMT_MUST: {
  ------------------
  |  Branch (1628:9): [True: 0, False: 632k]
  ------------------
 1629|       |            /* sized array */
 1630|      0|            struct lysc_must *musts = *((struct lysc_must **)substmts[u].storage);
 1631|       |
 1632|      0|            FREE_ARRAY(&fctx, musts, lysc_must_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1633|      0|            break;
 1634|      0|        }
 1635|      0|        case LY_STMT_WHEN:
  ------------------
  |  Branch (1635:9): [True: 0, False: 632k]
  ------------------
 1636|       |            /* single item, expects a pointer */
 1637|      0|            lysc_when_free(&fctx, substmts[u].storage);
 1638|      0|            break;
 1639|       |
 1640|      0|        case LY_STMT_PATTERN: {
  ------------------
  |  Branch (1640:9): [True: 0, False: 632k]
  ------------------
 1641|       |            /* sized array of pointers */
 1642|      0|            struct lysc_pattern **patterns = *((struct lysc_pattern ***)substmts[u].storage);
 1643|       |
 1644|      0|            FREE_ARRAY(&fctx, patterns, lysc_pattern_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1645|      0|            break;
 1646|      0|        }
 1647|   126k|        case LY_STMT_TYPE: {
  ------------------
  |  Branch (1647:9): [True: 126k, False: 506k]
  ------------------
 1648|       |            /* single item */
 1649|   126k|            struct lysc_type *type = *((struct lysc_type **)substmts[u].storage);
 1650|       |
 1651|   126k|            lysc_type_free(&fctx, type);
 1652|   126k|            break;
 1653|      0|        }
 1654|      0|        case LY_STMT_IDENTITY: {
  ------------------
  |  Branch (1654:9): [True: 0, False: 632k]
  ------------------
 1655|       |            /* sized array */
 1656|      0|            struct lysc_ident *idents = *((struct lysc_ident **)substmts[u].storage);
 1657|       |
 1658|      0|            FREE_ARRAY(&fctx, idents, lysc_ident_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1659|      0|            break;
 1660|      0|        }
 1661|      0|        case LY_STMT_EXTENSION_INSTANCE: {
  ------------------
  |  Branch (1661:9): [True: 0, False: 632k]
  ------------------
 1662|       |            /* sized array */
 1663|      0|            struct lysc_ext_instance *exts = *((struct lysc_ext_instance **)substmts[u].storage);
 1664|       |
 1665|      0|            FREE_ARRAY(&fctx, exts, lysc_ext_instance_free);
  ------------------
  |  |   34|      0|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|      0|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|      0|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|      0|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|      0|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|      0|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|      0|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|      0|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|      0|            break;
 1667|      0|        }
 1668|      0|        case LY_STMT_AUGMENT:
  ------------------
  |  Branch (1668:9): [True: 0, False: 632k]
  ------------------
 1669|      0|        case LY_STMT_BASE:
  ------------------
  |  Branch (1669:9): [True: 0, False: 632k]
  ------------------
 1670|      0|        case LY_STMT_BELONGS_TO:
  ------------------
  |  Branch (1670:9): [True: 0, False: 632k]
  ------------------
 1671|      0|        case LY_STMT_DEFAULT:
  ------------------
  |  Branch (1671:9): [True: 0, False: 632k]
  ------------------
 1672|      0|        case LY_STMT_DEVIATE:
  ------------------
  |  Branch (1672:9): [True: 0, False: 632k]
  ------------------
 1673|      0|        case LY_STMT_DEVIATION:
  ------------------
  |  Branch (1673:9): [True: 0, False: 632k]
  ------------------
 1674|      0|        case LY_STMT_EXTENSION:
  ------------------
  |  Branch (1674:9): [True: 0, False: 632k]
  ------------------
 1675|      0|        case LY_STMT_FEATURE:
  ------------------
  |  Branch (1675:9): [True: 0, False: 632k]
  ------------------
 1676|      0|        case LY_STMT_GROUPING:
  ------------------
  |  Branch (1676:9): [True: 0, False: 632k]
  ------------------
 1677|      0|        case LY_STMT_IF_FEATURE:
  ------------------
  |  Branch (1677:9): [True: 0, False: 632k]
  ------------------
 1678|      0|        case LY_STMT_IMPORT:
  ------------------
  |  Branch (1678:9): [True: 0, False: 632k]
  ------------------
 1679|      0|        case LY_STMT_INCLUDE:
  ------------------
  |  Branch (1679:9): [True: 0, False: 632k]
  ------------------
 1680|      0|        case LY_STMT_MODULE:
  ------------------
  |  Branch (1680:9): [True: 0, False: 632k]
  ------------------
 1681|      0|        case LY_STMT_PATH:
  ------------------
  |  Branch (1681:9): [True: 0, False: 632k]
  ------------------
 1682|      0|        case LY_STMT_PREFIX:
  ------------------
  |  Branch (1682:9): [True: 0, False: 632k]
  ------------------
 1683|      0|        case LY_STMT_REFINE:
  ------------------
  |  Branch (1683:9): [True: 0, False: 632k]
  ------------------
 1684|      0|        case LY_STMT_REVISION:
  ------------------
  |  Branch (1684:9): [True: 0, False: 632k]
  ------------------
 1685|      0|        case LY_STMT_REVISION_DATE:
  ------------------
  |  Branch (1685:9): [True: 0, False: 632k]
  ------------------
 1686|      0|        case LY_STMT_SUBMODULE:
  ------------------
  |  Branch (1686:9): [True: 0, False: 632k]
  ------------------
 1687|      0|        case LY_STMT_TYPEDEF:
  ------------------
  |  Branch (1687:9): [True: 0, False: 632k]
  ------------------
 1688|      0|        case LY_STMT_UNIQUE:
  ------------------
  |  Branch (1688:9): [True: 0, False: 632k]
  ------------------
 1689|      0|        case LY_STMT_YANG_VERSION:
  ------------------
  |  Branch (1689:9): [True: 0, False: 632k]
  ------------------
 1690|      0|        case LY_STMT_YIN_ELEMENT:
  ------------------
  |  Branch (1690:9): [True: 0, False: 632k]
  ------------------
 1691|       |            /* it is not possible to compile these statements */
 1692|      0|            break;
 1693|       |
 1694|      0|        default:
  ------------------
  |  Branch (1694:9): [True: 0, False: 632k]
  ------------------
 1695|      0|            LOGINT(ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
 1696|   632k|        }
 1697|   632k|    }
 1698|       |
 1699|   126k|    LY_ARRAY_FREE(substmts);
  ------------------
  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 126k, False: 0]
  |  |  ------------------
  ------------------
 1700|   126k|}
lysp_yang_ctx_free:
 1704|   140k|{
 1705|   140k|    if (ctx) {
  ------------------
  |  Branch (1705:9): [True: 126k, False: 14.0k]
  ------------------
 1706|   126k|        if (ctx->main_ctx == (struct lysp_ctx *)ctx) {
  ------------------
  |  Branch (1706:13): [True: 126k, False: 0]
  ------------------
 1707|   126k|            ly_set_erase(&ctx->tpdfs_nodes, NULL);
 1708|   126k|            ly_set_erase(&ctx->grps_nodes, NULL);
 1709|   126k|        }
 1710|   126k|        assert(!ctx->tpdfs_nodes.count && !ctx->grps_nodes.count);
 1711|      0|        ly_set_erase(&ctx->ext_inst, NULL);
 1712|   126k|        ly_set_rm_index(ctx->parsed_mods, ctx->parsed_mods->count - 1, NULL);
 1713|   126k|        if (!ctx->parsed_mods->count) {
  ------------------
  |  Branch (1713:13): [True: 126k, False: 0]
  ------------------
 1714|   126k|            ly_set_free(ctx->parsed_mods, NULL);
 1715|   126k|        }
 1716|   126k|        free(ctx);
 1717|   126k|    }
 1718|   140k|}
tree_schema_free.c:lysp_stmt_free:
   54|   745k|{
   55|   745k|    struct lysp_stmt *child, *next;
   56|       |
   57|   745k|    lydict_remove(ctx, stmt->stmt);
   58|   745k|    lydict_remove(ctx, stmt->arg);
   59|   745k|    ly_free_prefix_data(stmt->format, stmt->prefix_data);
   60|       |
   61|   745k|    LY_LIST_FOR_SAFE(stmt->child, next, child) {
  ------------------
  |  |  195|   745k|    for ((ELEM) = (START); \
  |  |  196|  1.15M|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 408k, False: 745k]
  |  |  |  Branch (196:10): [True: 408k, False: 745k]
  |  |  ------------------
  |  |  197|   745k|         (ELEM) = (NEXT))
  ------------------
   62|   408k|        lysp_stmt_free(ctx, child);
   63|   408k|    }
   64|       |
   65|   745k|    free(stmt);
   66|   745k|}
tree_schema_free.c:lysp_type_enum_free:
  260|   197k|{
  261|   197k|    lydict_remove(ctx->ctx, item->name);
  262|   197k|    lydict_remove(ctx->ctx, item->dsc);
  263|   197k|    lydict_remove(ctx->ctx, item->ref);
  264|   197k|    FREE_ARRAY(ctx->ctx, item->iffeatures, lysp_qname_free);
  ------------------
  |  |   34|   197k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   197k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   197k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   197k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   197k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   197k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   197k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   197k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 197k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 197k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   197k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   197k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 197k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  265|   197k|    FREE_ARRAY(ctx, item->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|   197k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   197k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   197k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   197k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   197k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   197k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   202k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   202k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 9.37k, False: 193k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 5.36k, False: 197k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   197k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   197k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 4.01k, False: 193k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  266|   197k|}
tree_schema_free.c:lysp_tpdf_free:
  298|   545k|{
  299|   545k|    lydict_remove(ctx->ctx, tpdf->name);
  300|   545k|    lydict_remove(ctx->ctx, tpdf->units);
  301|   545k|    lydict_remove(ctx->ctx, tpdf->dflt.str);
  302|   545k|    lydict_remove(ctx->ctx, tpdf->dsc);
  303|   545k|    lydict_remove(ctx->ctx, tpdf->ref);
  304|   545k|    FREE_ARRAY(ctx, tpdf->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|   545k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   545k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   545k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   545k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   545k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   545k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   547k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   547k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 2.04k, False: 545k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 1.99k, False: 545k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   545k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   545k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 45, False: 545k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|       |
  306|   545k|    lysp_type_free(ctx, &tpdf->type);
  307|       |
  308|   545k|}
tree_schema_free.c:lysp_refine_free:
  423|  3.88k|{
  424|  3.88k|    lydict_remove(ctx->ctx, ref->nodeid);
  425|  3.88k|    lydict_remove(ctx->ctx, ref->dsc);
  426|  3.88k|    lydict_remove(ctx->ctx, ref->ref);
  427|  3.88k|    FREE_ARRAY(ctx->ctx, ref->iffeatures, lysp_qname_free);
  ------------------
  |  |   34|  3.88k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  3.88k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  3.88k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  3.88k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  3.88k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  3.88k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  3.88k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  3.88k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 3.88k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 3.88k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  3.88k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  3.88k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 3.88k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  428|  3.88k|    FREE_ARRAY(ctx, ref->musts, lysp_restr_free);
  ------------------
  |  |   34|  3.88k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  3.88k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  3.88k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  3.88k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  3.88k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  3.88k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  5.40k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  5.40k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 1.58k, False: 3.81k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 1.52k, False: 3.88k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  3.88k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  3.88k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 62, False: 3.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  429|  3.88k|    lydict_remove(ctx->ctx, ref->presence);
  430|  3.88k|    FREE_ARRAY(ctx->ctx, ref->dflts, lysp_qname_free);
  ------------------
  |  |   34|  3.88k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  3.88k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  3.88k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  3.88k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  3.88k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  3.88k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  4.56k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  4.56k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 1.21k, False: 3.35k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 683, False: 3.88k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  3.88k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  3.88k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 530, False: 3.35k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  431|  3.88k|    FREE_ARRAY(ctx, ref->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|  3.88k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  3.88k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  3.88k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  3.88k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  3.88k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  3.88k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  7.41k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  7.41k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 6.06k, False: 1.34k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 3.53k, False: 3.88k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  3.88k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  3.88k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 2.53k, False: 1.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  432|  3.88k|}
tree_schema_free.c:lysp_grp_free:
  318|   129k|{
  319|   129k|    struct lysp_node *node, *next;
  320|       |
  321|   129k|    FREE_ARRAY(ctx, grp->typedefs, lysp_tpdf_free);
  ------------------
  |  |   34|   129k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   129k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   129k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   129k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   129k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   129k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   129k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   129k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 225, False: 129k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 136, False: 129k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   129k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   129k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 89, False: 129k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  322|   129k|    LY_LIST_FOR_SAFE((struct lysp_node *)grp->groupings, next, node) {
  ------------------
  |  |  195|   129k|    for ((ELEM) = (START); \
  |  |  196|   163k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 33.6k, False: 129k]
  |  |  |  Branch (196:10): [True: 33.6k, False: 129k]
  |  |  ------------------
  |  |  197|   129k|         (ELEM) = (NEXT))
  ------------------
  323|  33.6k|        lysp_node_free(ctx, node);
  324|  33.6k|    }
  325|   219k|    LY_LIST_FOR_SAFE(grp->child, next, node) {
  ------------------
  |  |  195|   129k|    for ((ELEM) = (START); \
  |  |  196|   349k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 219k, False: 129k]
  |  |  |  Branch (196:10): [True: 219k, False: 129k]
  |  |  ------------------
  |  |  197|   219k|         (ELEM) = (NEXT))
  ------------------
  326|   219k|        lysp_node_free(ctx, node);
  327|   219k|    }
  328|   129k|    LY_LIST_FOR_SAFE((struct lysp_node *)grp->actions, next, node) {
  ------------------
  |  |  195|   129k|    for ((ELEM) = (START); \
  |  |  196|   129k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 129k]
  |  |  |  Branch (196:10): [True: 0, False: 129k]
  |  |  ------------------
  |  |  197|   129k|         (ELEM) = (NEXT))
  ------------------
  329|      0|        lysp_node_free(ctx, node);
  330|      0|    }
  331|   129k|    LY_LIST_FOR_SAFE((struct lysp_node *)grp->notifs, next, node) {
  ------------------
  |  |  195|   129k|    for ((ELEM) = (START); \
  |  |  196|   129k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 129k]
  |  |  |  Branch (196:10): [True: 0, False: 129k]
  |  |  ------------------
  |  |  197|   129k|         (ELEM) = (NEXT))
  ------------------
  332|      0|        lysp_node_free(ctx, node);
  333|      0|    }
  334|   129k|}
tree_schema_free.c:lysp_augment_free:
  353|  3.16k|{
  354|  3.16k|    struct lysp_node *node, *next;
  355|       |
  356|  4.52k|    LY_LIST_FOR_SAFE(aug->child, next, node) {
  ------------------
  |  |  195|  3.16k|    for ((ELEM) = (START); \
  |  |  196|  7.68k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 4.52k, False: 3.16k]
  |  |  |  Branch (196:10): [True: 4.52k, False: 3.16k]
  |  |  ------------------
  |  |  197|  4.52k|         (ELEM) = (NEXT))
  ------------------
  357|  4.52k|        lysp_node_free(ctx, node);
  358|  4.52k|    }
  359|  3.16k|    LY_LIST_FOR_SAFE((struct lysp_node *)aug->actions, next, node) {
  ------------------
  |  |  195|  3.16k|    for ((ELEM) = (START); \
  |  |  196|  3.16k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 3.16k]
  |  |  |  Branch (196:10): [True: 0, False: 3.16k]
  |  |  ------------------
  |  |  197|  3.16k|         (ELEM) = (NEXT))
  ------------------
  360|      0|        lysp_node_free(ctx, node);
  361|      0|    }
  362|  3.16k|    LY_LIST_FOR_SAFE((struct lysp_node *)aug->notifs, next, node) {
  ------------------
  |  |  195|  3.16k|    for ((ELEM) = (START); \
  |  |  196|  3.16k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 3.16k]
  |  |  |  Branch (196:10): [True: 0, False: 3.16k]
  |  |  ------------------
  |  |  197|  3.16k|         (ELEM) = (NEXT))
  ------------------
  363|      0|        lysp_node_free(ctx, node);
  364|      0|    }
  365|  3.16k|}
tree_schema_free.c:lysp_import_free:
   93|  84.7k|{
   94|       |    /* imported module is freed directly from the context's list */
   95|  84.7k|    lydict_remove(ctx->ctx, import->name);
   96|  84.7k|    lydict_remove(ctx->ctx, import->prefix);
   97|  84.7k|    lydict_remove(ctx->ctx, import->dsc);
   98|  84.7k|    lydict_remove(ctx->ctx, import->ref);
   99|  84.7k|    FREE_ARRAY(ctx, import->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|  84.7k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  84.7k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  84.7k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  84.7k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  84.7k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  84.7k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  86.1k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  86.1k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 1.42k, False: 84.7k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 1.37k, False: 84.7k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  84.7k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  84.7k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 51, False: 84.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  100|  84.7k|}
tree_schema_free.c:lysp_include_free_:
  116|  3.40k|{
  117|  3.40k|    if (main_module && include->submodule) {
  ------------------
  |  Branch (117:9): [True: 3.40k, False: 0]
  |  Branch (117:24): [True: 0, False: 3.40k]
  ------------------
  118|      0|        lysp_module_free(ctx, (struct lysp_module *)include->submodule);
  119|      0|    }
  120|  3.40k|    lydict_remove(ctx->ctx, include->name);
  121|  3.40k|    lydict_remove(ctx->ctx, include->dsc);
  122|  3.40k|    lydict_remove(ctx->ctx, include->ref);
  123|  3.40k|    FREE_ARRAY(ctx, include->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|  3.40k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  3.40k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  3.40k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  3.40k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  3.40k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  3.40k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  4.41k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  4.41k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 1.33k, False: 3.08k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 1.01k, False: 3.40k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  3.40k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  3.40k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 319, False: 3.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  124|  3.40k|}
tree_schema_free.c:lysp_include_free:
  146|  3.40k|{
  147|  3.40k|    lysp_include_free_(ctx, include, 1);
  148|  3.40k|}
tree_schema_free.c:lysp_revision_free:
  158|   217k|{
  159|   217k|    lydict_remove(ctx->ctx, rev->dsc);
  160|   217k|    lydict_remove(ctx->ctx, rev->ref);
  161|   217k|    FREE_ARRAY(ctx, rev->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|   217k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   217k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   217k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   217k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   217k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   217k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   220k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   220k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 4.01k, False: 216k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 2.78k, False: 217k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   217k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   217k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 1.22k, False: 216k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  162|   217k|}
tree_schema_free.c:lysp_ext_free:
  195|  63.2k|{
  196|  63.2k|    lydict_remove(ctx->ctx, ext->name);
  197|  63.2k|    lydict_remove(ctx->ctx, ext->argname);
  198|  63.2k|    lydict_remove(ctx->ctx, ext->dsc);
  199|  63.2k|    lydict_remove(ctx->ctx, ext->ref);
  200|  63.2k|    FREE_ARRAY(ctx, ext->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|  63.2k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  63.2k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  63.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  63.2k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  63.2k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  63.2k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  65.5k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  65.5k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 3.66k, False: 61.8k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 2.30k, False: 63.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  63.2k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  63.2k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 1.36k, False: 61.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|  63.2k|    if (ext->compiled) {
  ------------------
  |  Branch (201:9): [True: 14.0k, False: 49.1k]
  ------------------
  202|  14.0k|        lysc_extension_free(ctx, &ext->compiled);
  203|  14.0k|    }
  204|  63.2k|}
tree_schema_free.c:lysc_extension_free:
  172|  14.0k|{
  173|  14.0k|    if (ly_set_contains(&ctx->ext_set, *ext, NULL)) {
  ------------------
  |  Branch (173:9): [True: 0, False: 14.0k]
  ------------------
  174|       |        /* already freed and only referenced again in this module */
  175|      0|        return;
  176|      0|    }
  177|       |
  178|       |    /* remember this extension to be freed, nothing to do on error */
  179|  14.0k|    (void)ly_set_add(&ctx->ext_set, *ext, 0, NULL);
  180|       |
  181|       |    /* recursive exts free */
  182|  14.0k|    FREE_ARRAY(ctx, (*ext)->exts, lysc_ext_instance_free);
  ------------------
  |  |   34|  14.0k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  14.0k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  14.0k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  14.0k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  14.0k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  14.0k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  14.0k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  14.0k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  14.0k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  14.0k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  183|       |
  184|  14.0k|    *ext = NULL;
  185|  14.0k|}
tree_schema_free.c:lysp_feature_free:
  214|  1.23k|{
  215|  1.23k|    lydict_remove(ctx->ctx, feat->name);
  216|  1.23k|    FREE_ARRAY(ctx->ctx, feat->iffeatures, lysp_qname_free);
  ------------------
  |  |   34|  1.23k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.23k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.23k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.23k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.23k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.23k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.53k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.53k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 346, False: 1.18k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 296, False: 1.23k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.23k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.23k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 50, False: 1.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  217|  1.23k|    FREE_ARRAY(ctx, feat->iffeatures_c, lysc_iffeature_free);
  ------------------
  |  |   34|  1.23k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.23k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.23k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.23k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.23k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.23k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.23k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.23k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 1.23k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 1.23k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.23k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.23k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 1.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  218|  1.23k|    LY_ARRAY_FREE(feat->depfeatures);
  ------------------
  |  |  232|  1.23k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
  219|  1.23k|    lydict_remove(ctx->ctx, feat->dsc);
  220|  1.23k|    lydict_remove(ctx->ctx, feat->ref);
  221|  1.23k|    FREE_ARRAY(ctx, feat->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|  1.23k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  1.23k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  1.23k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  1.23k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  1.23k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  1.23k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  1.79k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  1.79k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 903, False: 895]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 561, False: 1.23k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  1.23k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  1.23k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 342, False: 895]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  222|  1.23k|}
tree_schema_free.c:lysp_ident_free:
  232|   120k|{
  233|   120k|    lydict_remove(ctx->ctx, ident->name);
  234|   120k|    FREE_ARRAY(ctx->ctx, ident->iffeatures, lysp_qname_free);
  ------------------
  |  |   34|   120k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   120k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   120k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   120k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   120k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   120k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   120k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   120k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 120k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 120k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   120k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   120k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 120k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  235|   120k|    FREE_STRINGS(ctx->ctx, ident->bases);
  ------------------
  |  |   45|   120k|#define FREE_STRINGS(CTX, ARRAY) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){lydict_remove(CTX, ARRAY[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   120k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_STRINGS(CTX, ARRAY) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){lydict_remove(CTX, ARRAY[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   120k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   120k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   120k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   120k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   218k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   218k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 196k, False: 21.8k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 98.4k, False: 120k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   120k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_STRINGS(CTX, ARRAY) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){lydict_remove(CTX, ARRAY[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   120k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 98.4k, False: 21.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|   120k|    lydict_remove(ctx->ctx, ident->dsc);
  237|   120k|    lydict_remove(ctx->ctx, ident->ref);
  238|   120k|    FREE_ARRAY(ctx, ident->exts, lysp_ext_instance_free);
  ------------------
  |  |   34|   120k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   120k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   120k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   120k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   120k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   120k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   122k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   122k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 3.17k, False: 119k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 2.31k, False: 120k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   120k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   120k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 855, False: 119k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|   120k|}
tree_schema_free.c:lysc_range_free:
  835|  98.4k|{
  836|  98.4k|    LY_ARRAY_FREE(range->parts);
  ------------------
  |  |  232|  98.4k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 98.4k, False: 0]
  |  |  ------------------
  ------------------
  837|  98.4k|    lydict_remove(ctx->ctx, range->eapptag);
  838|  98.4k|    lydict_remove(ctx->ctx, range->emsg);
  839|  98.4k|    lydict_remove(ctx->ctx, range->dsc);
  840|  98.4k|    lydict_remove(ctx->ctx, range->ref);
  841|  98.4k|    FREE_ARRAY(ctx, range->exts, lysc_ext_instance_free);
  ------------------
  |  |   34|  98.4k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  98.4k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  98.4k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  98.4k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  98.4k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  98.4k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  98.4k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  98.4k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 98.4k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 98.4k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  98.4k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  98.4k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 98.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  842|  98.4k|}
tree_schema_free.c:lysc_type2_free:
  878|   224k|{
  879|   224k|    lysc_type_free(ctx, *type);
  880|   224k|}
tree_schema_free.c:lysc_node_free_:
 1153|   899k|{
 1154|   899k|    ly_bool inout = 0;
 1155|       |
 1156|       |    /* common part */
 1157|   899k|    lydict_remove(ctx->ctx, node->name);
 1158|   899k|    lydict_remove(ctx->ctx, node->dsc);
 1159|   899k|    lydict_remove(ctx->ctx, node->ref);
 1160|       |
 1161|       |    /* nodetype-specific part */
 1162|   899k|    switch (node->nodetype) {
 1163|  70.2k|    case LYS_CONTAINER:
  ------------------
  |  |  240|  70.2k|#define LYS_CONTAINER   0x0001    /**< container statement node */
  ------------------
  |  Branch (1163:5): [True: 70.2k, False: 829k]
  ------------------
 1164|  70.2k|        lysc_node_container_free(ctx, (struct lysc_node_container *)node);
 1165|  70.2k|        break;
 1166|   463k|    case LYS_LEAF:
  ------------------
  |  |  242|   463k|#define LYS_LEAF        0x0004    /**< leaf statement node */
  ------------------
  |  Branch (1166:5): [True: 463k, False: 435k]
  ------------------
 1167|   463k|        lysc_node_leaf_free(ctx, (struct lysc_node_leaf *)node);
 1168|   463k|        break;
 1169|   126k|    case LYS_LEAFLIST:
  ------------------
  |  |  243|   126k|#define LYS_LEAFLIST    0x0008    /**< leaf-list statement node */
  ------------------
  |  Branch (1169:5): [True: 126k, False: 773k]
  ------------------
 1170|   126k|        lysc_node_leaflist_free(ctx, (struct lysc_node_leaflist *)node);
 1171|   126k|        break;
 1172|   168k|    case LYS_LIST:
  ------------------
  |  |  244|   168k|#define LYS_LIST        0x0010    /**< list statement node */
  ------------------
  |  Branch (1172:5): [True: 168k, False: 731k]
  ------------------
 1173|   168k|        lysc_node_list_free(ctx, (struct lysc_node_list *)node);
 1174|   168k|        break;
 1175|  14.0k|    case LYS_CHOICE:
  ------------------
  |  |  241|  14.0k|#define LYS_CHOICE      0x0002    /**< choice statement node */
  ------------------
  |  Branch (1175:5): [True: 14.0k, False: 885k]
  ------------------
 1176|  14.0k|        lysc_node_choice_free(ctx, (struct lysc_node_choice *)node);
 1177|  14.0k|        break;
 1178|  28.1k|    case LYS_CASE:
  ------------------
  |  |  247|  28.1k|#define LYS_CASE        0x0080    /**< case statement node */
  ------------------
  |  Branch (1178:5): [True: 28.1k, False: 871k]
  ------------------
 1179|  28.1k|        lysc_node_case_free(ctx, (struct lysc_node_case *)node);
 1180|  28.1k|        break;
 1181|      0|    case LYS_ANYDATA:
  ------------------
  |  |  246|      0|#define LYS_ANYDATA     0x0060    /**< anydata statement node, in tests it can be used for both #LYS_ANYXML and #LYS_ANYDATA */
  ------------------
  |  Branch (1181:5): [True: 0, False: 899k]
  ------------------
 1182|      0|    case LYS_ANYXML:
  ------------------
  |  |  245|      0|#define LYS_ANYXML      0x0020    /**< anyxml statement node */
  ------------------
  |  Branch (1182:5): [True: 0, False: 899k]
  ------------------
 1183|      0|        lysc_node_anydata_free(ctx, (struct lysc_node_anydata *)node);
 1184|      0|        break;
 1185|      0|    case LYS_RPC:
  ------------------
  |  |  249|      0|#define LYS_RPC         0x0100    /**< RPC statement node */
  ------------------
  |  Branch (1185:5): [True: 0, False: 899k]
  ------------------
 1186|      0|    case LYS_ACTION:
  ------------------
  |  |  250|      0|#define LYS_ACTION      0x0200    /**< action statement node */
  ------------------
  |  Branch (1186:5): [True: 0, False: 899k]
  ------------------
 1187|      0|        lysc_node_action_free(ctx, (struct lysc_node_action *)node);
 1188|      0|        break;
 1189|      0|    case LYS_INPUT:
  ------------------
  |  |  254|      0|#define LYS_INPUT       0x1000    /**< RPC/action input node */
  ------------------
  |  Branch (1189:5): [True: 0, False: 899k]
  ------------------
 1190|      0|    case LYS_OUTPUT:
  ------------------
  |  |  255|      0|#define LYS_OUTPUT      0x2000    /**< RPC/action output node */
  ------------------
  |  Branch (1190:5): [True: 0, False: 899k]
  ------------------
 1191|      0|        lysc_node_action_inout_free(ctx, (struct lysc_node_action_inout *)node);
 1192|      0|        inout = 1;
 1193|      0|        break;
 1194|  28.1k|    case LYS_NOTIF:
  ------------------
  |  |  251|  28.1k|#define LYS_NOTIF       0x0400    /**< notification statement node */
  ------------------
  |  Branch (1194:5): [True: 28.1k, False: 871k]
  ------------------
 1195|  28.1k|        lysc_node_notif_free(ctx, (struct lysc_node_notif *)node);
 1196|  28.1k|        break;
 1197|      0|    default:
  ------------------
  |  Branch (1197:5): [True: 0, False: 899k]
  ------------------
 1198|      0|        LOGINT(ctx->ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
 1199|   899k|    }
 1200|       |
 1201|   899k|    FREE_ARRAY(ctx, node->exts, lysc_ext_instance_free);
  ------------------
  |  |   34|   899k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   899k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   899k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   899k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   899k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   899k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   899k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   899k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 899k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 899k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   899k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   899k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 899k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1202|       |
 1203|   899k|    if (!inout) {
  ------------------
  |  Branch (1203:9): [True: 899k, False: 0]
  ------------------
 1204|   899k|        free(node);
 1205|   899k|    }
 1206|   899k|}
tree_schema_free.c:lysc_node_leaf_free:
 1022|   463k|{
 1023|   463k|    FREE_ARRAY(ctx, node->when, lysc_when_free);
  ------------------
  |  |   34|   463k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   463k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   463k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   463k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   463k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   463k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   463k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   463k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 463k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 463k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   463k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   463k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 463k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1024|   463k|    FREE_ARRAY(ctx, node->musts, lysc_must_free);
  ------------------
  |  |   34|   463k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   463k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   463k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   463k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   463k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   463k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   463k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   463k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 463k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 463k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   463k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   463k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 463k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1025|   463k|    if (node->type) {
  ------------------
  |  Branch (1025:9): [True: 463k, False: 0]
  ------------------
 1026|   463k|        lysc_type_free(ctx, node->type);
 1027|   463k|    }
 1028|   463k|    lydict_remove(ctx->ctx, node->units);
 1029|   463k|    if (node->dflt) {
  ------------------
  |  Branch (1029:9): [True: 14.0k, False: 449k]
  ------------------
 1030|  14.0k|        node->dflt->realtype->plugin->free(ctx->ctx, node->dflt);
 1031|  14.0k|        lysc_type_free(ctx, (struct lysc_type *)node->dflt->realtype);
 1032|  14.0k|        free(node->dflt);
 1033|  14.0k|    }
 1034|   463k|}
tree_schema_free.c:lysc_node_leaflist_free:
 1045|   126k|{
 1046|   126k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1047|       |
 1048|   126k|    FREE_ARRAY(ctx, node->when, lysc_when_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   126k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   126k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 126k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1049|   126k|    FREE_ARRAY(ctx, node->musts, lysc_must_free);
  ------------------
  |  |   34|   126k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   126k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   126k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   126k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 126k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1050|   126k|    if (node->type) {
  ------------------
  |  Branch (1050:9): [True: 126k, False: 0]
  ------------------
 1051|   126k|        lysc_type_free(ctx, node->type);
 1052|   126k|    }
 1053|   126k|    lydict_remove(ctx->ctx, node->units);
 1054|   126k|    LY_ARRAY_FOR(node->dflts, u) {
  ------------------
  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   126k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   126k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   126k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   126k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   126k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 126k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   126k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1055|      0|        node->dflts[u]->realtype->plugin->free(ctx->ctx, node->dflts[u]);
 1056|      0|        lysc_type_free(ctx, (struct lysc_type *)node->dflts[u]->realtype);
 1057|      0|        free(node->dflts[u]);
 1058|      0|    }
 1059|   126k|    LY_ARRAY_FREE(node->dflts);
  ------------------
  |  |  232|   126k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 0, False: 126k]
  |  |  ------------------
  ------------------
 1060|   126k|}
tree_schema_free.c:lysc_node_list_free:
 1071|   168k|{
 1072|   168k|    LY_ARRAY_COUNT_TYPE u;
  ------------------
  |  |  104|   168k|#define LY_ARRAY_COUNT_TYPE uint64_t
  ------------------
 1073|   168k|    struct lysc_node *child, *child_next;
 1074|       |
 1075|   618k|    LY_LIST_FOR_SAFE(node->child, child_next, child) {
  ------------------
  |  |  195|   168k|    for ((ELEM) = (START); \
  |  |  196|   787k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 618k, False: 168k]
  |  |  |  Branch (196:10): [True: 618k, False: 168k]
  |  |  ------------------
  |  |  197|   618k|         (ELEM) = (NEXT))
  ------------------
 1076|   618k|        lysc_node_free_(ctx, child);
 1077|   618k|    }
 1078|   168k|    FREE_ARRAY(ctx, node->when, lysc_when_free);
  ------------------
  |  |   34|   168k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   168k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   168k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   168k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   168k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   168k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   168k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   168k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 168k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 168k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   168k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   168k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 168k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1079|   168k|    FREE_ARRAY(ctx, node->musts, lysc_must_free);
  ------------------
  |  |   34|   168k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   168k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   168k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   168k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   168k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   168k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   168k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   168k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 168k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 168k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   168k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   168k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 168k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1080|       |
 1081|   168k|    LY_ARRAY_FOR(node->uniques, u) {
  ------------------
  |  |  167|   168k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  114|   168k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  167|   168k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  141|   168k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  142|   168k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  148|   168k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 168k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 168k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  143|   168k|         ++INDEX)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1082|      0|        LY_ARRAY_FREE(node->uniques[u]);
  ------------------
  |  |  232|      0|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1083|      0|    }
 1084|   168k|    LY_ARRAY_FREE(node->uniques);
  ------------------
  |  |  232|   168k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 0, False: 168k]
  |  |  ------------------
  ------------------
 1085|       |
 1086|   168k|    LY_LIST_FOR_SAFE((struct lysc_node *)node->actions, child_next, child) {
  ------------------
  |  |  195|   168k|    for ((ELEM) = (START); \
  |  |  196|   168k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 168k]
  |  |  |  Branch (196:10): [True: 0, False: 168k]
  |  |  ------------------
  |  |  197|   168k|         (ELEM) = (NEXT))
  ------------------
 1087|      0|        lysc_node_free_(ctx, child);
 1088|      0|    }
 1089|   168k|    LY_LIST_FOR_SAFE((struct lysc_node *)node->notifs, child_next, child) {
  ------------------
  |  |  195|   168k|    for ((ELEM) = (START); \
  |  |  196|   168k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 0, False: 168k]
  |  |  |  Branch (196:10): [True: 0, False: 168k]
  |  |  ------------------
  |  |  197|   168k|         (ELEM) = (NEXT))
  ------------------
 1090|      0|        lysc_node_free_(ctx, child);
 1091|      0|    }
 1092|   168k|}
tree_schema_free.c:lysc_node_choice_free:
 1103|  14.0k|{
 1104|  14.0k|    struct lysc_node *child, *child_next;
 1105|       |
 1106|  14.0k|    FREE_ARRAY(ctx, node->when, lysc_when_free);
  ------------------
  |  |   34|  14.0k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  14.0k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  14.0k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  14.0k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  14.0k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  14.0k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  14.0k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  14.0k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 14.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  14.0k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  14.0k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1107|  28.1k|    LY_LIST_FOR_SAFE((struct lysc_node *)node->cases, child_next, child) {
  ------------------
  |  |  195|  14.0k|    for ((ELEM) = (START); \
  |  |  196|  42.1k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 28.1k, False: 14.0k]
  |  |  |  Branch (196:10): [True: 28.1k, False: 14.0k]
  |  |  ------------------
  |  |  197|  28.1k|         (ELEM) = (NEXT))
  ------------------
 1108|  28.1k|        lysc_node_free_(ctx, child);
 1109|  28.1k|    }
 1110|  14.0k|}
tree_schema_free.c:lysc_node_case_free:
 1121|  28.1k|{
 1122|  28.1k|    struct lysc_node *child, *child_next;
 1123|       |
 1124|  28.1k|    FREE_ARRAY(ctx, node->when, lysc_when_free);
  ------------------
  |  |   34|  28.1k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  28.1k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  28.1k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  28.1k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  28.1k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  28.1k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  28.1k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  28.1k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 28.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1125|  28.1k|    LY_LIST_FOR_SAFE(node->child, child_next, child) {
  ------------------
  |  |  195|  28.1k|    for ((ELEM) = (START); \
  |  |  196|  56.2k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 28.1k, False: 28.1k]
  |  |  |  Branch (196:10): [True: 28.1k, False: 28.1k]
  |  |  ------------------
  |  |  197|  28.1k|         (ELEM) = (NEXT))
  ------------------
 1126|  28.1k|        lysc_node_free_(ctx, child);
 1127|  28.1k|    }
 1128|  28.1k|}
tree_schema_free.c:lysc_node_notif_free:
  985|  28.1k|{
  986|  28.1k|    struct lysc_node *child, *child_next;
  987|       |
  988|  28.1k|    FREE_ARRAY(ctx, notif->when, lysc_when_free);
  ------------------
  |  |   34|  28.1k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  28.1k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  28.1k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  28.1k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  28.1k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  28.1k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  28.1k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  28.1k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 28.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  989|  28.1k|    FREE_ARRAY(ctx, notif->musts, lysc_must_free);
  ------------------
  |  |   34|  28.1k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|  28.1k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|  28.1k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|  28.1k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|  28.1k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|  28.1k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|  28.1k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 28.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|  28.1k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|  28.1k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 28.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  990|  28.1k|    LY_LIST_FOR_SAFE(notif->child, child_next, child) {
  ------------------
  |  |  195|  28.1k|    for ((ELEM) = (START); \
  |  |  196|  56.2k|         (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
  |  |  ------------------
  |  |  |  Branch (196:10): [True: 28.1k, False: 28.1k]
  |  |  |  Branch (196:10): [True: 28.1k, False: 28.1k]
  |  |  ------------------
  |  |  197|  28.1k|         (ELEM) = (NEXT))
  ------------------
  991|  28.1k|        lysc_node_free_(ctx, child);
  992|  28.1k|    }
  993|  28.1k|}
tree_schema_free.c:lysc_ident_free:
  818|   112k|{
  819|   112k|    lydict_remove(ctx->ctx, ident->name);
  820|   112k|    lydict_remove(ctx->ctx, ident->dsc);
  821|   112k|    lydict_remove(ctx->ctx, ident->ref);
  822|   112k|    LY_ARRAY_FREE(ident->derived);
  ------------------
  |  |  232|   112k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  ------------------
  |  |  |  Branch (232:13): [True: 28.1k, False: 84.3k]
  |  |  ------------------
  ------------------
  823|   112k|    FREE_ARRAY(ctx, ident->exts, lysc_ext_instance_free);
  ------------------
  |  |   34|   112k|#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  104|   112k|#define LY_ARRAY_COUNT_TYPE uint64_t
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  114|   112k|#define LY_ARRAY_SELECT(_1, _2, NAME, ...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  167|   112k|#define LY_ARRAY_FOR(ARRAY, ...) LY_ARRAY_SELECT(__VA_ARGS__, LY_ARRAY_FOR_ITER, LY_ARRAY_FOR_INDEX, LY_UNDEF)(ARRAY, __VA_ARGS__)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  141|   112k|    for (INDEX = 0; \
  |  |  |  |  |  |  |  |  |  |  142|   112k|         INDEX < LY_ARRAY_COUNT(ARRAY); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  148|   112k|#define LY_ARRAY_COUNT(ARRAY) (ARRAY ? (*((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1)) : 0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (148:32): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (142:10): [True: 0, False: 112k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  143|   112k|         ++INDEX)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);}
  |  |  ------------------
  |  |  |  |  232|   112k|        if (ARRAY){free((LY_ARRAY_COUNT_TYPE*)(ARRAY) - 1);}
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (232:13): [True: 0, False: 112k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  824|   112k|}

lyxp_token2str:
  106|  1.24k|{
  107|  1.24k|    switch (tok) {
  108|     24|    case LYXP_TOKEN_PAR1:
  ------------------
  |  Branch (108:5): [True: 24, False: 1.22k]
  ------------------
  109|     24|        return "(";
  110|      8|    case LYXP_TOKEN_PAR2:
  ------------------
  |  Branch (110:5): [True: 8, False: 1.23k]
  ------------------
  111|      8|        return ")";
  112|     14|    case LYXP_TOKEN_BRACK1:
  ------------------
  |  Branch (112:5): [True: 14, False: 1.23k]
  ------------------
  113|     14|        return "[";
  114|     13|    case LYXP_TOKEN_BRACK2:
  ------------------
  |  Branch (114:5): [True: 13, False: 1.23k]
  ------------------
  115|     13|        return "]";
  116|      7|    case LYXP_TOKEN_DOT:
  ------------------
  |  Branch (116:5): [True: 7, False: 1.24k]
  ------------------
  117|      7|        return ".";
  118|    586|    case LYXP_TOKEN_DDOT:
  ------------------
  |  Branch (118:5): [True: 586, False: 661]
  ------------------
  119|    586|        return "..";
  120|     13|    case LYXP_TOKEN_AT:
  ------------------
  |  Branch (120:5): [True: 13, False: 1.23k]
  ------------------
  121|     13|        return "@";
  122|     11|    case LYXP_TOKEN_COMMA:
  ------------------
  |  Branch (122:5): [True: 11, False: 1.23k]
  ------------------
  123|     11|        return ",";
  124|      0|    case LYXP_TOKEN_DCOLON:
  ------------------
  |  Branch (124:5): [True: 0, False: 1.24k]
  ------------------
  125|      0|        return "::";
  126|    312|    case LYXP_TOKEN_NAMETEST:
  ------------------
  |  Branch (126:5): [True: 312, False: 935]
  ------------------
  127|    312|        return "NameTest";
  128|     14|    case LYXP_TOKEN_NODETYPE:
  ------------------
  |  Branch (128:5): [True: 14, False: 1.23k]
  ------------------
  129|     14|        return "NodeType";
  130|      4|    case LYXP_TOKEN_VARREF:
  ------------------
  |  Branch (130:5): [True: 4, False: 1.24k]
  ------------------
  131|      4|        return "VariableReference";
  132|     87|    case LYXP_TOKEN_FUNCNAME:
  ------------------
  |  Branch (132:5): [True: 87, False: 1.16k]
  ------------------
  133|     87|        return "FunctionName";
  134|      0|    case LYXP_TOKEN_OPER_LOG:
  ------------------
  |  Branch (134:5): [True: 0, False: 1.24k]
  ------------------
  135|      0|        return "Operator(Logic)";
  136|     32|    case LYXP_TOKEN_OPER_EQUAL:
  ------------------
  |  Branch (136:5): [True: 32, False: 1.21k]
  ------------------
  137|     32|        return "Operator(Equal)";
  138|      3|    case LYXP_TOKEN_OPER_NEQUAL:
  ------------------
  |  Branch (138:5): [True: 3, False: 1.24k]
  ------------------
  139|      3|        return "Operator(Non-equal)";
  140|     22|    case LYXP_TOKEN_OPER_COMP:
  ------------------
  |  Branch (140:5): [True: 22, False: 1.22k]
  ------------------
  141|     22|        return "Operator(Comparison)";
  142|     27|    case LYXP_TOKEN_OPER_MATH:
  ------------------
  |  Branch (142:5): [True: 27, False: 1.22k]
  ------------------
  143|     27|        return "Operator(Math)";
  144|     10|    case LYXP_TOKEN_OPER_UNI:
  ------------------
  |  Branch (144:5): [True: 10, False: 1.23k]
  ------------------
  145|     10|        return "Operator(Union)";
  146|      5|    case LYXP_TOKEN_OPER_PATH:
  ------------------
  |  Branch (146:5): [True: 5, False: 1.24k]
  ------------------
  147|      5|        return "Operator(Path)";
  148|      9|    case LYXP_TOKEN_OPER_RPATH:
  ------------------
  |  Branch (148:5): [True: 9, False: 1.23k]
  ------------------
  149|      9|        return "Operator(Recursive Path)";
  150|      6|    case LYXP_TOKEN_AXISNAME:
  ------------------
  |  Branch (150:5): [True: 6, False: 1.24k]
  ------------------
  151|      6|        return "AxisName";
  152|      8|    case LYXP_TOKEN_LITERAL:
  ------------------
  |  Branch (152:5): [True: 8, False: 1.23k]
  ------------------
  153|      8|        return "Literal";
  154|     32|    case LYXP_TOKEN_NUMBER:
  ------------------
  |  Branch (154:5): [True: 32, False: 1.21k]
  ------------------
  155|     32|        return "Number";
  156|      0|    default:
  ------------------
  |  Branch (156:5): [True: 0, False: 1.24k]
  ------------------
  157|      0|        LOGINT(NULL);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
  158|      0|        return "";
  159|  1.24k|    }
  160|  1.24k|}
lyxp_check_token:
 1918|  1.64M|{
 1919|  1.64M|    if (exp->used == tok_idx) {
  ------------------
  |  Branch (1919:9): [True: 426k, False: 1.21M]
  ------------------
 1920|   426k|        if (ctx) {
  ------------------
  |  Branch (1920:13): [True: 27, False: 426k]
  ------------------
 1921|     27|            LOGVAL(ctx, LY_VCODE_XP_EOF);
  ------------------
  |  |  178|     27|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1922|     27|        }
 1923|   426k|        return LY_EINCOMPLETE;
 1924|   426k|    }
 1925|       |
 1926|  1.21M|    if (want_tok && (exp->tokens[tok_idx] != want_tok)) {
  ------------------
  |  Branch (1926:9): [True: 1.21M, False: 3]
  |  Branch (1926:21): [True: 324k, False: 891k]
  ------------------
 1927|   324k|        if (ctx) {
  ------------------
  |  Branch (1927:13): [True: 622, False: 324k]
  ------------------
 1928|    622|            LOGVAL(ctx, LY_VCODE_XP_INTOK2, lyxp_token2str(exp->tokens[tok_idx]),
  ------------------
  |  |  178|    622|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 1929|    622|                    &exp->expr[exp->tok_pos[tok_idx]], lyxp_token2str(want_tok));
 1930|    622|        }
 1931|   324k|        return LY_ENOT;
 1932|   324k|    }
 1933|       |
 1934|   891k|    return LY_SUCCESS;
 1935|  1.21M|}
lyxp_next_token:
 1939|  1.19M|{
 1940|  1.19M|    LY_CHECK_RET(lyxp_check_token(ctx, exp, *tok_idx, want_tok));
  ------------------
  |  |  206|  1.19M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  1.19M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.19M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  204|  1.19M|#define LY_CHECK_RET1(RETVAL) {LY_ERR ret__ = RETVAL;if (ret__ != LY_SUCCESS) {return ret__;}}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (204:58): [True: 751k, False: 438k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1941|       |
 1942|       |    /* skip the token */
 1943|   438k|    ++(*tok_idx);
 1944|       |
 1945|   438k|    return LY_SUCCESS;
 1946|  1.19M|}
lyxp_expr_free:
 2745|  1.74M|{
 2746|  1.74M|    uint32_t i;
 2747|       |
 2748|  1.74M|    if (!expr) {
  ------------------
  |  Branch (2748:9): [True: 1.59M, False: 144k]
  ------------------
 2749|  1.59M|        return;
 2750|  1.59M|    }
 2751|       |
 2752|   144k|    lydict_remove(ctx, expr->expr);
 2753|   144k|    free(expr->tokens);
 2754|   144k|    free(expr->tok_pos);
 2755|   144k|    free(expr->tok_len);
 2756|   144k|    if (expr->repeat) {
  ------------------
  |  Branch (2756:9): [True: 143k, False: 1.01k]
  ------------------
 2757|  1.43M|        for (i = 0; i < expr->used; ++i) {
  ------------------
  |  Branch (2757:21): [True: 1.29M, False: 143k]
  ------------------
 2758|  1.29M|            free(expr->repeat[i]);
 2759|  1.29M|        }
 2760|   143k|    }
 2761|   144k|    free(expr->repeat);
 2762|   144k|    free(expr);
 2763|   144k|}
lyxp_expr_parse:
 2838|  74.4k|{
 2839|  74.4k|    LY_ERR ret = LY_SUCCESS;
 2840|  74.4k|    struct lyxp_expr *expr;
 2841|  74.4k|    size_t parsed = 0, tok_len;
 2842|  74.4k|    enum lyxp_token tok_type;
 2843|  74.4k|    ly_bool prev_func_check = 0, prev_ntype_check = 0, has_axis;
 2844|  74.4k|    uint32_t tok_idx = 0;
 2845|  74.4k|    ssize_t ncname_len;
 2846|       |
 2847|  74.4k|    assert(expr_p);
 2848|       |
 2849|  74.4k|    if (!expr_str[0]) {
  ------------------
  |  Branch (2849:9): [True: 1, False: 74.4k]
  ------------------
 2850|      1|        LOGVAL(ctx, LY_VCODE_XP_EOF);
  ------------------
  |  |  178|      1|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2851|      1|        return LY_EVALID;
 2852|      1|    }
 2853|       |
 2854|  74.4k|    if (!expr_len) {
  ------------------
  |  Branch (2854:9): [True: 74.4k, False: 0]
  ------------------
 2855|  74.4k|        expr_len = strlen(expr_str);
 2856|  74.4k|    }
 2857|  74.4k|    if (expr_len > UINT32_MAX) {
  ------------------
  |  Branch (2857:9): [True: 0, False: 74.4k]
  ------------------
 2858|      0|        LOGVAL(ctx, LYVE_XPATH, "XPath expression cannot be longer than %" PRIu32 " characters.", UINT32_MAX);
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 2859|      0|        return LY_EVALID;
 2860|      0|    }
 2861|       |
 2862|       |    /* init lyxp_expr structure */
 2863|  74.4k|    expr = calloc(1, sizeof *expr);
 2864|  74.4k|    LY_CHECK_ERR_GOTO(!expr, LOGMEM(ctx); ret = LY_EMEM, error);
  ------------------
  |  |  203|  74.4k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 74.4k]
  |  |  ------------------
  ------------------
 2865|  74.4k|    LY_CHECK_GOTO(ret = lydict_insert(ctx, expr_str, expr_len, &expr->expr), error);
  ------------------
  |  |  202|  74.4k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 74.4k]
  |  |  ------------------
  ------------------
 2866|  74.4k|    expr->used = 0;
 2867|  74.4k|    expr->size = LYXP_EXPR_SIZE_START;
  ------------------
  |  |   82|  74.4k|#define LYXP_EXPR_SIZE_START 10
  ------------------
 2868|  74.4k|    expr->tokens = malloc(expr->size * sizeof *expr->tokens);
 2869|  74.4k|    LY_CHECK_ERR_GOTO(!expr->tokens, LOGMEM(ctx); ret = LY_EMEM, error);
  ------------------
  |  |  203|  74.4k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 74.4k]
  |  |  ------------------
  ------------------
 2870|       |
 2871|  74.4k|    expr->tok_pos = malloc(expr->size * sizeof *expr->tok_pos);
 2872|  74.4k|    LY_CHECK_ERR_GOTO(!expr->tok_pos, LOGMEM(ctx); ret = LY_EMEM, error);
  ------------------
  |  |  203|  74.4k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 74.4k]
  |  |  ------------------
  ------------------
 2873|       |
 2874|  74.4k|    expr->tok_len = malloc(expr->size * sizeof *expr->tok_len);
 2875|  74.4k|    LY_CHECK_ERR_GOTO(!expr->tok_len, LOGMEM(ctx); ret = LY_EMEM, error);
  ------------------
  |  |  203|  74.4k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 74.4k]
  |  |  ------------------
  ------------------
 2876|       |
 2877|       |    /* make expr 0-terminated */
 2878|  74.4k|    expr_str = expr->expr;
 2879|       |
 2880|  75.0k|    while (is_xmlws(expr_str[parsed])) {
  ------------------
  |  |   30|  75.0k|#define is_xmlws(c) (c == 0x20 || c == 0x9 || c == 0xa || c == 0xd)
  |  |  ------------------
  |  |  |  Branch (30:22): [True: 283, False: 74.7k]
  |  |  |  Branch (30:35): [True: 42, False: 74.7k]
  |  |  |  Branch (30:47): [True: 145, False: 74.5k]
  |  |  |  Branch (30:59): [True: 143, False: 74.4k]
  |  |  ------------------
  ------------------
 2881|    613|        ++parsed;
 2882|    613|    }
 2883|       |
 2884|   937k|    do {
 2885|   937k|        if (expr_str[parsed] == '(') {
  ------------------
  |  Branch (2885:13): [True: 19.3k, False: 917k]
  ------------------
 2886|       |
 2887|       |            /* '(' */
 2888|  19.3k|            tok_len = 1;
 2889|  19.3k|            tok_type = LYXP_TOKEN_PAR1;
 2890|       |
 2891|  19.3k|            if (prev_ntype_check && expr->used && (expr->tokens[expr->used - 1] == LYXP_TOKEN_NAMETEST) &&
  ------------------
  |  Branch (2891:17): [True: 17.2k, False: 2.09k]
  |  Branch (2891:37): [True: 17.2k, False: 0]
  |  Branch (2891:51): [True: 15.2k, False: 1.98k]
  ------------------
 2892|  19.3k|                    (((expr->tok_len[expr->used - 1] == 4) &&
  ------------------
  |  Branch (2892:23): [True: 1.61k, False: 13.6k]
  ------------------
 2893|  15.2k|                    (!strncmp(&expr_str[expr->tok_pos[expr->used - 1]], "node", 4) ||
  ------------------
  |  Branch (2893:22): [True: 135, False: 1.48k]
  ------------------
 2894|  1.61k|                    !strncmp(&expr_str[expr->tok_pos[expr->used - 1]], "text", 4))) ||
  ------------------
  |  Branch (2894:21): [True: 480, False: 1.00k]
  ------------------
 2895|  15.2k|                    ((expr->tok_len[expr->used - 1] == 7) &&
  ------------------
  |  Branch (2895:22): [True: 3.49k, False: 11.1k]
  ------------------
 2896|  14.6k|                    !strncmp(&expr_str[expr->tok_pos[expr->used - 1]], "comment", 7)))) {
  ------------------
  |  Branch (2896:21): [True: 441, False: 3.05k]
  ------------------
 2897|       |                /* it is NodeType after all */
 2898|  1.05k|                expr->tokens[expr->used - 1] = LYXP_TOKEN_NODETYPE;
 2899|       |
 2900|  1.05k|                prev_ntype_check = 0;
 2901|  1.05k|                prev_func_check = 0;
 2902|  18.3k|            } else if (prev_func_check && expr->used && (expr->tokens[expr->used - 1] == LYXP_TOKEN_NAMETEST)) {
  ------------------
  |  Branch (2902:24): [True: 14.1k, False: 4.20k]
  |  Branch (2902:43): [True: 14.1k, False: 0]
  |  Branch (2902:57): [True: 12.5k, False: 1.52k]
  ------------------
 2903|       |                /* it is FunctionName after all */
 2904|  12.5k|                expr->tokens[expr->used - 1] = LYXP_TOKEN_FUNCNAME;
 2905|       |
 2906|  12.5k|                prev_ntype_check = 0;
 2907|  12.5k|                prev_func_check = 0;
 2908|  12.5k|            }
 2909|       |
 2910|   917k|        } else if (expr_str[parsed] == ')') {
  ------------------
  |  Branch (2910:20): [True: 1.57k, False: 916k]
  ------------------
 2911|       |
 2912|       |            /* ')' */
 2913|  1.57k|            tok_len = 1;
 2914|  1.57k|            tok_type = LYXP_TOKEN_PAR2;
 2915|       |
 2916|   916k|        } else if (expr_str[parsed] == '[') {
  ------------------
  |  Branch (2916:20): [True: 3.00k, False: 913k]
  ------------------
 2917|       |
 2918|       |            /* '[' */
 2919|  3.00k|            tok_len = 1;
 2920|  3.00k|            tok_type = LYXP_TOKEN_BRACK1;
 2921|       |
 2922|   913k|        } else if (expr_str[parsed] == ']') {
  ------------------
  |  Branch (2922:20): [True: 20.9k, False: 892k]
  ------------------
 2923|       |
 2924|       |            /* ']' */
 2925|  20.9k|            tok_len = 1;
 2926|  20.9k|            tok_type = LYXP_TOKEN_BRACK2;
 2927|       |
 2928|   892k|        } else if (!strncmp(&expr_str[parsed], "..", 2)) {
  ------------------
  |  Branch (2928:20): [True: 85.3k, False: 807k]
  ------------------
 2929|       |
 2930|       |            /* '..' */
 2931|  85.3k|            tok_len = 2;
 2932|  85.3k|            tok_type = LYXP_TOKEN_DDOT;
 2933|       |
 2934|   807k|        } else if ((expr_str[parsed] == '.') && (!isdigit(expr_str[parsed + 1]))) {
  ------------------
  |  Branch (2934:20): [True: 612, False: 806k]
  |  Branch (2934:49): [True: 380, False: 232]
  ------------------
 2935|       |
 2936|       |            /* '.' */
 2937|    380|            tok_len = 1;
 2938|    380|            tok_type = LYXP_TOKEN_DOT;
 2939|       |
 2940|   806k|        } else if (expr_str[parsed] == '@') {
  ------------------
  |  Branch (2940:20): [True: 1.92k, False: 804k]
  ------------------
 2941|       |
 2942|       |            /* '@' */
 2943|  1.92k|            tok_len = 1;
 2944|  1.92k|            tok_type = LYXP_TOKEN_AT;
 2945|       |
 2946|   804k|        } else if (expr_str[parsed] == ',') {
  ------------------
  |  Branch (2946:20): [True: 65.7k, False: 738k]
  ------------------
 2947|       |
 2948|       |            /* ',' */
 2949|  65.7k|            tok_len = 1;
 2950|  65.7k|            tok_type = LYXP_TOKEN_COMMA;
 2951|       |
 2952|   738k|        } else if (expr_str[parsed] == '\'') {
  ------------------
  |  Branch (2952:20): [True: 656, False: 738k]
  ------------------
 2953|       |
 2954|       |            /* Literal with ' */
 2955|  2.08k|            for (tok_len = 1; (expr_str[parsed + tok_len] != '\0') && (expr_str[parsed + tok_len] != '\''); ++tok_len) {}
  ------------------
  |  Branch (2955:31): [True: 2.07k, False: 12]
  |  Branch (2955:71): [True: 1.43k, False: 644]
  ------------------
 2956|    656|            LY_CHECK_ERR_GOTO(expr_str[parsed + tok_len] == '\0',
  ------------------
  |  |  203|    656|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 12, False: 644]
  |  |  ------------------
  ------------------
 2957|    656|                    LOGVAL(ctx, LY_VCODE_XP_EOE, expr_str[parsed], &expr_str[parsed]); ret = LY_EVALID,
 2958|    656|                    error);
 2959|    644|            ++tok_len;
 2960|    644|            tok_type = LYXP_TOKEN_LITERAL;
 2961|       |
 2962|   738k|        } else if (expr_str[parsed] == '\"') {
  ------------------
  |  Branch (2962:20): [True: 318, False: 738k]
  ------------------
 2963|       |
 2964|       |            /* Literal with " */
 2965|    840|            for (tok_len = 1; (expr_str[parsed + tok_len] != '\0') && (expr_str[parsed + tok_len] != '\"'); ++tok_len) {}
  ------------------
  |  Branch (2965:31): [True: 825, False: 15]
  |  Branch (2965:71): [True: 522, False: 303]
  ------------------
 2966|    318|            LY_CHECK_ERR_GOTO(expr_str[parsed + tok_len] == '\0',
  ------------------
  |  |  203|    318|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 15, False: 303]
  |  |  ------------------
  ------------------
 2967|    318|                    LOGVAL(ctx, LY_VCODE_XP_EOE, expr_str[parsed], &expr_str[parsed]); ret = LY_EVALID,
 2968|    318|                    error);
 2969|    303|            ++tok_len;
 2970|    303|            tok_type = LYXP_TOKEN_LITERAL;
 2971|       |
 2972|   738k|        } else if ((expr_str[parsed] == '.') || (isdigit(expr_str[parsed]))) {
  ------------------
  |  Branch (2972:20): [True: 232, False: 737k]
  |  Branch (2972:49): [True: 764, False: 737k]
  ------------------
 2973|       |
 2974|       |            /* Number */
 2975|  1.92k|            for (tok_len = 0; isdigit(expr_str[parsed + tok_len]); ++tok_len) {}
 2976|    996|            if (expr_str[parsed + tok_len] == '.') {
  ------------------
  |  Branch (2976:17): [True: 391, False: 605]
  ------------------
 2977|    391|                ++tok_len;
 2978|    532|                for ( ; isdigit(expr_str[parsed + tok_len]); ++tok_len) {}
 2979|    391|            }
 2980|    996|            tok_type = LYXP_TOKEN_NUMBER;
 2981|       |
 2982|   737k|        } else if (expr_str[parsed] == '$') {
  ------------------
  |  Branch (2982:20): [True: 1.63k, False: 735k]
  ------------------
 2983|       |
 2984|       |            /* VariableReference */
 2985|  1.63k|            parsed++;
 2986|  1.63k|            ncname_len = parse_ncname(&expr_str[parsed]);
 2987|  1.63k|            LY_CHECK_ERR_GOTO(ncname_len < 1, LOGVAL(ctx, LY_VCODE_XP_INEXPR, expr_str[parsed - ncname_len],
  ------------------
  |  |  203|  1.63k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 28, False: 1.60k]
  |  |  ------------------
  ------------------
 2988|  1.63k|                    parsed - ncname_len + 1, expr_str); ret = LY_EVALID, error);
 2989|  1.60k|            tok_len = ncname_len;
 2990|  1.60k|            LY_CHECK_ERR_GOTO(expr_str[parsed + tok_len] == ':',
  ------------------
  |  |  203|  1.60k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 1, False: 1.60k]
  |  |  ------------------
  ------------------
 2991|  1.60k|                    LOGVAL(ctx, LYVE_XPATH, "Variable with prefix is not supported."); ret = LY_EVALID,
 2992|  1.60k|                    error);
 2993|  1.60k|            tok_type = LYXP_TOKEN_VARREF;
 2994|       |
 2995|   735k|        } else if (expr_str[parsed] == '/') {
  ------------------
  |  Branch (2995:20): [True: 298k, False: 436k]
  ------------------
 2996|       |
 2997|       |            /* Operator '/', '//' */
 2998|   298k|            if (!strncmp(&expr_str[parsed], "//", 2)) {
  ------------------
  |  Branch (2998:17): [True: 1.18k, False: 297k]
  ------------------
 2999|  1.18k|                tok_len = 2;
 3000|  1.18k|                tok_type = LYXP_TOKEN_OPER_RPATH;
 3001|   297k|            } else {
 3002|   297k|                tok_len = 1;
 3003|   297k|                tok_type = LYXP_TOKEN_OPER_PATH;
 3004|   297k|            }
 3005|       |
 3006|   436k|        } else if (!strncmp(&expr_str[parsed], "!=", 2)) {
  ------------------
  |  Branch (3006:20): [True: 1.56k, False: 435k]
  ------------------
 3007|       |
 3008|       |            /* Operator '!=' */
 3009|  1.56k|            tok_len = 2;
 3010|  1.56k|            tok_type = LYXP_TOKEN_OPER_NEQUAL;
 3011|       |
 3012|   435k|        } else if (!strncmp(&expr_str[parsed], "<=", 2) || !strncmp(&expr_str[parsed], ">=", 2)) {
  ------------------
  |  Branch (3012:20): [True: 1.42k, False: 433k]
  |  Branch (3012:60): [True: 1.04k, False: 432k]
  ------------------
 3013|       |
 3014|       |            /* Operator '<=', '>=' */
 3015|  2.46k|            tok_len = 2;
 3016|  2.46k|            tok_type = LYXP_TOKEN_OPER_COMP;
 3017|       |
 3018|   432k|        } else if (expr_str[parsed] == '|') {
  ------------------
  |  Branch (3018:20): [True: 3.16k, False: 429k]
  ------------------
 3019|       |
 3020|       |            /* Operator '|' */
 3021|  3.16k|            tok_len = 1;
 3022|  3.16k|            tok_type = LYXP_TOKEN_OPER_UNI;
 3023|       |
 3024|   429k|        } else if ((expr_str[parsed] == '+') || (expr_str[parsed] == '-')) {
  ------------------
  |  Branch (3024:20): [True: 4.03k, False: 425k]
  |  Branch (3024:49): [True: 3.41k, False: 422k]
  ------------------
 3025|       |
 3026|       |            /* Operator '+', '-' */
 3027|  7.45k|            tok_len = 1;
 3028|  7.45k|            tok_type = LYXP_TOKEN_OPER_MATH;
 3029|       |
 3030|   422k|        } else if (expr_str[parsed] == '=') {
  ------------------
  |  Branch (3030:20): [True: 1.50k, False: 420k]
  ------------------
 3031|       |
 3032|       |            /* Operator '=' */
 3033|  1.50k|            tok_len = 1;
 3034|  1.50k|            tok_type = LYXP_TOKEN_OPER_EQUAL;
 3035|       |
 3036|   420k|        } else if ((expr_str[parsed] == '<') || (expr_str[parsed] == '>')) {
  ------------------
  |  Branch (3036:20): [True: 619, False: 419k]
  |  Branch (3036:49): [True: 1.85k, False: 418k]
  ------------------
 3037|       |
 3038|       |            /* Operator '<', '>' */
 3039|  2.47k|            tok_len = 1;
 3040|  2.47k|            tok_type = LYXP_TOKEN_OPER_COMP;
 3041|       |
 3042|   418k|        } else if (expr->used && (expr->tokens[expr->used - 1] != LYXP_TOKEN_AT) &&
  ------------------
  |  Branch (3042:20): [True: 416k, False: 1.09k]
  |  Branch (3042:34): [True: 415k, False: 1.02k]
  ------------------
 3043|   418k|                (expr->tokens[expr->used - 1] != LYXP_TOKEN_PAR1) &&
  ------------------
  |  Branch (3043:17): [True: 398k, False: 17.0k]
  ------------------
 3044|   418k|                (expr->tokens[expr->used - 1] != LYXP_TOKEN_BRACK1) &&
  ------------------
  |  Branch (3044:17): [True: 397k, False: 1.53k]
  ------------------
 3045|   418k|                (expr->tokens[expr->used - 1] != LYXP_TOKEN_COMMA) &&
  ------------------
  |  Branch (3045:17): [True: 332k, False: 64.4k]
  ------------------
 3046|   418k|                (expr->tokens[expr->used - 1] != LYXP_TOKEN_OPER_LOG) &&
  ------------------
  |  Branch (3046:17): [True: 332k, False: 282]
  ------------------
 3047|   418k|                (expr->tokens[expr->used - 1] != LYXP_TOKEN_OPER_EQUAL) &&
  ------------------
  |  Branch (3047:17): [True: 331k, False: 821]
  ------------------
 3048|   418k|                (expr->tokens[expr->used - 1] != LYXP_TOKEN_OPER_NEQUAL) &&
  ------------------
  |  Branch (3048:17): [True: 330k, False: 1.18k]
  ------------------
 3049|   418k|                (expr->tokens[expr->used - 1] != LYXP_TOKEN_OPER_COMP) &&
  ------------------
  |  Branch (3049:17): [True: 328k, False: 1.75k]
  ------------------
 3050|   418k|                (expr->tokens[expr->used - 1] != LYXP_TOKEN_OPER_MATH) &&
  ------------------
  |  Branch (3050:17): [True: 315k, False: 13.5k]
  ------------------
 3051|   418k|                (expr->tokens[expr->used - 1] != LYXP_TOKEN_OPER_UNI) &&
  ------------------
  |  Branch (3051:17): [True: 314k, False: 1.04k]
  ------------------
 3052|   418k|                (expr->tokens[expr->used - 1] != LYXP_TOKEN_OPER_PATH) &&
  ------------------
  |  Branch (3052:17): [True: 61.6k, False: 252k]
  ------------------
 3053|   418k|                (expr->tokens[expr->used - 1] != LYXP_TOKEN_OPER_RPATH)) {
  ------------------
  |  Branch (3053:17): [True: 60.8k, False: 870]
  ------------------
 3054|       |
 3055|       |            /* Operator '*', 'or', 'and', 'mod', or 'div' */
 3056|  60.8k|            if (expr_str[parsed] == '*') {
  ------------------
  |  Branch (3056:17): [True: 59.8k, False: 909]
  ------------------
 3057|  59.8k|                tok_len = 1;
 3058|  59.8k|                tok_type = LYXP_TOKEN_OPER_MATH;
 3059|       |
 3060|  59.8k|            } else if (!strncmp(&expr_str[parsed], "or", 2)) {
  ------------------
  |  Branch (3060:24): [True: 228, False: 681]
  ------------------
 3061|    228|                tok_len = 2;
 3062|    228|                tok_type = LYXP_TOKEN_OPER_LOG;
 3063|       |
 3064|    681|            } else if (!strncmp(&expr_str[parsed], "and", 3)) {
  ------------------
  |  Branch (3064:24): [True: 117, False: 564]
  ------------------
 3065|    117|                tok_len = 3;
 3066|    117|                tok_type = LYXP_TOKEN_OPER_LOG;
 3067|       |
 3068|    564|            } else if (!strncmp(&expr_str[parsed], "mod", 3) || !strncmp(&expr_str[parsed], "div", 3)) {
  ------------------
  |  Branch (3068:24): [True: 236, False: 328]
  |  Branch (3068:65): [True: 87, False: 241]
  ------------------
 3069|    323|                tok_len = 3;
 3070|    323|                tok_type = LYXP_TOKEN_OPER_MATH;
 3071|       |
 3072|    323|            } else if (prev_ntype_check || prev_func_check) {
  ------------------
  |  Branch (3072:24): [True: 159, False: 82]
  |  Branch (3072:44): [True: 0, False: 82]
  ------------------
 3073|    159|                LOGVAL(ctx, LYVE_XPATH, "Invalid character 0x%x ('%c'), perhaps \"%.*s\" is supposed to be a function call.",
  ------------------
  |  |  178|    159|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3074|    159|                        expr_str[parsed], expr_str[parsed], expr->tok_len[expr->used - 1], &expr->expr[expr->tok_pos[expr->used - 1]]);
 3075|    159|                ret = LY_EVALID;
 3076|    159|                goto error;
 3077|    159|            } else {
 3078|     82|                LOGVAL(ctx, LY_VCODE_XP_INEXPR, expr_str[parsed], parsed + 1, expr_str);
  ------------------
  |  |  178|     82|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3079|     82|                ret = LY_EVALID;
 3080|     82|                goto error;
 3081|     82|            }
 3082|   357k|        } else {
 3083|       |
 3084|       |            /* (AxisName '::')? ((NCName ':')? '*' | QName) or NodeType/FunctionName */
 3085|   357k|            if (expr_str[parsed] == '*') {
  ------------------
  |  Branch (3085:17): [True: 86.7k, False: 270k]
  ------------------
 3086|  86.7k|                ncname_len = 1;
 3087|   270k|            } else {
 3088|   270k|                ncname_len = parse_ncname(&expr_str[parsed]);
 3089|   270k|                LY_CHECK_ERR_GOTO(ncname_len < 1, LOGVAL(ctx, LY_VCODE_XP_INEXPR, expr_str[parsed - ncname_len],
  ------------------
  |  |  203|   270k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 141, False: 270k]
  |  |  ------------------
  ------------------
 3090|   270k|                        parsed - ncname_len + 1, expr_str); ret = LY_EVALID, error);
 3091|   270k|            }
 3092|   357k|            tok_len = ncname_len;
 3093|       |
 3094|   357k|            has_axis = 0;
 3095|   357k|            if (!strncmp(&expr_str[parsed + tok_len], "::", 2)) {
  ------------------
  |  Branch (3095:17): [True: 3.61k, False: 353k]
  ------------------
 3096|       |                /* axis */
 3097|  3.61k|                LY_CHECK_ERR_GOTO(expr_parse_axis(&expr_str[parsed], ncname_len),
  ------------------
  |  |  203|  3.61k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 495, False: 3.11k]
  |  |  ------------------
  ------------------
 3098|  3.61k|                        LOGVAL(ctx, LY_VCODE_XP_INEXPR, expr_str[parsed], parsed + 1, expr_str); ret = LY_EVALID, error);
 3099|  3.11k|                tok_type = LYXP_TOKEN_AXISNAME;
 3100|       |
 3101|  3.11k|                LY_CHECK_GOTO(ret = exp_add_token(ctx, expr, tok_type, parsed, tok_len), error);
  ------------------
  |  |  202|  3.11k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 3.11k]
  |  |  ------------------
  ------------------
 3102|  3.11k|                parsed += tok_len;
 3103|       |
 3104|       |                /* '::' */
 3105|  3.11k|                tok_len = 2;
 3106|  3.11k|                tok_type = LYXP_TOKEN_DCOLON;
 3107|       |
 3108|  3.11k|                LY_CHECK_GOTO(ret = exp_add_token(ctx, expr, tok_type, parsed, tok_len), error);
  ------------------
  |  |  202|  3.11k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 3.11k]
  |  |  ------------------
  ------------------
 3109|  3.11k|                parsed += tok_len;
 3110|       |
 3111|  3.11k|                if (expr_str[parsed] == '*') {
  ------------------
  |  Branch (3111:21): [True: 312, False: 2.80k]
  ------------------
 3112|    312|                    ncname_len = 1;
 3113|  2.80k|                } else {
 3114|  2.80k|                    ncname_len = parse_ncname(&expr_str[parsed]);
 3115|  2.80k|                    LY_CHECK_ERR_GOTO(ncname_len < 1, LOGVAL(ctx, LY_VCODE_XP_INEXPR, expr_str[parsed - ncname_len],
  ------------------
  |  |  203|  2.80k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 46, False: 2.76k]
  |  |  ------------------
  ------------------
 3116|  2.80k|                            parsed - ncname_len + 1, expr_str); ret = LY_EVALID, error);
 3117|  2.76k|                }
 3118|  3.07k|                tok_len = ncname_len;
 3119|       |
 3120|  3.07k|                has_axis = 1;
 3121|  3.07k|            }
 3122|       |
 3123|   356k|            if (expr_str[parsed + tok_len] == ':') {
  ------------------
  |  Branch (3123:17): [True: 59.0k, False: 297k]
  ------------------
 3124|  59.0k|                ++tok_len;
 3125|  59.0k|                if (expr_str[parsed + tok_len] == '*') {
  ------------------
  |  Branch (3125:21): [True: 172, False: 58.8k]
  ------------------
 3126|    172|                    ++tok_len;
 3127|  58.8k|                } else {
 3128|  58.8k|                    ncname_len = parse_ncname(&expr_str[parsed + tok_len]);
 3129|  58.8k|                    LY_CHECK_ERR_GOTO(ncname_len < 1, LOGVAL(ctx, LY_VCODE_XP_INEXPR, expr_str[parsed - ncname_len],
  ------------------
  |  |  203|  58.8k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 40, False: 58.8k]
  |  |  ------------------
  ------------------
 3130|  58.8k|                            parsed - ncname_len + 1, expr_str); ret = LY_EVALID, error);
 3131|  58.8k|                    tok_len += ncname_len;
 3132|  58.8k|                }
 3133|       |                /* remove old flags to prevent ambiguities */
 3134|  58.9k|                prev_ntype_check = 0;
 3135|  58.9k|                prev_func_check = 0;
 3136|  58.9k|                tok_type = LYXP_TOKEN_NAMETEST;
 3137|   297k|            } else {
 3138|       |                /* if not '*', there is no prefix so it can still be NodeType/FunctionName, we can't finally decide now */
 3139|   297k|                prev_ntype_check = (expr_str[parsed] == '*') ? 0 : 1;
  ------------------
  |  Branch (3139:36): [True: 86.9k, False: 210k]
  ------------------
 3140|   297k|                prev_func_check = (prev_ntype_check && !has_axis) ? 1 : 0;
  ------------------
  |  Branch (3140:36): [True: 210k, False: 86.9k]
  |  Branch (3140:56): [True: 207k, False: 2.73k]
  ------------------
 3141|   297k|                tok_type = LYXP_TOKEN_NAMETEST;
 3142|   297k|            }
 3143|   356k|        }
 3144|       |
 3145|       |        /* store the token, move on to the next one */
 3146|   936k|        LY_CHECK_GOTO(ret = exp_add_token(ctx, expr, tok_type, parsed, tok_len), error);
  ------------------
  |  |  202|   936k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 936k]
  |  |  ------------------
  ------------------
 3147|   936k|        parsed += tok_len;
 3148|   941k|        while (is_xmlws(expr_str[parsed])) {
  ------------------
  |  |   30|   941k|#define is_xmlws(c) (c == 0x20 || c == 0x9 || c == 0xa || c == 0xd)
  |  |  ------------------
  |  |  |  Branch (30:22): [True: 3.95k, False: 937k]
  |  |  |  Branch (30:35): [True: 321, False: 937k]
  |  |  |  Branch (30:47): [True: 1.15k, False: 936k]
  |  |  |  Branch (30:59): [True: 141, False: 936k]
  |  |  ------------------
  ------------------
 3149|  5.57k|            ++parsed;
 3150|  5.57k|        }
 3151|       |
 3152|   936k|    } while (expr_str[parsed]);
  ------------------
  |  Branch (3152:14): [True: 862k, False: 73.4k]
  ------------------
 3153|       |
 3154|  73.4k|    if (reparse) {
  ------------------
  |  Branch (3154:9): [True: 0, False: 73.4k]
  ------------------
 3155|       |        /* prealloc repeat */
 3156|      0|        expr->repeat = calloc(expr->size, sizeof *expr->repeat);
 3157|      0|        LY_CHECK_ERR_GOTO(!expr->repeat, LOGMEM(ctx); ret = LY_EMEM, error);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3158|       |
 3159|       |        /* fill repeat */
 3160|      0|        LY_CHECK_ERR_GOTO(reparse_or_expr(ctx, expr, &tok_idx, 0), ret = LY_EVALID, error);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3161|      0|        if (expr->used > tok_idx) {
  ------------------
  |  Branch (3161:13): [True: 0, False: 0]
  ------------------
 3162|      0|            LOGVAL(ctx, LYVE_XPATH, "Unparsed characters \"%s\" left at the end of an XPath expression.",
  ------------------
  |  |  178|      0|#define LOGVAL(CTX, ...) ly_vlog(CTX, NULL, __VA_ARGS__)
  ------------------
 3163|      0|                    &expr->expr[expr->tok_pos[tok_idx]]);
 3164|      0|            ret = LY_EVALID;
 3165|      0|            goto error;
 3166|      0|        }
 3167|      0|    }
 3168|       |
 3169|  73.4k|    print_expr_struct_debug(expr);
 3170|  73.4k|    *expr_p = expr;
 3171|  73.4k|    return LY_SUCCESS;
 3172|       |
 3173|  1.01k|error:
 3174|  1.01k|    lyxp_expr_free(ctx, expr);
 3175|  1.01k|    return ret;
 3176|  73.4k|}
lyxp_expr_dup:
 3181|  70.2k|{
 3182|  70.2k|    LY_ERR ret = LY_SUCCESS;
 3183|  70.2k|    struct lyxp_expr *dup = NULL;
 3184|  70.2k|    uint32_t used = 0, i, j, expr_len;
 3185|  70.2k|    const char *expr_start;
 3186|       |
 3187|  70.2k|    assert((!start_idx && !end_idx) || ((start_idx < exp->used) && (end_idx < exp->used) && (start_idx <= end_idx)));
 3188|       |
 3189|  70.2k|    if (!exp) {
  ------------------
  |  Branch (3189:9): [True: 0, False: 70.2k]
  ------------------
 3190|      0|        goto cleanup;
 3191|      0|    }
 3192|       |
 3193|  70.2k|    if (!start_idx && !end_idx) {
  ------------------
  |  Branch (3193:9): [True: 70.2k, False: 0]
  |  Branch (3193:23): [True: 70.2k, False: 0]
  ------------------
 3194|  70.2k|        end_idx = exp->used - 1;
 3195|  70.2k|    }
 3196|       |
 3197|  70.2k|    expr_start = exp->expr + exp->tok_pos[start_idx];
 3198|  70.2k|    expr_len = (exp->tok_pos[end_idx] + exp->tok_len[end_idx]) - exp->tok_pos[start_idx];
 3199|       |
 3200|  70.2k|    dup = calloc(1, sizeof *dup);
 3201|  70.2k|    LY_CHECK_ERR_GOTO(!dup, LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|  70.2k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 3202|       |
 3203|  70.2k|    if (exp->used) {
  ------------------
  |  Branch (3203:9): [True: 70.2k, False: 0]
  ------------------
 3204|  70.2k|        used = (end_idx - start_idx) + 1;
 3205|       |
 3206|  70.2k|        dup->tokens = malloc(used * sizeof *dup->tokens);
 3207|  70.2k|        LY_CHECK_ERR_GOTO(!dup->tokens, LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|  70.2k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 3208|  70.2k|        memcpy(dup->tokens, exp->tokens + start_idx, used * sizeof *dup->tokens);
 3209|       |
 3210|  70.2k|        dup->tok_pos = malloc(used * sizeof *dup->tok_pos);
 3211|  70.2k|        LY_CHECK_ERR_GOTO(!dup->tok_pos, LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|  70.2k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 3212|  70.2k|        memcpy(dup->tok_pos, exp->tok_pos + start_idx, used * sizeof *dup->tok_pos);
 3213|       |
 3214|  70.2k|        if (start_idx) {
  ------------------
  |  Branch (3214:13): [True: 0, False: 70.2k]
  ------------------
 3215|       |            /* fix the indices in the expression */
 3216|      0|            for (i = 0; i < used; ++i) {
  ------------------
  |  Branch (3216:25): [True: 0, False: 0]
  ------------------
 3217|      0|                dup->tok_pos[i] -= expr_start - exp->expr;
 3218|      0|            }
 3219|      0|        }
 3220|       |
 3221|  70.2k|        dup->tok_len = malloc(used * sizeof *dup->tok_len);
 3222|  70.2k|        LY_CHECK_ERR_GOTO(!dup->tok_len, LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|  70.2k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 3223|  70.2k|        memcpy(dup->tok_len, exp->tok_len + start_idx, used * sizeof *dup->tok_len);
 3224|       |
 3225|  70.2k|        if (exp->repeat) {
  ------------------
  |  Branch (3225:13): [True: 70.2k, False: 0]
  ------------------
 3226|  70.2k|            dup->repeat = malloc(used * sizeof *dup->repeat);
 3227|  70.2k|            LY_CHECK_ERR_GOTO(!dup->repeat, LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|  70.2k|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 3228|   477k|            for (i = start_idx; i <= end_idx; ++i) {
  ------------------
  |  Branch (3228:33): [True: 407k, False: 70.2k]
  ------------------
 3229|   407k|                if (!exp->repeat[i]) {
  ------------------
  |  Branch (3229:21): [True: 407k, False: 0]
  ------------------
 3230|   407k|                    dup->repeat[i - start_idx] = NULL;
 3231|   407k|                } else {
 3232|      0|                    for (j = 0; exp->repeat[i][j]; ++j) {}
  ------------------
  |  Branch (3232:33): [True: 0, False: 0]
  ------------------
 3233|       |                    /* the ending 0 as well */
 3234|      0|                    ++j;
 3235|       |
 3236|      0|                    dup->repeat[i - start_idx] = malloc(j * sizeof **dup->repeat);
 3237|      0|                    LY_CHECK_ERR_GOTO(!dup->repeat[i - start_idx], LOGMEM(ctx); ret = LY_EMEM, cleanup);
  ------------------
  |  |  203|      0|#define LY_CHECK_ERR_GOTO(COND, ERR, GOTO) if ((COND)) {ERR; goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (203:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3238|      0|                    memcpy(dup->repeat[i - start_idx], exp->repeat[i], j * sizeof **dup->repeat);
 3239|      0|                }
 3240|   407k|            }
 3241|  70.2k|        }
 3242|  70.2k|    }
 3243|       |
 3244|  70.2k|    dup->used = used;
 3245|  70.2k|    dup->size = used;
 3246|       |
 3247|       |    /* copy only subexpression */
 3248|  70.2k|    LY_CHECK_GOTO(ret = lydict_insert(ctx, expr_start, expr_len, &dup->expr), cleanup);
  ------------------
  |  |  202|  70.2k|#define LY_CHECK_GOTO(COND, GOTO) if ((COND)) {goto GOTO;}
  |  |  ------------------
  |  |  |  Branch (202:39): [True: 0, False: 70.2k]
  |  |  ------------------
  ------------------
 3249|       |
 3250|  70.2k|cleanup:
 3251|  70.2k|    if (ret) {
  ------------------
  |  Branch (3251:9): [True: 0, False: 70.2k]
  ------------------
 3252|      0|        lyxp_expr_free(ctx, dup);
 3253|  70.2k|    } else {
 3254|  70.2k|        *dup_p = dup;
 3255|  70.2k|    }
 3256|  70.2k|    return ret;
 3257|  70.2k|}
xpath.c:parse_ncname:
 2684|   333k|{
 2685|   333k|    uint32_t uc;
 2686|   333k|    size_t size;
 2687|   333k|    ssize_t len = 0;
 2688|       |
 2689|   333k|    LY_CHECK_RET(ly_getutf8(&ncname, &uc, &size), 0);
  ------------------
  |  |  206|   333k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|   333k|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   333k|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|   333k|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:41): [True: 44, False: 333k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2690|   333k|    if (!is_xmlqnamestartchar(uc) || (uc == ':')) {
  ------------------
  |  |   33|   667k|#define is_xmlqnamestartchar(c) ((c >= 'a' && c <= 'z') || c == '_' || \
  |  |  ------------------
  |  |  |  Branch (33:35): [True: 328k, False: 5.22k]
  |  |  |  Branch (33:47): [True: 323k, False: 5.07k]
  |  |  |  Branch (33:60): [True: 1.24k, False: 9.06k]
  |  |  ------------------
  |  |   34|   333k|        (c >= 'A' && c <= 'Z') || /* c == ':' || */ \
  |  |  ------------------
  |  |  |  Branch (34:10): [True: 9.01k, False: 50]
  |  |  |  Branch (34:22): [True: 3.93k, False: 5.07k]
  |  |  ------------------
  |  |   35|   333k|        (c >= 0x370 && c <= 0x1fff && c != 0x37e ) || \
  |  |  ------------------
  |  |  |  Branch (35:10): [True: 3.56k, False: 1.56k]
  |  |  |  Branch (35:24): [True: 1.03k, False: 2.52k]
  |  |  |  Branch (35:39): [True: 1.03k, False: 2]
  |  |  ------------------
  |  |   36|   333k|        (c >= 0xc0 && c <= 0x2ff && c != 0xd7 && c != 0xf7) || c == 0x200c || \
  |  |  ------------------
  |  |  |  Branch (36:10): [True: 4.03k, False: 61]
  |  |  |  Branch (36:23): [True: 1.50k, False: 2.53k]
  |  |  |  Branch (36:37): [True: 1.50k, False: 0]
  |  |  |  Branch (36:50): [True: 1.50k, False: 1]
  |  |  |  Branch (36:64): [True: 476, False: 2.12k]
  |  |  ------------------
  |  |   37|   333k|        c == 0x200d || (c >= 0x2070 && c <= 0x218f) || \
  |  |  ------------------
  |  |  |  Branch (37:9): [True: 814, False: 1.30k]
  |  |  |  Branch (37:25): [True: 1.22k, False: 80]
  |  |  |  Branch (37:40): [True: 178, False: 1.04k]
  |  |  ------------------
  |  |   38|   333k|        (c >= 0x2c00 && c <= 0x2fef) || (c >= 0x3001 && c <= 0xd7ff) || \
  |  |  ------------------
  |  |  |  Branch (38:10): [True: 1.04k, False: 83]
  |  |  |  Branch (38:25): [True: 276, False: 769]
  |  |  |  Branch (38:42): [True: 768, False: 84]
  |  |  |  Branch (38:57): [True: 66, False: 702]
  |  |  ------------------
  |  |   39|   333k|        (c >= 0xf900 && c <= 0xfdcf) || (c >= 0xfdf0 && c <= 0xfffd) || \
  |  |  ------------------
  |  |  |  Branch (39:10): [True: 696, False: 90]
  |  |  |  Branch (39:25): [True: 67, False: 629]
  |  |  |  Branch (39:42): [True: 629, False: 90]
  |  |  |  Branch (39:57): [True: 204, False: 425]
  |  |  ------------------
  |  |   40|   667k|        (c >= 0x10000 && c <= 0xeffff))
  |  |  ------------------
  |  |  |  Branch (40:10): [True: 425, False: 90]
  |  |  |  Branch (40:26): [True: 410, False: 15]
  |  |  ------------------
  ------------------
  |  Branch (2690:38): [True: 0, False: 333k]
  ------------------
 2691|    105|        return len;
 2692|    105|    }
 2693|       |
 2694|  6.21M|    do {
 2695|  6.21M|        len += size;
 2696|  6.21M|        if (!*ncname) {
  ------------------
  |  Branch (2696:13): [True: 73.0k, False: 6.13M]
  ------------------
 2697|  73.0k|            break;
 2698|  73.0k|        }
 2699|  6.13M|        LY_CHECK_RET(ly_getutf8(&ncname, &uc, &size), -len);
  ------------------
  |  |  206|  6.13M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   57|  6.13M|#define GETMACRO2(_1, _2, NAME, ...) NAME
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  6.13M|#define LY_CHECK_RET(...) GETMACRO2(__VA_ARGS__, LY_CHECK_RET2, LY_CHECK_RET1, DUMMY)(__VA_ARGS__)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  205|  6.13M|#define LY_CHECK_RET2(COND, RETVAL) if ((COND)) {return RETVAL;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (205:41): [True: 106, False: 6.13M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2700|  6.13M|    } while (is_xmlqnamechar(uc) && (uc != ':'));
  ------------------
  |  |   43|  12.2M|#define is_xmlqnamechar(c) ((c >= 'a' && c <= 'z') || c == '_' || c == '-' || \
  |  |  ------------------
  |  |  |  Branch (43:30): [True: 5.69M, False: 447k]
  |  |  |  Branch (43:42): [True: 5.67M, False: 20.8k]
  |  |  |  Branch (43:55): [True: 3.40k, False: 465k]
  |  |  |  Branch (43:67): [True: 146k, False: 318k]
  |  |  ------------------
  |  |   44|  6.13M|        (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || /* c == ':' || */ \
  |  |  ------------------
  |  |  |  Branch (44:10): [True: 51.0k, False: 267k]
  |  |  |  Branch (44:22): [True: 28.2k, False: 22.7k]
  |  |  |  Branch (44:36): [True: 96.1k, False: 194k]
  |  |  |  Branch (44:48): [True: 5.97k, False: 90.2k]
  |  |  ------------------
  |  |   45|  6.13M|        c == '.' || c == 0xb7 || (c >= 0x370 && c <= 0x1fff && c != 0x37e ) ||\
  |  |  ------------------
  |  |  |  Branch (45:9): [True: 4.32k, False: 280k]
  |  |  |  Branch (45:21): [True: 72, False: 280k]
  |  |  |  Branch (45:35): [True: 18.4k, False: 261k]
  |  |  |  Branch (45:49): [True: 1.92k, False: 16.5k]
  |  |  |  Branch (45:64): [True: 1.92k, False: 2]
  |  |  ------------------
  |  |   46|  6.13M|        (c >= 0xc0 && c <= 0x2ff && c != 0xd7 && c != 0xf7) || c == 0x200c || \
  |  |  ------------------
  |  |  |  Branch (46:10): [True: 17.7k, False: 260k]
  |  |  |  Branch (46:23): [True: 892, False: 16.8k]
  |  |  |  Branch (46:37): [True: 891, False: 1]
  |  |  |  Branch (46:50): [True: 890, False: 1]
  |  |  |  Branch (46:64): [True: 208, False: 277k]
  |  |  ------------------
  |  |   47|  6.13M|        c == 0x200d || (c >= 0x300 && c <= 0x36f) || \
  |  |  ------------------
  |  |  |  Branch (47:9): [True: 373, False: 276k]
  |  |  |  Branch (47:25): [True: 16.2k, False: 260k]
  |  |  |  Branch (47:39): [True: 313, False: 15.9k]
  |  |  ------------------
  |  |   48|  6.13M|        (c >= 0x2070 && c <= 0x218f) || (c >= 0x203f && c <= 0x2040) || \
  |  |  ------------------
  |  |  |  Branch (48:10): [True: 15.8k, False: 260k]
  |  |  |  Branch (48:25): [True: 100, False: 15.7k]
  |  |  |  Branch (48:42): [True: 15.8k, False: 260k]
  |  |  |  Branch (48:57): [True: 89, False: 15.7k]
  |  |  ------------------
  |  |   49|  6.13M|        (c >= 0x2c00 && c <= 0x2fef) || (c >= 0x3001 && c <= 0xd7ff) || \
  |  |  ------------------
  |  |  |  Branch (49:10): [True: 15.7k, False: 260k]
  |  |  |  Branch (49:25): [True: 169, False: 15.5k]
  |  |  |  Branch (49:42): [True: 15.5k, False: 260k]
  |  |  |  Branch (49:57): [True: 316, False: 15.2k]
  |  |  ------------------
  |  |   50|  6.13M|        (c >= 0xf900 && c <= 0xfdcf) || (c >= 0xfdf0 && c <= 0xfffd) || \
  |  |  ------------------
  |  |  |  Branch (50:10): [True: 15.2k, False: 260k]
  |  |  |  Branch (50:25): [True: 24, False: 15.2k]
  |  |  |  Branch (50:42): [True: 15.2k, False: 260k]
  |  |  |  Branch (50:57): [True: 300, False: 14.9k]
  |  |  ------------------
  |  |   51|  12.2M|        (c >= 0x10000 && c <= 0xeffff))
  |  |  ------------------
  |  |  |  Branch (51:10): [True: 14.9k, False: 260k]
  |  |  |  Branch (51:26): [True: 14.9k, False: 22]
  |  |  ------------------
  ------------------
  |  Branch (2700:37): [True: 5.87M, False: 0]
  ------------------
 2701|       |
 2702|   333k|    return len;
 2703|   333k|}
xpath.c:expr_parse_axis:
 2775|  3.61k|{
 2776|  3.61k|    switch (str_len) {
  ------------------
  |  Branch (2776:13): [True: 15, False: 3.59k]
  ------------------
 2777|    235|    case 4:
  ------------------
  |  Branch (2777:5): [True: 235, False: 3.37k]
  ------------------
 2778|    235|        if (!strncmp("self", str, str_len)) {
  ------------------
  |  Branch (2778:13): [True: 221, False: 14]
  ------------------
 2779|    221|            return LY_SUCCESS;
 2780|    221|        }
 2781|     14|        break;
 2782|    278|    case 5:
  ------------------
  |  Branch (2782:5): [True: 278, False: 3.33k]
  ------------------
 2783|    278|        if (!strncmp("child", str, str_len)) {
  ------------------
  |  Branch (2783:13): [True: 260, False: 18]
  ------------------
 2784|    260|            return LY_SUCCESS;
 2785|    260|        }
 2786|     18|        break;
 2787|    328|    case 6:
  ------------------
  |  Branch (2787:5): [True: 328, False: 3.28k]
  ------------------
 2788|    328|        if (!strncmp("parent", str, str_len)) {
  ------------------
  |  Branch (2788:13): [True: 306, False: 22]
  ------------------
 2789|    306|            return LY_SUCCESS;
 2790|    306|        }
 2791|     22|        break;
 2792|     75|    case 8:
  ------------------
  |  Branch (2792:5): [True: 75, False: 3.53k]
  ------------------
 2793|     75|        if (!strncmp("ancestor", str, str_len)) {
  ------------------
  |  Branch (2793:13): [True: 45, False: 30]
  ------------------
 2794|     45|            return LY_SUCCESS;
 2795|     45|        }
 2796|     30|        break;
 2797|  1.30k|    case 9:
  ------------------
  |  Branch (2797:5): [True: 1.30k, False: 2.31k]
  ------------------
 2798|  1.30k|        if (!strncmp("attribute", str, str_len)) {
  ------------------
  |  Branch (2798:13): [True: 862, False: 442]
  ------------------
 2799|    862|            return LY_SUCCESS;
 2800|    862|        } else if (!strncmp("following", str, str_len)) {
  ------------------
  |  Branch (2800:20): [True: 51, False: 391]
  ------------------
 2801|     51|            return LY_SUCCESS;
 2802|    391|        } else if (!strncmp("namespace", str, str_len)) {
  ------------------
  |  Branch (2802:20): [True: 1, False: 390]
  ------------------
 2803|      1|            LOGERR(NULL, LY_EINVAL, "Axis \"namespace\" not supported.");
  ------------------
  |  |  154|      1|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  ------------------
 2804|      1|            return LY_ENOT;
 2805|    390|        } else if (!strncmp("preceding", str, str_len)) {
  ------------------
  |  Branch (2805:20): [True: 288, False: 102]
  ------------------
 2806|    288|            return LY_SUCCESS;
 2807|    288|        }
 2808|    102|        break;
 2809|    340|    case 10:
  ------------------
  |  Branch (2809:5): [True: 340, False: 3.27k]
  ------------------
 2810|    340|        if (!strncmp("descendant", str, str_len)) {
  ------------------
  |  Branch (2810:13): [True: 309, False: 31]
  ------------------
 2811|    309|            return LY_SUCCESS;
 2812|    309|        }
 2813|     31|        break;
 2814|    173|    case 16:
  ------------------
  |  Branch (2814:5): [True: 173, False: 3.44k]
  ------------------
 2815|    173|        if (!strncmp("ancestor-or-self", str, str_len)) {
  ------------------
  |  Branch (2815:13): [True: 100, False: 73]
  ------------------
 2816|    100|            return LY_SUCCESS;
 2817|    100|        }
 2818|     73|        break;
 2819|    164|    case 17:
  ------------------
  |  Branch (2819:5): [True: 164, False: 3.45k]
  ------------------
 2820|    164|        if (!strncmp("following-sibling", str, str_len)) {
  ------------------
  |  Branch (2820:13): [True: 28, False: 136]
  ------------------
 2821|     28|            return LY_SUCCESS;
 2822|    136|        } else if (!strncmp("preceding-sibling", str, str_len)) {
  ------------------
  |  Branch (2822:20): [True: 31, False: 105]
  ------------------
 2823|     31|            return LY_SUCCESS;
 2824|     31|        }
 2825|    105|        break;
 2826|    702|    case 18:
  ------------------
  |  Branch (2826:5): [True: 702, False: 2.91k]
  ------------------
 2827|    702|        if (!strncmp("descendant-or-self", str, str_len)) {
  ------------------
  |  Branch (2827:13): [True: 618, False: 84]
  ------------------
 2828|    618|            return LY_SUCCESS;
 2829|    618|        }
 2830|     84|        break;
 2831|  3.61k|    }
 2832|       |
 2833|    494|    return LY_ENOT;
 2834|  3.61k|}
xpath.c:exp_add_token:
 2717|   942k|{
 2718|   942k|    uint32_t prev;
 2719|       |
 2720|   942k|    if (exp->used == exp->size) {
  ------------------
  |  Branch (2720:9): [True: 104k, False: 838k]
  ------------------
 2721|   104k|        prev = exp->size;
 2722|   104k|        exp->size += LYXP_EXPR_SIZE_STEP;
  ------------------
  |  |   83|   104k|#define LYXP_EXPR_SIZE_STEP 5
  ------------------
 2723|   104k|        if (prev > exp->size) {
  ------------------
  |  Branch (2723:13): [True: 0, False: 104k]
  ------------------
 2724|      0|            LOGINT(ctx);
  ------------------
  |  |  176|      0|#define LOGINT(CTX) LOGERR(CTX, LY_EINT, "Internal error (%s:%d).", __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  |  154|      0|#define LOGERR(ctx, errno, ...) ly_log(ctx, LY_LLERR, errno, __VA_ARGS__)
  |  |  ------------------
  ------------------
 2725|      0|            return LY_EINT;
 2726|      0|        }
 2727|       |
 2728|   104k|        exp->tokens = ly_realloc(exp->tokens, exp->size * sizeof *exp->tokens);
 2729|   104k|        LY_CHECK_ERR_RET(!exp->tokens, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|   104k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 104k]
  |  |  ------------------
  ------------------
 2730|   104k|        exp->tok_pos = ly_realloc(exp->tok_pos, exp->size * sizeof *exp->tok_pos);
 2731|   104k|        LY_CHECK_ERR_RET(!exp->tok_pos, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|   104k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 104k]
  |  |  ------------------
  ------------------
 2732|   104k|        exp->tok_len = ly_realloc(exp->tok_len, exp->size * sizeof *exp->tok_len);
 2733|   104k|        LY_CHECK_ERR_RET(!exp->tok_len, LOGMEM(ctx), LY_EMEM);
  ------------------
  |  |  207|   104k|#define LY_CHECK_ERR_RET(COND, ERR, RETVAL) if ((COND)) {ERR; return RETVAL;}
  |  |  ------------------
  |  |  |  Branch (207:49): [True: 0, False: 104k]
  |  |  ------------------
  ------------------
 2734|   104k|    }
 2735|       |
 2736|   942k|    exp->tokens[exp->used] = token;
 2737|   942k|    exp->tok_pos[exp->used] = tok_pos;
 2738|   942k|    exp->tok_len[exp->used] = tok_len;
 2739|   942k|    ++exp->used;
 2740|   942k|    return LY_SUCCESS;
 2741|   942k|}
xpath.c:print_expr_struct_debug:
  228|  73.4k|{
  229|  73.4k|#define MSG_BUFFER_SIZE 128
  230|  73.4k|    char tmp[MSG_BUFFER_SIZE];
  231|  73.4k|    uint32_t i, j;
  232|       |
  233|  73.4k|    if (!exp || (ly_ll < LY_LLDBG)) {
  ------------------
  |  Branch (233:9): [True: 0, False: 73.4k]
  |  Branch (233:17): [True: 73.4k, False: 0]
  ------------------
  234|  73.4k|        return;
  235|  73.4k|    }
  236|       |
  237|      0|    LOGDBG(LY_LDGXPATH, "expression \"%s\":", exp->expr);
  ------------------
  |  |  162|      0|#  define LOGDBG(dbg_group, ...) ly_log_dbg(dbg_group, __VA_ARGS__);
  ------------------
  238|      0|    for (i = 0; i < exp->used; ++i) {
  ------------------
  |  Branch (238:17): [True: 0, False: 0]
  ------------------
  239|      0|        sprintf(tmp, "\ttoken %s, in expression \"%.*s\"", lyxp_token2str(exp->tokens[i]), exp->tok_len[i],
  240|      0|                &exp->expr[exp->tok_pos[i]]);
  241|      0|        if (exp->repeat && exp->repeat[i]) {
  ------------------
  |  Branch (241:13): [True: 0, False: 0]
  |  Branch (241:28): [True: 0, False: 0]
  ------------------
  242|      0|            sprintf(tmp + strlen(tmp), " (repeat %d", exp->repeat[i][0]);
  243|      0|            for (j = 1; exp->repeat[i][j]; ++j) {
  ------------------
  |  Branch (243:25): [True: 0, False: 0]
  ------------------
  244|      0|                sprintf(tmp + strlen(tmp), ", %d", exp->repeat[i][j]);
  245|      0|            }
  246|      0|            strcat(tmp, ")");
  247|      0|        }
  248|      0|        LOGDBG(LY_LDGXPATH, tmp);
  ------------------
  |  |  162|      0|#  define LOGDBG(dbg_group, ...) ly_log_dbg(dbg_group, __VA_ARGS__);
  ------------------
  249|      0|    }
  250|      0|#undef MSG_BUFFER_SIZE
  251|      0|}

