int64_t qcow2_alloc_clusters(BlockDriverState *bs, int64_t size)

{

    int64_t offset;

    int ret;



    BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_ALLOC);

    offset = alloc_clusters_noref(bs, size);

    if (offset < 0) {

        return offset;

    }



    ret = update_refcount(bs, offset, size, 1, QCOW2_DISCARD_NEVER);

    if (ret < 0) {

        return ret;

    }



    return offset;

}

int64_t qcow2_alloc_clusters(BlockDriverState *bs, int64_t size)

{

    int64_t offset;

    int ret;



    BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_ALLOC);

    offset = alloc_clusters_noref(bs, size);

    if (offset < 0) {

        return offset;

    }



    ret = update_refcount(bs, offset, size, 1, QCOW2_DISCARD_NEVER);

    if (ret < 0) {

        return ret;

    }



    return offset;

}

    offset = alloc_clusters_noref(bs, size);     if (offset < 0) {         return offset;     ret = update_refcount(bs, offset, size, 1, QCOW2_DISCARD_NEVER);
int64_t FUNC_0(BlockDriverState *bs, int64_t size)

{

    int64_t offset;

    int VAR_0;



    BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_ALLOC);

    offset = alloc_clusters_noref(bs, size);

    if (offset < 0) {

        return offset;

    }



    VAR_0 = update_refcount(bs, offset, size, 1, QCOW2_DISCARD_NEVER);

    if (VAR_0 < 0) {

        return VAR_0;

    }



    return offset;

}

int64_t FUNC_0(BlockDriverState *bs, int64_t size)
{ int64_t offset; int VAR_0; BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_ALLOC); offset = alloc_clusters_noref(bs, size); if (offset < 0) { return offset; } VAR_0 = update_refcount(bs, offset, size, 1, QCOW2_DISCARD_NEVER); if (VAR_0 < 0) { return VAR_0; } return offset; }