int bdrv_dirty_bitmap_get_meta(BlockDriverState *bs,

                               BdrvDirtyBitmap *bitmap, int64_t sector,

                               int nb_sectors)

{

    uint64_t i;

    int sectors_per_bit = 1 << hbitmap_granularity(bitmap->meta);



    /* To optimize: we can make hbitmap to internally check the range in a

     * coarse level, or at least do it word by word. */

    for (i = sector; i < sector + nb_sectors; i += sectors_per_bit) {

        if (hbitmap_get(bitmap->meta, i)) {

            return true;

        }

    }

    return false;

}

int bdrv_dirty_bitmap_get_meta(BlockDriverState *bs,

                               BdrvDirtyBitmap *bitmap, int64_t sector,

                               int nb_sectors)

{

    uint64_t i;

    int sectors_per_bit = 1 << hbitmap_granularity(bitmap->meta);



    



    for (i = sector; i < sector + nb_sectors; i += sectors_per_bit) {

        if (hbitmap_get(bitmap->meta, i)) {

            return true;

        }

    }

    return false;

}

int FUNC_0(BlockDriverState *VAR_0,

                               BdrvDirtyBitmap *VAR_1, int64_t VAR_2,

                               int VAR_3)

{

    uint64_t i;

    int VAR_4 = 1 << hbitmap_granularity(VAR_1->meta);



    



    for (i = VAR_2; i < VAR_2 + VAR_3; i += VAR_4) {

        if (hbitmap_get(VAR_1->meta, i)) {

            return true;

        }

    }

    return false;

}

int FUNC_0(BlockDriverState *VAR_0,
BdrvDirtyBitmap *VAR_1, int64_t VAR_2,
int VAR_3)
{ uint64_t i; int VAR_4 = 1 << hbitmap_granularity(VAR_1->meta); for (i = VAR_2; i < VAR_2 + VAR_3; i += VAR_4) { if (hbitmap_get(VAR_1->meta, i)) { return true; } } return false; }