static void qmp_output_type_enum(Visitor *v, int *obj, const char *strings[],

                                 const char *kind, const char *name,

                                 Error **errp)

{

    int i = 0;

    int value = *obj;

    char *enum_str;



    assert(strings);

    while (strings[i++] != NULL);

    if (value >= i - 1) {

        error_set(errp, QERR_INVALID_PARAMETER, name ? name : "null");

        return;

    }



    enum_str = (char *)strings[value];

    qmp_output_type_str(v, &enum_str, name, errp);

}

static void qmp_output_type_enum(Visitor *v, int *obj, const char *strings[],

                                 const char *kind, const char *name,

                                 Error **errp)

{

    int i = 0;

    int value = *obj;

    char *enum_str;



    assert(strings);

    while (strings[i++] != NULL);

    if (value >= i - 1) {

        error_set(errp, QERR_INVALID_PARAMETER, name ? name : "null");

        return;

    }



    enum_str = (char *)strings[value];

    qmp_output_type_str(v, &enum_str, name, errp);

}

static void FUNC_0(Visitor *VAR_0, int *VAR_1, const char *VAR_2[],

                                 const char *VAR_3, const char *VAR_4,

                                 Error **VAR_5)

{

    int VAR_6 = 0;

    int VAR_7 = *VAR_1;

    char *VAR_8;



    assert(VAR_2);

    while (VAR_2[VAR_6++] != NULL);

    if (VAR_7 >= VAR_6 - 1) {

        error_set(VAR_5, QERR_INVALID_PARAMETER, VAR_4 ? VAR_4 : "null");

        return;

    }



    VAR_8 = (char *)VAR_2[VAR_7];

    qmp_output_type_str(VAR_0, &VAR_8, VAR_4, VAR_5);

}

static void FUNC_0(Visitor *VAR_0, int *VAR_1, const char *VAR_2[],
const char *VAR_3, const char *VAR_4,
Error **VAR_5)
{ int VAR_6 = 0; int VAR_7 = *VAR_1; char *VAR_8; assert(VAR_2); while (VAR_2[VAR_6++] != NULL); if (VAR_7 >= VAR_6 - 1) { error_set(VAR_5, QERR_INVALID_PARAMETER, VAR_4 ? VAR_4 : "null"); return; } VAR_8 = (char *)VAR_2[VAR_7]; qmp_output_type_str(VAR_0, &VAR_8, VAR_4, VAR_5); }