static void slavio_set_irq(void *opaque, int irq, int level)

{

    SLAVIO_INTCTLState *s = opaque;



    DPRINTF("Set cpu %d irq %d level %d\n", s->target_cpu, irq, level);

    if (irq < 32) {

	uint32_t mask = 1 << irq;

	uint32_t pil = s->intbit_to_level[irq];

	if (pil > 0) {

	    if (level) {

		s->intregm_pending |= mask;

		s->intreg_pending[s->target_cpu] |= 1 << pil;

		slavio_check_interrupts(s);

	    }

	    else {

		s->intregm_pending &= ~mask;

		s->intreg_pending[s->target_cpu] &= ~(1 << pil);

	    }

	}

    }

}

static void slavio_set_irq(void *opaque, int irq, int level)

{

    SLAVIO_INTCTLState *s = opaque;



    DPRINTF("Set cpu %d irq %d level %d\n", s->target_cpu, irq, level);

    if (irq < 32) {

	uint32_t mask = 1 << irq;

	uint32_t pil = s->intbit_to_level[irq];

	if (pil > 0) {

	    if (level) {

		s->intregm_pending |= mask;

		s->intreg_pending[s->target_cpu] |= 1 << pil;

		slavio_check_interrupts(s);

	    }

	    else {

		s->intregm_pending &= ~mask;

		s->intreg_pending[s->target_cpu] &= ~(1 << pil);

	    }

	}

    }

}

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

{

    SLAVIO_INTCTLState *s = VAR_0;



    DPRINTF("Set cpu %d VAR_1 %d VAR_2 %d\n", s->target_cpu, VAR_1, VAR_2);

    if (VAR_1 < 32) {

	uint32_t mask = 1 << VAR_1;

	uint32_t pil = s->intbit_to_level[VAR_1];

	if (pil > 0) {

	    if (VAR_2) {

		s->intregm_pending |= mask;

		s->intreg_pending[s->target_cpu] |= 1 << pil;

		slavio_check_interrupts(s);

	    }

	    else {

		s->intregm_pending &= ~mask;

		s->intreg_pending[s->target_cpu] &= ~(1 << pil);

	    }

	}

    }

}

static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)
{ SLAVIO_INTCTLState *s = VAR_0; DPRINTF("Set cpu %d VAR_1 %d VAR_2 %d\n", s->target_cpu, VAR_1, VAR_2); if (VAR_1 < 32) { uint32_t mask = 1 << VAR_1; uint32_t pil = s->intbit_to_level[VAR_1]; if (pil > 0) { if (VAR_2) { s->intregm_pending |= mask; s->intreg_pending[s->target_cpu] |= 1 << pil; slavio_check_interrupts(s); } else { s->intregm_pending &= ~mask; s->intreg_pending[s->target_cpu] &= ~(1 << pil); } } } }