char *spapr_get_cpu_core_type(const char *model)

{

    char *core_type;

    gchar **model_pieces = g_strsplit(model, ",", 2);



    core_type = g_strdup_printf("%s-%s", model_pieces[0], TYPE_SPAPR_CPU_CORE);

    g_strfreev(model_pieces);



    /* Check whether it exists or whether we have to look up an alias name */

    if (!object_class_by_name(core_type)) {

        const char *realmodel;



        g_free(core_type);

        realmodel = ppc_cpu_lookup_alias(model);

        if (realmodel) {

            return spapr_get_cpu_core_type(realmodel);

        }

        return NULL;

    }



    return core_type;

}

char *spapr_get_cpu_core_type(const char *model)

{

    char *core_type;

    gchar **model_pieces = g_strsplit(model, ",", 2);



    core_type = g_strdup_printf("%s-%s", model_pieces[0], TYPE_SPAPR_CPU_CORE);

    g_strfreev(model_pieces);



    

    if (!object_class_by_name(core_type)) {

        const char *realmodel;



        g_free(core_type);

        realmodel = ppc_cpu_lookup_alias(model);

        if (realmodel) {

            return spapr_get_cpu_core_type(realmodel);

        }

        return NULL;

    }



    return core_type;

}

    g_strfreev(model_pieces);         realmodel = ppc_cpu_lookup_alias(model);             return spapr_get_cpu_core_type(realmodel);         return NULL;
char *FUNC_0(const char *VAR_0)

{

    char *VAR_1;

    gchar **model_pieces = g_strsplit(VAR_0, ",", 2);



    VAR_1 = g_strdup_printf("%s-%s", model_pieces[0], TYPE_SPAPR_CPU_CORE);

    g_strfreev(model_pieces);



    

    if (!object_class_by_name(VAR_1)) {

        const char *VAR_2;



        g_free(VAR_1);

        VAR_2 = ppc_cpu_lookup_alias(VAR_0);

        if (VAR_2) {

            return FUNC_0(VAR_2);

        }

        return NULL;

    }



    return VAR_1;

}

char *FUNC_0(const char *VAR_0)
{ char *VAR_1; gchar **model_pieces = g_strsplit(VAR_0, ",", 2); VAR_1 = g_strdup_printf("%s-%s", model_pieces[0], TYPE_SPAPR_CPU_CORE); g_strfreev(model_pieces); if (!object_class_by_name(VAR_1)) { const char *VAR_2; g_free(VAR_1); VAR_2 = ppc_cpu_lookup_alias(VAR_0); if (VAR_2) { return FUNC_0(VAR_2); } return NULL; } return VAR_1; }