static int ram_save_target_page(MigrationState *ms, QEMUFile *f,

                                RAMBlock *block, ram_addr_t offset,

                                bool last_stage,

                                uint64_t *bytes_transferred,

                                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(dirty_ram_abs)) {

        unsigned long *unsentmap;

        if (compression_switch && migrate_use_compression()) {

            res = ram_save_compressed_page(f, block, offset,

                                           last_stage,

                                           bytes_transferred);

        } else {

            res = ram_save_page(f, block, offset, last_stage,

                                bytes_transferred);

        }



        if (res < 0) {

            return res;

        }

        unsentmap = atomic_rcu_read(&migration_bitmap_rcu)->unsentmap;

        if (unsentmap) {

            clear_bit(dirty_ram_abs >> TARGET_PAGE_BITS, unsentmap);

        }

        last_sent_block = block;

    }



    return res;

}

static int ram_save_target_page(MigrationState *ms, QEMUFile *f,

                                RAMBlock *block, ram_addr_t offset,

                                bool last_stage,

                                uint64_t *bytes_transferred,

                                ram_addr_t dirty_ram_abs)

{

    int res = 0;



    

    if (migration_bitmap_clear_dirty(dirty_ram_abs)) {

        unsigned long *unsentmap;

        if (compression_switch && migrate_use_compression()) {

            res = ram_save_compressed_page(f, block, offset,

                                           last_stage,

                                           bytes_transferred);

        } else {

            res = ram_save_page(f, block, offset, last_stage,

                                bytes_transferred);

        }



        if (res < 0) {

            return res;

        }

        unsentmap = atomic_rcu_read(&migration_bitmap_rcu)->unsentmap;

        if (unsentmap) {

            clear_bit(dirty_ram_abs >> TARGET_PAGE_BITS, unsentmap);

        }

        last_sent_block = block;

    }



    return res;

}

        last_sent_block = block;
static int FUNC_0(MigrationState *VAR_0, QEMUFile *VAR_1,

                                RAMBlock *VAR_2, ram_addr_t VAR_3,

                                bool VAR_4,

                                uint64_t *VAR_5,

                                ram_addr_t VAR_6)

{

    int VAR_7 = 0;



    

    if (migration_bitmap_clear_dirty(VAR_6)) {

        unsigned long *VAR_8;

        if (compression_switch && migrate_use_compression()) {

            VAR_7 = ram_save_compressed_page(VAR_1, VAR_2, VAR_3,

                                           VAR_4,

                                           VAR_5);

        } else {

            VAR_7 = ram_save_page(VAR_1, VAR_2, VAR_3, VAR_4,

                                VAR_5);

        }



        if (VAR_7 < 0) {

            return VAR_7;

        }

        VAR_8 = atomic_rcu_read(&migration_bitmap_rcu)->VAR_8;

        if (VAR_8) {

            clear_bit(VAR_6 >> TARGET_PAGE_BITS, VAR_8);

        }

        last_sent_block = VAR_2;

    }



    return VAR_7;

}

static int FUNC_0(MigrationState *VAR_0, QEMUFile *VAR_1,
RAMBlock *VAR_2, ram_addr_t VAR_3,
bool VAR_4,
uint64_t *VAR_5,
ram_addr_t VAR_6)
{ int VAR_7 = 0; if (migration_bitmap_clear_dirty(VAR_6)) { unsigned long *VAR_8; if (compression_switch && migrate_use_compression()) { VAR_7 = ram_save_compressed_page(VAR_1, VAR_2, VAR_3,
VAR_4,
VAR_5); } else { VAR_7 = ram_save_page(VAR_1, VAR_2, VAR_3, VAR_4,
VAR_5); } if (VAR_7 < 0) { return VAR_7; } VAR_8 = atomic_rcu_read(&migration_bitmap_rcu)->VAR_8; if (VAR_8) { clear_bit(VAR_6 >> TARGET_PAGE_BITS, VAR_8); } last_sent_block = VAR_2; } return VAR_7; }