static inline int is_bit_set(BlockDriverState *bs, int64_t bitnum)

{

    uint64_t offset = sizeof(struct cow_header_v2) + bitnum / 8;

    uint8_t bitmap;



    if (bdrv_pread(bs->file, offset, &bitmap, sizeof(bitmap)) !=

	    sizeof(bitmap)) {

       return -errno;

    }



    return !!(bitmap & (1 << (bitnum % 8)));

}

static inline int is_bit_set(BlockDriverState *bs, int64_t bitnum)

{

    uint64_t offset = sizeof(struct cow_header_v2) + bitnum / 8;

    uint8_t bitmap;



    if (bdrv_pread(bs->file, offset, &bitmap, sizeof(bitmap)) !=

	    sizeof(bitmap)) {

       return -errno;

    }



    return !!(bitmap & (1 << (bitnum % 8)));

}

    if (bdrv_pread(bs->file, offset, &bitmap, sizeof(bitmap)) != 	    sizeof(bitmap)) {        return -errno; 	    sizeof(bitmap)) {        return -errno;     if (bdrv_pread(bs->file, offset, &bitmap, sizeof(bitmap)) != 	    sizeof(bitmap)) {        return -errno;
static inline int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)

{

    uint64_t offset = sizeof(struct cow_header_v2) + VAR_1 / 8;

    uint8_t bitmap;



    if (bdrv_pread(VAR_0->file, offset, &bitmap, sizeof(bitmap)) !=

	    sizeof(bitmap)) {

       return -errno;

    }



    return !!(bitmap & (1 << (VAR_1 % 8)));

}

static inline int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)
{ uint64_t offset = sizeof(struct cow_header_v2) + VAR_1 / 8; uint8_t bitmap; if (bdrv_pread(VAR_0->file, offset, &bitmap, sizeof(bitmap)) !=
sizeof(bitmap)) { return -errno; } return !!(bitmap & (1 << (VAR_1 % 8))); }