static int apic_init_common(SysBusDevice *dev)

{

    APICCommonState *s = APIC_COMMON(dev);

    APICCommonClass *info;

    static DeviceState *vapic;

    static int apic_no;



    if (apic_no >= MAX_APICS) {

        return -1;

    }

    s->idx = apic_no++;



    info = APIC_COMMON_GET_CLASS(s);

    info->init(s);



    sysbus_init_mmio(dev, &s->io_memory);



    if (!vapic && s->vapic_control & VAPIC_ENABLE_MASK) {

        vapic = sysbus_create_simple("kvmvapic", -1, NULL);

    }

    s->vapic = vapic;

    if (apic_report_tpr_access && info->enable_tpr_reporting) {

        info->enable_tpr_reporting(s, true);

    }



    return 0;

}

static int apic_init_common(SysBusDevice *dev)

{

    APICCommonState *s = APIC_COMMON(dev);

    APICCommonClass *info;

    static DeviceState *vapic;

    static int apic_no;



    if (apic_no >= MAX_APICS) {

        return -1;

    }

    s->idx = apic_no++;



    info = APIC_COMMON_GET_CLASS(s);

    info->init(s);



    sysbus_init_mmio(dev, &s->io_memory);



    if (!vapic && s->vapic_control & VAPIC_ENABLE_MASK) {

        vapic = sysbus_create_simple("kvmvapic", -1, NULL);

    }

    s->vapic = vapic;

    if (apic_report_tpr_access && info->enable_tpr_reporting) {

        info->enable_tpr_reporting(s, true);

    }



    return 0;

}

    if (!vapic && s->vapic_control & VAPIC_ENABLE_MASK) {
static int FUNC_0(SysBusDevice *VAR_0)

{

    APICCommonState *s = APIC_COMMON(VAR_0);

    APICCommonClass *info;

    static DeviceState *VAR_1;

    static int VAR_2;



    if (VAR_2 >= MAX_APICS) {

        return -1;

    }

    s->idx = VAR_2++;



    info = APIC_COMMON_GET_CLASS(s);

    info->init(s);



    sysbus_init_mmio(VAR_0, &s->io_memory);



    if (!VAR_1 && s->vapic_control & VAPIC_ENABLE_MASK) {

        VAR_1 = sysbus_create_simple("kvmvapic", -1, NULL);

    }

    s->VAR_1 = VAR_1;

    if (apic_report_tpr_access && info->enable_tpr_reporting) {

        info->enable_tpr_reporting(s, true);

    }



    return 0;

}

static int FUNC_0(SysBusDevice *VAR_0)
{ APICCommonState *s = APIC_COMMON(VAR_0); APICCommonClass *info; static DeviceState *VAR_1; static int VAR_2; if (VAR_2 >= MAX_APICS) { return -1; } s->idx = VAR_2++; info = APIC_COMMON_GET_CLASS(s); info->init(s); sysbus_init_mmio(VAR_0, &s->io_memory); if (!VAR_1 && s->vapic_control & VAPIC_ENABLE_MASK) { VAR_1 = sysbus_create_simple("kvmvapic", -1, NULL); } s->VAR_1 = VAR_1; if (apic_report_tpr_access && info->enable_tpr_reporting) { info->enable_tpr_reporting(s, true); } return 0; }