static QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp)

{

    const QDictEntry *ent;

    const char *arg_name;

    const QObject *arg_obj;

    bool has_exec_key = false;

    QDict *dict = NULL;



    if (qobject_type(request) != QTYPE_QDICT) {

        error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT,

                   "request is not a dictionary");

        return NULL;

    }



    dict = qobject_to_qdict(request);



    for (ent = qdict_first(dict); ent;

         ent = qdict_next(dict, ent)) {

        arg_name = qdict_entry_key(ent);

        arg_obj = qdict_entry_value(ent);



        if (!strcmp(arg_name, "execute")) {

            if (qobject_type(arg_obj) != QTYPE_QSTRING) {

                error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT_MEMBER, "execute",

                           "string");

                return NULL;

            }

            has_exec_key = true;

        } else if (strcmp(arg_name, "arguments")) {

            error_setg(errp, QERR_QMP_EXTRA_MEMBER, arg_name);

            return NULL;

        }

    }



    if (!has_exec_key) {

        error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT, "execute");

        return NULL;

    }



    return dict;

}

static QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp)

{

    const QDictEntry *ent;

    const char *arg_name;

    const QObject *arg_obj;

    bool has_exec_key = false;

    QDict *dict = NULL;



    if (qobject_type(request) != QTYPE_QDICT) {

        error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT,

                   "request is not a dictionary");

        return NULL;

    }



    dict = qobject_to_qdict(request);



    for (ent = qdict_first(dict); ent;

         ent = qdict_next(dict, ent)) {

        arg_name = qdict_entry_key(ent);

        arg_obj = qdict_entry_value(ent);



        if (!strcmp(arg_name, "execute")) {

            if (qobject_type(arg_obj) != QTYPE_QSTRING) {

                error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT_MEMBER, "execute",

                           "string");

                return NULL;

            }

            has_exec_key = true;

        } else if (strcmp(arg_name, "arguments")) {

            error_setg(errp, QERR_QMP_EXTRA_MEMBER, arg_name);

            return NULL;

        }

    }



    if (!has_exec_key) {

        error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT, "execute");

        return NULL;

    }



    return dict;

}

static QDict *FUNC_0(const QObject *request, Error **errp)

{

    const QDictEntry *VAR_0;

    const char *VAR_1;

    const QObject *VAR_2;

    bool has_exec_key = false;

    QDict *dict = NULL;



    if (qobject_type(request) != QTYPE_QDICT) {

        error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT,

                   "request is not a dictionary");

        return NULL;

    }



    dict = qobject_to_qdict(request);



    for (VAR_0 = qdict_first(dict); VAR_0;

         VAR_0 = qdict_next(dict, VAR_0)) {

        VAR_1 = qdict_entry_key(VAR_0);

        VAR_2 = qdict_entry_value(VAR_0);



        if (!strcmp(VAR_1, "execute")) {

            if (qobject_type(VAR_2) != QTYPE_QSTRING) {

                error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT_MEMBER, "execute",

                           "string");

                return NULL;

            }

            has_exec_key = true;

        } else if (strcmp(VAR_1, "arguments")) {

            error_setg(errp, QERR_QMP_EXTRA_MEMBER, VAR_1);

            return NULL;

        }

    }



    if (!has_exec_key) {

        error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT, "execute");

        return NULL;

    }



    return dict;

}

static QDict *FUNC_0(const QObject *request, Error **errp)
{ const QDictEntry *VAR_0; const char *VAR_1; const QObject *VAR_2; bool has_exec_key = false; QDict *dict = NULL; if (qobject_type(request) != QTYPE_QDICT) { error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT,
"request is not a dictionary"); return NULL; } dict = qobject_to_qdict(request); for (VAR_0 = qdict_first(dict); VAR_0; VAR_0 = qdict_next(dict, VAR_0)) { VAR_1 = qdict_entry_key(VAR_0); VAR_2 = qdict_entry_value(VAR_0); if (!strcmp(VAR_1, "execute")) { if (qobject_type(VAR_2) != QTYPE_QSTRING) { error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT_MEMBER, "execute",
"string"); return NULL; } has_exec_key = true; } else if (strcmp(VAR_1, "arguments")) { error_setg(errp, QERR_QMP_EXTRA_MEMBER, VAR_1); return NULL; } } if (!has_exec_key) { error_setg(errp, QERR_QMP_BAD_INPUT_OBJECT, "execute"); return NULL; } return dict; }