static int do_info(Monitor *mon, const QDict *qdict, QObject **ret_data)

{

    const mon_cmd_t *cmd;

    const char *item = qdict_get_try_str(qdict, "item");



    if (!item) {

        goto help;

    }



    for (cmd = info_cmds; cmd->name != NULL; cmd++) {

        if (compare_cmd(item, cmd->name))

            break;

    }



    if (cmd->name == NULL) {

        goto help;

    }



    if (monitor_handler_is_async(cmd)) {

        user_async_info_handler(mon, cmd);

        /*

         * Indicate that this command is asynchronous and will not return any

         * data (not even empty).  Instead, the data will be returned via a

         * completion callback.

         */

        *ret_data = qobject_from_jsonf("{ '__mon_async': 'return' }");

    } else if (monitor_handler_ported(cmd)) {

        QObject *info_data = NULL;



        cmd->mhandler.info_new(mon, &info_data);

        if (info_data) {

            cmd->user_print(mon, info_data);

            qobject_decref(info_data);

        }

    } else {

        cmd->mhandler.info(mon);

    }



    return 0;



help:

    help_cmd(mon, "info");

    return 0;

}

static int do_info(Monitor *mon, const QDict *qdict, QObject **ret_data)

{

    const mon_cmd_t *cmd;

    const char *item = qdict_get_try_str(qdict, "item");



    if (!item) {

        goto help;

    }



    for (cmd = info_cmds; cmd->name != NULL; cmd++) {

        if (compare_cmd(item, cmd->name))

            break;

    }



    if (cmd->name == NULL) {

        goto help;

    }



    if (monitor_handler_is_async(cmd)) {

        user_async_info_handler(mon, cmd);

        









        *ret_data = qobject_from_jsonf("{ '__mon_async': 'return' }");

    } else if (monitor_handler_ported(cmd)) {

        QObject *info_data = NULL;



        cmd->mhandler.info_new(mon, &info_data);

        if (info_data) {

            cmd->user_print(mon, info_data);

            qobject_decref(info_data);

        }

    } else {

        cmd->mhandler.info(mon);

    }



    return 0;



help:

    help_cmd(mon, "info");

    return 0;

}

static int FUNC_0(Monitor *VAR_0, const QDict *VAR_1, QObject **VAR_2)

{

    const mon_cmd_t *VAR_3;

    const char *VAR_4 = qdict_get_try_str(VAR_1, "VAR_4");



    if (!VAR_4) {

        goto help;

    }



    for (VAR_3 = info_cmds; VAR_3->name != NULL; VAR_3++) {

        if (compare_cmd(VAR_4, VAR_3->name))

            break;

    }



    if (VAR_3->name == NULL) {

        goto help;

    }



    if (monitor_handler_is_async(VAR_3)) {

        user_async_info_handler(VAR_0, VAR_3);

        









        *VAR_2 = qobject_from_jsonf("{ '__mon_async': 'return' }");

    } else if (monitor_handler_ported(VAR_3)) {

        QObject *info_data = NULL;



        VAR_3->mhandler.info_new(VAR_0, &info_data);

        if (info_data) {

            VAR_3->user_print(VAR_0, info_data);

            qobject_decref(info_data);

        }

    } else {

        VAR_3->mhandler.info(VAR_0);

    }



    return 0;



help:

    help_cmd(VAR_0, "info");

    return 0;

}

static int FUNC_0(Monitor *VAR_0, const QDict *VAR_1, QObject **VAR_2)
{ const mon_cmd_t *VAR_3; const char *VAR_4 = qdict_get_try_str(VAR_1, "VAR_4"); if (!VAR_4) { goto help; } for (VAR_3 = info_cmds; VAR_3->name != NULL; VAR_3++) { if (compare_cmd(VAR_4, VAR_3->name))
break; } if (VAR_3->name == NULL) { goto help; } if (monitor_handler_is_async(VAR_3)) { user_async_info_handler(VAR_0, VAR_3); *VAR_2 = qobject_from_jsonf("{ '__mon_async': 'return' }"); } else if (monitor_handler_ported(VAR_3)) { QObject *info_data = NULL; VAR_3->mhandler.info_new(VAR_0, &info_data); if (info_data) { VAR_3->user_print(VAR_0, info_data); qobject_decref(info_data); } } else { VAR_3->mhandler.info(VAR_0); } return 0; help:
help_cmd(VAR_0, "info"); return 0; }