S390CPU *cpu_s390x_create(const char *cpu_model, Error **errp)

{

    static bool features_parsed;

    char *name, *features;

    const char *typename;

    ObjectClass *oc;

    CPUClass *cc;



    name = g_strdup(cpu_model);

    features = strchr(name, ',');

    if (features) {

        features[0] = 0;

        features++;

    }



    oc = cpu_class_by_name(TYPE_S390_CPU, name);

    if (!oc) {

        error_setg(errp, "Unknown CPU definition \'%s\'", name);

        g_free(name);

        return NULL;

    }

    typename = object_class_get_name(oc);



    if (!features_parsed) {

        features_parsed = true;

        cc = CPU_CLASS(oc);

        cc->parse_features(typename, features, errp);

    }

    g_free(name);



    if (*errp) {

        return NULL;

    }

    return S390_CPU(CPU(object_new(typename)));

}

S390CPU *cpu_s390x_create(const char *cpu_model, Error **errp)

{

    static bool features_parsed;

    char *name, *features;

    const char *typename;

    ObjectClass *oc;

    CPUClass *cc;



    name = g_strdup(cpu_model);

    features = strchr(name, ',');

    if (features) {

        features[0] = 0;

        features++;

    }



    oc = cpu_class_by_name(TYPE_S390_CPU, name);

    if (!oc) {

        error_setg(errp, "Unknown CPU definition \'%s\'", name);

        g_free(name);

        return NULL;

    }

    typename = object_class_get_name(oc);



    if (!features_parsed) {

        features_parsed = true;

        cc = CPU_CLASS(oc);

        cc->parse_features(typename, features, errp);

    }

    g_free(name);



    if (*errp) {

        return NULL;

    }

    return S390_CPU(CPU(object_new(typename)));

}

S390CPU *FUNC_0(const char *cpu_model, Error **errp)

{

    static bool VAR_0;

    char *VAR_1, *VAR_2;

    const char *VAR_3;

    ObjectClass *oc;

    CPUClass *cc;



    VAR_1 = g_strdup(cpu_model);

    VAR_2 = strchr(VAR_1, ',');

    if (VAR_2) {

        VAR_2[0] = 0;

        VAR_2++;

    }



    oc = cpu_class_by_name(TYPE_S390_CPU, VAR_1);

    if (!oc) {

        error_setg(errp, "Unknown CPU definition \'%s\'", VAR_1);

        g_free(VAR_1);

        return NULL;

    }

    VAR_3 = object_class_get_name(oc);



    if (!VAR_0) {

        VAR_0 = true;

        cc = CPU_CLASS(oc);

        cc->parse_features(VAR_3, VAR_2, errp);

    }

    g_free(VAR_1);



    if (*errp) {

        return NULL;

    }

    return S390_CPU(CPU(object_new(VAR_3)));

}

S390CPU *FUNC_0(const char *cpu_model, Error **errp)
{ static bool VAR_0; char *VAR_1, *VAR_2; const char *VAR_3; ObjectClass *oc; CPUClass *cc; VAR_1 = g_strdup(cpu_model); VAR_2 = strchr(VAR_1, ','); if (VAR_2) { VAR_2[0] = 0; VAR_2++; } oc = cpu_class_by_name(TYPE_S390_CPU, VAR_1); if (!oc) { error_setg(errp, "Unknown CPU definition \'%s\'", VAR_1); g_free(VAR_1); return NULL; } VAR_3 = object_class_get_name(oc); if (!VAR_0) { VAR_0 = true; cc = CPU_CLASS(oc); cc->parse_features(VAR_3, VAR_2, errp); } g_free(VAR_1); if (*errp) { return NULL; } return S390_CPU(CPU(object_new(VAR_3))); }