static int bmds_aio_inflight(BlkMigDevState *bmds, int64_t sector)

{

    int64_t chunk = sector / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;



    if (sector < bdrv_nb_sectors(bmds->bs)) {

        return !!(bmds->aio_bitmap[chunk / (sizeof(unsigned long) * 8)] &

            (1UL << (chunk % (sizeof(unsigned long) * 8))));

    } else {

        return 0;

    }

}

static int bmds_aio_inflight(BlkMigDevState *bmds, int64_t sector)

{

    int64_t chunk = sector / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;



    if (sector < bdrv_nb_sectors(bmds->bs)) {

        return !!(bmds->aio_bitmap[chunk / (sizeof(unsigned long) * 8)] &

            (1UL << (chunk % (sizeof(unsigned long) * 8))));

    } else {

        return 0;

    }

}

static int FUNC_0(BlkMigDevState *VAR_0, int64_t VAR_1)

{

    int64_t chunk = VAR_1 / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;



    if (VAR_1 < bdrv_nb_sectors(VAR_0->bs)) {

        return !!(VAR_0->aio_bitmap[chunk / (sizeof(unsigned long) * 8)] &

            (1UL << (chunk % (sizeof(unsigned long) * 8))));

    } else {

        return 0;

    }

}

static int FUNC_0(BlkMigDevState *VAR_0, int64_t VAR_1)
{ int64_t chunk = VAR_1 / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK; if (VAR_1 < bdrv_nb_sectors(VAR_0->bs)) { return !!(VAR_0->aio_bitmap[chunk / (sizeof(unsigned long) * 8)] &
(1UL << (chunk % (sizeof(unsigned long) * 8)))); } else { return 0; } }