void acpi_memory_hotplug_init(MemoryRegion *as, Object *owner,

                              MemHotplugState *state)

{

    MachineState *machine = MACHINE(qdev_get_machine());



    state->dev_count = machine->ram_slots;

    if (!state->dev_count) {

        return;

    }



    state->devs = g_malloc0(sizeof(*state->devs) * state->dev_count);

    memory_region_init_io(&state->io, owner, &acpi_memory_hotplug_ops, state,

                          "acpi-mem-hotplug", ACPI_MEMORY_HOTPLUG_IO_LEN);

    memory_region_add_subregion(as, ACPI_MEMORY_HOTPLUG_BASE, &state->io);

}

void acpi_memory_hotplug_init(MemoryRegion *as, Object *owner,

                              MemHotplugState *state)

{

    MachineState *machine = MACHINE(qdev_get_machine());



    state->dev_count = machine->ram_slots;

    if (!state->dev_count) {

        return;

    }



    state->devs = g_malloc0(sizeof(*state->devs) * state->dev_count);

    memory_region_init_io(&state->io, owner, &acpi_memory_hotplug_ops, state,

                          "acpi-mem-hotplug", ACPI_MEMORY_HOTPLUG_IO_LEN);

    memory_region_add_subregion(as, ACPI_MEMORY_HOTPLUG_BASE, &state->io);

}

void FUNC_0(MemoryRegion *VAR_0, Object *VAR_1,

                              MemHotplugState *VAR_2)

{

    MachineState *machine = MACHINE(qdev_get_machine());



    VAR_2->dev_count = machine->ram_slots;

    if (!VAR_2->dev_count) {

        return;

    }



    VAR_2->devs = g_malloc0(sizeof(*VAR_2->devs) * VAR_2->dev_count);

    memory_region_init_io(&VAR_2->io, VAR_1, &acpi_memory_hotplug_ops, VAR_2,

                          "acpi-mem-hotplug", ACPI_MEMORY_HOTPLUG_IO_LEN);

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

}

void FUNC_0(MemoryRegion *VAR_0, Object *VAR_1,
MemHotplugState *VAR_2)
{ MachineState *machine = MACHINE(qdev_get_machine()); VAR_2->dev_count = machine->ram_slots; if (!VAR_2->dev_count) { return; } VAR_2->devs = g_malloc0(sizeof(*VAR_2->devs) * VAR_2->dev_count); memory_region_init_io(&VAR_2->io, VAR_1, &acpi_memory_hotplug_ops, VAR_2,
"acpi-mem-hotplug", ACPI_MEMORY_HOTPLUG_IO_LEN); memory_region_add_subregion(VAR_0, ACPI_MEMORY_HOTPLUG_BASE, &VAR_2->io); }