char *qmp_human_monitor_command(const char *command_line, bool has_cpu_index,

                                int64_t cpu_index, Error **errp)

{

    char *output = NULL;

    Monitor *old_mon, hmp;



    memset(&hmp, 0, sizeof(hmp));

    hmp.outbuf = qstring_new();

    hmp.skip_flush = true;



    old_mon = cur_mon;

    cur_mon = &hmp;



    if (has_cpu_index) {

        int ret = monitor_set_cpu(cpu_index);

        if (ret < 0) {

            cur_mon = old_mon;

            error_set(errp, QERR_INVALID_PARAMETER_VALUE, "cpu-index",

                      "a CPU number");

            goto out;

        }

    }



    handle_user_command(&hmp, command_line);

    cur_mon = old_mon;



    if (qstring_get_length(hmp.outbuf) > 0) {

        output = g_strdup(qstring_get_str(hmp.outbuf));

    } else {

        output = g_strdup("");

    }



out:

    QDECREF(hmp.outbuf);

    return output;

}

char *qmp_human_monitor_command(const char *command_line, bool has_cpu_index,

                                int64_t cpu_index, Error **errp)

{

    char *output = NULL;

    Monitor *old_mon, hmp;



    memset(&hmp, 0, sizeof(hmp));

    hmp.outbuf = qstring_new();

    hmp.skip_flush = true;



    old_mon = cur_mon;

    cur_mon = &hmp;



    if (has_cpu_index) {

        int ret = monitor_set_cpu(cpu_index);

        if (ret < 0) {

            cur_mon = old_mon;

            error_set(errp, QERR_INVALID_PARAMETER_VALUE, "cpu-index",

                      "a CPU number");

            goto out;

        }

    }



    handle_user_command(&hmp, command_line);

    cur_mon = old_mon;



    if (qstring_get_length(hmp.outbuf) > 0) {

        output = g_strdup(qstring_get_str(hmp.outbuf));

    } else {

        output = g_strdup("");

    }



out:

    QDECREF(hmp.outbuf);

    return output;

}

char *FUNC_0(const char *VAR_0, bool VAR_1,

                                int64_t VAR_2, Error **VAR_3)

{

    char *VAR_4 = NULL;

    Monitor *old_mon, hmp;



    memset(&hmp, 0, sizeof(hmp));

    hmp.outbuf = qstring_new();

    hmp.skip_flush = true;



    old_mon = cur_mon;

    cur_mon = &hmp;



    if (VAR_1) {

        int VAR_5 = monitor_set_cpu(VAR_2);

        if (VAR_5 < 0) {

            cur_mon = old_mon;

            error_set(VAR_3, QERR_INVALID_PARAMETER_VALUE, "cpu-index",

                      "a CPU number");

            goto out;

        }

    }



    handle_user_command(&hmp, VAR_0);

    cur_mon = old_mon;



    if (qstring_get_length(hmp.outbuf) > 0) {

        VAR_4 = g_strdup(qstring_get_str(hmp.outbuf));

    } else {

        VAR_4 = g_strdup("");

    }



out:

    QDECREF(hmp.outbuf);

    return VAR_4;

}

char *FUNC_0(const char *VAR_0, bool VAR_1,
int64_t VAR_2, Error **VAR_3)
{ char *VAR_4 = NULL; Monitor *old_mon, hmp; memset(&hmp, 0, sizeof(hmp)); hmp.outbuf = qstring_new(); hmp.skip_flush = true; old_mon = cur_mon; cur_mon = &hmp; if (VAR_1) { int VAR_5 = monitor_set_cpu(VAR_2); if (VAR_5 < 0) { cur_mon = old_mon; error_set(VAR_3, QERR_INVALID_PARAMETER_VALUE, "cpu-index",
"a CPU number"); goto out; } } handle_user_command(&hmp, VAR_0); cur_mon = old_mon; if (qstring_get_length(hmp.outbuf) > 0) { VAR_4 = g_strdup(qstring_get_str(hmp.outbuf)); } else { VAR_4 = g_strdup(""); } out:
QDECREF(hmp.outbuf); return VAR_4; }