static void pci_get_node_name(char *nodename, int len, PCIDevice *dev)

{

    int slot = PCI_SLOT(dev->devfn);

    int func = PCI_FUNC(dev->devfn);

    uint32_t ccode = pci_default_read_config(dev, PCI_CLASS_PROG, 3);

    const char *name;



    name = pci_find_device_name((ccode >> 16) & 0xff, (ccode >> 8) & 0xff,

                                ccode & 0xff);



    if (func != 0) {

        snprintf(nodename, len, "%s@%x,%x", name, slot, func);

    } else {

        snprintf(nodename, len, "%s@%x", name, slot);

    }

}

static void pci_get_node_name(char *nodename, int len, PCIDevice *dev)

{

    int slot = PCI_SLOT(dev->devfn);

    int func = PCI_FUNC(dev->devfn);

    uint32_t ccode = pci_default_read_config(dev, PCI_CLASS_PROG, 3);

    const char *name;



    name = pci_find_device_name((ccode >> 16) & 0xff, (ccode >> 8) & 0xff,

                                ccode & 0xff);



    if (func != 0) {

        snprintf(nodename, len, "%s@%x,%x", name, slot, func);

    } else {

        snprintf(nodename, len, "%s@%x", name, slot);

    }

}

static void FUNC_0(char *VAR_0, int VAR_1, PCIDevice *VAR_2)

{

    int VAR_3 = PCI_SLOT(VAR_2->devfn);

    int VAR_4 = PCI_FUNC(VAR_2->devfn);

    uint32_t ccode = pci_default_read_config(VAR_2, PCI_CLASS_PROG, 3);

    const char *VAR_5;



    VAR_5 = pci_find_device_name((ccode >> 16) & 0xff, (ccode >> 8) & 0xff,

                                ccode & 0xff);



    if (VAR_4 != 0) {

        snprintf(VAR_0, VAR_1, "%s@%x,%x", VAR_5, VAR_3, VAR_4);

    } else {

        snprintf(VAR_0, VAR_1, "%s@%x", VAR_5, VAR_3);

    }

}

static void FUNC_0(char *VAR_0, int VAR_1, PCIDevice *VAR_2)
{ int VAR_3 = PCI_SLOT(VAR_2->devfn); int VAR_4 = PCI_FUNC(VAR_2->devfn); uint32_t ccode = pci_default_read_config(VAR_2, PCI_CLASS_PROG, 3); const char *VAR_5; VAR_5 = pci_find_device_name((ccode >> 16) & 0xff, (ccode >> 8) & 0xff,
ccode & 0xff); if (VAR_4 != 0) { snprintf(VAR_0, VAR_1, "%s@%x,%x", VAR_5, VAR_3, VAR_4); } else { snprintf(VAR_0, VAR_1, "%s@%x", VAR_5, VAR_3); } }