static void pic_write(void *opaque, target_phys_addr_t addr,

                      uint64_t value, unsigned size)

{

    HeathrowPICS *s = opaque;

    HeathrowPIC *pic;

    unsigned int n;



    n = ((addr & 0xfff) - 0x10) >> 4;

    PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);

    if (n >= 2)

        return;

    pic = &s->pics[n];

    switch(addr & 0xf) {

    case 0x04:

        pic->mask = value;

        heathrow_pic_update(s);

        break;

    case 0x08:

        /* do not reset level triggered IRQs */

        value &= ~pic->level_triggered;

        pic->events &= ~value;

        heathrow_pic_update(s);

        break;

    default:

        break;

    }

}

static void pic_write(void *opaque, target_phys_addr_t addr,

                      uint64_t value, unsigned size)

{

    HeathrowPICS *s = opaque;

    HeathrowPIC *pic;

    unsigned int n;



    n = ((addr & 0xfff) - 0x10) >> 4;

    PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);

    if (n >= 2)

        return;

    pic = &s->pics[n];

    switch(addr & 0xf) {

    case 0x04:

        pic->mask = value;

        heathrow_pic_update(s);

        break;

    case 0x08:

        

        value &= ~pic->level_triggered;

        pic->events &= ~value;

        heathrow_pic_update(s);

        break;

    default:

        break;

    }

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,

                      uint64_t VAR_2, unsigned VAR_3)

{

    HeathrowPICS *s = VAR_0;

    HeathrowPIC *pic;

    unsigned int VAR_4;



    VAR_4 = ((VAR_1 & 0xfff) - 0x10) >> 4;

    PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\VAR_4", VAR_1, VAR_4, VAR_2);

    if (VAR_4 >= 2)

        return;

    pic = &s->pics[VAR_4];

    switch(VAR_1 & 0xf) {

    case 0x04:

        pic->mask = VAR_2;

        heathrow_pic_update(s);

        break;

    case 0x08:

        

        VAR_2 &= ~pic->level_triggered;

        pic->events &= ~VAR_2;

        heathrow_pic_update(s);

        break;

    default:

        break;

    }

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{ HeathrowPICS *s = VAR_0; HeathrowPIC *pic; unsigned int VAR_4; VAR_4 = ((VAR_1 & 0xfff) - 0x10) >> 4; PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\VAR_4", VAR_1, VAR_4, VAR_2); if (VAR_4 >= 2)
return; pic = &s->pics[VAR_4]; switch(VAR_1 & 0xf) { case 0x04:
pic->mask = VAR_2; heathrow_pic_update(s); break; case 0x08:
VAR_2 &= ~pic->level_triggered; pic->events &= ~VAR_2; heathrow_pic_update(s); break; default:
break; } }