static int do_compress_ram_page(QEMUFile *f, RAMBlock *block,

                                ram_addr_t offset)

{

    RAMState *rs = &ram_state;

    int bytes_sent, blen;

    uint8_t *p = block->host + (offset & TARGET_PAGE_MASK);



    bytes_sent = save_page_header(rs, block, offset |

                                  RAM_SAVE_FLAG_COMPRESS_PAGE);

    blen = qemu_put_compression_data(f, p, TARGET_PAGE_SIZE,

                                     migrate_compress_level());

    if (blen < 0) {

        bytes_sent = 0;

        qemu_file_set_error(migrate_get_current()->to_dst_file, blen);

        error_report("compressed data failed!");

    } else {

        bytes_sent += blen;

        ram_release_pages(block->idstr, offset & TARGET_PAGE_MASK, 1);

    }



    return bytes_sent;

}

static int do_compress_ram_page(QEMUFile *f, RAMBlock *block,

                                ram_addr_t offset)

{

    RAMState *rs = &ram_state;

    int bytes_sent, blen;

    uint8_t *p = block->host + (offset & TARGET_PAGE_MASK);



    bytes_sent = save_page_header(rs, block, offset |

                                  RAM_SAVE_FLAG_COMPRESS_PAGE);

    blen = qemu_put_compression_data(f, p, TARGET_PAGE_SIZE,

                                     migrate_compress_level());

    if (blen < 0) {

        bytes_sent = 0;

        qemu_file_set_error(migrate_get_current()->to_dst_file, blen);

        error_report("compressed data failed!");

    } else {

        bytes_sent += blen;

        ram_release_pages(block->idstr, offset & TARGET_PAGE_MASK, 1);

    }



    return bytes_sent;

}

    bytes_sent = save_page_header(rs, block, offset |
static int FUNC_0(QEMUFile *VAR_0, RAMBlock *VAR_1,

                                ram_addr_t VAR_2)

{

    RAMState *rs = &ram_state;

    int VAR_3, VAR_4;

    uint8_t *p = VAR_1->host + (VAR_2 & TARGET_PAGE_MASK);



    VAR_3 = save_page_header(rs, VAR_1, VAR_2 |

                                  RAM_SAVE_FLAG_COMPRESS_PAGE);

    VAR_4 = qemu_put_compression_data(VAR_0, p, TARGET_PAGE_SIZE,

                                     migrate_compress_level());

    if (VAR_4 < 0) {

        VAR_3 = 0;

        qemu_file_set_error(migrate_get_current()->to_dst_file, VAR_4);

        error_report("compressed data failed!");

    } else {

        VAR_3 += VAR_4;

        ram_release_pages(VAR_1->idstr, VAR_2 & TARGET_PAGE_MASK, 1);

    }



    return VAR_3;

}

static int FUNC_0(QEMUFile *VAR_0, RAMBlock *VAR_1,
ram_addr_t VAR_2)
{ RAMState *rs = &ram_state; int VAR_3, VAR_4; uint8_t *p = VAR_1->host + (VAR_2 & TARGET_PAGE_MASK); VAR_3 = save_page_header(rs, VAR_1, VAR_2 |
RAM_SAVE_FLAG_COMPRESS_PAGE); VAR_4 = qemu_put_compression_data(VAR_0, p, TARGET_PAGE_SIZE,
migrate_compress_level()); if (VAR_4 < 0) { VAR_3 = 0; qemu_file_set_error(migrate_get_current()->to_dst_file, VAR_4); error_report("compressed data failed!"); } else { VAR_3 += VAR_4; ram_release_pages(VAR_1->idstr, VAR_2 & TARGET_PAGE_MASK, 1); } return VAR_3; }