int bdrv_get_dirty(BlockDriverState *bs, int64_t sector)

{

    int64_t chunk = sector / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;



    if (bs->dirty_bitmap != NULL &&

        (sector << BDRV_SECTOR_BITS) <= bdrv_getlength(bs)) {

        return bs->dirty_bitmap[chunk];

    } else {

        return 0;

    }

}

int bdrv_get_dirty(BlockDriverState *bs, int64_t sector)

{

    int64_t chunk = sector / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;



    if (bs->dirty_bitmap != NULL &&

        (sector << BDRV_SECTOR_BITS) <= bdrv_getlength(bs)) {

        return bs->dirty_bitmap[chunk];

    } else {

        return 0;

    }

}

    if (bs->dirty_bitmap != NULL &&         (sector << BDRV_SECTOR_BITS) <= bdrv_getlength(bs)) {         return bs->dirty_bitmap[chunk];
int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)

{

    int64_t chunk = VAR_1 / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;



    if (VAR_0->dirty_bitmap != NULL &&

        (VAR_1 << BDRV_SECTOR_BITS) <= bdrv_getlength(VAR_0)) {

        return VAR_0->dirty_bitmap[chunk];

    } else {

        return 0;

    }

}

int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)
{ int64_t chunk = VAR_1 / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK; if (VAR_0->dirty_bitmap != NULL &&
(VAR_1 << BDRV_SECTOR_BITS) <= bdrv_getlength(VAR_0)) { return VAR_0->dirty_bitmap[chunk]; } else { return 0; } }