static void pci_set_irq(void *opaque, int irq_num, int level)

{

    PCIDevice *pci_dev = opaque;

    PCIBus *bus;

    int change;



    change = level - pci_dev->irq_state[irq_num];

    if (!change)

        return;



    pci_dev->irq_state[irq_num] = level;

    for (;;) {

        bus = pci_dev->bus;

        irq_num = bus->map_irq(pci_dev, irq_num);

        if (bus->set_irq)

            break;

        pci_dev = bus->parent_dev;

    }

    bus->irq_count[irq_num] += change;

    bus->set_irq(bus->irq_opaque, irq_num, bus->irq_count[irq_num] != 0);

}

static void pci_set_irq(void *opaque, int irq_num, int level)

{

    PCIDevice *pci_dev = opaque;

    PCIBus *bus;

    int change;



    change = level - pci_dev->irq_state[irq_num];

    if (!change)

        return;



    pci_dev->irq_state[irq_num] = level;

    for (;;) {

        bus = pci_dev->bus;

        irq_num = bus->map_irq(pci_dev, irq_num);

        if (bus->set_irq)

            break;

        pci_dev = bus->parent_dev;

    }

    bus->irq_count[irq_num] += change;

    bus->set_irq(bus->irq_opaque, irq_num, bus->irq_count[irq_num] != 0);

}

    PCIBus *bus;     change = level - pci_dev->irq_state[irq_num];     pci_dev->irq_state[irq_num] = level;     for (;;) {         bus = pci_dev->bus;         irq_num = bus->map_irq(pci_dev, irq_num);         if (bus->set_irq)             break;         pci_dev = bus->parent_dev;     bus->irq_count[irq_num] += change;     bus->set_irq(bus->irq_opaque, irq_num, bus->irq_count[irq_num] != 0);
static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)

{

    PCIDevice *pci_dev = VAR_0;

    PCIBus *bus;

    int VAR_3;



    VAR_3 = VAR_2 - pci_dev->irq_state[VAR_1];

    if (!VAR_3)

        return;



    pci_dev->irq_state[VAR_1] = VAR_2;

    for (;;) {

        bus = pci_dev->bus;

        VAR_1 = bus->map_irq(pci_dev, VAR_1);

        if (bus->set_irq)

            break;

        pci_dev = bus->parent_dev;

    }

    bus->irq_count[VAR_1] += VAR_3;

    bus->set_irq(bus->irq_opaque, VAR_1, bus->irq_count[VAR_1] != 0);

}

static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)
{ PCIDevice *pci_dev = VAR_0; PCIBus *bus; int VAR_3; VAR_3 = VAR_2 - pci_dev->irq_state[VAR_1]; if (!VAR_3)
return; pci_dev->irq_state[VAR_1] = VAR_2; for (;;) { bus = pci_dev->bus; VAR_1 = bus->map_irq(pci_dev, VAR_1); if (bus->set_irq)
break; pci_dev = bus->parent_dev; } bus->irq_count[VAR_1] += VAR_3; bus->set_irq(bus->irq_opaque, VAR_1, bus->irq_count[VAR_1] != 0); }