static inline void *host_from_stream_offset(QEMUFile *f,

                                            ram_addr_t offset,

                                            int flags)

{

    static RAMBlock *block = NULL;

    char id[256];

    uint8_t len;



    if (flags & RAM_SAVE_FLAG_CONTINUE) {

        if (!block) {

            error_report("Ack, bad migration stream!");

            return NULL;

        }



        return memory_region_get_ram_ptr(block->mr) + offset;

    }



    len = qemu_get_byte(f);

    qemu_get_buffer(f, (uint8_t *)id, len);

    id[len] = 0;



    QTAILQ_FOREACH(block, &ram_list.blocks, next) {

        if (!strncmp(id, block->idstr, sizeof(id)))

            return memory_region_get_ram_ptr(block->mr) + offset;

    }



    error_report("Can't find block %s!", id);

    return NULL;

}

static inline void *host_from_stream_offset(QEMUFile *f,

                                            ram_addr_t offset,

                                            int flags)

{

    static RAMBlock *block = NULL;

    char id[256];

    uint8_t len;



    if (flags & RAM_SAVE_FLAG_CONTINUE) {

        if (!block) {

            error_report("Ack, bad migration stream!");

            return NULL;

        }



        return memory_region_get_ram_ptr(block->mr) + offset;

    }



    len = qemu_get_byte(f);

    qemu_get_buffer(f, (uint8_t *)id, len);

    id[len] = 0;



    QTAILQ_FOREACH(block, &ram_list.blocks, next) {

        if (!strncmp(id, block->idstr, sizeof(id)))

            return memory_region_get_ram_ptr(block->mr) + offset;

    }



    error_report("Can't find block %s!", id);

    return NULL;

}

        if (!block) {         if (!strncmp(id, block->idstr, sizeof(id)))
static inline void *FUNC_0(QEMUFile *VAR_0,

                                            ram_addr_t VAR_1,

                                            int VAR_2)

{

    static RAMBlock *VAR_3 = NULL;

    char VAR_4[256];

    uint8_t len;



    if (VAR_2 & RAM_SAVE_FLAG_CONTINUE) {

        if (!VAR_3) {

            error_report("Ack, bad migration stream!");

            return NULL;

        }



        return memory_region_get_ram_ptr(VAR_3->mr) + VAR_1;

    }



    len = qemu_get_byte(VAR_0);

    qemu_get_buffer(VAR_0, (uint8_t *)VAR_4, len);

    VAR_4[len] = 0;



    QTAILQ_FOREACH(VAR_3, &ram_list.blocks, next) {

        if (!strncmp(VAR_4, VAR_3->idstr, sizeof(VAR_4)))

            return memory_region_get_ram_ptr(VAR_3->mr) + VAR_1;

    }



    error_report("Can't find VAR_3 %s!", VAR_4);

    return NULL;

}

static inline void *FUNC_0(QEMUFile *VAR_0,
ram_addr_t VAR_1,
int VAR_2)
{ static RAMBlock *VAR_3 = NULL; char VAR_4[256]; uint8_t len; if (VAR_2 & RAM_SAVE_FLAG_CONTINUE) { if (!VAR_3) { error_report("Ack, bad migration stream!"); return NULL; } return memory_region_get_ram_ptr(VAR_3->mr) + VAR_1; } len = qemu_get_byte(VAR_0); qemu_get_buffer(VAR_0, (uint8_t *)VAR_4, len); VAR_4[len] = 0; QTAILQ_FOREACH(VAR_3, &ram_list.blocks, next) { if (!strncmp(VAR_4, VAR_3->idstr, sizeof(VAR_4)))
return memory_region_get_ram_ptr(VAR_3->mr) + VAR_1; } error_report("Can't find VAR_3 %s!", VAR_4); return NULL; }