e1000e_io_read(void *opaque, hwaddr addr, unsigned size)

{

    E1000EState *s = opaque;

    uint32_t idx;

    uint64_t val;



    switch (addr) {

    case E1000_IOADDR:

        trace_e1000e_io_read_addr(s->ioaddr);

        return s->ioaddr;

    case E1000_IODATA:

        if (e1000e_io_get_reg_index(s, &idx)) {

            val = e1000e_core_read(&s->core, idx, sizeof(val));

            trace_e1000e_io_read_data(idx, val);

            return val;

        }

        return 0;

    default:

        trace_e1000e_wrn_io_read_unknown(addr);

        return 0;

    }

}

e1000e_io_read(void *opaque, hwaddr addr, unsigned size)

{

    E1000EState *s = opaque;

    uint32_t idx;

    uint64_t val;



    switch (addr) {

    case E1000_IOADDR:

        trace_e1000e_io_read_addr(s->ioaddr);

        return s->ioaddr;

    case E1000_IODATA:

        if (e1000e_io_get_reg_index(s, &idx)) {

            val = e1000e_core_read(&s->core, idx, sizeof(val));

            trace_e1000e_io_read_data(idx, val);

            return val;

        }

        return 0;

    default:

        trace_e1000e_wrn_io_read_unknown(addr);

        return 0;

    }

}

    uint32_t idx;     uint32_t idx;
FUNC_0(void *VAR_0, hwaddr VAR_1, unsigned VAR_2)

{

    E1000EState *s = VAR_0;

    uint32_t idx;

    uint64_t val;



    switch (VAR_1) {

    case E1000_IOADDR:

        trace_e1000e_io_read_addr(s->ioaddr);

        return s->ioaddr;

    case E1000_IODATA:

        if (e1000e_io_get_reg_index(s, &idx)) {

            val = e1000e_core_read(&s->core, idx, sizeof(val));

            trace_e1000e_io_read_data(idx, val);

            return val;

        }

        return 0;

    default:

        trace_e1000e_wrn_io_read_unknown(VAR_1);

        return 0;

    }

}

FUNC_0(void *VAR_0, hwaddr VAR_1, unsigned VAR_2)
{ E1000EState *s = VAR_0; uint32_t idx; uint64_t val; switch (VAR_1) { case E1000_IOADDR:
trace_e1000e_io_read_addr(s->ioaddr); return s->ioaddr; case E1000_IODATA:
if (e1000e_io_get_reg_index(s, &idx)) { val = e1000e_core_read(&s->core, idx, sizeof(val)); trace_e1000e_io_read_data(idx, val); return val; } return 0; default:
trace_e1000e_wrn_io_read_unknown(VAR_1); return 0; } }