void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem)

{

    virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, &elem->in_num,

                        MIN(ARRAY_SIZE(elem->in_sg), ARRAY_SIZE(elem->in_addr)),

                        1);

    virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, &elem->out_num,

                        MIN(ARRAY_SIZE(elem->out_sg),

                        ARRAY_SIZE(elem->out_addr)),

                        0);

}

void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem)

{

    virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, &elem->in_num,

                        MIN(ARRAY_SIZE(elem->in_sg), ARRAY_SIZE(elem->in_addr)),

                        1);

    virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, &elem->out_num,

                        MIN(ARRAY_SIZE(elem->out_sg),

                        ARRAY_SIZE(elem->out_addr)),

                        0);

}

void FUNC_0(VirtIODevice *VAR_0, VirtQueueElement *VAR_1)

{

    virtqueue_map_iovec(VAR_0, VAR_1->in_sg, VAR_1->in_addr, &VAR_1->in_num,

                        MIN(ARRAY_SIZE(VAR_1->in_sg), ARRAY_SIZE(VAR_1->in_addr)),

                        1);

    virtqueue_map_iovec(VAR_0, VAR_1->out_sg, VAR_1->out_addr, &VAR_1->out_num,

                        MIN(ARRAY_SIZE(VAR_1->out_sg),

                        ARRAY_SIZE(VAR_1->out_addr)),

                        0);

}

void FUNC_0(VirtIODevice *VAR_0, VirtQueueElement *VAR_1)
{ virtqueue_map_iovec(VAR_0, VAR_1->in_sg, VAR_1->in_addr, &VAR_1->in_num,
MIN(ARRAY_SIZE(VAR_1->in_sg), ARRAY_SIZE(VAR_1->in_addr)),
1); virtqueue_map_iovec(VAR_0, VAR_1->out_sg, VAR_1->out_addr, &VAR_1->out_num,
MIN(ARRAY_SIZE(VAR_1->out_sg),
ARRAY_SIZE(VAR_1->out_addr)),
0); }