int ppc_get_compat_smt_threads(PowerPCCPU *cpu)

{

    int ret = smp_threads;

    PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);



    switch (cpu->cpu_version) {

    case CPU_POWERPC_LOGICAL_2_05:

        ret = 2;

        break;

    case CPU_POWERPC_LOGICAL_2_06:

        ret = 4;

        break;

    case CPU_POWERPC_LOGICAL_2_07:

        ret = 8;

        break;

    default:

        if (pcc->pcr_mask & PCR_COMPAT_2_06) {

            ret = 4;

        } else if (pcc->pcr_mask & PCR_COMPAT_2_05) {

            ret = 2;

        }

        break;

    }



    return MIN(ret, smp_threads);

}

int ppc_get_compat_smt_threads(PowerPCCPU *cpu)

{

    int ret = smp_threads;

    PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);



    switch (cpu->cpu_version) {

    case CPU_POWERPC_LOGICAL_2_05:

        ret = 2;

        break;

    case CPU_POWERPC_LOGICAL_2_06:

        ret = 4;

        break;

    case CPU_POWERPC_LOGICAL_2_07:

        ret = 8;

        break;

    default:

        if (pcc->pcr_mask & PCR_COMPAT_2_06) {

            ret = 4;

        } else if (pcc->pcr_mask & PCR_COMPAT_2_05) {

            ret = 2;

        }

        break;

    }



    return MIN(ret, smp_threads);

}

int FUNC_0(PowerPCCPU *VAR_0)

{

    int VAR_1 = smp_threads;

    PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(VAR_0);



    switch (VAR_0->cpu_version) {

    case CPU_POWERPC_LOGICAL_2_05:

        VAR_1 = 2;

        break;

    case CPU_POWERPC_LOGICAL_2_06:

        VAR_1 = 4;

        break;

    case CPU_POWERPC_LOGICAL_2_07:

        VAR_1 = 8;

        break;

    default:

        if (pcc->pcr_mask & PCR_COMPAT_2_06) {

            VAR_1 = 4;

        } else if (pcc->pcr_mask & PCR_COMPAT_2_05) {

            VAR_1 = 2;

        }

        break;

    }



    return MIN(VAR_1, smp_threads);

}

int FUNC_0(PowerPCCPU *VAR_0)
{ int VAR_1 = smp_threads; PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(VAR_0); switch (VAR_0->cpu_version) { case CPU_POWERPC_LOGICAL_2_05:
VAR_1 = 2; break; case CPU_POWERPC_LOGICAL_2_06:
VAR_1 = 4; break; case CPU_POWERPC_LOGICAL_2_07:
VAR_1 = 8; break; default:
if (pcc->pcr_mask & PCR_COMPAT_2_06) { VAR_1 = 4; } else if (pcc->pcr_mask & PCR_COMPAT_2_05) { VAR_1 = 2; } break; } return MIN(VAR_1, smp_threads); }