opts_next_list(Visitor *v, GenericList **list, size_t size)

{

    OptsVisitor *ov = to_ov(v);

    GenericList **link;



    switch (ov->list_mode) {

    case LM_STARTED:

        ov->list_mode = LM_IN_PROGRESS;

        link = list;

        break;



    case LM_SIGNED_INTERVAL:

    case LM_UNSIGNED_INTERVAL:

        link = &(*list)->next;



        if (ov->list_mode == LM_SIGNED_INTERVAL) {

            if (ov->range_next.s < ov->range_limit.s) {

                ++ov->range_next.s;

                break;

            }

        } else if (ov->range_next.u < ov->range_limit.u) {

            ++ov->range_next.u;

            break;

        }

        ov->list_mode = LM_IN_PROGRESS;

        /* range has been completed, fall through in order to pop option */



    case LM_IN_PROGRESS: {

        const QemuOpt *opt;



        opt = g_queue_pop_head(ov->repeated_opts);

        if (g_queue_is_empty(ov->repeated_opts)) {

            g_hash_table_remove(ov->unprocessed_opts, opt->name);

            return NULL;

        }

        link = &(*list)->next;

        break;

    }



    default:

        abort();

    }



    *link = g_malloc0(size);

    return *link;

}

opts_next_list(Visitor *v, GenericList **list, size_t size)

{

    OptsVisitor *ov = to_ov(v);

    GenericList **link;



    switch (ov->list_mode) {

    case LM_STARTED:

        ov->list_mode = LM_IN_PROGRESS;

        link = list;

        break;



    case LM_SIGNED_INTERVAL:

    case LM_UNSIGNED_INTERVAL:

        link = &(*list)->next;



        if (ov->list_mode == LM_SIGNED_INTERVAL) {

            if (ov->range_next.s < ov->range_limit.s) {

                ++ov->range_next.s;

                break;

            }

        } else if (ov->range_next.u < ov->range_limit.u) {

            ++ov->range_next.u;

            break;

        }

        ov->list_mode = LM_IN_PROGRESS;

        



    case LM_IN_PROGRESS: {

        const QemuOpt *opt;



        opt = g_queue_pop_head(ov->repeated_opts);

        if (g_queue_is_empty(ov->repeated_opts)) {

            g_hash_table_remove(ov->unprocessed_opts, opt->name);

            return NULL;

        }

        link = &(*list)->next;

        break;

    }



    default:

        abort();

    }



    *link = g_malloc0(size);

    return *link;

}

FUNC_0(Visitor *VAR_0, GenericList **VAR_1, size_t VAR_2)

{

    OptsVisitor *ov = to_ov(VAR_0);

    GenericList **link;



    switch (ov->list_mode) {

    case LM_STARTED:

        ov->list_mode = LM_IN_PROGRESS;

        link = VAR_1;

        break;



    case LM_SIGNED_INTERVAL:

    case LM_UNSIGNED_INTERVAL:

        link = &(*VAR_1)->next;



        if (ov->list_mode == LM_SIGNED_INTERVAL) {

            if (ov->range_next.s < ov->range_limit.s) {

                ++ov->range_next.s;

                break;

            }

        } else if (ov->range_next.u < ov->range_limit.u) {

            ++ov->range_next.u;

            break;

        }

        ov->list_mode = LM_IN_PROGRESS;

        



    case LM_IN_PROGRESS: {

        const QemuOpt *VAR_3;



        VAR_3 = g_queue_pop_head(ov->repeated_opts);

        if (g_queue_is_empty(ov->repeated_opts)) {

            g_hash_table_remove(ov->unprocessed_opts, VAR_3->name);

            return NULL;

        }

        link = &(*VAR_1)->next;

        break;

    }



    default:

        abort();

    }



    *link = g_malloc0(VAR_2);

    return *link;

}

FUNC_0(Visitor *VAR_0, GenericList **VAR_1, size_t VAR_2)
{ OptsVisitor *ov = to_ov(VAR_0); GenericList **link; switch (ov->list_mode) { case LM_STARTED:
ov->list_mode = LM_IN_PROGRESS; link = VAR_1; break; case LM_SIGNED_INTERVAL:
case LM_UNSIGNED_INTERVAL:
link = &(*VAR_1)->next; if (ov->list_mode == LM_SIGNED_INTERVAL) { if (ov->range_next.s < ov->range_limit.s) { ++ov->range_next.s; break; } } else if (ov->range_next.u < ov->range_limit.u) { ++ov->range_next.u; break; } ov->list_mode = LM_IN_PROGRESS; case LM_IN_PROGRESS: { const QemuOpt *VAR_3; VAR_3 = g_queue_pop_head(ov->repeated_opts); if (g_queue_is_empty(ov->repeated_opts)) { g_hash_table_remove(ov->unprocessed_opts, VAR_3->name); return NULL; } link = &(*VAR_1)->next; break; } default:
abort(); } *link = g_malloc0(VAR_2); return *link; }