static void mmio_ide_write(void *opaque, target_phys_addr_t addr,

                           uint64_t val, unsigned size)

{

    MMIOState *s = opaque;

    addr >>= s->shift;

    if (addr & 7)

        ide_ioport_write(&s->bus, addr, val);

    else

        ide_data_writew(&s->bus, 0, val);

}

static void mmio_ide_write(void *opaque, target_phys_addr_t addr,

                           uint64_t val, unsigned size)

{

    MMIOState *s = opaque;

    addr >>= s->shift;

    if (addr & 7)

        ide_ioport_write(&s->bus, addr, val);

    else

        ide_data_writew(&s->bus, 0, val);

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,

                           uint64_t VAR_2, unsigned VAR_3)

{

    MMIOState *s = VAR_0;

    VAR_1 >>= s->shift;

    if (VAR_1 & 7)

        ide_ioport_write(&s->bus, VAR_1, VAR_2);

    else

        ide_data_writew(&s->bus, 0, VAR_2);

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{ MMIOState *s = VAR_0; VAR_1 >>= s->shift; if (VAR_1 & 7)
ide_ioport_write(&s->bus, VAR_1, VAR_2); else
ide_data_writew(&s->bus, 0, VAR_2); }