UNPL

Table of Contents

UNPL

Description

Unique name per line

Usage example (Cross-references)

    ///
    #define VecForeachIdx(v, var, idx)                                                                                     \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    #define VecForeachIdx(v, var, idx)                                                                                     \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    for (VEC_DATATYPE(UNPL(pv)) var = {0}; idx < UNPL(pv)->length && (var = VecAt(UNPL(pv), idx), 1); idx++)
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    for (VEC_DATATYPE(UNPL(pv)) var = {0}; idx < UNPL(pv)->length && (var = VecAt(UNPL(pv), idx), 1); idx++)
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    for (VEC_DATATYPE(UNPL(pv)) var = {0}; idx < UNPL(pv)->length && (var = VecAt(UNPL(pv), idx), 1); idx++)
    
    ///
    ///
    #define VecForeachReverseIdx(v, var, idx)                                                                              \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = UNPL(pv)->length; idx-- > 0 && idx < UNPL(pv)->length;)                                     \
    #define VecForeachReverseIdx(v, var, idx)                                                                              \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = UNPL(pv)->length; idx-- > 0 && idx < UNPL(pv)->length;)                                     \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = UNPL(pv)->length; idx-- > 0 && idx < UNPL(pv)->length;)                                     \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (VEC_DATATYPE(UNPL(pv)) var = VecAt(UNPL(pv), idx); UNPL(run_once); UNPL(run_once) = 0)
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = UNPL(pv)->length; idx-- > 0 && idx < UNPL(pv)->length;)                                     \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (VEC_DATATYPE(UNPL(pv)) var = VecAt(UNPL(pv), idx); UNPL(run_once); UNPL(run_once) = 0)
    for (u64 idx = UNPL(pv)->length; idx-- > 0 && idx < UNPL(pv)->length;)                                     \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (VEC_DATATYPE(UNPL(pv)) var = VecAt(UNPL(pv), idx); UNPL(run_once); UNPL(run_once) = 0)
    
    ///
    ///
    #define VecForeachPtrIdx(v, var, idx)                                                                                  \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    #define VecForeachPtrIdx(v, var, idx)                                                                                  \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    for (VEC_DATATYPE(UNPL(pv)) *var = NULL; idx < UNPL(pv)->length && (var = VecPtrAt(UNPL(pv), idx), 1); \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    for (VEC_DATATYPE(UNPL(pv)) *var = NULL; idx < UNPL(pv)->length && (var = VecPtrAt(UNPL(pv), idx), 1); \
    idx++)
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    for (VEC_DATATYPE(UNPL(pv)) *var = NULL; idx < UNPL(pv)->length && (var = VecPtrAt(UNPL(pv), idx), 1); \
    idx++)
    ///
    #define VecForeachPtrReverseIdx(v, var, idx)                                                                           \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = UNPL(pv)->length; idx-- > 0 && idx < UNPL(pv)->length;)                                     \
    #define VecForeachPtrReverseIdx(v, var, idx)                                                                           \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = UNPL(pv)->length; idx-- > 0 && idx < UNPL(pv)->length;)                                     \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = UNPL(pv)->length; idx-- > 0 && idx < UNPL(pv)->length;)                                     \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (VEC_DATATYPE(UNPL(pv)) *var = VecPtrAt(UNPL(pv), idx); UNPL(run_once); UNPL(run_once) = 0)
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 idx = UNPL(pv)->length; idx-- > 0 && idx < UNPL(pv)->length;)                                     \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (VEC_DATATYPE(UNPL(pv)) *var = VecPtrAt(UNPL(pv), idx); UNPL(run_once); UNPL(run_once) = 0)
    for (u64 idx = UNPL(pv)->length; idx-- > 0 && idx < UNPL(pv)->length;)                                     \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (VEC_DATATYPE(UNPL(pv)) *var = VecPtrAt(UNPL(pv), idx); UNPL(run_once); UNPL(run_once) = 0)
    
    ///
    /// TAGS: Foreach, Vec, Iteration, Loop
    ///
    #define VecForeach(v, var) VecForeachIdx((v), (var), UNPL(iter))
    
    ///
    /// TAGS: Foreach, Vec, Iteration, Loop, Reverse
    ///
    #define VecForeachReverse(v, var) VecForeachReverseIdx((v), (var), UNPL(iter))
    
    ///
    /// TAGS: Foreach, Vec, Iteration, Loop, Pointer
    ///
    #define VecForeachPtr(v, var) VecForeachPtrIdx((v), (var), UNPL(iter))
    
    ///
    ///
    #define VecForeachInRangeIdx(v, var, idx, start, end)                                                                  \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    #define VecForeachInRangeIdx(v, var, idx, start, end)                                                                  \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    UNPL(s) <= idx && idx < UNPL(e) && idx < UNPL(pv)->length && UNPL(s) <= UNPL(e);                      \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    UNPL(s) <= idx && idx < UNPL(e) && idx < UNPL(pv)->length && UNPL(s) <= UNPL(e);                      \
    ++idx, UNPL(d) = 1)                                                                                   \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    UNPL(s) <= idx && idx < UNPL(e) && idx < UNPL(pv)->length && UNPL(s) <= UNPL(e);                      \
    ++idx, UNPL(d) = 1)                                                                                   \
    for (VEC_DATATYPE(UNPL(pv)) var = VecAt(UNPL(pv), idx); UNPL(d); UNPL(d) = 0)
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    UNPL(s) <= idx && idx < UNPL(e) && idx < UNPL(pv)->length && UNPL(s) <= UNPL(e);                      \
    ++idx, UNPL(d) = 1)                                                                                   \
    for (VEC_DATATYPE(UNPL(pv)) var = VecAt(UNPL(pv), idx); UNPL(d); UNPL(d) = 0)
    UNPL(s) <= idx && idx < UNPL(e) && idx < UNPL(pv)->length && UNPL(s) <= UNPL(e);                      \
    ++idx, UNPL(d) = 1)                                                                                   \
    for (VEC_DATATYPE(UNPL(pv)) var = VecAt(UNPL(pv), idx); UNPL(d); UNPL(d) = 0)
    
    ///
    ///
    #define VecForeachPtrInRangeIdx(v, var, idx, start, end)                                                               \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    #define VecForeachPtrInRangeIdx(v, var, idx, start, end)                                                               \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    idx >= UNPL(s) && idx < UNPL(e) && idx < UNPL(pv)->length && UNPL(s) <= UNPL(e);                      \
    for (TYPE_OF(v) UNPL(pv) = (v); UNPL(pv); UNPL(pv) = NULL)                                                         \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    idx >= UNPL(s) && idx < UNPL(e) && idx < UNPL(pv)->length && UNPL(s) <= UNPL(e);                      \
    ++idx, UNPL(d) = 1)                                                                                   \
    if ((ValidateVec(UNPL(pv)), 1) && UNPL(pv)->length > 0)                                                        \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    idx >= UNPL(s) && idx < UNPL(e) && idx < UNPL(pv)->length && UNPL(s) <= UNPL(e);                      \
    ++idx, UNPL(d) = 1)                                                                                   \
    for (VEC_DATATYPE(UNPL(pv)) *var = VecPtrAt(UNPL(pv), idx); UNPL(d); UNPL(d) = 0)
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    idx >= UNPL(s) && idx < UNPL(e) && idx < UNPL(pv)->length && UNPL(s) <= UNPL(e);                      \
    ++idx, UNPL(d) = 1)                                                                                   \
    for (VEC_DATATYPE(UNPL(pv)) *var = VecPtrAt(UNPL(pv), idx); UNPL(d); UNPL(d) = 0)
    idx >= UNPL(s) && idx < UNPL(e) && idx < UNPL(pv)->length && UNPL(s) <= UNPL(e);                      \
    ++idx, UNPL(d) = 1)                                                                                   \
    for (VEC_DATATYPE(UNPL(pv)) *var = VecPtrAt(UNPL(pv), idx); UNPL(d); UNPL(d) = 0)
    
    ///
    do {                                                                                                               \
    ValidateList(l);                                                                                               \
    LIST_DATA_TYPE(l) * UNPL(_ptrval) = &(lval);                                                                   \
    LIST_DATA_TYPE(l) UNPL(_tmpval)   = *UNPL(_ptrval);                                                            \
    insert_into_list(GENERIC_LIST(l), UNPL(_ptrval), sizeof(LIST_DATA_TYPE(l)), (idx));                            \
    ValidateList(l);                                                                                               \
    LIST_DATA_TYPE(l) * UNPL(_ptrval) = &(lval);                                                                   \
    LIST_DATA_TYPE(l) UNPL(_tmpval)   = *UNPL(_ptrval);                                                            \
    insert_into_list(GENERIC_LIST(l), UNPL(_ptrval), sizeof(LIST_DATA_TYPE(l)), (idx));                            \
    if (!(l)->copy_init) {                                                                                         \
    LIST_DATA_TYPE(l) * UNPL(_ptrval) = &(lval);                                                                   \
    LIST_DATA_TYPE(l) UNPL(_tmpval)   = *UNPL(_ptrval);                                                            \
    insert_into_list(GENERIC_LIST(l), UNPL(_ptrval), sizeof(LIST_DATA_TYPE(l)), (idx));                            \
    if (!(l)->copy_init) {                                                                                         \
    memset(UNPL(_ptrval), 0, sizeof(LIST_DATA_TYPE(l)));                                                       \
    insert_into_list(GENERIC_LIST(l), UNPL(_ptrval), sizeof(LIST_DATA_TYPE(l)), (idx));                            \
    if (!(l)->copy_init) {                                                                                         \
    memset(UNPL(_ptrval), 0, sizeof(LIST_DATA_TYPE(l)));                                                       \
    }                                                                                                              \
    } while (0)
    do {                                                                                                               \
    ValidateList(l);                                                                                               \
    LIST_DATA_TYPE(l) UNPL(_rval) = (rval);                                                                        \
    insert_into_list(GENERIC_LIST(l), (char *)&UNPL(_rval), sizeof(LIST_DATA_TYPE(l)), (idx));                     \
    } while (0)
    ValidateList(l);                                                                                               \
    LIST_DATA_TYPE(l) UNPL(_rval) = (rval);                                                                        \
    insert_into_list(GENERIC_LIST(l), (char *)&UNPL(_rval), sizeof(LIST_DATA_TYPE(l)), (idx));                     \
    } while (0)
    do {                                                                                                               \
    ValidateList(l);                                                                                               \
    LIST_DATA_TYPE(l) * UNPL(_ptrval)     = (arr);                                                                 \
    const LIST_DATA_TYPE(l) UNPL(_tmpval) = *UNPL(_ptrval);                                                        \
    (void)UNPL(_tmpval);                                                                                           \
    ValidateList(l);                                                                                               \
    LIST_DATA_TYPE(l) * UNPL(_ptrval)     = (arr);                                                                 \
    const LIST_DATA_TYPE(l) UNPL(_tmpval) = *UNPL(_ptrval);                                                        \
    (void)UNPL(_tmpval);                                                                                           \
    push_arr_list(GENERIC_LIST(l), sizeof(LIST_DATA_TYPE(l)), UNPL(_ptrval), (count));                             \
    LIST_DATA_TYPE(l) * UNPL(_ptrval)     = (arr);                                                                 \
    const LIST_DATA_TYPE(l) UNPL(_tmpval) = *UNPL(_ptrval);                                                        \
    (void)UNPL(_tmpval);                                                                                           \
    push_arr_list(GENERIC_LIST(l), sizeof(LIST_DATA_TYPE(l)), UNPL(_ptrval), (count));                             \
    if (!(l)->copy_init) {                                                                                         \
    const LIST_DATA_TYPE(l) UNPL(_tmpval) = *UNPL(_ptrval);                                                        \
    (void)UNPL(_tmpval);                                                                                           \
    push_arr_list(GENERIC_LIST(l), sizeof(LIST_DATA_TYPE(l)), UNPL(_ptrval), (count));                             \
    if (!(l)->copy_init) {                                                                                         \
    memset(UNPL(_ptrval), 0, sizeof(LIST_DATA_TYPE(l)));                                                       \
    push_arr_list(GENERIC_LIST(l), sizeof(LIST_DATA_TYPE(l)), UNPL(_ptrval), (count));                             \
    if (!(l)->copy_init) {                                                                                         \
    memset(UNPL(_ptrval), 0, sizeof(LIST_DATA_TYPE(l)));                                                       \
    }                                                                                                              \
    } while (0)
    ValidateList(l2);                                                                                              \
    {                                                                                                              \
    LIST_DATA_TYPE(l) UNPL(_tmp1)  = {0};                                                                      \
    LIST_DATA_TYPE(l2) UNPL(_tmp2) = {0};                                                                      \
    UNPL(_tmp1)                    = UNPL(_tmp2);                                                              \
    {                                                                                                              \
    LIST_DATA_TYPE(l) UNPL(_tmp1)  = {0};                                                                      \
    LIST_DATA_TYPE(l2) UNPL(_tmp2) = {0};                                                                      \
    UNPL(_tmp1)                    = UNPL(_tmp2);                                                              \
    (void)UNPL(_tmp1);                                                                                         \
    LIST_DATA_TYPE(l) UNPL(_tmp1)  = {0};                                                                      \
    LIST_DATA_TYPE(l2) UNPL(_tmp2) = {0};                                                                      \
    UNPL(_tmp1)                    = UNPL(_tmp2);                                                              \
    (void)UNPL(_tmp1);                                                                                         \
    (void)UNPL(_tmp2);                                                                                         \
    LIST_DATA_TYPE(l2) UNPL(_tmp2) = {0};                                                                      \
    UNPL(_tmp1)                    = UNPL(_tmp2);                                                              \
    (void)UNPL(_tmp1);                                                                                         \
    (void)UNPL(_tmp2);                                                                                         \
    }                                                                                                              \
    UNPL(_tmp1)                    = UNPL(_tmp2);                                                              \
    (void)UNPL(_tmp1);                                                                                         \
    (void)UNPL(_tmp2);                                                                                         \
    }                                                                                                              \
    merge_list(GENERIC_LIST(l), sizeof(LIST_DATA_TYPE(l)), GENERIC_LIST(l2));                                      \
    ValidateList(l2);                                                                                              \
    {                                                                                                              \
    LIST_DATA_TYPE(l) UNPL(_tmp1)  = {0};                                                                      \
    LIST_DATA_TYPE(l2) UNPL(_tmp2) = {0};                                                                      \
    UNPL(_tmp1)                    = UNPL(_tmp2);                                                              \
    {                                                                                                              \
    LIST_DATA_TYPE(l) UNPL(_tmp1)  = {0};                                                                      \
    LIST_DATA_TYPE(l2) UNPL(_tmp2) = {0};                                                                      \
    UNPL(_tmp1)                    = UNPL(_tmp2);                                                              \
    (void)UNPL(_tmp1);                                                                                         \
    LIST_DATA_TYPE(l) UNPL(_tmp1)  = {0};                                                                      \
    LIST_DATA_TYPE(l2) UNPL(_tmp2) = {0};                                                                      \
    UNPL(_tmp1)                    = UNPL(_tmp2);                                                              \
    (void)UNPL(_tmp1);                                                                                         \
    (void)UNPL(_tmp2);                                                                                         \
    LIST_DATA_TYPE(l2) UNPL(_tmp2) = {0};                                                                      \
    UNPL(_tmp1)                    = UNPL(_tmp2);                                                              \
    (void)UNPL(_tmp1);                                                                                         \
    (void)UNPL(_tmp2);                                                                                         \
    }                                                                                                              \
    UNPL(_tmp1)                    = UNPL(_tmp2);                                                              \
    (void)UNPL(_tmp1);                                                                                         \
    (void)UNPL(_tmp2);                                                                                         \
    }                                                                                                              \
    merge_list(GENERIC_LIST(l), sizeof(LIST_DATA_TYPE(l)), GENERIC_LIST(l2));                                      \
    ///
    #define ListForeach(l, var)                                                                                                      \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                   \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->head))                                                                     \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                          \
    #define ListForeach(l, var)                                                                                                      \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                   \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->head))                                                                     \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                          \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                        \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                   \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->head))                                                                     \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                          \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                        \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                        \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->head))                                                                     \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                          \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                        \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                        \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                    \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                          \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                        \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                        \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                    \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                            \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                        \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                        \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                    \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                            \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data)); \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                        \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                    \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                            \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data)); \
    UNPL(_once);                                                                      \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                    \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                            \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data)); \
    UNPL(_once);                                                                      \
    UNPL(_once) = false)
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                            \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data)); \
    UNPL(_once);                                                                      \
    UNPL(_once) = false)
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data)); \
    UNPL(_once);                                                                      \
    UNPL(_once) = false)
    
    ///
    ///
    #define ListForeachPtr(l, var)                                                                                                 \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                 \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->head))                                                                   \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                        \
    #define ListForeachPtr(l, var)                                                                                                 \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                 \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->head))                                                                   \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                        \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                      \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                 \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->head))                                                                   \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                        \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                      \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                      \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->head))                                                                   \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                        \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                      \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                      \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                  \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                        \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                      \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                      \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                  \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                          \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                      \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                      \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                  \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                          \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data); \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                      \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                  \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                          \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data); \
    UNPL(_once);                                                                    \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                  \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                          \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data); \
    UNPL(_once);                                                                    \
    UNPL(_once) = false)
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                          \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data); \
    UNPL(_once);                                                                    \
    UNPL(_once) = false)
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data); \
    UNPL(_once);                                                                    \
    UNPL(_once) = false)
    
    ///
    ///
    #define ListForeachReverse(l, var)                                                                                               \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                   \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->tail))                                                                     \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                            \
    #define ListForeachReverse(l, var)                                                                                               \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                   \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->tail))                                                                     \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                            \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                        \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                   \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->tail))                                                                     \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                            \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                        \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                        \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->tail))                                                                     \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                            \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                        \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                        \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                    \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                            \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                        \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                        \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                    \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                            \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                        \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                        \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                    \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                            \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data)); \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                        \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                    \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                            \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data)); \
    UNPL(_once);                                                                      \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                    \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                            \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data)); \
    UNPL(_once);                                                                      \
    UNPL(_once) = false)
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                            \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data)); \
    UNPL(_once);                                                                      \
    UNPL(_once) = false)
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data)); \
    UNPL(_once);                                                                      \
    UNPL(_once) = false)
    
    ///
    ///
    #define ListForeachPtrReverse(l, var)                                                                                          \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                 \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->tail))                                                                   \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                          \
    #define ListForeachPtrReverse(l, var)                                                                                          \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                 \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->tail))                                                                   \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                          \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                      \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                 \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->tail))                                                                   \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                          \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                      \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                      \
    if ((ValidateList(UNPL(pl)), 1) && (UNPL(pl)->tail))                                                                   \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                          \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                      \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                      \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                  \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                          \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                      \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                      \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                  \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                          \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                      \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                      \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                  \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                          \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data); \
    if (((void *)UNPL(node)->next != (void *)UNPL(node)) &&                                      \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                  \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                          \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data); \
    UNPL(_once);                                                                    \
    ((void *)UNPL(node)->prev != (void *)UNPL(node)) && (UNPL(node)->data))                  \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                          \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data); \
    UNPL(_once);                                                                    \
    UNPL(_once) = false)
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                          \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data); \
    UNPL(_once);                                                                    \
    UNPL(_once) = false)
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data); \
    UNPL(_once);                                                                    \
    UNPL(_once) = false)
    
    ///
    ///
    #define ListForeachInRange(l, var, start, end)                                                                                           \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                                  \
    #define ListForeachInRange(l, var, start, end)                                                                                           \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                                  \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                                \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                                  \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodeNext(UNPL(node)), ++UNPL(i)) \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                                  \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodeNext(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                                  \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodeNext(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodeNext(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data));     \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodeNext(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data));     \
    UNPL(_once);                                                                          \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data));     \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data));     \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data));     \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    
    ///
    ///
    #define ListForeachPtrInRange(l, var, start, end)                                                                                        \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                                  \
    #define ListForeachPtrInRange(l, var, start, end)                                                                                        \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                                  \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                                \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                                  \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodeNext(UNPL(node)), ++UNPL(i)) \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                                  \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodeNext(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)); UNPL(node);                                  \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodeNext(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    UNPL(node)                   = ListNodeNext(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodeNext(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data);       \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodeNext(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data);       \
    UNPL(_once);                                                                          \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data);       \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data);       \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data);       \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    
    ///
    ///
    #define ListForeachReverseInRange(l, var, start, end)                                                                                    \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                                    \
    #define ListForeachReverseInRange(l, var, start, end)                                                                                    \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                                    \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                                \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                                    \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodePrev(UNPL(node)), ++UNPL(i)) \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                                    \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodePrev(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                                    \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodePrev(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodePrev(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data));     \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodePrev(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data));     \
    UNPL(_once);                                                                          \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data));     \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data));     \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data));     \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    
    ///
    ///
    #define ListForeachPtrReverseInRange(l, var, start, end)                                                                                 \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                                    \
    #define ListForeachPtrReverseInRange(l, var, start, end)                                                                                 \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                                    \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                                \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                                           \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                                    \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodePrev(UNPL(node)), ++UNPL(i)) \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail)                                                                               \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                                    \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodePrev(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeEnd(UNPL(pl)); UNPL(node);                                    \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodePrev(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    UNPL(node)                   = ListNodePrev(UNPL(node)))                                                                \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodePrev(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data);       \
    for (u64 UNPL(i) = 0; UNPL(node) && UNPL(i) < (end); UNPL(node) = ListNodePrev(UNPL(node)), ++UNPL(i)) \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data);       \
    UNPL(_once);                                                                          \
    if (UNPL(i) >= (start) && (UNPL(node)->data))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data);       \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data);       \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    for (LIST_DATA_TYPE(UNPL(pl)) *var = (LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(node)->data);       \
    UNPL(_once);                                                                          \
    UNPL(_once) = false)
    
    ///
    ///
    #define ListForeachIdx(l, var, idx)                                                                                    \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                             \
    for (u64 idx = 0, UNPL(pidx) = 0; idx < UNPL(pl)->length;)                                                 \
    #define ListForeachIdx(l, var, idx)                                                                                    \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                             \
    for (u64 idx = 0, UNPL(pidx) = 0; idx < UNPL(pl)->length;)                                                 \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)), *UNPL(next) = NULL;    \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                             \
    for (u64 idx = 0, UNPL(pidx) = 0; idx < UNPL(pl)->length;)                                                 \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)), *UNPL(next) = NULL;    \
    UNPL(node) &&                                                                                     \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                             \
    for (u64 idx = 0, UNPL(pidx) = 0; idx < UNPL(pl)->length;)                                                 \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)), *UNPL(next) = NULL;    \
    UNPL(node) &&                                                                                     \
    (UNPL(next) =                                                                                     \
    for (u64 idx = 0, UNPL(pidx) = 0; idx < UNPL(pl)->length;)                                                 \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)), *UNPL(next) = NULL;    \
    UNPL(node) &&                                                                                     \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) ? (GenericListNode *)get_node_random_access(                                     \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)), *UNPL(next) = NULL;    \
    UNPL(node) &&                                                                                     \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) ? (GenericListNode *)get_node_random_access(                                     \
    GENERIC_LIST(UNPL(pl)),                                                    \
    UNPL(node) &&                                                                                     \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) ? (GenericListNode *)get_node_random_access(                                     \
    GENERIC_LIST(UNPL(pl)),                                                    \
    GENERIC_LIST_NODE(UNPL(node)),                                             \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) ? (GenericListNode *)get_node_random_access(                                     \
    GENERIC_LIST(UNPL(pl)),                                                    \
    GENERIC_LIST_NODE(UNPL(node)),                                             \
    UNPL(pidx),                                                                \
    (UNPL(pidx) ? (GenericListNode *)get_node_random_access(                                     \
    GENERIC_LIST(UNPL(pl)),                                                    \
    GENERIC_LIST_NODE(UNPL(node)),                                             \
    UNPL(pidx),                                                                \
    (i64)(idx) - (i64)UNPL(pidx)                                               \
    GENERIC_LIST(UNPL(pl)),                                                    \
    GENERIC_LIST_NODE(UNPL(node)),                                             \
    UNPL(pidx),                                                                \
    (i64)(idx) - (i64)UNPL(pidx)                                               \
    ) :                                                                            \
    GENERIC_LIST_NODE(UNPL(node)),                                             \
    UNPL(pidx),                                                                \
    (i64)(idx) - (i64)UNPL(pidx)                                               \
    ) :                                                                            \
    (GenericListNode *)UNPL(pl)->head)) &&                                         \
    (i64)(idx) - (i64)UNPL(pidx)                                               \
    ) :                                                                            \
    (GenericListNode *)UNPL(pl)->head)) &&                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(pidx) = ++idx, UNPL(node) = UNPL(next))                                                      \
    ) :                                                                            \
    (GenericListNode *)UNPL(pl)->head)) &&                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(pidx) = ++idx, UNPL(node) = UNPL(next))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    (GenericListNode *)UNPL(pl)->head)) &&                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(pidx) = ++idx, UNPL(node) = UNPL(next))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(next)->data));         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(pidx) = ++idx, UNPL(node) = UNPL(next))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(next)->data));         \
    UNPL(_once);                                                                              \
    UNPL(pidx) = ++idx, UNPL(node) = UNPL(next))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(next)->data));         \
    UNPL(_once);                                                                              \
    UNPL(_once) = false)
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(next)->data));         \
    UNPL(_once);                                                                              \
    UNPL(_once) = false)
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(next)->data));         \
    UNPL(_once);                                                                              \
    UNPL(_once) = false)
    
    ///
    ///
    #define ListForeachPtrIdx(l, var, idx)                                                                                 \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                             \
    for (u64 idx = 0, UNPL(pidx) = 0; idx < UNPL(pl)->length;)                                                 \
    #define ListForeachPtrIdx(l, var, idx)                                                                                 \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                             \
    for (u64 idx = 0, UNPL(pidx) = 0; idx < UNPL(pl)->length;)                                                 \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)), *UNPL(next) = NULL;    \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                             \
    for (u64 idx = 0, UNPL(pidx) = 0; idx < UNPL(pl)->length;)                                                 \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)), *UNPL(next) = NULL;    \
    UNPL(node) &&                                                                                     \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->head)                                                             \
    for (u64 idx = 0, UNPL(pidx) = 0; idx < UNPL(pl)->length;)                                                 \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)), *UNPL(next) = NULL;    \
    UNPL(node) &&                                                                                     \
    (UNPL(next) =                                                                                     \
    for (u64 idx = 0, UNPL(pidx) = 0; idx < UNPL(pl)->length;)                                                 \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)), *UNPL(next) = NULL;    \
    UNPL(node) &&                                                                                     \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) ? (GenericListNode *)get_node_random_access(                                     \
    for (GenericListNode * UNPL(node) = (GenericListNode *)ListNodeBegin(UNPL(pl)), *UNPL(next) = NULL;    \
    UNPL(node) &&                                                                                     \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) ? (GenericListNode *)get_node_random_access(                                     \
    GENERIC_LIST(UNPL(pl)),                                                    \
    UNPL(node) &&                                                                                     \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) ? (GenericListNode *)get_node_random_access(                                     \
    GENERIC_LIST(UNPL(pl)),                                                    \
    GENERIC_LIST_NODE(UNPL(node)),                                             \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) ? (GenericListNode *)get_node_random_access(                                     \
    GENERIC_LIST(UNPL(pl)),                                                    \
    GENERIC_LIST_NODE(UNPL(node)),                                             \
    UNPL(pidx),                                                                \
    (UNPL(pidx) ? (GenericListNode *)get_node_random_access(                                     \
    GENERIC_LIST(UNPL(pl)),                                                    \
    GENERIC_LIST_NODE(UNPL(node)),                                             \
    UNPL(pidx),                                                                \
    (i64)(idx) - (i64)UNPL(pidx)                                               \
    GENERIC_LIST(UNPL(pl)),                                                    \
    GENERIC_LIST_NODE(UNPL(node)),                                             \
    UNPL(pidx),                                                                \
    (i64)(idx) - (i64)UNPL(pidx)                                               \
    ) :                                                                            \
    GENERIC_LIST_NODE(UNPL(node)),                                             \
    UNPL(pidx),                                                                \
    (i64)(idx) - (i64)UNPL(pidx)                                               \
    ) :                                                                            \
    (GenericListNode *)UNPL(pl)->head)) &&                                         \
    (i64)(idx) - (i64)UNPL(pidx)                                               \
    ) :                                                                            \
    (GenericListNode *)UNPL(pl)->head)) &&                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(pidx) = ++idx, UNPL(node) = UNPL(next))                                                      \
    ) :                                                                            \
    (GenericListNode *)UNPL(pl)->head)) &&                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(pidx) = ++idx, UNPL(node) = UNPL(next))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    (GenericListNode *)UNPL(pl)->head)) &&                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(pidx) = ++idx, UNPL(node) = UNPL(next))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = UNPL(next)->data; UNPL(_once); UNPL(_once) = false)
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(pidx) = ++idx, UNPL(node) = UNPL(next))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = UNPL(next)->data; UNPL(_once); UNPL(_once) = false)
    UNPL(pidx) = ++idx, UNPL(node) = UNPL(next))                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = UNPL(next)->data; UNPL(_once); UNPL(_once) = false)
    
    ///
    ///
    #define ListForeachReverseIdx(l, var, idx)                                                                             \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail && UNPL(pl)->length > 0)                                     \
    for (u64 idx            = UNPL(pl)->length - 1,                                                            \
    #define ListForeachReverseIdx(l, var, idx)                                                                             \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail && UNPL(pl)->length > 0)                                     \
    for (u64 idx            = UNPL(pl)->length - 1,                                                            \
    UNPL(pidx)     = UNPL(pl)->length - 1,                                                            \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail && UNPL(pl)->length > 0)                                     \
    for (u64 idx            = UNPL(pl)->length - 1,                                                            \
    UNPL(pidx)     = UNPL(pl)->length - 1,                                                            \
    UNPL(first)    = 1,                                                                               \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail && UNPL(pl)->length > 0)                                     \
    for (u64 idx            = UNPL(pl)->length - 1,                                                            \
    UNPL(pidx)     = UNPL(pl)->length - 1,                                                            \
    UNPL(first)    = 1,                                                                               \
    UNPL(user_idx) = 0;                                                                               \
    for (u64 idx            = UNPL(pl)->length - 1,                                                            \
    UNPL(pidx)     = UNPL(pl)->length - 1,                                                            \
    UNPL(first)    = 1,                                                                               \
    UNPL(user_idx) = 0;                                                                               \
    idx < UNPL(pl)->length;)                                                                              \
    UNPL(pidx)     = UNPL(pl)->length - 1,                                                            \
    UNPL(first)    = 1,                                                                               \
    UNPL(user_idx) = 0;                                                                               \
    idx < UNPL(pl)->length;)                                                                              \
    for (GenericListNode * UNPL(node)  = (UNPL(first) ? (GenericListNode *)UNPL(pl)->tail : NULL),         \
    UNPL(first)    = 1,                                                                               \
    UNPL(user_idx) = 0;                                                                               \
    idx < UNPL(pl)->length;)                                                                              \
    for (GenericListNode * UNPL(node)  = (UNPL(first) ? (GenericListNode *)UNPL(pl)->tail : NULL),         \
    *UNPL(next) = NULL;                                                             \
    UNPL(user_idx) = 0;                                                                               \
    idx < UNPL(pl)->length;)                                                                              \
    for (GenericListNode * UNPL(node)  = (UNPL(first) ? (GenericListNode *)UNPL(pl)->tail : NULL),         \
    *UNPL(next) = NULL;                                                             \
    UNPL(node) && idx < UNPL(pl)->length && (UNPL(first) = 0) &&                                      \
    idx < UNPL(pl)->length;)                                                                              \
    for (GenericListNode * UNPL(node)  = (UNPL(first) ? (GenericListNode *)UNPL(pl)->tail : NULL),         \
    *UNPL(next) = NULL;                                                             \
    UNPL(node) && idx < UNPL(pl)->length && (UNPL(first) = 0) &&                                      \
    (UNPL(next) =                                                                                     \
    for (GenericListNode * UNPL(node)  = (UNPL(first) ? (GenericListNode *)UNPL(pl)->tail : NULL),         \
    *UNPL(next) = NULL;                                                             \
    UNPL(node) && idx < UNPL(pl)->length && (UNPL(first) = 0) &&                                      \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) != idx ? (GenericListNode *)get_node_random_access(                              \
    *UNPL(next) = NULL;                                                             \
    UNPL(node) && idx < UNPL(pl)->length && (UNPL(first) = 0) &&                                      \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) != idx ? (GenericListNode *)get_node_random_access(                              \
    GENERIC_LIST(UNPL(pl)),                                             \
    UNPL(node) && idx < UNPL(pl)->length && (UNPL(first) = 0) &&                                      \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) != idx ? (GenericListNode *)get_node_random_access(                              \
    GENERIC_LIST(UNPL(pl)),                                             \
    GENERIC_LIST_NODE(UNPL(node)),                                      \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) != idx ? (GenericListNode *)get_node_random_access(                              \
    GENERIC_LIST(UNPL(pl)),                                             \
    GENERIC_LIST_NODE(UNPL(node)),                                      \
    UNPL(pidx),                                                         \
    (UNPL(pidx) != idx ? (GenericListNode *)get_node_random_access(                              \
    GENERIC_LIST(UNPL(pl)),                                             \
    GENERIC_LIST_NODE(UNPL(node)),                                      \
    UNPL(pidx),                                                         \
    (i64)(idx) - (i64)UNPL(pidx)                                        \
    GENERIC_LIST(UNPL(pl)),                                             \
    GENERIC_LIST_NODE(UNPL(node)),                                      \
    UNPL(pidx),                                                         \
    (i64)(idx) - (i64)UNPL(pidx)                                        \
    ) :                                                                     \
    GENERIC_LIST_NODE(UNPL(node)),                                      \
    UNPL(pidx),                                                         \
    (i64)(idx) - (i64)UNPL(pidx)                                        \
    ) :                                                                     \
    UNPL(node))) &&                                                         \
    (i64)(idx) - (i64)UNPL(pidx)                                        \
    ) :                                                                     \
    UNPL(node))) &&                                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(node) = UNPL(next), UNPL(pidx) = idx)                                                        \
    ) :                                                                     \
    UNPL(node))) &&                                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(node) = UNPL(next), UNPL(pidx) = idx)                                                        \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    UNPL(node))) &&                                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(node) = UNPL(next), UNPL(pidx) = idx)                                                        \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(next)->data));         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(node) = UNPL(next), UNPL(pidx) = idx)                                                        \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(next)->data));         \
    UNPL(_once);                                                                              \
    UNPL(node) = UNPL(next), UNPL(pidx) = idx)                                                        \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(next)->data));         \
    UNPL(_once);                                                                              \
    UNPL(_once) = false)                                                                      \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(next)->data));         \
    UNPL(_once);                                                                              \
    UNPL(_once) = false)                                                                      \
    for (bool UNPL(_update)  = true; UNPL(_update);                                            \
    for (LIST_DATA_TYPE(UNPL(pl)) var = *((LIST_DATA_TYPE(UNPL(pl)) *)(UNPL(next)->data));         \
    UNPL(_once);                                                                              \
    UNPL(_once) = false)                                                                      \
    for (bool UNPL(_update)  = true; UNPL(_update);                                            \
    UNPL(_update)       = false,                                                          \
    UNPL(_once);                                                                              \
    UNPL(_once) = false)                                                                      \
    for (bool UNPL(_update)  = true; UNPL(_update);                                            \
    UNPL(_update)       = false,                                                          \
    UNPL(user_idx) = idx,                                                            \
    UNPL(_once) = false)                                                                      \
    for (bool UNPL(_update)  = true; UNPL(_update);                                            \
    UNPL(_update)       = false,                                                          \
    UNPL(user_idx) = idx,                                                            \
    idx =                                                                            \
    for (bool UNPL(_update)  = true; UNPL(_update);                                            \
    UNPL(_update)       = false,                                                          \
    UNPL(user_idx) = idx,                                                            \
    idx =                                                                            \
    (UNPL(user_idx) != UNPL(pidx) ? UNPL(user_idx) :                             \
    UNPL(user_idx) = idx,                                                            \
    idx =                                                                            \
    (UNPL(user_idx) != UNPL(pidx) ? UNPL(user_idx) :                             \
    (idx > 0 ? idx - 1 : UNPL(pl)->length)))
    idx =                                                                            \
    (UNPL(user_idx) != UNPL(pidx) ? UNPL(user_idx) :                             \
    (idx > 0 ? idx - 1 : UNPL(pl)->length)))
    
    ///
    ///
    #define ListForeachPtrReverseIdx(l, var, idx)                                                                          \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail && UNPL(pl)->length > 0)                                     \
    for (u64 idx            = UNPL(pl)->length - 1,                                                            \
    #define ListForeachPtrReverseIdx(l, var, idx)                                                                          \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail && UNPL(pl)->length > 0)                                     \
    for (u64 idx            = UNPL(pl)->length - 1,                                                            \
    UNPL(pidx)     = UNPL(pl)->length - 1,                                                            \
    for (TYPE_OF(l) UNPL(pl) = (l); UNPL(pl); UNPL(pl) = NULL)                                                         \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail && UNPL(pl)->length > 0)                                     \
    for (u64 idx            = UNPL(pl)->length - 1,                                                            \
    UNPL(pidx)     = UNPL(pl)->length - 1,                                                            \
    UNPL(first)    = 1,                                                                               \
    if ((ValidateList(UNPL(pl)), 1) && UNPL(pl)->tail && UNPL(pl)->length > 0)                                     \
    for (u64 idx            = UNPL(pl)->length - 1,                                                            \
    UNPL(pidx)     = UNPL(pl)->length - 1,                                                            \
    UNPL(first)    = 1,                                                                               \
    UNPL(user_idx) = 0;                                                                               \
    for (u64 idx            = UNPL(pl)->length - 1,                                                            \
    UNPL(pidx)     = UNPL(pl)->length - 1,                                                            \
    UNPL(first)    = 1,                                                                               \
    UNPL(user_idx) = 0;                                                                               \
    idx < UNPL(pl)->length;)                                                                              \
    UNPL(pidx)     = UNPL(pl)->length - 1,                                                            \
    UNPL(first)    = 1,                                                                               \
    UNPL(user_idx) = 0;                                                                               \
    idx < UNPL(pl)->length;)                                                                              \
    for (GenericListNode * UNPL(node)  = (UNPL(first) ? (GenericListNode *)UNPL(pl)->tail : NULL),         \
    UNPL(first)    = 1,                                                                               \
    UNPL(user_idx) = 0;                                                                               \
    idx < UNPL(pl)->length;)                                                                              \
    for (GenericListNode * UNPL(node)  = (UNPL(first) ? (GenericListNode *)UNPL(pl)->tail : NULL),         \
    *UNPL(next) = NULL;                                                             \
    UNPL(user_idx) = 0;                                                                               \
    idx < UNPL(pl)->length;)                                                                              \
    for (GenericListNode * UNPL(node)  = (UNPL(first) ? (GenericListNode *)UNPL(pl)->tail : NULL),         \
    *UNPL(next) = NULL;                                                             \
    UNPL(node) && idx < UNPL(pl)->length && (UNPL(first) = 0) &&                                      \
    idx < UNPL(pl)->length;)                                                                              \
    for (GenericListNode * UNPL(node)  = (UNPL(first) ? (GenericListNode *)UNPL(pl)->tail : NULL),         \
    *UNPL(next) = NULL;                                                             \
    UNPL(node) && idx < UNPL(pl)->length && (UNPL(first) = 0) &&                                      \
    (UNPL(next) =                                                                                     \
    for (GenericListNode * UNPL(node)  = (UNPL(first) ? (GenericListNode *)UNPL(pl)->tail : NULL),         \
    *UNPL(next) = NULL;                                                             \
    UNPL(node) && idx < UNPL(pl)->length && (UNPL(first) = 0) &&                                      \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) != idx ? get_node_random_access(                                                 \
    *UNPL(next) = NULL;                                                             \
    UNPL(node) && idx < UNPL(pl)->length && (UNPL(first) = 0) &&                                      \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) != idx ? get_node_random_access(                                                 \
    GENERIC_LIST(UNPL(pl)),                                             \
    UNPL(node) && idx < UNPL(pl)->length && (UNPL(first) = 0) &&                                      \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) != idx ? get_node_random_access(                                                 \
    GENERIC_LIST(UNPL(pl)),                                             \
    GENERIC_LIST_NODE(UNPL(node)),                                      \
    (UNPL(next) =                                                                                     \
    (UNPL(pidx) != idx ? get_node_random_access(                                                 \
    GENERIC_LIST(UNPL(pl)),                                             \
    GENERIC_LIST_NODE(UNPL(node)),                                      \
    UNPL(pidx),                                                         \
    (UNPL(pidx) != idx ? get_node_random_access(                                                 \
    GENERIC_LIST(UNPL(pl)),                                             \
    GENERIC_LIST_NODE(UNPL(node)),                                      \
    UNPL(pidx),                                                         \
    (i64)(idx) - (i64)(UNPL(pidx))                                      \
    GENERIC_LIST(UNPL(pl)),                                             \
    GENERIC_LIST_NODE(UNPL(node)),                                      \
    UNPL(pidx),                                                         \
    (i64)(idx) - (i64)(UNPL(pidx))                                      \
    ) :                                                                     \
    GENERIC_LIST_NODE(UNPL(node)),                                      \
    UNPL(pidx),                                                         \
    (i64)(idx) - (i64)(UNPL(pidx))                                      \
    ) :                                                                     \
    UNPL(node))) &&                                                         \
    (i64)(idx) - (i64)(UNPL(pidx))                                      \
    ) :                                                                     \
    UNPL(node))) &&                                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(node) = UNPL(next), UNPL(pidx) = idx)                                                        \
    ) :                                                                     \
    UNPL(node))) &&                                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(node) = UNPL(next), UNPL(pidx) = idx)                                                        \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    UNPL(node))) &&                                                         \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(node) = UNPL(next), UNPL(pidx) = idx)                                                        \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = UNPL(next)->data; UNPL(_once); UNPL(_once) = false)       \
    UNPL(next) && UNPL(next)->data;                                                                   \
    UNPL(node) = UNPL(next), UNPL(pidx) = idx)                                                        \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = UNPL(next)->data; UNPL(_once); UNPL(_once) = false)       \
    for (bool UNPL(_update)  = true; UNPL(_update);                                            \
    UNPL(node) = UNPL(next), UNPL(pidx) = idx)                                                        \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = UNPL(next)->data; UNPL(_once); UNPL(_once) = false)       \
    for (bool UNPL(_update)  = true; UNPL(_update);                                            \
    UNPL(_update)       = false,                                                          \
    for (bool UNPL(_once) = true; UNPL(_once); UNPL(_once) = false)                                    \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = UNPL(next)->data; UNPL(_once); UNPL(_once) = false)       \
    for (bool UNPL(_update)  = true; UNPL(_update);                                            \
    UNPL(_update)       = false,                                                          \
    UNPL(user_idx) = idx,                                                            \
    for (LIST_DATA_TYPE(UNPL(pl)) *var = UNPL(next)->data; UNPL(_once); UNPL(_once) = false)       \
    for (bool UNPL(_update)  = true; UNPL(_update);                                            \
    UNPL(_update)       = false,                                                          \
    UNPL(user_idx) = idx,                                                            \
    idx =                                                                            \
    for (bool UNPL(_update)  = true; UNPL(_update);                                            \
    UNPL(_update)       = false,                                                          \
    UNPL(user_idx) = idx,                                                            \
    idx =                                                                            \
    (UNPL(user_idx) != UNPL(pidx) ? UNPL(user_idx) :                             \
    UNPL(user_idx) = idx,                                                            \
    idx =                                                                            \
    (UNPL(user_idx) != UNPL(pidx) ? UNPL(user_idx) :                             \
    (idx > 0 ? idx - 1 : UNPL(pl)->length)))
    idx =                                                                            \
    (UNPL(user_idx) != UNPL(pidx) ? UNPL(user_idx) :                             \
    (idx > 0 ? idx - 1 : UNPL(pl)->length)))
    
    #endif // MISRA_STD_CONTAINER_LIST_FOREACH_H
    ///
    #define BitVecForeachIdx(bv, var, idx)                                                                                 \
    for (TYPE_OF(bv) UNPL(pbv) = (bv); UNPL(pbv); UNPL(pbv) = NULL)                                                    \
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    #define BitVecForeachIdx(bv, var, idx)                                                                                 \
    for (TYPE_OF(bv) UNPL(pbv) = (bv); UNPL(pbv); UNPL(pbv) = NULL)                                                    \
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    for (bool var = 0; idx < UNPL(pbv)->length && (var = BitVecGet(UNPL(pbv), idx), 1); idx++)
    for (TYPE_OF(bv) UNPL(pbv) = (bv); UNPL(pbv); UNPL(pbv) = NULL)                                                    \
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    for (bool var = 0; idx < UNPL(pbv)->length && (var = BitVecGet(UNPL(pbv), idx), 1); idx++)
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 idx = 0, UNPL(d) = 1; UNPL(d); UNPL(d)--)                                                         \
    for (bool var = 0; idx < UNPL(pbv)->length && (var = BitVecGet(UNPL(pbv), idx), 1); idx++)
    
    ///
    ///
    #define BitVecForeachReverseIdx(bv, var, idx)                                                                          \
    for (TYPE_OF(bv) UNPL(pbv) = (bv); UNPL(pbv); UNPL(pbv) = NULL)                                                    \
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 idx = UNPL(pbv)->length; idx-- > 0 && idx < UNPL(pbv)->length;)                                   \
    #define BitVecForeachReverseIdx(bv, var, idx)                                                                          \
    for (TYPE_OF(bv) UNPL(pbv) = (bv); UNPL(pbv); UNPL(pbv) = NULL)                                                    \
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 idx = UNPL(pbv)->length; idx-- > 0 && idx < UNPL(pbv)->length;)                                   \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (TYPE_OF(bv) UNPL(pbv) = (bv); UNPL(pbv); UNPL(pbv) = NULL)                                                    \
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 idx = UNPL(pbv)->length; idx-- > 0 && idx < UNPL(pbv)->length;)                                   \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (bool var = BitVecGet(UNPL(pbv), idx); UNPL(run_once); UNPL(run_once) = 0)
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 idx = UNPL(pbv)->length; idx-- > 0 && idx < UNPL(pbv)->length;)                                   \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (bool var = BitVecGet(UNPL(pbv), idx); UNPL(run_once); UNPL(run_once) = 0)
    for (u64 idx = UNPL(pbv)->length; idx-- > 0 && idx < UNPL(pbv)->length;)                                   \
    for (u8 UNPL(run_once) = 1; UNPL(run_once); UNPL(run_once) = 0)                                        \
    for (bool var = BitVecGet(UNPL(pbv), idx); UNPL(run_once); UNPL(run_once) = 0)
    
    ///
    ///              current bit during iteration. The type of `var` will be `bool`.
    ///
    #define BitVecForeach(bv, var) BitVecForeachIdx((bv), (var), UNPL(iter))
    
    ///
    ///              current bit during iteration. The type of `var` will be `bool`.
    ///
    #define BitVecForeachReverse(bv, var) BitVecForeachReverseIdx((bv), (var), UNPL(iter))
    
    ///
    ///
    #define BitVecForeachInRangeIdx(bv, var, idx, start, end)                                                              \
    for (TYPE_OF(bv) UNPL(pbv) = (bv); UNPL(pbv); UNPL(pbv) = NULL)                                                    \
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    #define BitVecForeachInRangeIdx(bv, var, idx, start, end)                                                              \
    for (TYPE_OF(bv) UNPL(pbv) = (bv); UNPL(pbv); UNPL(pbv) = NULL)                                                    \
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    UNPL(s) <= idx && idx < UNPL(e) && idx < UNPL(pbv)->length && UNPL(s) <= UNPL(e);                     \
    for (TYPE_OF(bv) UNPL(pbv) = (bv); UNPL(pbv); UNPL(pbv) = NULL)                                                    \
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    UNPL(s) <= idx && idx < UNPL(e) && idx < UNPL(pbv)->length && UNPL(s) <= UNPL(e);                     \
    ++idx, UNPL(d) = 1)                                                                                   \
    if ((ValidateBitVec(UNPL(pbv)), 1) && UNPL(pbv)->length > 0)                                                   \
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    UNPL(s) <= idx && idx < UNPL(e) && idx < UNPL(pbv)->length && UNPL(s) <= UNPL(e);                     \
    ++idx, UNPL(d) = 1)                                                                                   \
    for (bool var = BitVecGet(UNPL(pbv), idx); UNPL(d); UNPL(d) = 0)
    for (u64 UNPL(s) = (start), UNPL(e) = (end), idx = UNPL(s), UNPL(d) = 1;                                   \
    UNPL(s) <= idx && idx < UNPL(e) && idx < UNPL(pbv)->length && UNPL(s) <= UNPL(e);                     \
    ++idx, UNPL(d) = 1)                                                                                   \
    for (bool var = BitVecGet(UNPL(pbv), idx); UNPL(d); UNPL(d) = 0)
    UNPL(s) <= idx && idx < UNPL(e) && idx < UNPL(pbv)->length && UNPL(s) <= UNPL(e);                     \
    ++idx, UNPL(d) = 1)                                                                                   \
    for (bool var = BitVecGet(UNPL(pbv), idx); UNPL(d); UNPL(d) = 0)
    
    /// end[in]      : Ending index (exclusive).
    ///
    #define BitVecForeachInRange(bv, var, start, end) BitVecForeachInRangeIdx((bv), (var), UNPL(iter), (start), (end))
    
    #endif // MISRA_STD_CONTAINER_BITVEC_FOREACH_H

Share :