static void usb_serial_read(void *opaque, const uint8_t *buf, int size)

{

    USBSerialState *s = opaque;

    int first_size = RECV_BUF - s->recv_ptr;

    if (first_size > size)

        first_size = size;

    memcpy(s->recv_buf + s->recv_ptr + s->recv_used, buf, first_size);

    if (size > first_size)

        memcpy(s->recv_buf, buf + first_size, size - first_size);

    s->recv_used += size;

}

static void usb_serial_read(void *opaque, const uint8_t *buf, int size)

{

    USBSerialState *s = opaque;

    int first_size = RECV_BUF - s->recv_ptr;

    if (first_size > size)

        first_size = size;

    memcpy(s->recv_buf + s->recv_ptr + s->recv_used, buf, first_size);

    if (size > first_size)

        memcpy(s->recv_buf, buf + first_size, size - first_size);

    s->recv_used += size;

}

    int first_size = RECV_BUF - s->recv_ptr;     if (first_size > size)         first_size = size;     memcpy(s->recv_buf + s->recv_ptr + s->recv_used, buf, first_size);     if (size > first_size)         memcpy(s->recv_buf, buf + first_size, size - first_size);
static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)

{

    USBSerialState *s = VAR_0;

    int VAR_3 = RECV_BUF - s->recv_ptr;

    if (VAR_3 > VAR_2)

        VAR_3 = VAR_2;

    memcpy(s->recv_buf + s->recv_ptr + s->recv_used, VAR_1, VAR_3);

    if (VAR_2 > VAR_3)

        memcpy(s->recv_buf, VAR_1 + VAR_3, VAR_2 - VAR_3);

    s->recv_used += VAR_2;

}

static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)
{ USBSerialState *s = VAR_0; int VAR_3 = RECV_BUF - s->recv_ptr; if (VAR_3 > VAR_2)
VAR_3 = VAR_2; memcpy(s->recv_buf + s->recv_ptr + s->recv_used, VAR_1, VAR_3); if (VAR_2 > VAR_3)
memcpy(s->recv_buf, VAR_1 + VAR_3, VAR_2 - VAR_3); s->recv_used += VAR_2; }