static void pciej_write(void *opaque, uint32_t addr, uint32_t val)

{

    BusState *bus = opaque;

    DeviceState *qdev, *next;

    PCIDevice *dev;

    int slot = ffs(val) - 1;



    QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) {

        dev = DO_UPCAST(PCIDevice, qdev, qdev);

        if (PCI_SLOT(dev->devfn) == slot) {

            qdev_free(qdev);

        }

    }





    PIIX4_DPRINTF("pciej write %x <== %d\n", addr, val);

}

static void pciej_write(void *opaque, uint32_t addr, uint32_t val)

{

    BusState *bus = opaque;

    DeviceState *qdev, *next;

    PCIDevice *dev;

    int slot = ffs(val) - 1;



    QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) {

        dev = DO_UPCAST(PCIDevice, qdev, qdev);

        if (PCI_SLOT(dev->devfn) == slot) {

            qdev_free(qdev);

        }

    }





    PIIX4_DPRINTF("pciej write %x <== %d\n", addr, val);

}

        if (PCI_SLOT(dev->devfn) == slot) {
static void FUNC_0(void *VAR_0, uint32_t VAR_1, uint32_t VAR_2)

{

    BusState *bus = VAR_0;

    DeviceState *qdev, *next;

    PCIDevice *dev;

    int VAR_3 = ffs(VAR_2) - 1;



    QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) {

        dev = DO_UPCAST(PCIDevice, qdev, qdev);

        if (PCI_SLOT(dev->devfn) == VAR_3) {

            qdev_free(qdev);

        }

    }





    PIIX4_DPRINTF("pciej write %x <== %d\n", VAR_1, VAR_2);

}

static void FUNC_0(void *VAR_0, uint32_t VAR_1, uint32_t VAR_2)
{ BusState *bus = VAR_0; DeviceState *qdev, *next; PCIDevice *dev; int VAR_3 = ffs(VAR_2) - 1; QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) { dev = DO_UPCAST(PCIDevice, qdev, qdev); if (PCI_SLOT(dev->devfn) == VAR_3) { qdev_free(qdev); } } PIIX4_DPRINTF("pciej write %x <== %d\n", VAR_1, VAR_2); }