/* group.c generated by valac 0.56.19, the Vala compiler
 * generated from group.vala, do not modify */

#include "protonplus_core.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gee.h>
#include <glib-object.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	PROTON_PLUS_MODELS_GROUP_0_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_ID_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_TOOLS_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_INSTALLED_TOOL_INVENTORY_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	PROTON_PLUS_MODELS_GROUP_INSTALLED_TOOL_INDEX_INVALIDATED_SIGNAL,
	PROTON_PLUS_MODELS_GROUP_INSTALLED_STATE_REFRESHED_SIGNAL,
	PROTON_PLUS_MODELS_GROUP_NUM_SIGNALS
};
static guint proton_plus_models_group_signals[PROTON_PLUS_MODELS_GROUP_NUM_SIGNALS] = {0};

struct _ProtonPlusModelsGroupPrivate {
	gchar* _id;
	gchar* _title;
	gchar* _description;
	gchar* _directory;
	ProtonPlusModelsLauncher* _launcher;
	GeeLinkedList* _tools;
	ProtonPlusModelsInstalledToolInventory* _installed_tool_inventory;
};

static gint ProtonPlusModelsGroup_private_offset;
static gpointer proton_plus_models_group_parent_class = NULL;

static void proton_plus_models_group_set_id (ProtonPlusModelsGroup* self,
                                      const gchar* value);
static void proton_plus_models_group_set_installed_tool_inventory (ProtonPlusModelsGroup* self,
                                                            ProtonPlusModelsInstalledToolInventory* value);
static void proton_plus_models_group_finalize (GObject * obj);
static GType proton_plus_models_group_get_type_once (void);
static void _vala_proton_plus_models_group_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_proton_plus_models_group_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_models_group_get_instance_private (ProtonPlusModelsGroup* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsGroup_private_offset);
}

ProtonPlusModelsGroup*
proton_plus_models_group_construct (GType object_type,
                                    const gchar* title,
                                    const gchar* description,
                                    const gchar* directory,
                                    ProtonPlusModelsLauncher* launcher,
                                    const gchar* id)
{
	ProtonPlusModelsGroup * self = NULL;
	ProtonPlusModelsInstalledToolInventory* _tmp0_;
	ProtonPlusModelsInstalledToolInventory* _tmp1_;
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (description != NULL, NULL);
	g_return_val_if_fail (directory != NULL, NULL);
	g_return_val_if_fail (launcher != NULL, NULL);
	g_return_val_if_fail (id != NULL, NULL);
	self = (ProtonPlusModelsGroup*) g_object_new (object_type, NULL);
	proton_plus_models_group_set_id (self, id);
	proton_plus_models_group_set_title (self, title);
	proton_plus_models_group_set_description (self, description);
	proton_plus_models_group_set_directory (self, directory);
	proton_plus_models_group_set_launcher (self, launcher);
	_tmp0_ = proton_plus_models_installed_tool_inventory_new (self);
	_tmp1_ = _tmp0_;
	proton_plus_models_group_set_installed_tool_inventory (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	return self;
}

ProtonPlusModelsGroup*
proton_plus_models_group_new (const gchar* title,
                              const gchar* description,
                              const gchar* directory,
                              ProtonPlusModelsLauncher* launcher,
                              const gchar* id)
{
	return proton_plus_models_group_construct (PROTON_PLUS_MODELS_TYPE_GROUP, title, description, directory, launcher, id);
}

void
proton_plus_models_group_refresh_installed_state (ProtonPlusModelsGroup* self)
{
	ProtonPlusModelsInstalledToolInventory* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_installed_tool_inventory;
	proton_plus_models_installed_tool_inventory_refresh (_tmp0_);
	g_signal_emit (self, proton_plus_models_group_signals[PROTON_PLUS_MODELS_GROUP_INSTALLED_STATE_REFRESHED_SIGNAL], 0);
}

void
proton_plus_models_group_invalidate_installed_state (ProtonPlusModelsGroup* self)
{
	ProtonPlusModelsInstalledToolInventory* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_installed_tool_inventory;
	proton_plus_models_installed_tool_inventory_invalidate (_tmp0_);
	g_signal_emit (self, proton_plus_models_group_signals[PROTON_PLUS_MODELS_GROUP_INSTALLED_TOOL_INDEX_INVALIDATED_SIGNAL], 0);
}

GeeList*
proton_plus_models_group_get_installed_tool_snapshot (ProtonPlusModelsGroup* self)
{
	ProtonPlusModelsInstalledToolInventory* _tmp0_;
	GeeList* _tmp1_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_installed_tool_inventory;
	_tmp1_ = proton_plus_models_installed_tool_inventory_get_snapshot (_tmp0_);
	result = _tmp1_;
	return result;
}

const gchar*
proton_plus_models_group_get_id (ProtonPlusModelsGroup* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_group_set_id (ProtonPlusModelsGroup* self,
                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_group_get_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_id);
		self->priv->_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_models_group_get_title (ProtonPlusModelsGroup* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_group_set_title (ProtonPlusModelsGroup* self,
                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_group_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY]);
	}
}

