opts_next_list(Visitor *v, GenericList **list, Error **errp)

{

    OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v);

    GenericList **link;



    if (ov->repeated_opts_first) {

        ov->repeated_opts_first = false;

        link = list;

    } else {

        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;

    }



    *link = g_malloc0(sizeof **link);

    return *link;

}

opts_next_list(Visitor *v, GenericList **list, Error **errp)

{

    OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v);

    GenericList **link;



    if (ov->repeated_opts_first) {

        ov->repeated_opts_first = false;

        link = list;

    } else {

        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;

    }



    *link = g_malloc0(sizeof **link);

    return *link;

}

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

{

    OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, VAR_0);

    GenericList **link;



    if (ov->repeated_opts_first) {

        ov->repeated_opts_first = false;

        link = VAR_1;

    } else {

        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;

    }



    *link = g_malloc0(sizeof **link);

    return *link;

}

FUNC_0(Visitor *VAR_0, GenericList **VAR_1, Error **VAR_2)
{ OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, VAR_0); GenericList **link; if (ov->repeated_opts_first) { ov->repeated_opts_first = false; link = VAR_1; } else { 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; } *link = g_malloc0(sizeof **link); return *link; }