static void xics_reset(void *opaque)

{

    struct icp_state *icp = (struct icp_state *)opaque;

    struct ics_state *ics = icp->ics;

    int i;



    for (i = 0; i < icp->nr_servers; i++) {

        icp->ss[i].xirr = 0;

        icp->ss[i].pending_priority = 0;

        icp->ss[i].mfrr = 0xff;

        /* Make all outputs are deasserted */

        qemu_set_irq(icp->ss[i].output, 0);

    }



    for (i = 0; i < ics->nr_irqs; i++) {

        /* Reset everything *except* the type */

        ics->irqs[i].server = 0;

        ics->irqs[i].status = 0;

        ics->irqs[i].priority = 0xff;

        ics->irqs[i].saved_priority = 0xff;

    }

}

static void xics_reset(void *opaque)

{

    struct icp_state *icp = (struct icp_state *)opaque;

    struct ics_state *ics = icp->ics;

    int i;



    for (i = 0; i < icp->nr_servers; i++) {

        icp->ss[i].xirr = 0;

        icp->ss[i].pending_priority = 0;

        icp->ss[i].mfrr = 0xff;

        

        qemu_set_irq(icp->ss[i].output, 0);

    }



    for (i = 0; i < ics->nr_irqs; i++) {

        

        ics->irqs[i].server = 0;

        ics->irqs[i].status = 0;

        ics->irqs[i].priority = 0xff;

        ics->irqs[i].saved_priority = 0xff;

    }

}

static void FUNC_0(void *VAR_0)

{

    struct icp_state *VAR_1 = (struct icp_state *)VAR_0;

    struct ics_state *VAR_2 = VAR_1->VAR_2;

    int VAR_3;



    for (VAR_3 = 0; VAR_3 < VAR_1->nr_servers; VAR_3++) {

        VAR_1->ss[VAR_3].xirr = 0;

        VAR_1->ss[VAR_3].pending_priority = 0;

        VAR_1->ss[VAR_3].mfrr = 0xff;

        

        qemu_set_irq(VAR_1->ss[VAR_3].output, 0);

    }



    for (VAR_3 = 0; VAR_3 < VAR_2->nr_irqs; VAR_3++) {

        

        VAR_2->irqs[VAR_3].server = 0;

        VAR_2->irqs[VAR_3].status = 0;

        VAR_2->irqs[VAR_3].priority = 0xff;

        VAR_2->irqs[VAR_3].saved_priority = 0xff;

    }

}

static void FUNC_0(void *VAR_0)
{ struct icp_state *VAR_1 = (struct icp_state *)VAR_0; struct ics_state *VAR_2 = VAR_1->VAR_2; int VAR_3; for (VAR_3 = 0; VAR_3 < VAR_1->nr_servers; VAR_3++) { VAR_1->ss[VAR_3].xirr = 0; VAR_1->ss[VAR_3].pending_priority = 0; VAR_1->ss[VAR_3].mfrr = 0xff; qemu_set_irq(VAR_1->ss[VAR_3].output, 0); } for (VAR_3 = 0; VAR_3 < VAR_2->nr_irqs; VAR_3++) { VAR_2->irqs[VAR_3].server = 0; VAR_2->irqs[VAR_3].status = 0; VAR_2->irqs[VAR_3].priority = 0xff; VAR_2->irqs[VAR_3].saved_priority = 0xff; } }