static void spapr_msi_setmsg(PCIDevice *pdev, hwaddr addr,

                             bool msix, unsigned req_num)

{

    unsigned i;

    MSIMessage msg = { .address = addr, .data = 0 };



    if (!msix) {

        msi_set_message(pdev, msg);

        trace_spapr_pci_msi_setup(pdev->name, 0, msg.address);

        return;

    }



    for (i = 0; i < req_num; ++i) {

        msg.address = addr | (i << 2);

        msix_set_message(pdev, i, msg);

        trace_spapr_pci_msi_setup(pdev->name, i, msg.address);

    }

}

static void spapr_msi_setmsg(PCIDevice *pdev, hwaddr addr,

                             bool msix, unsigned req_num)

{

    unsigned i;

    MSIMessage msg = { .address = addr, .data = 0 };



    if (!msix) {

        msi_set_message(pdev, msg);

        trace_spapr_pci_msi_setup(pdev->name, 0, msg.address);

        return;

    }



    for (i = 0; i < req_num; ++i) {

        msg.address = addr | (i << 2);

        msix_set_message(pdev, i, msg);

        trace_spapr_pci_msi_setup(pdev->name, i, msg.address);

    }

}

static void FUNC_0(PCIDevice *VAR_0, hwaddr VAR_1,

                             bool VAR_2, unsigned VAR_3)

{

    unsigned VAR_4;

    MSIMessage msg = { .address = VAR_1, .data = 0 };



    if (!VAR_2) {

        msi_set_message(VAR_0, msg);

        trace_spapr_pci_msi_setup(VAR_0->name, 0, msg.address);

        return;

    }



    for (VAR_4 = 0; VAR_4 < VAR_3; ++VAR_4) {

        msg.address = VAR_1 | (VAR_4 << 2);

        msix_set_message(VAR_0, VAR_4, msg);

        trace_spapr_pci_msi_setup(VAR_0->name, VAR_4, msg.address);

    }

}

static void FUNC_0(PCIDevice *VAR_0, hwaddr VAR_1,
bool VAR_2, unsigned VAR_3)
{ unsigned VAR_4; MSIMessage msg = { .address = VAR_1, .data = 0 }; if (!VAR_2) { msi_set_message(VAR_0, msg); trace_spapr_pci_msi_setup(VAR_0->name, 0, msg.address); return; } for (VAR_4 = 0; VAR_4 < VAR_3; ++VAR_4) { msg.address = VAR_1 | (VAR_4 << 2); msix_set_message(VAR_0, VAR_4, msg); trace_spapr_pci_msi_setup(VAR_0->name, VAR_4, msg.address); } }