static int write_memory(DumpState *s, RAMBlock *block, ram_addr_t start,

                        int64_t size)

{

    int64_t i;

    int ret;



    for (i = 0; i < size / TARGET_PAGE_SIZE; i++) {

        ret = write_data(s, block->host + start + i * TARGET_PAGE_SIZE,

                         TARGET_PAGE_SIZE);

        if (ret < 0) {

            return ret;

        }

    }



    if ((size % TARGET_PAGE_SIZE) != 0) {

        ret = write_data(s, block->host + start + i * TARGET_PAGE_SIZE,

                         size % TARGET_PAGE_SIZE);

        if (ret < 0) {

            return ret;

        }

    }



    return 0;

}

static int write_memory(DumpState *s, RAMBlock *block, ram_addr_t start,

                        int64_t size)

{

    int64_t i;

    int ret;



    for (i = 0; i < size / TARGET_PAGE_SIZE; i++) {

        ret = write_data(s, block->host + start + i * TARGET_PAGE_SIZE,

                         TARGET_PAGE_SIZE);

        if (ret < 0) {

            return ret;

        }

    }



    if ((size % TARGET_PAGE_SIZE) != 0) {

        ret = write_data(s, block->host + start + i * TARGET_PAGE_SIZE,

                         size % TARGET_PAGE_SIZE);

        if (ret < 0) {

            return ret;

        }

    }



    return 0;

}

static int write_memory(DumpState *s, RAMBlock *block, ram_addr_t start,         ret = write_data(s, block->host + start + i * TARGET_PAGE_SIZE,         ret = write_data(s, block->host + start + i * TARGET_PAGE_SIZE,
static int FUNC_0(DumpState *VAR_0, RAMBlock *VAR_1, ram_addr_t VAR_2,

                        int64_t VAR_3)

{

    int64_t i;

    int VAR_4;



    for (i = 0; i < VAR_3 / TARGET_PAGE_SIZE; i++) {

        VAR_4 = write_data(VAR_0, VAR_1->host + VAR_2 + i * TARGET_PAGE_SIZE,

                         TARGET_PAGE_SIZE);

        if (VAR_4 < 0) {

            return VAR_4;

        }

    }



    if ((VAR_3 % TARGET_PAGE_SIZE) != 0) {

        VAR_4 = write_data(VAR_0, VAR_1->host + VAR_2 + i * TARGET_PAGE_SIZE,

                         VAR_3 % TARGET_PAGE_SIZE);

        if (VAR_4 < 0) {

            return VAR_4;

        }

    }



    return 0;

}

static int FUNC_0(DumpState *VAR_0, RAMBlock *VAR_1, ram_addr_t VAR_2,
int64_t VAR_3)
{ int64_t i; int VAR_4; for (i = 0; i < VAR_3 / TARGET_PAGE_SIZE; i++) { VAR_4 = write_data(VAR_0, VAR_1->host + VAR_2 + i * TARGET_PAGE_SIZE,
TARGET_PAGE_SIZE); if (VAR_4 < 0) { return VAR_4; } } if ((VAR_3 % TARGET_PAGE_SIZE) != 0) { VAR_4 = write_data(VAR_0, VAR_1->host + VAR_2 + i * TARGET_PAGE_SIZE,
VAR_3 % TARGET_PAGE_SIZE); if (VAR_4 < 0) { return VAR_4; } } return 0; }