static void usbredir_put_bufpq(QEMUFile *f, void *priv, size_t unused)

{

    struct endp_data *endp = priv;

    USBRedirDevice *dev = endp->dev;

    struct buf_packet *bufp;

    int i = 0;



    qemu_put_be32(f, endp->bufpq_size);

    QTAILQ_FOREACH(bufp, &endp->bufpq, next) {

        DPRINTF("put_bufpq %d/%d len %d status %d\n", i + 1, endp->bufpq_size,

                bufp->len, bufp->status);

        qemu_put_be32(f, bufp->len);

        qemu_put_be32(f, bufp->status);

        qemu_put_buffer(f, bufp->data, bufp->len);

        i++;

    }

    assert(i == endp->bufpq_size);

}

static void usbredir_put_bufpq(QEMUFile *f, void *priv, size_t unused)

{

    struct endp_data *endp = priv;

    USBRedirDevice *dev = endp->dev;

    struct buf_packet *bufp;

    int i = 0;



    qemu_put_be32(f, endp->bufpq_size);

    QTAILQ_FOREACH(bufp, &endp->bufpq, next) {

        DPRINTF("put_bufpq %d/%d len %d status %d\n", i + 1, endp->bufpq_size,

                bufp->len, bufp->status);

        qemu_put_be32(f, bufp->len);

        qemu_put_be32(f, bufp->status);

        qemu_put_buffer(f, bufp->data, bufp->len);

        i++;

    }

    assert(i == endp->bufpq_size);

}

    int i = 0;                 bufp->len, bufp->status);         qemu_put_be32(f, bufp->len);         qemu_put_buffer(f, bufp->data, bufp->len);
static void FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)

{

    struct endp_data *VAR_3 = VAR_1;

    USBRedirDevice *dev = VAR_3->dev;

    struct buf_packet *VAR_4;

    int VAR_5 = 0;



    qemu_put_be32(VAR_0, VAR_3->bufpq_size);

    QTAILQ_FOREACH(VAR_4, &VAR_3->bufpq, next) {

        DPRINTF("put_bufpq %d/%d len %d status %d\n", VAR_5 + 1, VAR_3->bufpq_size,

                VAR_4->len, VAR_4->status);

        qemu_put_be32(VAR_0, VAR_4->len);

        qemu_put_be32(VAR_0, VAR_4->status);

        qemu_put_buffer(VAR_0, VAR_4->data, VAR_4->len);

        VAR_5++;

    }

    assert(VAR_5 == VAR_3->bufpq_size);

}

static void FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)
{ struct endp_data *VAR_3 = VAR_1; USBRedirDevice *dev = VAR_3->dev; struct buf_packet *VAR_4; int VAR_5 = 0; qemu_put_be32(VAR_0, VAR_3->bufpq_size); QTAILQ_FOREACH(VAR_4, &VAR_3->bufpq, next) { DPRINTF("put_bufpq %d/%d len %d status %d\n", VAR_5 + 1, VAR_3->bufpq_size,
VAR_4->len, VAR_4->status); qemu_put_be32(VAR_0, VAR_4->len); qemu_put_be32(VAR_0, VAR_4->status); qemu_put_buffer(VAR_0, VAR_4->data, VAR_4->len); VAR_5++; } assert(VAR_5 == VAR_3->bufpq_size); }