static void pmac_ide_writeb (void *opaque,

                             target_phys_addr_t addr, uint32_t val)

{

    MACIOIDEState *d = opaque;



    addr = (addr & 0xFFF) >> 4;

    switch (addr) {

    case 1 ... 7:

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

        break;

    case 8:

    case 22:

        ide_cmd_write(&d->bus, 0, val);

        break;

    default:

        break;

    }

}

static void pmac_ide_writeb (void *opaque,

                             target_phys_addr_t addr, uint32_t val)

{

    MACIOIDEState *d = opaque;



    addr = (addr & 0xFFF) >> 4;

    switch (addr) {

    case 1 ... 7:

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

        break;

    case 8:

    case 22:

        ide_cmd_write(&d->bus, 0, val);

        break;

    default:

        break;

    }

}

static void FUNC_0 (void *VAR_0,

                             target_phys_addr_t VAR_1, uint32_t VAR_2)

{

    MACIOIDEState *d = VAR_0;



    VAR_1 = (VAR_1 & 0xFFF) >> 4;

    switch (VAR_1) {

    case 1 ... 7:

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

        break;

    case 8:

    case 22:

        ide_cmd_write(&d->bus, 0, VAR_2);

        break;

    default:

        break;

    }

}

static void FUNC_0 (void *VAR_0,
target_phys_addr_t VAR_1, uint32_t VAR_2)
{ MACIOIDEState *d = VAR_0; VAR_1 = (VAR_1 & 0xFFF) >> 4; switch (VAR_1) { case 1 ... 7:
ide_ioport_write(&d->bus, VAR_1, VAR_2); break; case 8:
case 22:
ide_cmd_write(&d->bus, 0, VAR_2); break; default:
break; } }