static int qcow2_write(BlockDriverState *bs, int64_t sector_num,

                       const uint8_t *buf, int nb_sectors)

{

    Coroutine *co;

    AioContext *aio_context = bdrv_get_aio_context(bs);

    Qcow2WriteCo data = {

        .bs         = bs,

        .sector_num = sector_num,

        .buf        = buf,

        .nb_sectors = nb_sectors,

        .ret        = -EINPROGRESS,

    };

    co = qemu_coroutine_create(qcow2_write_co_entry);

    qemu_coroutine_enter(co, &data);

    while (data.ret == -EINPROGRESS) {

        aio_poll(aio_context, true);

    }

    return data.ret;

}

static int qcow2_write(BlockDriverState *bs, int64_t sector_num,

                       const uint8_t *buf, int nb_sectors)

{

    Coroutine *co;

    AioContext *aio_context = bdrv_get_aio_context(bs);

    Qcow2WriteCo data = {

        .bs         = bs,

        .sector_num = sector_num,

        .buf        = buf,

        .nb_sectors = nb_sectors,

        .ret        = -EINPROGRESS,

    };

    co = qemu_coroutine_create(qcow2_write_co_entry);

    qemu_coroutine_enter(co, &data);

    while (data.ret == -EINPROGRESS) {

        aio_poll(aio_context, true);

    }

    return data.ret;

}

    qemu_coroutine_enter(co, &data);     co = qemu_coroutine_create(qcow2_write_co_entry);     qemu_coroutine_enter(co, &data);     qemu_coroutine_enter(co, &data);     qemu_coroutine_enter(co, &data);
static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,

                       const uint8_t *VAR_2, int VAR_3)

{

    Coroutine *co;

    AioContext *aio_context = bdrv_get_aio_context(VAR_0);

    Qcow2WriteCo data = {

        .VAR_0         = VAR_0,

        .VAR_1 = VAR_1,

        .VAR_2        = VAR_2,

        .VAR_3 = VAR_3,

        .ret        = -EINPROGRESS,

    };

    co = qemu_coroutine_create(qcow2_write_co_entry);

    qemu_coroutine_enter(co, &data);

    while (data.ret == -EINPROGRESS) {

        aio_poll(aio_context, true);

    }

    return data.ret;

}

static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
const uint8_t *VAR_2, int VAR_3)
{ Coroutine *co; AioContext *aio_context = bdrv_get_aio_context(VAR_0); Qcow2WriteCo data = { .VAR_0         = VAR_0,
.VAR_1 = VAR_1,
.VAR_2        = VAR_2,
.VAR_3 = VAR_3,
.ret        = -EINPROGRESS,
}; co = qemu_coroutine_create(qcow2_write_co_entry); qemu_coroutine_enter(co, &data); while (data.ret == -EINPROGRESS) { aio_poll(aio_context, true); } return data.ret; }