static int dump_iterate(DumpState *s)

{

    RAMBlock *block;

    int64_t size;

    int ret;



    while (1) {

        block = s->block;



        size = block->length;

        if (s->has_filter) {

            size -= s->start;

            if (s->begin + s->length < block->offset + block->length) {

                size -= block->offset + block->length - (s->begin + s->length);

            }

        }

        ret = write_memory(s, block, s->start, size);

        if (ret == -1) {

            return ret;

        }



        ret = get_next_block(s, block);

        if (ret == 1) {

            dump_completed(s);

            return 0;

        }

    }

}

static int dump_iterate(DumpState *s)

{

    RAMBlock *block;

    int64_t size;

    int ret;



    while (1) {

        block = s->block;



        size = block->length;

        if (s->has_filter) {

            size -= s->start;

            if (s->begin + s->length < block->offset + block->length) {

                size -= block->offset + block->length - (s->begin + s->length);

            }

        }

        ret = write_memory(s, block, s->start, size);

        if (ret == -1) {

            return ret;

        }



        ret = get_next_block(s, block);

        if (ret == 1) {

            dump_completed(s);

            return 0;

        }

    }

}

    RAMBlock *block;     RAMBlock *block;             if (s->begin + s->length < block->offset + block->length) {     RAMBlock *block;         block = s->block;         size = block->length;             if (s->begin + s->length < block->offset + block->length) {                 size -= block->offset + block->length - (s->begin + s->length);     RAMBlock *block;     RAMBlock *block;     RAMBlock *block;     RAMBlock *block;
static int FUNC_0(DumpState *VAR_0)

{

    RAMBlock *block;

    int64_t size;

    int VAR_1;



    while (1) {

        block = VAR_0->block;



        size = block->length;

        if (VAR_0->has_filter) {

            size -= VAR_0->start;

            if (VAR_0->begin + VAR_0->length < block->offset + block->length) {

                size -= block->offset + block->length - (VAR_0->begin + VAR_0->length);

            }

        }

        VAR_1 = write_memory(VAR_0, block, VAR_0->start, size);

        if (VAR_1 == -1) {

            return VAR_1;

        }



        VAR_1 = get_next_block(VAR_0, block);

        if (VAR_1 == 1) {

            dump_completed(VAR_0);

            return 0;

        }

    }

}

static int FUNC_0(DumpState *VAR_0)
{ RAMBlock *block; int64_t size; int VAR_1; while (1) { block = VAR_0->block; size = block->length; if (VAR_0->has_filter) { size -= VAR_0->start; if (VAR_0->begin + VAR_0->length < block->offset + block->length) { size -= block->offset + block->length - (VAR_0->begin + VAR_0->length); } } VAR_1 = write_memory(VAR_0, block, VAR_0->start, size); if (VAR_1 == -1) { return VAR_1; } VAR_1 = get_next_block(VAR_0, block); if (VAR_1 == 1) { dump_completed(VAR_0); return 0; } } }