static int ne2000_can_receive(void *opaque)

{

    NE2000State *s = opaque;

    int avail, index, boundary;

    

    if (s->cmd & E8390_STOP)

        return 0;

    index = s->curpag << 8;

    boundary = s->boundary << 8;

    if (index < boundary)

        avail = boundary - index;

    else

        avail = (s->stop - s->start) - (index - boundary);

    if (avail < (MAX_ETH_FRAME_SIZE + 4))

        return 0;

    return MAX_ETH_FRAME_SIZE;

}

static int ne2000_can_receive(void *opaque)

{

    NE2000State *s = opaque;

    int avail, index, boundary;

    

    if (s->cmd & E8390_STOP)

        return 0;

    index = s->curpag << 8;

    boundary = s->boundary << 8;

    if (index < boundary)

        avail = boundary - index;

    else

        avail = (s->stop - s->start) - (index - boundary);

    if (avail < (MAX_ETH_FRAME_SIZE + 4))

        return 0;

    return MAX_ETH_FRAME_SIZE;

}

static int ne2000_can_receive(void *opaque)     NE2000State *s = opaque;     if (s->cmd & E8390_STOP)         return 0;         return 0;     return MAX_ETH_FRAME_SIZE;
static int FUNC_0(void *VAR_0)

{

    NE2000State *s = VAR_0;

    int VAR_1, VAR_2, VAR_3;

    

    if (s->cmd & E8390_STOP)

        return 0;

    VAR_2 = s->curpag << 8;

    VAR_3 = s->VAR_3 << 8;

    if (VAR_2 < VAR_3)

        VAR_1 = VAR_3 - VAR_2;

    else

        VAR_1 = (s->stop - s->start) - (VAR_2 - VAR_3);

    if (VAR_1 < (MAX_ETH_FRAME_SIZE + 4))

        return 0;

    return MAX_ETH_FRAME_SIZE;

}

static int FUNC_0(void *VAR_0)
{ NE2000State *s = VAR_0; int VAR_1, VAR_2, VAR_3; if (s->cmd & E8390_STOP)
return 0; VAR_2 = s->curpag << 8; VAR_3 = s->VAR_3 << 8; if (VAR_2 < VAR_3)
VAR_1 = VAR_3 - VAR_2; else
VAR_1 = (s->stop - s->start) - (VAR_2 - VAR_3); if (VAR_1 < (MAX_ETH_FRAME_SIZE + 4))
return 0; return MAX_ETH_FRAME_SIZE; }