static int ram_save_host_page(RAMState *rs, PageSearchStatus *pss,

                              bool last_stage)

{

    int tmppages, pages = 0;

    size_t pagesize_bits =

        qemu_ram_pagesize(pss->block) >> TARGET_PAGE_BITS;



    do {

        tmppages = ram_save_target_page(rs, pss, last_stage);

        if (tmppages < 0) {

            return tmppages;

        }



        pages += tmppages;

        pss->page++;

    } while (pss->page & (pagesize_bits - 1));



    /* The offset we leave with is the last one we looked at */

    pss->page--;

    return pages;

}

static int ram_save_host_page(RAMState *rs, PageSearchStatus *pss,

                              bool last_stage)

{

    int tmppages, pages = 0;

    size_t pagesize_bits =

        qemu_ram_pagesize(pss->block) >> TARGET_PAGE_BITS;



    do {

        tmppages = ram_save_target_page(rs, pss, last_stage);

        if (tmppages < 0) {

            return tmppages;

        }



        pages += tmppages;

        pss->page++;

    } while (pss->page & (pagesize_bits - 1));



    

    pss->page--;

    return pages;

}

    } while (pss->page & (pagesize_bits - 1));
static int FUNC_0(RAMState *VAR_0, PageSearchStatus *VAR_1,

                              bool VAR_2)

{

    int VAR_3, VAR_4 = 0;

    size_t pagesize_bits =

        qemu_ram_pagesize(VAR_1->block) >> TARGET_PAGE_BITS;



    do {

        VAR_3 = ram_save_target_page(VAR_0, VAR_1, VAR_2);

        if (VAR_3 < 0) {

            return VAR_3;

        }



        VAR_4 += VAR_3;

        VAR_1->page++;

    } while (VAR_1->page & (pagesize_bits - 1));



    

    VAR_1->page--;

    return VAR_4;

}

static int FUNC_0(RAMState *VAR_0, PageSearchStatus *VAR_1,
bool VAR_2)
{ int VAR_3, VAR_4 = 0; size_t pagesize_bits =
qemu_ram_pagesize(VAR_1->block) >> TARGET_PAGE_BITS; do { VAR_3 = ram_save_target_page(VAR_0, VAR_1, VAR_2); if (VAR_3 < 0) { return VAR_3; } VAR_4 += VAR_3; VAR_1->page++; } while (VAR_1->page & (pagesize_bits - 1)); VAR_1->page--; return VAR_4; }