void acpi_pcihp_init(AcpiPciHpState *s, PCIBus *root_bus,

                     MemoryRegion *address_space_io, bool bridges_enabled)

{

    uint16_t io_size = ACPI_PCIHP_SIZE;



    s->root= root_bus;

    s->legacy_piix = !bridges_enabled;



    if (s->legacy_piix) {

        unsigned *bus_bsel = g_malloc(sizeof *bus_bsel);



        io_size = ACPI_PCIHP_LEGACY_SIZE;



        *bus_bsel = ACPI_PCIHP_BSEL_DEFAULT;

        object_property_add_uint32_ptr(OBJECT(root_bus), ACPI_PCIHP_PROP_BSEL,

                                       bus_bsel, NULL);

    }



    memory_region_init_io(&s->io, NULL, &acpi_pcihp_io_ops, s,

                          "acpi-pci-hotplug", io_size);

    memory_region_add_subregion(address_space_io, ACPI_PCIHP_ADDR, &s->io);

}

void acpi_pcihp_init(AcpiPciHpState *s, PCIBus *root_bus,

                     MemoryRegion *address_space_io, bool bridges_enabled)

{

    uint16_t io_size = ACPI_PCIHP_SIZE;



    s->root= root_bus;

    s->legacy_piix = !bridges_enabled;



    if (s->legacy_piix) {

        unsigned *bus_bsel = g_malloc(sizeof *bus_bsel);



        io_size = ACPI_PCIHP_LEGACY_SIZE;



        *bus_bsel = ACPI_PCIHP_BSEL_DEFAULT;

        object_property_add_uint32_ptr(OBJECT(root_bus), ACPI_PCIHP_PROP_BSEL,

                                       bus_bsel, NULL);

    }



    memory_region_init_io(&s->io, NULL, &acpi_pcihp_io_ops, s,

                          "acpi-pci-hotplug", io_size);

    memory_region_add_subregion(address_space_io, ACPI_PCIHP_ADDR, &s->io);

}

void FUNC_0(AcpiPciHpState *VAR_0, PCIBus *VAR_1,

                     MemoryRegion *VAR_2, bool VAR_3)

{

    uint16_t io_size = ACPI_PCIHP_SIZE;



    VAR_0->root= VAR_1;

    VAR_0->legacy_piix = !VAR_3;



    if (VAR_0->legacy_piix) {

        unsigned *VAR_4 = g_malloc(sizeof *VAR_4);



        io_size = ACPI_PCIHP_LEGACY_SIZE;



        *VAR_4 = ACPI_PCIHP_BSEL_DEFAULT;

        object_property_add_uint32_ptr(OBJECT(VAR_1), ACPI_PCIHP_PROP_BSEL,

                                       VAR_4, NULL);

    }



    memory_region_init_io(&VAR_0->io, NULL, &acpi_pcihp_io_ops, VAR_0,

                          "acpi-pci-hotplug", io_size);

    memory_region_add_subregion(VAR_2, ACPI_PCIHP_ADDR, &VAR_0->io);

}

void FUNC_0(AcpiPciHpState *VAR_0, PCIBus *VAR_1,
MemoryRegion *VAR_2, bool VAR_3)
{ uint16_t io_size = ACPI_PCIHP_SIZE; VAR_0->root= VAR_1; VAR_0->legacy_piix = !VAR_3; if (VAR_0->legacy_piix) { unsigned *VAR_4 = g_malloc(sizeof *VAR_4); io_size = ACPI_PCIHP_LEGACY_SIZE; *VAR_4 = ACPI_PCIHP_BSEL_DEFAULT; object_property_add_uint32_ptr(OBJECT(VAR_1), ACPI_PCIHP_PROP_BSEL,
VAR_4, NULL); } memory_region_init_io(&VAR_0->io, NULL, &acpi_pcihp_io_ops, VAR_0,
"acpi-pci-hotplug", io_size); memory_region_add_subregion(VAR_2, ACPI_PCIHP_ADDR, &VAR_0->io); }