static void openpic_set_irq(void *opaque, int n_IRQ, int level)

{

    OpenPICState *opp = opaque;

    IRQSource *src;



    if (n_IRQ >= MAX_IRQ) {

        fprintf(stderr, "%s: IRQ %d out of range\n", __func__, n_IRQ);

        abort();

    }



    src = &opp->src[n_IRQ];

    DPRINTF("openpic: set irq %d = %d ivpr=0x%08x\n",

            n_IRQ, level, src->ivpr);

    if (src->level) {

        /* level-sensitive irq */

        src->pending = level;

        if (!level) {

            src->ivpr &= ~IVPR_ACTIVITY_MASK;

        }

    } else {

        /* edge-sensitive irq */

        if (level) {

            src->pending = 1;

        }

    }

    openpic_update_irq(opp, n_IRQ);

}

static void openpic_set_irq(void *opaque, int n_IRQ, int level)

{

    OpenPICState *opp = opaque;

    IRQSource *src;



    if (n_IRQ >= MAX_IRQ) {

        fprintf(stderr, "%s: IRQ %d out of range\n", __func__, n_IRQ);

        abort();

    }



    src = &opp->src[n_IRQ];

    DPRINTF("openpic: set irq %d = %d ivpr=0x%08x\n",

            n_IRQ, level, src->ivpr);

    if (src->level) {

        

        src->pending = level;

        if (!level) {

            src->ivpr &= ~IVPR_ACTIVITY_MASK;

        }

    } else {

        

        if (level) {

            src->pending = 1;

        }

    }

    openpic_update_irq(opp, n_IRQ);

}

static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)

{

    OpenPICState *opp = VAR_0;

    IRQSource *src;



    if (VAR_1 >= MAX_IRQ) {

        fprintf(stderr, "%s: IRQ %d out of range\n", __func__, VAR_1);

        abort();

    }



    src = &opp->src[VAR_1];

    DPRINTF("openpic: set irq %d = %d ivpr=0x%08x\n",

            VAR_1, VAR_2, src->ivpr);

    if (src->VAR_2) {

        

        src->pending = VAR_2;

        if (!VAR_2) {

            src->ivpr &= ~IVPR_ACTIVITY_MASK;

        }

    } else {

        

        if (VAR_2) {

            src->pending = 1;

        }

    }

    openpic_update_irq(opp, VAR_1);

}

static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)
{ OpenPICState *opp = VAR_0; IRQSource *src; if (VAR_1 >= MAX_IRQ) { fprintf(stderr, "%s: IRQ %d out of range\n", __func__, VAR_1); abort(); } src = &opp->src[VAR_1]; DPRINTF("openpic: set irq %d = %d ivpr=0x%08x\n",
VAR_1, VAR_2, src->ivpr); if (src->VAR_2) { src->pending = VAR_2; if (!VAR_2) { src->ivpr &= ~IVPR_ACTIVITY_MASK; } } else { if (VAR_2) { src->pending = 1; } } openpic_update_irq(opp, VAR_1); }