void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,

                                 DeviceState *dev, Error **errp)

{

    PCIDevice *pdev = PCI_DEVICE(dev);

    int slot = PCI_SLOT(pdev->devfn);

    int bsel = acpi_pcihp_get_bsel(pdev->bus);

    if (bsel < 0) {

        error_setg(errp, "Unsupported bus. Bus doesn't have property '"

                   ACPI_PCIHP_PROP_BSEL "' set");

        return;

    }



    s->acpi_pcihp_pci_status[bsel].down |= (1U << slot);

    acpi_send_event(DEVICE(hotplug_dev), ACPI_PCI_HOTPLUG_STATUS);

}

void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,

                                 DeviceState *dev, Error **errp)

{

    PCIDevice *pdev = PCI_DEVICE(dev);

    int slot = PCI_SLOT(pdev->devfn);

    int bsel = acpi_pcihp_get_bsel(pdev->bus);

    if (bsel < 0) {

        error_setg(errp, "Unsupported bus. Bus doesn't have property '"

                   ACPI_PCIHP_PROP_BSEL "' set");

        return;

    }



    s->acpi_pcihp_pci_status[bsel].down |= (1U << slot);

    acpi_send_event(DEVICE(hotplug_dev), ACPI_PCI_HOTPLUG_STATUS);

}

void FUNC_0(HotplugHandler *VAR_0, AcpiPciHpState *VAR_1,

                                 DeviceState *VAR_2, Error **VAR_3)

{

    PCIDevice *pdev = PCI_DEVICE(VAR_2);

    int VAR_4 = PCI_SLOT(pdev->devfn);

    int VAR_5 = acpi_pcihp_get_bsel(pdev->bus);

    if (VAR_5 < 0) {

        error_setg(VAR_3, "Unsupported bus. Bus doesn't have property '"

                   ACPI_PCIHP_PROP_BSEL "' set");

        return;

    }



    VAR_1->acpi_pcihp_pci_status[VAR_5].down |= (1U << VAR_4);

    acpi_send_event(DEVICE(VAR_0), ACPI_PCI_HOTPLUG_STATUS);

}

void FUNC_0(HotplugHandler *VAR_0, AcpiPciHpState *VAR_1,
DeviceState *VAR_2, Error **VAR_3)
{ PCIDevice *pdev = PCI_DEVICE(VAR_2); int VAR_4 = PCI_SLOT(pdev->devfn); int VAR_5 = acpi_pcihp_get_bsel(pdev->bus); if (VAR_5 < 0) { error_setg(VAR_3, "Unsupported bus. Bus doesn't have property '"
ACPI_PCIHP_PROP_BSEL "' set"); return; } VAR_1->acpi_pcihp_pci_status[VAR_5].down |= (1U << VAR_4); acpi_send_event(DEVICE(VAR_0), ACPI_PCI_HOTPLUG_STATUS); }