static void pci_bridge_write_config(PCIDevice *d,

                             uint32_t address, uint32_t val, int len)

{

    PCIBridge *s = (PCIBridge *)d;



    if (address == 0x19 || (address == 0x18 && len > 1)) {

        if (address == 0x19)

            s->bus->bus_num = val & 0xff;

        else

            s->bus->bus_num = (val >> 8) & 0xff;

#if defined(DEBUG_PCI)

        printf ("pci-bridge: %s: Assigned bus %d\n", d->name, s->bus->bus_num);

#endif

    }

    pci_default_write_config(d, address, val, len);

}

static void pci_bridge_write_config(PCIDevice *d,

                             uint32_t address, uint32_t val, int len)

{

    PCIBridge *s = (PCIBridge *)d;



    if (address == 0x19 || (address == 0x18 && len > 1)) {

        if (address == 0x19)

            s->bus->bus_num = val & 0xff;

        else

            s->bus->bus_num = (val >> 8) & 0xff;

#if defined(DEBUG_PCI)

        printf ("pci-bridge: %s: Assigned bus %d\n", d->name, s->bus->bus_num);

#endif

    }

    pci_default_write_config(d, address, val, len);

}

static void FUNC_0(PCIDevice *VAR_0,

                             uint32_t VAR_1, uint32_t VAR_2, int VAR_3)

{

    PCIBridge *s = (PCIBridge *)VAR_0;



    if (VAR_1 == 0x19 || (VAR_1 == 0x18 && VAR_3 > 1)) {

        if (VAR_1 == 0x19)

            s->bus->bus_num = VAR_2 & 0xff;

        else

            s->bus->bus_num = (VAR_2 >> 8) & 0xff;

#if defined(DEBUG_PCI)

        printf ("pci-bridge: %s: Assigned bus %VAR_0\n", VAR_0->name, s->bus->bus_num);

#endif

    }

    pci_default_write_config(VAR_0, VAR_1, VAR_2, VAR_3);

}

static void FUNC_0(PCIDevice *VAR_0,
uint32_t VAR_1, uint32_t VAR_2, int VAR_3)
{ PCIBridge *s = (PCIBridge *)VAR_0; if (VAR_1 == 0x19 || (VAR_1 == 0x18 && VAR_3 > 1)) { if (VAR_1 == 0x19)
s->bus->bus_num = VAR_2 & 0xff; else
s->bus->bus_num = (VAR_2 >> 8) & 0xff; #if defined(DEBUG_PCI)
printf ("pci-bridge: %s: Assigned bus %VAR_0\n", VAR_0->name, s->bus->bus_num); #endif
} pci_default_write_config(VAR_0, VAR_1, VAR_2, VAR_3); }