static inline void flash_sync_area(Flash *s, int64_t off, int64_t len)

{

    int64_t start, end, nb_sectors;

    QEMUIOVector iov;



    if (!s->bdrv || bdrv_is_read_only(s->bdrv)) {

        return;

    }



    assert(!(len % BDRV_SECTOR_SIZE));

    start = off / BDRV_SECTOR_SIZE;

    end = (off + len) / BDRV_SECTOR_SIZE;

    nb_sectors = end - start;

    qemu_iovec_init(&iov, 1);

    qemu_iovec_add(&iov, s->storage + (start * BDRV_SECTOR_SIZE),

                                        nb_sectors * BDRV_SECTOR_SIZE);

    bdrv_aio_writev(s->bdrv, start, &iov, nb_sectors, bdrv_sync_complete, NULL);

}

static inline void flash_sync_area(Flash *s, int64_t off, int64_t len)

{

    int64_t start, end, nb_sectors;

    QEMUIOVector iov;



    if (!s->bdrv || bdrv_is_read_only(s->bdrv)) {

        return;

    }



    assert(!(len % BDRV_SECTOR_SIZE));

    start = off / BDRV_SECTOR_SIZE;

    end = (off + len) / BDRV_SECTOR_SIZE;

    nb_sectors = end - start;

    qemu_iovec_init(&iov, 1);

    qemu_iovec_add(&iov, s->storage + (start * BDRV_SECTOR_SIZE),

                                        nb_sectors * BDRV_SECTOR_SIZE);

    bdrv_aio_writev(s->bdrv, start, &iov, nb_sectors, bdrv_sync_complete, NULL);

}

static inline void FUNC_0(Flash *VAR_0, int64_t VAR_1, int64_t VAR_2)

{

    int64_t start, end, nb_sectors;

    QEMUIOVector iov;



    if (!VAR_0->bdrv || bdrv_is_read_only(VAR_0->bdrv)) {

        return;

    }



    assert(!(VAR_2 % BDRV_SECTOR_SIZE));

    start = VAR_1 / BDRV_SECTOR_SIZE;

    end = (VAR_1 + VAR_2) / BDRV_SECTOR_SIZE;

    nb_sectors = end - start;

    qemu_iovec_init(&iov, 1);

    qemu_iovec_add(&iov, VAR_0->storage + (start * BDRV_SECTOR_SIZE),

                                        nb_sectors * BDRV_SECTOR_SIZE);

    bdrv_aio_writev(VAR_0->bdrv, start, &iov, nb_sectors, bdrv_sync_complete, NULL);

}

static inline void FUNC_0(Flash *VAR_0, int64_t VAR_1, int64_t VAR_2)
{ int64_t start, end, nb_sectors; QEMUIOVector iov; if (!VAR_0->bdrv || bdrv_is_read_only(VAR_0->bdrv)) { return; } assert(!(VAR_2 % BDRV_SECTOR_SIZE)); start = VAR_1 / BDRV_SECTOR_SIZE; end = (VAR_1 + VAR_2) / BDRV_SECTOR_SIZE; nb_sectors = end - start; qemu_iovec_init(&iov, 1); qemu_iovec_add(&iov, VAR_0->storage + (start * BDRV_SECTOR_SIZE),
nb_sectors * BDRV_SECTOR_SIZE); bdrv_aio_writev(VAR_0->bdrv, start, &iov, nb_sectors, bdrv_sync_complete, NULL); }