bdrv_rw_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos,

                bool is_read)

{

    if (qemu_in_coroutine()) {

        return bdrv_co_rw_vmstate(bs, qiov, pos, is_read);

    } else {

        BdrvVmstateCo data = {

            .bs         = bs,

            .qiov       = qiov,

            .pos        = pos,

            .is_read    = is_read,

            .ret        = -EINPROGRESS,

        };

        Coroutine *co = qemu_coroutine_create(bdrv_co_rw_vmstate_entry, &data);



        qemu_coroutine_enter(co);

        while (data.ret == -EINPROGRESS) {

            aio_poll(bdrv_get_aio_context(bs), true);

        }

        return data.ret;

    }

}

bdrv_rw_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos,

                bool is_read)

{

    if (qemu_in_coroutine()) {

        return bdrv_co_rw_vmstate(bs, qiov, pos, is_read);

    } else {

        BdrvVmstateCo data = {

            .bs         = bs,

            .qiov       = qiov,

            .pos        = pos,

            .is_read    = is_read,

            .ret        = -EINPROGRESS,

        };

        Coroutine *co = qemu_coroutine_create(bdrv_co_rw_vmstate_entry, &data);



        qemu_coroutine_enter(co);

        while (data.ret == -EINPROGRESS) {

            aio_poll(bdrv_get_aio_context(bs), true);

        }

        return data.ret;

    }

}

        qemu_coroutine_enter(co);         qemu_coroutine_enter(co);         qemu_coroutine_enter(co);         qemu_coroutine_enter(co);         qemu_coroutine_enter(co);         qemu_coroutine_enter(co);
FUNC_0(BlockDriverState *VAR_0, QEMUIOVector *VAR_1, int64_t VAR_2,

                bool VAR_3)

{

    if (qemu_in_coroutine()) {

        return bdrv_co_rw_vmstate(VAR_0, VAR_1, VAR_2, VAR_3);

    } else {

        BdrvVmstateCo data = {

            .VAR_0         = VAR_0,

            .VAR_1       = VAR_1,

            .VAR_2        = VAR_2,

            .VAR_3    = VAR_3,

            .ret        = -EINPROGRESS,

        };

        Coroutine *co = qemu_coroutine_create(bdrv_co_rw_vmstate_entry, &data);



        qemu_coroutine_enter(co);

        while (data.ret == -EINPROGRESS) {

            aio_poll(bdrv_get_aio_context(VAR_0), true);

        }

        return data.ret;

    }

}

FUNC_0(BlockDriverState *VAR_0, QEMUIOVector *VAR_1, int64_t VAR_2,
bool VAR_3)
{ if (qemu_in_coroutine()) { return bdrv_co_rw_vmstate(VAR_0, VAR_1, VAR_2, VAR_3); } else { BdrvVmstateCo data = { .VAR_0         = VAR_0,
.VAR_1       = VAR_1,
.VAR_2        = VAR_2,
.VAR_3    = VAR_3,
.ret        = -EINPROGRESS,
}; Coroutine *co = qemu_coroutine_create(bdrv_co_rw_vmstate_entry, &data); qemu_coroutine_enter(co); while (data.ret == -EINPROGRESS) { aio_poll(bdrv_get_aio_context(VAR_0), true); } return data.ret; } }