static int vhost_user_get_u64(struct vhost_dev *dev, int request, uint64_t *u64)

{

    VhostUserMsg msg = {

        .request = request,

        .flags = VHOST_USER_VERSION,

    };



    if (vhost_user_one_time_request(request) && dev->vq_index != 0) {

        return 0;

    }



    vhost_user_write(dev, &msg, NULL, 0);



    if (vhost_user_read(dev, &msg) < 0) {

        return 0;

    }



    if (msg.request != request) {

        error_report("Received unexpected msg type. Expected %d received %d",

                     request, msg.request);

        return -1;

    }



    if (msg.size != sizeof(m.u64)) {

        error_report("Received bad msg size.");

        return -1;

    }



    *u64 = msg.u64;



    return 0;

}

static int vhost_user_get_u64(struct vhost_dev *dev, int request, uint64_t *u64)

{

    VhostUserMsg msg = {

        .request = request,

        .flags = VHOST_USER_VERSION,

    };



    if (vhost_user_one_time_request(request) && dev->vq_index != 0) {

        return 0;

    }



    vhost_user_write(dev, &msg, NULL, 0);



    if (vhost_user_read(dev, &msg) < 0) {

        return 0;

    }



    if (msg.request != request) {

        error_report("Received unexpected msg type. Expected %d received %d",

                     request, msg.request);

        return -1;

    }



    if (msg.size != sizeof(m.u64)) {

        error_report("Received bad msg size.");

        return -1;

    }



    *u64 = msg.u64;



    return 0;

}

    };     if (msg.size != sizeof(m.u64)) {     *u64 = msg.u64;
static int FUNC_0(struct vhost_dev *VAR_0, int VAR_1, uint64_t *VAR_2)

{

    VhostUserMsg msg = {

        .VAR_1 = VAR_1,

        .flags = VHOST_USER_VERSION,

    };



    if (vhost_user_one_time_request(VAR_1) && VAR_0->vq_index != 0) {

        return 0;

    }



    vhost_user_write(VAR_0, &msg, NULL, 0);



    if (vhost_user_read(VAR_0, &msg) < 0) {

        return 0;

    }



    if (msg.VAR_1 != VAR_1) {

        error_report("Received unexpected msg type. Expected %d received %d",

                     VAR_1, msg.VAR_1);

        return -1;

    }



    if (msg.size != sizeof(m.VAR_2)) {

        error_report("Received bad msg size.");

        return -1;

    }



    *VAR_2 = msg.VAR_2;



    return 0;

}

static int FUNC_0(struct vhost_dev *VAR_0, int VAR_1, uint64_t *VAR_2)
{ VhostUserMsg msg = { .VAR_1 = VAR_1,
.flags = VHOST_USER_VERSION,
}; if (vhost_user_one_time_request(VAR_1) && VAR_0->vq_index != 0) { return 0; } vhost_user_write(VAR_0, &msg, NULL, 0); if (vhost_user_read(VAR_0, &msg) < 0) { return 0; } if (msg.VAR_1 != VAR_1) { error_report("Received unexpected msg type. Expected %d received %d",
VAR_1, msg.VAR_1); return -1; } if (msg.size != sizeof(m.VAR_2)) { error_report("Received bad msg size."); return -1; } *VAR_2 = msg.VAR_2; return 0; }