lookup_scalar(const OptsVisitor *ov, const char *name, Error **errp)

{

    if (ov->repeated_opts == NULL) {

        GQueue *list;



        /* the last occurrence of any QemuOpt takes effect when queried by name

         */

        list = lookup_distinct(ov, name, errp);

        return list ? g_queue_peek_tail(list) : NULL;

    }

    return g_queue_peek_head(ov->repeated_opts);

}

lookup_scalar(const OptsVisitor *ov, const char *name, Error **errp)

{

    if (ov->repeated_opts == NULL) {

        GQueue *list;



        



        list = lookup_distinct(ov, name, errp);

        return list ? g_queue_peek_tail(list) : NULL;

    }

    return g_queue_peek_head(ov->repeated_opts);

}

FUNC_0(const OptsVisitor *VAR_0, const char *VAR_1, Error **VAR_2)

{

    if (VAR_0->repeated_opts == NULL) {

        GQueue *list;



        



        list = lookup_distinct(VAR_0, VAR_1, VAR_2);

        return list ? g_queue_peek_tail(list) : NULL;

    }

    return g_queue_peek_head(VAR_0->repeated_opts);

}

FUNC_0(const OptsVisitor *VAR_0, const char *VAR_1, Error **VAR_2)
{ if (VAR_0->repeated_opts == NULL) { GQueue *list; list = lookup_distinct(VAR_0, VAR_1, VAR_2); return list ? g_queue_peek_tail(list) : NULL; } return g_queue_peek_head(VAR_0->repeated_opts); }