int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,

                          const uint8_t *buf, int nb_sectors)

{

    BlockDriver *drv = bs->drv;

    int ret;



    if (!drv) {

        return -ENOMEDIUM;

    }

    if (!drv->bdrv_write_compressed) {

        return -ENOTSUP;

    }

    ret = bdrv_check_request(bs, sector_num, nb_sectors);

    if (ret < 0) {

        return ret;

    }



    assert(QLIST_EMPTY(&bs->dirty_bitmaps));



    return drv->bdrv_write_compressed(bs, sector_num, buf, nb_sectors);

}

int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,

                          const uint8_t *buf, int nb_sectors)

{

    BlockDriver *drv = bs->drv;

    int ret;



    if (!drv) {

        return -ENOMEDIUM;

    }

    if (!drv->bdrv_write_compressed) {

        return -ENOTSUP;

    }

    ret = bdrv_check_request(bs, sector_num, nb_sectors);

    if (ret < 0) {

        return ret;

    }



    assert(QLIST_EMPTY(&bs->dirty_bitmaps));



    return drv->bdrv_write_compressed(bs, sector_num, buf, nb_sectors);

}

int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,

                          const uint8_t *VAR_2, int VAR_3)

{

    BlockDriver *drv = VAR_0->drv;

    int VAR_4;



    if (!drv) {

        return -ENOMEDIUM;

    }

    if (!drv->FUNC_0) {

        return -ENOTSUP;

    }

    VAR_4 = bdrv_check_request(VAR_0, VAR_1, VAR_3);

    if (VAR_4 < 0) {

        return VAR_4;

    }



    assert(QLIST_EMPTY(&VAR_0->dirty_bitmaps));



    return drv->FUNC_0(VAR_0, VAR_1, VAR_2, VAR_3);

}

int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
const uint8_t *VAR_2, int VAR_3)
{ BlockDriver *drv = VAR_0->drv; int VAR_4; if (!drv) { return -ENOMEDIUM; } if (!drv->FUNC_0) { return -ENOTSUP; } VAR_4 = bdrv_check_request(VAR_0, VAR_1, VAR_3); if (VAR_4 < 0) { return VAR_4; } assert(QLIST_EMPTY(&VAR_0->dirty_bitmaps)); return drv->FUNC_0(VAR_0, VAR_1, VAR_2, VAR_3); }