const gchar*
proton_plus_models_group_get_description (ProtonPlusModelsGroup* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_description;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_group_set_description (ProtonPlusModelsGroup* self,
                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_group_get_description (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_description);
		self->priv->_description = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY]);
	}
}

const gchar*
proton_plus_models_group_get_directory (ProtonPlusModelsGroup* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_directory;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_group_set_directory (ProtonPlusModelsGroup* self,
                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_group_get_directory (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_directory);
		self->priv->_directory = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY]);
	}
}

ProtonPlusModelsLauncher*
proton_plus_models_group_get_launcher (ProtonPlusModelsGroup* self)
{
	ProtonPlusModelsLauncher* result;
	ProtonPlusModelsLauncher* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_launcher;
	result = _tmp0_;
	return result;
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

void
proton_plus_models_group_set_launcher (ProtonPlusModelsGroup* self,
                                       ProtonPlusModelsLauncher* value)
{
	ProtonPlusModelsLauncher* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_group_get_launcher (self);
	if (old_value != value) {
		ProtonPlusModelsLauncher* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_launcher);
		self->priv->_launcher = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY]);
	}
}

GeeLinkedList*
proton_plus_models_group_get_tools (ProtonPlusModelsGroup* self)
{
	GeeLinkedList* result;
	GeeLinkedList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tools;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_group_set_tools (ProtonPlusModelsGroup* self,
                                    GeeLinkedList* value)
{
	GeeLinkedList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_group_get_tools (self);
	if (old_value != value) {
		GeeLinkedList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_tools);
		self->priv->_tools = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_TOOLS_PROPERTY]);
	}
}

ProtonPlusModelsInstalledToolInventory*
proton_plus_models_group_get_installed_tool_inventory (ProtonPlusModelsGroup* self)
{
	ProtonPlusModelsInstalledToolInventory* result;
	ProtonPlusModelsInstalledToolInventory* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_installed_tool_inventory;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_group_set_installed_tool_inventory (ProtonPlusModelsGroup* self,
                                                       ProtonPlusModelsInstalledToolInventory* value)
{
	ProtonPlusModelsInstalledToolInventory* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_group_get_installed_tool_inventory (self);
	if (old_value != value) {
		ProtonPlusModelsInstalledToolInventory* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_installed_tool_inventory);
		self->priv->_installed_tool_inventory = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_INSTALLED_TOOL_INVENTORY_PROPERTY]);
	}
}

