static int raw_write(BlockDriverState *bs, int64_t sector_num,

                     const uint8_t *buf, int nb_sectors)

{

    if (check_write_unsafe(bs, sector_num, buf, nb_sectors)) {

        int ret;



        ret = raw_write_scrubbed_bootsect(bs, buf);

        if (ret < 0) {

            return ret;

        }



        ret = bdrv_write(bs->file, 1, buf + 512, nb_sectors - 1);

        if (ret < 0) {

            return ret;

        }



        return ret + 512;

    }



    return bdrv_write(bs->file, sector_num, buf, nb_sectors);

}

static int raw_write(BlockDriverState *bs, int64_t sector_num,

                     const uint8_t *buf, int nb_sectors)

{

    if (check_write_unsafe(bs, sector_num, buf, nb_sectors)) {

        int ret;



        ret = raw_write_scrubbed_bootsect(bs, buf);

        if (ret < 0) {

            return ret;

        }



        ret = bdrv_write(bs->file, 1, buf + 512, nb_sectors - 1);

        if (ret < 0) {

            return ret;

        }



        return ret + 512;

    }



    return bdrv_write(bs->file, sector_num, buf, nb_sectors);

}

    if (check_write_unsafe(bs, sector_num, buf, nb_sectors)) {         int ret;         ret = raw_write_scrubbed_bootsect(bs, buf);         if (ret < 0) {             return ret;         ret = bdrv_write(bs->file, 1, buf + 512, nb_sectors - 1);         if (ret < 0) {             return ret;         return ret + 512;         int ret;         if (ret < 0) {
static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,

                     const uint8_t *VAR_2, int VAR_3)

{

    if (check_write_unsafe(VAR_0, VAR_1, VAR_2, VAR_3)) {

        int VAR_4;



        VAR_4 = raw_write_scrubbed_bootsect(VAR_0, VAR_2);

        if (VAR_4 < 0) {

            return VAR_4;

        }



        VAR_4 = bdrv_write(VAR_0->file, 1, VAR_2 + 512, VAR_3 - 1);

        if (VAR_4 < 0) {

            return VAR_4;

        }



        return VAR_4 + 512;

    }



    return bdrv_write(VAR_0->file, VAR_1, VAR_2, VAR_3);

}

static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
const uint8_t *VAR_2, int VAR_3)
{ if (check_write_unsafe(VAR_0, VAR_1, VAR_2, VAR_3)) { int VAR_4; VAR_4 = raw_write_scrubbed_bootsect(VAR_0, VAR_2); if (VAR_4 < 0) { return VAR_4; } VAR_4 = bdrv_write(VAR_0->file, 1, VAR_2 + 512, VAR_3 - 1); if (VAR_4 < 0) { return VAR_4; } return VAR_4 + 512; } return bdrv_write(VAR_0->file, VAR_1, VAR_2, VAR_3); }