void bmdma_init(IDEBus *bus, BMDMAState *bm, PCIIDEState *d)

{

    qemu_irq *irq;



    if (bus->dma == &bm->dma) {

        return;

    }



    bm->dma.ops = &bmdma_ops;

    bus->dma = &bm->dma;

    bm->irq = bus->irq;

    irq = qemu_allocate_irqs(bmdma_irq, bm, 1);

    bus->irq = *irq;

    bm->pci_dev = d;

}

void bmdma_init(IDEBus *bus, BMDMAState *bm, PCIIDEState *d)

{

    qemu_irq *irq;



    if (bus->dma == &bm->dma) {

        return;

    }



    bm->dma.ops = &bmdma_ops;

    bus->dma = &bm->dma;

    bm->irq = bus->irq;

    irq = qemu_allocate_irqs(bmdma_irq, bm, 1);

    bus->irq = *irq;

    bm->pci_dev = d;

}

    qemu_irq *irq;     irq = qemu_allocate_irqs(bmdma_irq, bm, 1);     bus->irq = *irq;
void FUNC_0(IDEBus *VAR_0, BMDMAState *VAR_1, PCIIDEState *VAR_2)

{

    qemu_irq *irq;



    if (VAR_0->dma == &VAR_1->dma) {

        return;

    }



    VAR_1->dma.ops = &bmdma_ops;

    VAR_0->dma = &VAR_1->dma;

    VAR_1->irq = VAR_0->irq;

    irq = qemu_allocate_irqs(bmdma_irq, VAR_1, 1);

    VAR_0->irq = *irq;

    VAR_1->pci_dev = VAR_2;

}

void FUNC_0(IDEBus *VAR_0, BMDMAState *VAR_1, PCIIDEState *VAR_2)
{ qemu_irq *irq; if (VAR_0->dma == &VAR_1->dma) { return; } VAR_1->dma.ops = &bmdma_ops; VAR_0->dma = &VAR_1->dma; VAR_1->irq = VAR_0->irq; irq = qemu_allocate_irqs(bmdma_irq, VAR_1, 1); VAR_0->irq = *irq; VAR_1->pci_dev = VAR_2; }