static PCIDevice *find_dev(sPAPREnvironment *spapr,

                           uint64_t buid, uint32_t config_addr)

{

    int devfn = (config_addr >> 8) & 0xFF;

    sPAPRPHBState *phb;



    QLIST_FOREACH(phb, &spapr->phbs, list) {

        BusChild *kid;



        if (phb->buid != buid) {

            continue;

        }



        QTAILQ_FOREACH(kid, &phb->host_state.bus->qbus.children, sibling) {

            PCIDevice *dev = (PCIDevice *)kid->child;

            if (dev->devfn == devfn) {

                return dev;

            }

        }

    }



    return NULL;

}

static PCIDevice *find_dev(sPAPREnvironment *spapr,

                           uint64_t buid, uint32_t config_addr)

{

    int devfn = (config_addr >> 8) & 0xFF;

    sPAPRPHBState *phb;



    QLIST_FOREACH(phb, &spapr->phbs, list) {

        BusChild *kid;



        if (phb->buid != buid) {

            continue;

        }



        QTAILQ_FOREACH(kid, &phb->host_state.bus->qbus.children, sibling) {

            PCIDevice *dev = (PCIDevice *)kid->child;

            if (dev->devfn == devfn) {

                return dev;

            }

        }

    }



    return NULL;

}

static PCIDevice *find_dev(sPAPREnvironment *spapr,                            uint64_t buid, uint32_t config_addr)     int devfn = (config_addr >> 8) & 0xFF;         BusChild *kid;         QTAILQ_FOREACH(kid, &phb->host_state.bus->qbus.children, sibling) {             PCIDevice *dev = (PCIDevice *)kid->child;             if (dev->devfn == devfn) {                 return dev;
static PCIDevice *FUNC_0(sPAPREnvironment *spapr,

                           uint64_t buid, uint32_t config_addr)

{

    int VAR_0 = (config_addr >> 8) & 0xFF;

    sPAPRPHBState *phb;



    QLIST_FOREACH(phb, &spapr->phbs, list) {

        BusChild *kid;



        if (phb->buid != buid) {

            continue;

        }



        QTAILQ_FOREACH(kid, &phb->host_state.bus->qbus.children, sibling) {

            PCIDevice *dev = (PCIDevice *)kid->child;

            if (dev->VAR_0 == VAR_0) {

                return dev;

            }

        }

    }



    return NULL;

}

static PCIDevice *FUNC_0(sPAPREnvironment *spapr,
uint64_t buid, uint32_t config_addr)
{ int VAR_0 = (config_addr >> 8) & 0xFF; sPAPRPHBState *phb; QLIST_FOREACH(phb, &spapr->phbs, list) { BusChild *kid; if (phb->buid != buid) { continue; } QTAILQ_FOREACH(kid, &phb->host_state.bus->qbus.children, sibling) { PCIDevice *dev = (PCIDevice *)kid->child; if (dev->VAR_0 == VAR_0) { return dev; } } } return NULL; }