static void virtio_input_handle_sts(VirtIODevice *vdev, VirtQueue *vq)

{

    VirtIOInputClass *vic = VIRTIO_INPUT_GET_CLASS(vdev);

    VirtIOInput *vinput = VIRTIO_INPUT(vdev);

    virtio_input_event event;

    VirtQueueElement elem;

    int len;



    while (virtqueue_pop(vinput->sts, &elem)) {

        memset(&event, 0, sizeof(event));

        len = iov_to_buf(elem.out_sg, elem.out_num,

                         0, &event, sizeof(event));

        if (vic->handle_status) {

            vic->handle_status(vinput, &event);

        }

        virtqueue_push(vinput->sts, &elem, len);

    }

    virtio_notify(vdev, vinput->sts);

}

static void virtio_input_handle_sts(VirtIODevice *vdev, VirtQueue *vq)

{

    VirtIOInputClass *vic = VIRTIO_INPUT_GET_CLASS(vdev);

    VirtIOInput *vinput = VIRTIO_INPUT(vdev);

    virtio_input_event event;

    VirtQueueElement elem;

    int len;



    while (virtqueue_pop(vinput->sts, &elem)) {

        memset(&event, 0, sizeof(event));

        len = iov_to_buf(elem.out_sg, elem.out_num,

                         0, &event, sizeof(event));

        if (vic->handle_status) {

            vic->handle_status(vinput, &event);

        }

        virtqueue_push(vinput->sts, &elem, len);

    }

    virtio_notify(vdev, vinput->sts);

}

static void FUNC_0(VirtIODevice *VAR_0, VirtQueue *VAR_1)

{

    VirtIOInputClass *vic = VIRTIO_INPUT_GET_CLASS(VAR_0);

    VirtIOInput *vinput = VIRTIO_INPUT(VAR_0);

    virtio_input_event event;

    VirtQueueElement elem;

    int VAR_2;



    while (virtqueue_pop(vinput->sts, &elem)) {

        memset(&event, 0, sizeof(event));

        VAR_2 = iov_to_buf(elem.out_sg, elem.out_num,

                         0, &event, sizeof(event));

        if (vic->handle_status) {

            vic->handle_status(vinput, &event);

        }

        virtqueue_push(vinput->sts, &elem, VAR_2);

    }

    virtio_notify(VAR_0, vinput->sts);

}

static void FUNC_0(VirtIODevice *VAR_0, VirtQueue *VAR_1)
{ VirtIOInputClass *vic = VIRTIO_INPUT_GET_CLASS(VAR_0); VirtIOInput *vinput = VIRTIO_INPUT(VAR_0); virtio_input_event event; VirtQueueElement elem; int VAR_2; while (virtqueue_pop(vinput->sts, &elem)) { memset(&event, 0, sizeof(event)); VAR_2 = iov_to_buf(elem.out_sg, elem.out_num,
0, &event, sizeof(event)); if (vic->handle_status) { vic->handle_status(vinput, &event); } virtqueue_push(vinput->sts, &elem, VAR_2); } virtio_notify(VAR_0, vinput->sts); }