int qcow2_backing_read1(BlockDriverState *bs, QEMUIOVector *qiov,

                  int64_t sector_num, int nb_sectors)

{

    int n1;

    if ((sector_num + nb_sectors) <= bs->total_sectors)

        return nb_sectors;

    if (sector_num >= bs->total_sectors)

        n1 = 0;

    else

        n1 = bs->total_sectors - sector_num;



    qemu_iovec_memset(qiov, 0, 512 * (nb_sectors - n1));



    return n1;

}

int qcow2_backing_read1(BlockDriverState *bs, QEMUIOVector *qiov,

                  int64_t sector_num, int nb_sectors)

{

    int n1;

    if ((sector_num + nb_sectors) <= bs->total_sectors)

        return nb_sectors;

    if (sector_num >= bs->total_sectors)

        n1 = 0;

    else

        n1 = bs->total_sectors - sector_num;



    qemu_iovec_memset(qiov, 0, 512 * (nb_sectors - n1));



    return n1;

}

    qemu_iovec_memset(qiov, 0, 512 * (nb_sectors - n1));
int FUNC_0(BlockDriverState *VAR_0, QEMUIOVector *VAR_1,

                  int64_t VAR_2, int VAR_3)

{

    int VAR_4;

    if ((VAR_2 + VAR_3) <= VAR_0->total_sectors)

        return VAR_3;

    if (VAR_2 >= VAR_0->total_sectors)

        VAR_4 = 0;

    else

        VAR_4 = VAR_0->total_sectors - VAR_2;



    qemu_iovec_memset(VAR_1, 0, 512 * (VAR_3 - VAR_4));



    return VAR_4;

}

int FUNC_0(BlockDriverState *VAR_0, QEMUIOVector *VAR_1,
int64_t VAR_2, int VAR_3)
{ int VAR_4; if ((VAR_2 + VAR_3) <= VAR_0->total_sectors)
return VAR_3; if (VAR_2 >= VAR_0->total_sectors)
VAR_4 = 0; else
VAR_4 = VAR_0->total_sectors - VAR_2; qemu_iovec_memset(VAR_1, 0, 512 * (VAR_3 - VAR_4)); return VAR_4; }