static int check_empty_sectors(BlockBackend *blk, int64_t sect_num,

                               int sect_count, const char *filename,

                               uint8_t *buffer, bool quiet)

{

    int pnum, ret = 0;

    ret = blk_pread(blk, sect_num << BDRV_SECTOR_BITS, buffer,

                    sect_count << BDRV_SECTOR_BITS);

    if (ret < 0) {

        error_report("Error while reading offset %" PRId64 " of %s: %s",

                     sectors_to_bytes(sect_num), filename, strerror(-ret));

        return ret;

    }

    ret = is_allocated_sectors(buffer, sect_count, &pnum);

    if (ret || pnum != sect_count) {

        qprintf(quiet, "Content mismatch at offset %" PRId64 "!\n",

                sectors_to_bytes(ret ? sect_num : sect_num + pnum));

        return 1;

    }



    return 0;

}

static int check_empty_sectors(BlockBackend *blk, int64_t sect_num,

                               int sect_count, const char *filename,

                               uint8_t *buffer, bool quiet)

{

    int pnum, ret = 0;

    ret = blk_pread(blk, sect_num << BDRV_SECTOR_BITS, buffer,

                    sect_count << BDRV_SECTOR_BITS);

    if (ret < 0) {

        error_report("Error while reading offset %" PRId64 " of %s: %s",

                     sectors_to_bytes(sect_num), filename, strerror(-ret));

        return ret;

    }

    ret = is_allocated_sectors(buffer, sect_count, &pnum);

    if (ret || pnum != sect_count) {

        qprintf(quiet, "Content mismatch at offset %" PRId64 "!\n",

                sectors_to_bytes(ret ? sect_num : sect_num + pnum));

        return 1;

    }



    return 0;

}

static int FUNC_0(BlockBackend *VAR_0, int64_t VAR_1,

                               int VAR_2, const char *VAR_3,

                               uint8_t *VAR_4, bool VAR_5)

{

    int VAR_6, VAR_7 = 0;

    VAR_7 = blk_pread(VAR_0, VAR_1 << BDRV_SECTOR_BITS, VAR_4,

                    VAR_2 << BDRV_SECTOR_BITS);

    if (VAR_7 < 0) {

        error_report("Error while reading offset %" PRId64 " of %s: %s",

                     sectors_to_bytes(VAR_1), VAR_3, strerror(-VAR_7));

        return VAR_7;

    }

    VAR_7 = is_allocated_sectors(VAR_4, VAR_2, &VAR_6);

    if (VAR_7 || VAR_6 != VAR_2) {

        qprintf(VAR_5, "Content mismatch at offset %" PRId64 "!\n",

                sectors_to_bytes(VAR_7 ? VAR_1 : VAR_1 + VAR_6));

        return 1;

    }



    return 0;

}

static int FUNC_0(BlockBackend *VAR_0, int64_t VAR_1,
int VAR_2, const char *VAR_3,
uint8_t *VAR_4, bool VAR_5)
{ int VAR_6, VAR_7 = 0; VAR_7 = blk_pread(VAR_0, VAR_1 << BDRV_SECTOR_BITS, VAR_4,
VAR_2 << BDRV_SECTOR_BITS); if (VAR_7 < 0) { error_report("Error while reading offset %" PRId64 " of %s: %s",
sectors_to_bytes(VAR_1), VAR_3, strerror(-VAR_7)); return VAR_7; } VAR_7 = is_allocated_sectors(VAR_4, VAR_2, &VAR_6); if (VAR_7 || VAR_6 != VAR_2) { qprintf(VAR_5, "Content mismatch at offset %" PRId64 "!\n",
sectors_to_bytes(VAR_7 ? VAR_1 : VAR_1 + VAR_6)); return 1; } return 0; }