static void host_memory_backend_set_prealloc(Object *obj, bool value,

                                             Error **errp)

{

    Error *local_err = NULL;

    HostMemoryBackend *backend = MEMORY_BACKEND(obj);



    if (backend->force_prealloc) {

        if (value) {

            error_setg(errp,

                       "remove -mem-prealloc to use the prealloc property");

            return;

        }

    }



    if (!memory_region_size(&backend->mr)) {

        backend->prealloc = value;

        return;

    }



    if (value && !backend->prealloc) {

        int fd = memory_region_get_fd(&backend->mr);

        void *ptr = memory_region_get_ram_ptr(&backend->mr);

        uint64_t sz = memory_region_size(&backend->mr);



        os_mem_prealloc(fd, ptr, sz, &local_err);

        if (local_err) {

            error_propagate(errp, local_err);

            return;

        }

        backend->prealloc = true;

    }

}

static void host_memory_backend_set_prealloc(Object *obj, bool value,

                                             Error **errp)

{

    Error *local_err = NULL;

    HostMemoryBackend *backend = MEMORY_BACKEND(obj);



    if (backend->force_prealloc) {

        if (value) {

            error_setg(errp,

                       "remove -mem-prealloc to use the prealloc property");

            return;

        }

    }



    if (!memory_region_size(&backend->mr)) {

        backend->prealloc = value;

        return;

    }



    if (value && !backend->prealloc) {

        int fd = memory_region_get_fd(&backend->mr);

        void *ptr = memory_region_get_ram_ptr(&backend->mr);

        uint64_t sz = memory_region_size(&backend->mr);



        os_mem_prealloc(fd, ptr, sz, &local_err);

        if (local_err) {

            error_propagate(errp, local_err);

            return;

        }

        backend->prealloc = true;

    }

}

        os_mem_prealloc(fd, ptr, sz, &local_err);
static void FUNC_0(Object *VAR_0, bool VAR_1,

                                             Error **VAR_2)

{

    Error *local_err = NULL;

    HostMemoryBackend *backend = MEMORY_BACKEND(VAR_0);



    if (backend->force_prealloc) {

        if (VAR_1) {

            error_setg(VAR_2,

                       "remove -mem-prealloc to use the prealloc property");

            return;

        }

    }



    if (!memory_region_size(&backend->mr)) {

        backend->prealloc = VAR_1;

        return;

    }



    if (VAR_1 && !backend->prealloc) {

        int VAR_3 = memory_region_get_fd(&backend->mr);

        void *VAR_4 = memory_region_get_ram_ptr(&backend->mr);

        uint64_t sz = memory_region_size(&backend->mr);



        os_mem_prealloc(VAR_3, VAR_4, sz, &local_err);

        if (local_err) {

            error_propagate(VAR_2, local_err);

            return;

        }

        backend->prealloc = true;

    }

}

static void FUNC_0(Object *VAR_0, bool VAR_1,
Error **VAR_2)
{ Error *local_err = NULL; HostMemoryBackend *backend = MEMORY_BACKEND(VAR_0); if (backend->force_prealloc) { if (VAR_1) { error_setg(VAR_2,
"remove -mem-prealloc to use the prealloc property"); return; } } if (!memory_region_size(&backend->mr)) { backend->prealloc = VAR_1; return; } if (VAR_1 && !backend->prealloc) { int VAR_3 = memory_region_get_fd(&backend->mr); void *VAR_4 = memory_region_get_ram_ptr(&backend->mr); uint64_t sz = memory_region_size(&backend->mr); os_mem_prealloc(VAR_3, VAR_4, sz, &local_err); if (local_err) { error_propagate(VAR_2, local_err); return; } backend->prealloc = true; } }