static void openpic_src_write(void *opaque, hwaddr addr, uint64_t val,

                              unsigned len)

{

    OpenPICState *opp = opaque;

    int idx;



    DPRINTF("%s: addr %08x <= %08x\n", __func__, addr, val);

    if (addr & 0xF)

        return;

    addr = addr & 0xFFF0;

    idx = addr >> 5;

    if (addr & 0x10) {

        /* EXDE / IFEDE / IEEDE */

        write_IRQreg_ide(opp, idx, val);

    } else {

        /* EXVP / IFEVP / IEEVP */

        write_IRQreg_ipvp(opp, idx, val);

    }

}

static void openpic_src_write(void *opaque, hwaddr addr, uint64_t val,

                              unsigned len)

{

    OpenPICState *opp = opaque;

    int idx;



    DPRINTF("%s: addr %08x <= %08x\n", __func__, addr, val);

    if (addr & 0xF)

        return;

    addr = addr & 0xFFF0;

    idx = addr >> 5;

    if (addr & 0x10) {

        

        write_IRQreg_ide(opp, idx, val);

    } else {

        

        write_IRQreg_ipvp(opp, idx, val);

    }

}

    if (addr & 0xF)     if (addr & 0xF)     if (addr & 0xF)     if (addr & 0xF)     if (addr & 0xF)     if (addr & 0xF)     if (addr & 0xF)
static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,

                              unsigned VAR_3)

{

    OpenPICState *opp = VAR_0;

    int VAR_4;



    DPRINTF("%s: VAR_1 %08x <= %08x\n", __func__, VAR_1, VAR_2);

    if (VAR_1 & 0xF)

        return;

    VAR_1 = VAR_1 & 0xFFF0;

    VAR_4 = VAR_1 >> 5;

    if (VAR_1 & 0x10) {

        

        write_IRQreg_ide(opp, VAR_4, VAR_2);

    } else {

        

        write_IRQreg_ipvp(opp, VAR_4, VAR_2);

    }

}

static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,
unsigned VAR_3)
{ OpenPICState *opp = VAR_0; int VAR_4; DPRINTF("%s: VAR_1 %08x <= %08x\n", __func__, VAR_1, VAR_2); if (VAR_1 & 0xF)
return; VAR_1 = VAR_1 & 0xFFF0; VAR_4 = VAR_1 >> 5; if (VAR_1 & 0x10) { write_IRQreg_ide(opp, VAR_4, VAR_2); } else { write_IRQreg_ipvp(opp, VAR_4, VAR_2); } }