static unsigned int virtqueue_get_head(VirtQueue *vq, unsigned int idx)

{

    unsigned int head;



    /* Grab the next descriptor number they're advertising, and increment

     * the index we've seen. */

    head = vring_avail_ring(vq, idx % vq->vring.num);



    /* If their number is silly, that's a fatal mistake. */

    if (head >= vq->vring.num) {

        error_report("Guest says index %u is available", head);

        exit(1);

    }



    return head;

}

static unsigned int virtqueue_get_head(VirtQueue *vq, unsigned int idx)

{

    unsigned int head;



    



    head = vring_avail_ring(vq, idx % vq->vring.num);



    

    if (head >= vq->vring.num) {

        error_report("Guest says index %u is available", head);

        exit(1);

    }



    return head;

}

static unsigned int virtqueue_get_head(VirtQueue *vq, unsigned int idx)     unsigned int head;     head = vring_avail_ring(vq, idx % vq->vring.num);     if (head >= vq->vring.num) {         error_report("Guest says index %u is available", head);         exit(1);     return head;
static unsigned int FUNC_0(VirtQueue *VAR_0, unsigned int VAR_1)

{

    unsigned int VAR_2;



    



    VAR_2 = vring_avail_ring(VAR_0, VAR_1 % VAR_0->vring.num);



    

    if (VAR_2 >= VAR_0->vring.num) {

        error_report("Guest says index %u is available", VAR_2);

        exit(1);

    }



    return VAR_2;

}

static unsigned int FUNC_0(VirtQueue *VAR_0, unsigned int VAR_1)
{ unsigned int VAR_2; VAR_2 = vring_avail_ring(VAR_0, VAR_1 % VAR_0->vring.num); if (VAR_2 >= VAR_0->vring.num) { error_report("Guest says index %u is available", VAR_2); exit(1); } return VAR_2; }