static void
proton_plus_models_group_class_init (ProtonPlusModelsGroupClass * klass,
                                     gpointer klass_data)
{
	proton_plus_models_group_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsGroup_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_group_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_group_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_group_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GROUP_ID_PROPERTY, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY] = g_param_spec_string ("directory", "directory", "directory", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY] = g_param_spec_object ("launcher", "launcher", "launcher", PROTON_PLUS_MODELS_TYPE_LAUNCHER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GROUP_TOOLS_PROPERTY, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_TOOLS_PROPERTY] = g_param_spec_object ("tools", "tools", "tools", GEE_TYPE_LINKED_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GROUP_INSTALLED_TOOL_INVENTORY_PROPERTY, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_INSTALLED_TOOL_INVENTORY_PROPERTY] = g_param_spec_object ("installed-tool-inventory", "installed-tool-inventory", "installed-tool-inventory", PROTON_PLUS_MODELS_TYPE_INSTALLED_TOOL_INVENTORY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	proton_plus_models_group_signals[PROTON_PLUS_MODELS_GROUP_INSTALLED_TOOL_INDEX_INVALIDATED_SIGNAL] = g_signal_new ("installed-tool-index-invalidated", PROTON_PLUS_MODELS_TYPE_GROUP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	proton_plus_models_group_signals[PROTON_PLUS_MODELS_GROUP_INSTALLED_STATE_REFRESHED_SIGNAL] = g_signal_new ("installed-state-refreshed", PROTON_PLUS_MODELS_TYPE_GROUP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
proton_plus_models_group_instance_init (ProtonPlusModelsGroup * self,
                                        gpointer klass)
{
	self->priv = proton_plus_models_group_get_instance_private (self);
}

static void
proton_plus_models_group_finalize (GObject * obj)
{
	ProtonPlusModelsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroup);
	_g_free0 (self->priv->_id);
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_description);
	_g_free0 (self->priv->_directory);
	_g_object_unref0 (self->priv->_launcher);
	_g_object_unref0 (self->priv->_tools);
	_g_object_unref0 (self->priv->_installed_tool_inventory);
	G_OBJECT_CLASS (proton_plus_models_group_parent_class)->finalize (obj);
}

static GType
proton_plus_models_group_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsGroupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_group_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsGroup), 0, (GInstanceInitFunc) proton_plus_models_group_instance_init, NULL };
	GType proton_plus_models_group_type_id;
	proton_plus_models_group_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsGroup", &g_define_type_info, 0);
	ProtonPlusModelsGroup_private_offset = g_type_add_instance_private (proton_plus_models_group_type_id, sizeof (ProtonPlusModelsGroupPrivate));
	return proton_plus_models_group_type_id;
}

GType
proton_plus_models_group_get_type (void)
{
	static volatile gsize proton_plus_models_group_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_group_type_id__once)) {
		GType proton_plus_models_group_type_id;
		proton_plus_models_group_type_id = proton_plus_models_group_get_type_once ();
		g_once_init_leave (&proton_plus_models_group_type_id__once, proton_plus_models_group_type_id);
	}
	return proton_plus_models_group_type_id__once;
}

static void
_vala_proton_plus_models_group_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	ProtonPlusModelsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroup);
	switch (property_id) {
		case PROTON_PLUS_MODELS_GROUP_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_group_get_id (self));
		break;
		case PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY:
		g_value_set_string (value, proton_plus_models_group_get_title (self));
		break;
		case PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY:
		g_value_set_string (value, proton_plus_models_group_get_description (self));
		break;
		case PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY:
		g_value_set_string (value, proton_plus_models_group_get_directory (self));
		break;
		case PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY:
		g_value_set_object (value, proton_plus_models_group_get_launcher (self));
		break;
		case PROTON_PLUS_MODELS_GROUP_TOOLS_PROPERTY:
		g_value_set_object (value, proton_plus_models_group_get_tools (self));
		break;
		case PROTON_PLUS_MODELS_GROUP_INSTALLED_TOOL_INVENTORY_PROPERTY:
		g_value_set_object (value, proton_plus_models_group_get_installed_tool_inventory (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_group_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	ProtonPlusModelsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroup);
	switch (property_id) {
		case PROTON_PLUS_MODELS_GROUP_ID_PROPERTY:
		proton_plus_models_group_set_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY:
		proton_plus_models_group_set_title (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY:
		proton_plus_models_group_set_description (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY:
		proton_plus_models_group_set_directory (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY:
		proton_plus_models_group_set_launcher (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_MODELS_GROUP_TOOLS_PROPERTY:
		proton_plus_models_group_set_tools (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_MODELS_GROUP_INSTALLED_TOOL_INVENTORY_PROPERTY:
		proton_plus_models_group_set_installed_tool_inventory (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

