static void pcnet_ioport_write(void *opaque, target_phys_addr_t addr,

                               uint64_t data, unsigned size)

{

    PCNetState *d = opaque;



    if (addr < 16 && size == 1) {

        return pcnet_aprom_writeb(d, addr, data);

    } else if (addr >= 0x10 && addr < 0x20 && size == 2) {

        return pcnet_ioport_writew(d, addr, data);

    } else if (addr >= 0x10 && addr < 0x20 && size == 4) {

        return pcnet_ioport_writel(d, addr, data);

    }

}

static void pcnet_ioport_write(void *opaque, target_phys_addr_t addr,

                               uint64_t data, unsigned size)

{

    PCNetState *d = opaque;



    if (addr < 16 && size == 1) {

        return pcnet_aprom_writeb(d, addr, data);

    } else if (addr >= 0x10 && addr < 0x20 && size == 2) {

        return pcnet_ioport_writew(d, addr, data);

    } else if (addr >= 0x10 && addr < 0x20 && size == 4) {

        return pcnet_ioport_writel(d, addr, data);

    }

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,

                               uint64_t VAR_2, unsigned VAR_3)

{

    PCNetState *d = VAR_0;



    if (VAR_1 < 16 && VAR_3 == 1) {

        return pcnet_aprom_writeb(d, VAR_1, VAR_2);

    } else if (VAR_1 >= 0x10 && VAR_1 < 0x20 && VAR_3 == 2) {

        return pcnet_ioport_writew(d, VAR_1, VAR_2);

    } else if (VAR_1 >= 0x10 && VAR_1 < 0x20 && VAR_3 == 4) {

        return pcnet_ioport_writel(d, VAR_1, VAR_2);

    }

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{ PCNetState *d = VAR_0; if (VAR_1 < 16 && VAR_3 == 1) { return pcnet_aprom_writeb(d, VAR_1, VAR_2); } else if (VAR_1 >= 0x10 && VAR_1 < 0x20 && VAR_3 == 2) { return pcnet_ioport_writew(d, VAR_1, VAR_2); } else if (VAR_1 >= 0x10 && VAR_1 < 0x20 && VAR_3 == 4) { return pcnet_ioport_writel(d, VAR_1, VAR_2); } }