static int64_t alloc_clusters_noref(BlockDriverState *bs, int64_t size)

{

    BDRVQcowState *s = bs->opaque;

    int i, nb_clusters, refcount;



    nb_clusters = size_to_clusters(s, size);

retry:

    for(i = 0; i < nb_clusters; i++) {

        int64_t next_cluster_index = s->free_cluster_index++;

        refcount = get_refcount(bs, next_cluster_index);



        if (refcount < 0) {

            return refcount;

        } else if (refcount != 0) {

            goto retry;

        }

    }

#ifdef DEBUG_ALLOC2

    fprintf(stderr, "alloc_clusters: size=%" PRId64 " -> %" PRId64 "\n",

            size,

            (s->free_cluster_index - nb_clusters) << s->cluster_bits);

#endif

    return (s->free_cluster_index - nb_clusters) << s->cluster_bits;

}

static int64_t alloc_clusters_noref(BlockDriverState *bs, int64_t size)

{

    BDRVQcowState *s = bs->opaque;

    int i, nb_clusters, refcount;



    nb_clusters = size_to_clusters(s, size);

retry:

    for(i = 0; i < nb_clusters; i++) {

        int64_t next_cluster_index = s->free_cluster_index++;

        refcount = get_refcount(bs, next_cluster_index);



        if (refcount < 0) {

            return refcount;

        } else if (refcount != 0) {

            goto retry;

        }

    }

#ifdef DEBUG_ALLOC2

    fprintf(stderr, "alloc_clusters: size=%" PRId64 " -> %" PRId64 "\n",

            size,

            (s->free_cluster_index - nb_clusters) << s->cluster_bits);

#endif

    return (s->free_cluster_index - nb_clusters) << s->cluster_bits;

}

static int64_t alloc_clusters_noref(BlockDriverState *bs, int64_t size)     int i, nb_clusters, refcount;         int64_t next_cluster_index = s->free_cluster_index++;
static int64_t FUNC_0(BlockDriverState *bs, int64_t size)

{

    BDRVQcowState *s = bs->opaque;

    int VAR_0, VAR_1, VAR_2;



    VAR_1 = size_to_clusters(s, size);

retry:

    for(VAR_0 = 0; VAR_0 < VAR_1; VAR_0++) {

        int64_t next_cluster_index = s->free_cluster_index++;

        VAR_2 = get_refcount(bs, next_cluster_index);



        if (VAR_2 < 0) {

            return VAR_2;

        } else if (VAR_2 != 0) {

            goto retry;

        }

    }

#ifdef DEBUG_ALLOC2

    fprintf(stderr, "alloc_clusters: size=%" PRId64 " -> %" PRId64 "\n",

            size,

            (s->free_cluster_index - VAR_1) << s->cluster_bits);

#endif

    return (s->free_cluster_index - VAR_1) << s->cluster_bits;

}

static int64_t FUNC_0(BlockDriverState *bs, int64_t size)
{ BDRVQcowState *s = bs->opaque; int VAR_0, VAR_1, VAR_2; VAR_1 = size_to_clusters(s, size); retry:
for(VAR_0 = 0; VAR_0 < VAR_1; VAR_0++) { int64_t next_cluster_index = s->free_cluster_index++; VAR_2 = get_refcount(bs, next_cluster_index); if (VAR_2 < 0) { return VAR_2; } else if (VAR_2 != 0) { goto retry; } } #ifdef DEBUG_ALLOC2
fprintf(stderr, "alloc_clusters: size=%" PRId64 " -> %" PRId64 "\n",
size,
(s->free_cluster_index - VAR_1) << s->cluster_bits); #endif
return (s->free_cluster_index - VAR_1) << s->cluster_bits; }