static int bdrv_wr_badreq_sectors(BlockDriverState *bs,

                                  int64_t sector_num, int nb_sectors)

{

    if (sector_num < 0 ||

        nb_sectors < 0)

        return 1;



    if (sector_num > bs->total_sectors - nb_sectors) {

        if (bs->autogrow)

            bs->total_sectors = sector_num + nb_sectors;

        else

            return 1;

    }

    return 0;

}

static int bdrv_wr_badreq_sectors(BlockDriverState *bs,

                                  int64_t sector_num, int nb_sectors)

{

    if (sector_num < 0 ||

        nb_sectors < 0)

        return 1;



    if (sector_num > bs->total_sectors - nb_sectors) {

        if (bs->autogrow)

            bs->total_sectors = sector_num + nb_sectors;

        else

            return 1;

    }

    return 0;

}

                                  int64_t sector_num, int nb_sectors) static int bdrv_wr_badreq_sectors(BlockDriverState *bs,                                   int64_t sector_num, int nb_sectors)     if (sector_num < 0 ||         nb_sectors < 0)         return 1;     if (sector_num > bs->total_sectors - nb_sectors) {         if (bs->autogrow)             bs->total_sectors = sector_num + nb_sectors;             return 1;     return 0;         return 1;         if (bs->autogrow)             return 1;     return 0;
static int FUNC_0(BlockDriverState *VAR_0,

                                  int64_t VAR_1, int VAR_2)

{

    if (VAR_1 < 0 ||

        VAR_2 < 0)

        return 1;



    if (VAR_1 > VAR_0->total_sectors - VAR_2) {

        if (VAR_0->autogrow)

            VAR_0->total_sectors = VAR_1 + VAR_2;

        else

            return 1;

    }

    return 0;

}

static int FUNC_0(BlockDriverState *VAR_0,
int64_t VAR_1, int VAR_2)
{ if (VAR_1 < 0 ||
VAR_2 < 0)
return 1; if (VAR_1 > VAR_0->total_sectors - VAR_2) { if (VAR_0->autogrow)
VAR_0->total_sectors = VAR_1 + VAR_2; else
return 1; } return 0; }