static ram_addr_t get_start_block(DumpState *s)

{

    RAMBlock *block;



    if (!s->has_filter) {

        s->block = QTAILQ_FIRST(&ram_list.blocks);

        return 0;

    }



    QTAILQ_FOREACH(block, &ram_list.blocks, next) {

        if (block->offset >= s->begin + s->length ||

            block->offset + block->length <= s->begin) {

            /* This block is out of the range */

            continue;

        }



        s->block = block;

        if (s->begin > block->offset) {

            s->start = s->begin - block->offset;

        } else {

            s->start = 0;

        }

        return s->start;

    }



    return -1;

}

static ram_addr_t get_start_block(DumpState *s)

{

    RAMBlock *block;



    if (!s->has_filter) {

        s->block = QTAILQ_FIRST(&ram_list.blocks);

        return 0;

    }



    QTAILQ_FOREACH(block, &ram_list.blocks, next) {

        if (block->offset >= s->begin + s->length ||

            block->offset + block->length <= s->begin) {

            

            continue;

        }



        s->block = block;

        if (s->begin > block->offset) {

            s->start = s->begin - block->offset;

        } else {

            s->start = 0;

        }

        return s->start;

    }



    return -1;

}

    RAMBlock *block;     RAMBlock *block;     QTAILQ_FOREACH(block, &ram_list.blocks, next) {         s->block = block;     RAMBlock *block;     RAMBlock *block;         s->block = QTAILQ_FIRST(&ram_list.blocks);     QTAILQ_FOREACH(block, &ram_list.blocks, next) {         if (block->offset >= s->begin + s->length ||             block->offset + block->length <= s->begin) {         s->block = block;         if (s->begin > block->offset) {             s->start = s->begin - block->offset;     RAMBlock *block;     QTAILQ_FOREACH(block, &ram_list.blocks, next) {     RAMBlock *block;     QTAILQ_FOREACH(block, &ram_list.blocks, next) {     RAMBlock *block;
static ram_addr_t FUNC_0(DumpState *s)

{

    RAMBlock *block;



    if (!s->has_filter) {

        s->block = QTAILQ_FIRST(&ram_list.blocks);

        return 0;

    }



    QTAILQ_FOREACH(block, &ram_list.blocks, next) {

        if (block->offset >= s->begin + s->length ||

            block->offset + block->length <= s->begin) {

            

            continue;

        }



        s->block = block;

        if (s->begin > block->offset) {

            s->start = s->begin - block->offset;

        } else {

            s->start = 0;

        }

        return s->start;

    }



    return -1;

}

static ram_addr_t FUNC_0(DumpState *s)
{ RAMBlock *block; if (!s->has_filter) { s->block = QTAILQ_FIRST(&ram_list.blocks); return 0; } QTAILQ_FOREACH(block, &ram_list.blocks, next) { if (block->offset >= s->begin + s->length ||
block->offset + block->length <= s->begin) { continue; } s->block = block; if (s->begin > block->offset) { s->start = s->begin - block->offset; } else { s->start = 0; } return s->start; } return -1; }