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

                                bool last_stage, ram_addr_t dirty_ram_abs)

{

    int res = 0;



    /* Check the pages is dirty and if it is send it */

    if (migration_bitmap_clear_dirty(rs, dirty_ram_abs)) {

        unsigned long *unsentmap;

        /*

         * If xbzrle is on, stop using the data compression after first

         * round of migration even if compression is enabled. In theory,

         * xbzrle can do better than compression.

         */



        if (migrate_use_compression()

            && (rs->ram_bulk_stage || !migrate_use_xbzrle())) {

            res = ram_save_compressed_page(rs, pss, last_stage);

        } else {

            res = ram_save_page(rs, pss, last_stage);

        }



        if (res < 0) {

            return res;

        }

        unsentmap = atomic_rcu_read(&rs->ram_bitmap)->unsentmap;

        if (unsentmap) {

            clear_bit(dirty_ram_abs >> TARGET_PAGE_BITS, unsentmap);

        }

    }



    return res;

}

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

                                bool last_stage, ram_addr_t dirty_ram_abs)

{

    int res = 0;



    

    if (migration_bitmap_clear_dirty(rs, dirty_ram_abs)) {

        unsigned long *unsentmap;

        











        if (migrate_use_compression()

            && (rs->ram_bulk_stage || !migrate_use_xbzrle())) {

            res = ram_save_compressed_page(rs, pss, last_stage);

        } else {

            res = ram_save_page(rs, pss, last_stage);

        }



        if (res < 0) {

            return res;

        }

        unsentmap = atomic_rcu_read(&rs->ram_bitmap)->unsentmap;

        if (unsentmap) {

            clear_bit(dirty_ram_abs >> TARGET_PAGE_BITS, unsentmap);

        }

    }



    return res;

}

                                bool last_stage, ram_addr_t dirty_ram_abs)     if (migration_bitmap_clear_dirty(rs, dirty_ram_abs)) {             clear_bit(dirty_ram_abs >> TARGET_PAGE_BITS, unsentmap);
static int FUNC_0(RAMState *VAR_0, PageSearchStatus *VAR_1,

                                bool VAR_2, ram_addr_t VAR_3)

{

    int VAR_4 = 0;



    

    if (migration_bitmap_clear_dirty(VAR_0, VAR_3)) {

        unsigned long *VAR_5;

        











        if (migrate_use_compression()

            && (VAR_0->ram_bulk_stage || !migrate_use_xbzrle())) {

            VAR_4 = ram_save_compressed_page(VAR_0, VAR_1, VAR_2);

        } else {

            VAR_4 = ram_save_page(VAR_0, VAR_1, VAR_2);

        }



        if (VAR_4 < 0) {

            return VAR_4;

        }

        VAR_5 = atomic_rcu_read(&VAR_0->ram_bitmap)->VAR_5;

        if (VAR_5) {

            clear_bit(VAR_3 >> TARGET_PAGE_BITS, VAR_5);

        }

    }



    return VAR_4;

}

static int FUNC_0(RAMState *VAR_0, PageSearchStatus *VAR_1,
bool VAR_2, ram_addr_t VAR_3)
{ int VAR_4 = 0; if (migration_bitmap_clear_dirty(VAR_0, VAR_3)) { unsigned long *VAR_5; if (migrate_use_compression()
&& (VAR_0->ram_bulk_stage || !migrate_use_xbzrle())) { VAR_4 = ram_save_compressed_page(VAR_0, VAR_1, VAR_2); } else { VAR_4 = ram_save_page(VAR_0, VAR_1, VAR_2); } if (VAR_4 < 0) { return VAR_4; } VAR_5 = atomic_rcu_read(&VAR_0->ram_bitmap)->VAR_5; if (VAR_5) { clear_bit(VAR_3 >> TARGET_PAGE_BITS, VAR_5); } } return VAR_4; }