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

#include <glib-object.h>
#include "xmpp-vala.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gobject/gvaluecollector.h>
#include <gee.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

#define XMPP_XEP_JINGLE_TYPE_CONTENT_NODE (xmpp_xep_jingle_content_node_get_type ())
#define XMPP_XEP_JINGLE_CONTENT_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XMPP_XEP_JINGLE_TYPE_CONTENT_NODE, XmppXepJingleContentNode))
#define XMPP_XEP_JINGLE_CONTENT_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XMPP_XEP_JINGLE_TYPE_CONTENT_NODE, XmppXepJingleContentNodeClass))
#define XMPP_XEP_JINGLE_IS_CONTENT_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XMPP_XEP_JINGLE_TYPE_CONTENT_NODE))
#define XMPP_XEP_JINGLE_IS_CONTENT_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XMPP_XEP_JINGLE_TYPE_CONTENT_NODE))
#define XMPP_XEP_JINGLE_CONTENT_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XMPP_XEP_JINGLE_TYPE_CONTENT_NODE, XmppXepJingleContentNodeClass))

typedef struct _XmppXepJingleContentNode XmppXepJingleContentNode;
typedef struct _XmppXepJingleContentNodeClass XmppXepJingleContentNodeClass;
typedef struct _XmppXepJingleContentNodePrivate XmppXepJingleContentNodePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _xmpp_stanza_entry_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_stanza_entry_unref (var), NULL)))
typedef struct _XmppXepJingleParamSpecContentNode XmppXepJingleParamSpecContentNode;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _xmpp_xep_jingle_content_node_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_jingle_content_node_unref (var), NULL)))

struct _XmppXepJingleContentNode {
	GTypeInstance parent_instance;
	volatile int ref_count;
	XmppXepJingleContentNodePrivate * priv;
	XmppXepJingleRole creator;
	gchar* name;
	XmppXepJingleSenders senders;
	XmppStanzaNode* description;
	XmppStanzaNode* transport;
	XmppStanzaNode* security;
};

struct _XmppXepJingleContentNodeClass {
	GTypeClass parent_class;
	void (*finalize) (XmppXepJingleContentNode *self);
};

struct _XmppXepJingleParamSpecContentNode {
	GParamSpec parent_instance;
};

static gpointer xmpp_xep_jingle_content_node_parent_class = NULL;

VALA_EXTERN gpointer xmpp_xep_jingle_content_node_ref (gpointer instance);
VALA_EXTERN void xmpp_xep_jingle_content_node_unref (gpointer instance);
VALA_EXTERN GParamSpec* xmpp_xep_jingle_param_spec_content_node (const gchar* name,
                                                     const gchar* nick,
                                                     const gchar* blurb,
                                                     GType object_type,
                                                     GParamFlags flags);
VALA_EXTERN void xmpp_xep_jingle_value_set_content_node (GValue* value,
                                             gpointer v_object);
VALA_EXTERN void xmpp_xep_jingle_value_take_content_node (GValue* value,
                                              gpointer v_object);
VALA_EXTERN gpointer xmpp_xep_jingle_value_get_content_node (const GValue* value);
VALA_EXTERN GType xmpp_xep_jingle_content_node_get_type (void) G_GNUC_CONST ;
VALA_EXTERN XmppXepJingleContentNode* xmpp_xep_jingle_content_node_new (void);
VALA_EXTERN XmppXepJingleContentNode* xmpp_xep_jingle_content_node_construct (GType object_type);
static void xmpp_xep_jingle_content_node_finalize (XmppXepJingleContentNode * obj);
static GType xmpp_xep_jingle_content_node_get_type_once (void);
VALA_EXTERN XmppXepJingleContentNode* xmpp_xep_jingle_get_single_content_node (XmppStanzaNode* jingle,
                                                                   GError** error) G_GNUC_DEPRECATED ;
static XmppXepJingleRole* _xmpp_xep_jingle_role_dup (XmppXepJingleRole* self);
VALA_EXTERN XmppStanzaNode* xmpp_xep_jingle_get_single_node_anyns (XmppStanzaNode* parent,
                                                       const gchar* node_name,
                                                       GError** error);
VALA_EXTERN GeeList* xmpp_xep_jingle_get_content_nodes (XmppStanzaNode* jingle,
                                            GError** error);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

XmppXepJingleContentNode*
xmpp_xep_jingle_content_node_construct (GType object_type)
{
	XmppXepJingleContentNode* self = NULL;
	self = (XmppXepJingleContentNode*) g_type_create_instance (object_type);
	return self;
}

XmppXepJingleContentNode*
xmpp_xep_jingle_content_node_new (void)
{
	return xmpp_xep_jingle_content_node_construct (XMPP_XEP_JINGLE_TYPE_CONTENT_NODE);
}

static void
xmpp_xep_jingle_value_content_node_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
xmpp_xep_jingle_value_content_node_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		xmpp_xep_jingle_content_node_unref (value->data[0].v_pointer);
	}
}

static void
xmpp_xep_jingle_value_content_node_copy_value (const GValue* src_value,
                                               GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = xmpp_xep_jingle_content_node_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
xmpp_xep_jingle_value_content_node_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
xmpp_xep_jingle_value_content_node_collect_value (GValue* value,
                                                  guint n_collect_values,
                                                  GTypeCValue* collect_values,
                                                  guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		XmppXepJingleContentNode * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = xmpp_xep_jingle_content_node_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
xmpp_xep_jingle_value_content_node_lcopy_value (const GValue* value,
                                                guint n_collect_values,
                                                GTypeCValue* collect_values,
                                                guint collect_flags)
{
	XmppXepJingleContentNode ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = xmpp_xep_jingle_content_node_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
xmpp_xep_jingle_param_spec_content_node (const gchar* name,
                                         const gchar* nick,
                                         const gchar* blurb,
                                         GType object_type,
                                         GParamFlags flags)
{
	XmppXepJingleParamSpecContentNode* spec;
	g_return_val_if_fail (g_type_is_a (object_type, XMPP_XEP_JINGLE_TYPE_CONTENT_NODE), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
xmpp_xep_jingle_value_get_content_node (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_JINGLE_TYPE_CONTENT_NODE), NULL);
	return value->data[0].v_pointer;
}

void
xmpp_xep_jingle_value_set_content_node (GValue* value,
                                        gpointer v_object)
{
	XmppXepJingleContentNode * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_JINGLE_TYPE_CONTENT_NODE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_JINGLE_TYPE_CONTENT_NODE));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		xmpp_xep_jingle_content_node_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_jingle_content_node_unref (old);
	}
}

void
xmpp_xep_jingle_value_take_content_node (GValue* value,
                                         gpointer v_object)
{
	XmppXepJingleContentNode * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_JINGLE_TYPE_CONTENT_NODE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_JINGLE_TYPE_CONTENT_NODE));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_jingle_content_node_unref (old);
	}
}

static void
xmpp_xep_jingle_content_node_class_init (XmppXepJingleContentNodeClass * klass,
                                         gpointer klass_data)
{
	xmpp_xep_jingle_content_node_parent_class = g_type_class_peek_parent (klass);
	((XmppXepJingleContentNodeClass *) klass)->finalize = xmpp_xep_jingle_content_node_finalize;
}

static void
xmpp_xep_jingle_content_node_instance_init (XmppXepJingleContentNode * self,
                                            gpointer klass)
{
	self->ref_count = 1;
}

static void
xmpp_xep_jingle_content_node_finalize (XmppXepJingleContentNode * obj)
{
	XmppXepJingleContentNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_JINGLE_TYPE_CONTENT_NODE, XmppXepJingleContentNode);
	g_signal_handlers_destroy (self);
	_g_free0 (self->name);
	_xmpp_stanza_entry_unref0 (self->description);
	_xmpp_stanza_entry_unref0 (self->transport);
	_xmpp_stanza_entry_unref0 (self->security);
}

static GType
xmpp_xep_jingle_content_node_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { xmpp_xep_jingle_value_content_node_init, xmpp_xep_jingle_value_content_node_free_value, xmpp_xep_jingle_value_content_node_copy_value, xmpp_xep_jingle_value_content_node_peek_pointer, "p", xmpp_xep_jingle_value_content_node_collect_value, "p", xmpp_xep_jingle_value_content_node_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepJingleContentNodeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_jingle_content_node_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepJingleContentNode), 0, (GInstanceInitFunc) xmpp_xep_jingle_content_node_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType xmpp_xep_jingle_content_node_type_id;
	xmpp_xep_jingle_content_node_type_id = g_type_register_fundamental (g_type_fundamental_next (), "XmppXepJingleContentNode", &g_define_type_info, &g_define_type_fundamental_info, 0);
	return xmpp_xep_jingle_content_node_type_id;
}

GType
xmpp_xep_jingle_content_node_get_type (void)
{
	static volatile gsize xmpp_xep_jingle_content_node_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_jingle_content_node_type_id__once)) {
		GType xmpp_xep_jingle_content_node_type_id;
		xmpp_xep_jingle_content_node_type_id = xmpp_xep_jingle_content_node_get_type_once ();
		g_once_init_leave (&xmpp_xep_jingle_content_node_type_id__once, xmpp_xep_jingle_content_node_type_id);
	}
	return xmpp_xep_jingle_content_node_type_id__once;
}

gpointer
xmpp_xep_jingle_content_node_ref (gpointer instance)
{
	XmppXepJingleContentNode * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
xmpp_xep_jingle_content_node_unref (gpointer instance)
{
	XmppXepJingleContentNode * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		XMPP_XEP_JINGLE_CONTENT_NODE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static XmppXepJingleRole*
_xmpp_xep_jingle_role_dup (XmppXepJingleRole* self)
{
	XmppXepJingleRole* dup;
	dup = g_new0 (XmppXepJingleRole, 1);
	memcpy (dup, self, sizeof (XmppXepJingleRole));
	return dup;
}

static gpointer
__xmpp_xep_jingle_role_dup0 (gpointer self)
{
	return self ? _xmpp_xep_jingle_role_dup (self) : NULL;
}

static gpointer
_xmpp_stanza_entry_ref0 (gpointer self)
{
	return self ? xmpp_stanza_entry_ref (self) : NULL;
}

XmppXepJingleContentNode*
xmpp_xep_jingle_get_single_content_node (XmppStanzaNode* jingle,
                                         GError** error)
{
	GeeList* contents = NULL;
	GeeList* _tmp0_;
	GeeList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	GeeList* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	XmppStanzaNode* content = NULL;
	GeeList* _tmp9_;
	gpointer _tmp10_;
	gchar* creator_str = NULL;
	XmppStanzaNode* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	XmppXepJingleRole* creator = NULL;
	const gchar* _tmp14_;
	gchar* name = NULL;
	XmppStanzaNode* _tmp20_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
	XmppXepJingleSenders senders = 0;
	XmppStanzaNode* _tmp23_;
	const gchar* _tmp24_;
	XmppStanzaNode* description = NULL;
	XmppStanzaNode* _tmp25_;
	XmppStanzaNode* _tmp26_;
	XmppStanzaNode* transport = NULL;
	XmppStanzaNode* _tmp27_;
	XmppStanzaNode* _tmp28_;
	XmppStanzaNode* security = NULL;
	XmppStanzaNode* _tmp29_;
	XmppStanzaNode* _tmp30_;
	gboolean _tmp31_ = FALSE;
	const gchar* _tmp32_;
	XmppXepJingleRole* _tmp35_;
	const gchar* _tmp36_;
	gchar* _tmp37_;
	XmppStanzaNode* _tmp38_;
	XmppStanzaNode* _tmp39_;
	XmppStanzaNode* _tmp40_;
	XmppStanzaNode* _tmp41_;
	XmppStanzaNode* _tmp42_;
	XmppStanzaNode* _tmp43_;
	XmppXepJingleContentNode* _tmp44_ = NULL;
	GError* _inner_error0_ = NULL;
	XmppXepJingleContentNode* result;
	g_return_val_if_fail (jingle != NULL, NULL);
	_tmp0_ = xmpp_stanza_node_get_subnodes (jingle, "content", NULL, FALSE);
	contents = _tmp0_;
	_tmp1_ = contents;
	_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == 0) {
		GError* _tmp4_;
		_tmp4_ = g_error_new_literal (XMPP_XEP_JINGLE_IQ_ERROR, XMPP_XEP_JINGLE_IQ_ERROR_BAD_REQUEST, "missing content node");
		_inner_error0_ = _tmp4_;
		if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (contents);
			return NULL;
		} else {
			_g_object_unref0 (contents);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp5_ = contents;
	_tmp6_ = gee_collection_get_size ((GeeCollection*) _tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp7_ > 1) {
		GError* _tmp8_;
		_tmp8_ = g_error_new_literal (XMPP_XEP_JINGLE_IQ_ERROR, XMPP_XEP_JINGLE_IQ_ERROR_NOT_IMPLEMENTED, "can't process multiple content nodes");
		_inner_error0_ = _tmp8_;
		if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (contents);
			return NULL;
		} else {
			_g_object_unref0 (contents);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp9_ = contents;
	_tmp10_ = gee_list_get (_tmp9_, 0);
	content = (XmppStanzaNode*) _tmp10_;
	_tmp11_ = content;
	_tmp12_ = xmpp_stanza_node_get_attribute (_tmp11_, "creator", NULL);
	_tmp13_ = g_strdup (_tmp12_);
	creator_str = _tmp13_;
	creator = NULL;
	_tmp14_ = creator_str;
	if (_tmp14_ != NULL) {
		XmppXepJingleRole _tmp15_ = 0;
		const gchar* _tmp16_;
		XmppXepJingleRole* _tmp17_;
		_tmp16_ = creator_str;
		_tmp15_ = xmpp_xep_jingle_role_parse (_tmp16_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
				g_propagate_error (error, _inner_error0_);
				_g_free0 (creator);
				_g_free0 (creator_str);
				_xmpp_stanza_entry_unref0 (content);
				_g_object_unref0 (contents);
				return NULL;
			} else {
				_g_free0 (creator);
				_g_free0 (creator_str);
				_xmpp_stanza_entry_unref0 (content);
				_g_object_unref0 (contents);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return NULL;
			}
		}
		_tmp17_ = __xmpp_xep_jingle_role_dup0 (&_tmp15_);
		_g_free0 (creator);
		creator = _tmp17_;
	} else {
		XmppXepJingleRole _tmp18_;
		XmppXepJingleRole* _tmp19_;
		_tmp18_ = XMPP_XEP_JINGLE_ROLE_INITIATOR;
		_tmp19_ = __xmpp_xep_jingle_role_dup0 (&_tmp18_);
		_g_free0 (creator);
		creator = _tmp19_;
	}
	_tmp20_ = content;
	_tmp21_ = xmpp_stanza_node_get_attribute (_tmp20_, "name", NULL);
	_tmp22_ = g_strdup (_tmp21_);
	name = _tmp22_;
	_tmp23_ = content;
	_tmp24_ = xmpp_stanza_node_get_attribute (_tmp23_, "senders", NULL);
	senders = xmpp_xep_jingle_senders_parse (_tmp24_, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_g_free0 (name);
			_g_free0 (creator);
			_g_free0 (creator_str);
			_xmpp_stanza_entry_unref0 (content);
			_g_object_unref0 (contents);
			return NULL;
		} else {
			_g_free0 (name);
			_g_free0 (creator);
			_g_free0 (creator_str);
			_xmpp_stanza_entry_unref0 (content);
			_g_object_unref0 (contents);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp25_ = content;
	_tmp26_ = xmpp_xep_jingle_get_single_node_anyns (_tmp25_, "description", &_inner_error0_);
	description = _tmp26_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_g_free0 (name);
			_g_free0 (creator);
			_g_free0 (creator_str);
			_xmpp_stanza_entry_unref0 (content);
			_g_object_unref0 (contents);
			return NULL;
		} else {
			_g_free0 (name);
			_g_free0 (creator);
			_g_free0 (creator_str);
			_xmpp_stanza_entry_unref0 (content);
			_g_object_unref0 (contents);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp27_ = content;
	_tmp28_ = xmpp_xep_jingle_get_single_node_anyns (_tmp27_, "transport", &_inner_error0_);
	transport = _tmp28_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_xmpp_stanza_entry_unref0 (description);
			_g_free0 (name);
			_g_free0 (creator);
			_g_free0 (creator_str);
			_xmpp_stanza_entry_unref0 (content);
			_g_object_unref0 (contents);
			return NULL;
		} else {
			_xmpp_stanza_entry_unref0 (description);
			_g_free0 (name);
			_g_free0 (creator);
			_g_free0 (creator_str);
			_xmpp_stanza_entry_unref0 (content);
			_g_object_unref0 (contents);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp29_ = content;
	_tmp30_ = xmpp_xep_jingle_get_single_node_anyns (_tmp29_, "security", &_inner_error0_);
	security = _tmp30_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_xmpp_stanza_entry_unref0 (transport);
			_xmpp_stanza_entry_unref0 (description);
			_g_free0 (name);
			_g_free0 (creator);
			_g_free0 (creator_str);
			_xmpp_stanza_entry_unref0 (content);
			_g_object_unref0 (contents);
			return NULL;
		} else {
			_xmpp_stanza_entry_unref0 (transport);
			_xmpp_stanza_entry_unref0 (description);
			_g_free0 (name);
			_g_free0 (creator);
			_g_free0 (creator_str);
			_xmpp_stanza_entry_unref0 (content);
			_g_object_unref0 (contents);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp32_ = name;
	if (_tmp32_ == NULL) {
		_tmp31_ = TRUE;
	} else {
		XmppXepJingleRole* _tmp33_;
		_tmp33_ = creator;
		_tmp31_ = _tmp33_ == NULL;
	}
	if (_tmp31_) {
		GError* _tmp34_;
		_tmp34_ = g_error_new_literal (XMPP_XEP_JINGLE_IQ_ERROR, XMPP_XEP_JINGLE_IQ_ERROR_BAD_REQUEST, "missing name or creator");
		_inner_error0_ = _tmp34_;
		if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_xmpp_stanza_entry_unref0 (security);
			_xmpp_stanza_entry_unref0 (transport);
			_xmpp_stanza_entry_unref0 (description);
			_g_free0 (name);
			_g_free0 (creator);
			_g_free0 (creator_str);
			_xmpp_stanza_entry_unref0 (content);
			_g_object_unref0 (contents);
			return NULL;
		} else {
			_xmpp_stanza_entry_unref0 (security);
			_xmpp_stanza_entry_unref0 (transport);
			_xmpp_stanza_entry_unref0 (description);
			_g_free0 (name);
			_g_free0 (creator);
			_g_free0 (creator_str);
			_xmpp_stanza_entry_unref0 (content);
			_g_object_unref0 (contents);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp35_ = creator;
	_tmp36_ = name;
	_tmp37_ = g_strdup (_tmp36_);
	_tmp38_ = description;
	_tmp39_ = _xmpp_stanza_entry_ref0 (_tmp38_);
	_tmp40_ = transport;
	_tmp41_ = _xmpp_stanza_entry_ref0 (_tmp40_);
	_tmp42_ = security;
	_tmp43_ = _xmpp_stanza_entry_ref0 (_tmp42_);
	_tmp44_ = xmpp_xep_jingle_content_node_new ();
	_tmp44_->creator = *_tmp35_;
	_g_free0 (_tmp44_->name);
	_tmp44_->name = _tmp37_;
	_tmp44_->senders = senders;
	_xmpp_stanza_entry_unref0 (_tmp44_->description);
	_tmp44_->description = _tmp39_;
	_xmpp_stanza_entry_unref0 (_tmp44_->transport);
	_tmp44_->transport = _tmp41_;
	_xmpp_stanza_entry_unref0 (_tmp44_->security);
	_tmp44_->security = _tmp43_;
	result = _tmp44_;
	_xmpp_stanza_entry_unref0 (security);
	_xmpp_stanza_entry_unref0 (transport);
	_xmpp_stanza_entry_unref0 (description);
	_g_free0 (name);
	_g_free0 (creator);
	_g_free0 (creator_str);
	_xmpp_stanza_entry_unref0 (content);
	_g_object_unref0 (contents);
	return result;
}

GeeList*
xmpp_xep_jingle_get_content_nodes (XmppStanzaNode* jingle,
                                   GError** error)
{
	GeeList* contents = NULL;
	GeeList* _tmp0_;
	GeeList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	GeeList* list = NULL;
	GeeArrayList* _tmp5_;
	GError* _inner_error0_ = NULL;
	GeeList* result;
	g_return_val_if_fail (jingle != NULL, NULL);
	_tmp0_ = xmpp_stanza_node_get_subnodes (jingle, "content", NULL, FALSE);
	contents = _tmp0_;
	_tmp1_ = contents;
	_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == 0) {
		GError* _tmp4_;
		_tmp4_ = g_error_new_literal (XMPP_XEP_JINGLE_IQ_ERROR, XMPP_XEP_JINGLE_IQ_ERROR_BAD_REQUEST, "missing content node");
		_inner_error0_ = _tmp4_;
		if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (contents);
			return NULL;
		} else {
			_g_object_unref0 (contents);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp5_ = gee_array_list_new (XMPP_XEP_JINGLE_TYPE_CONTENT_NODE, (GBoxedCopyFunc) xmpp_xep_jingle_content_node_ref, (GDestroyNotify) xmpp_xep_jingle_content_node_unref, NULL, NULL, NULL);
	list = (GeeList*) _tmp5_;
	{
		GeeList* _content_list = NULL;
		GeeList* _tmp6_;
		gint _content_size = 0;
		GeeList* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _content_index = 0;
		_tmp6_ = contents;
		_content_list = _tmp6_;
		_tmp7_ = _content_list;
		_tmp8_ = gee_collection_get_size ((GeeCollection*) _tmp7_);
		_tmp9_ = _tmp8_;
		_content_size = _tmp9_;
		_content_index = -1;
		while (TRUE) {
			gint _tmp10_;
			gint _tmp11_;
			XmppStanzaNode* content = NULL;
			GeeList* _tmp12_;
			gpointer _tmp13_;
			gchar* creator_str = NULL;
			XmppStanzaNode* _tmp14_;
			const gchar* _tmp15_;
			gchar* _tmp16_;
			XmppXepJingleRole* creator = NULL;
			const gchar* _tmp17_;
			gchar* name = NULL;
			XmppStanzaNode* _tmp23_;
			const gchar* _tmp24_;
			gchar* _tmp25_;
			XmppXepJingleSenders senders = 0;
			XmppStanzaNode* _tmp26_;
			const gchar* _tmp27_;
			XmppStanzaNode* description = NULL;
			XmppStanzaNode* _tmp28_;
			XmppStanzaNode* _tmp29_;
			XmppStanzaNode* transport = NULL;
			XmppStanzaNode* _tmp30_;
			XmppStanzaNode* _tmp31_;
			XmppStanzaNode* security = NULL;
			XmppStanzaNode* _tmp32_;
			XmppStanzaNode* _tmp33_;
			gboolean _tmp34_ = FALSE;
			const gchar* _tmp35_;
			GeeList* _tmp38_;
			XmppXepJingleRole* _tmp39_;
			const gchar* _tmp40_;
			gchar* _tmp41_;
			XmppStanzaNode* _tmp42_;
			XmppStanzaNode* _tmp43_;
			XmppStanzaNode* _tmp44_;
			XmppStanzaNode* _tmp45_;
			XmppStanzaNode* _tmp46_;
			XmppStanzaNode* _tmp47_;
			XmppXepJingleContentNode* _tmp48_ = NULL;
			XmppXepJingleContentNode* _tmp49_;
			_content_index = _content_index + 1;
			_tmp10_ = _content_index;
			_tmp11_ = _content_size;
			if (!(_tmp10_ < _tmp11_)) {
				break;
			}
			_tmp12_ = _content_list;
			_tmp13_ = gee_list_get (_tmp12_, _content_index);
			content = (XmppStanzaNode*) _tmp13_;
			_tmp14_ = content;
			_tmp15_ = xmpp_stanza_node_get_attribute (_tmp14_, "creator", NULL);
			_tmp16_ = g_strdup (_tmp15_);
			creator_str = _tmp16_;
			creator = NULL;
			_tmp17_ = creator_str;
			if (_tmp17_ != NULL) {
				XmppXepJingleRole _tmp18_ = 0;
				const gchar* _tmp19_;
				XmppXepJingleRole* _tmp20_;
				_tmp19_ = creator_str;
				_tmp18_ = xmpp_xep_jingle_role_parse (_tmp19_, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
						g_propagate_error (error, _inner_error0_);
						_g_free0 (creator);
						_g_free0 (creator_str);
						_xmpp_stanza_entry_unref0 (content);
						_g_object_unref0 (list);
						_g_object_unref0 (contents);
						return NULL;
					} else {
						_g_free0 (creator);
						_g_free0 (creator_str);
						_xmpp_stanza_entry_unref0 (content);
						_g_object_unref0 (list);
						_g_object_unref0 (contents);
						g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
						g_clear_error (&_inner_error0_);
						return NULL;
					}
				}
				_tmp20_ = __xmpp_xep_jingle_role_dup0 (&_tmp18_);
				_g_free0 (creator);
				creator = _tmp20_;
			} else {
				XmppXepJingleRole _tmp21_;
				XmppXepJingleRole* _tmp22_;
				_tmp21_ = XMPP_XEP_JINGLE_ROLE_INITIATOR;
				_tmp22_ = __xmpp_xep_jingle_role_dup0 (&_tmp21_);
				_g_free0 (creator);
				creator = _tmp22_;
			}
			_tmp23_ = content;
			_tmp24_ = xmpp_stanza_node_get_attribute (_tmp23_, "name", NULL);
			_tmp25_ = g_strdup (_tmp24_);
			name = _tmp25_;
			_tmp26_ = content;
			_tmp27_ = xmpp_stanza_node_get_attribute (_tmp26_, "senders", NULL);
			senders = xmpp_xep_jingle_senders_parse (_tmp27_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
					g_propagate_error (error, _inner_error0_);
					_g_free0 (name);
					_g_free0 (creator);
					_g_free0 (creator_str);
					_xmpp_stanza_entry_unref0 (content);
					_g_object_unref0 (list);
					_g_object_unref0 (contents);
					return NULL;
				} else {
					_g_free0 (name);
					_g_free0 (creator);
					_g_free0 (creator_str);
					_xmpp_stanza_entry_unref0 (content);
					_g_object_unref0 (list);
					_g_object_unref0 (contents);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
					g_clear_error (&_inner_error0_);
					return NULL;
				}
			}
			_tmp28_ = content;
			_tmp29_ = xmpp_xep_jingle_get_single_node_anyns (_tmp28_, "description", &_inner_error0_);
			description = _tmp29_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
					g_propagate_error (error, _inner_error0_);
					_g_free0 (name);
					_g_free0 (creator);
					_g_free0 (creator_str);
					_xmpp_stanza_entry_unref0 (content);
					_g_object_unref0 (list);
					_g_object_unref0 (contents);
					return NULL;
				} else {
					_g_free0 (name);
					_g_free0 (creator);
					_g_free0 (creator_str);
					_xmpp_stanza_entry_unref0 (content);
					_g_object_unref0 (list);
					_g_object_unref0 (contents);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
					g_clear_error (&_inner_error0_);
					return NULL;
				}
			}
			_tmp30_ = content;
			_tmp31_ = xmpp_xep_jingle_get_single_node_anyns (_tmp30_, "transport", &_inner_error0_);
			transport = _tmp31_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
					g_propagate_error (error, _inner_error0_);
					_xmpp_stanza_entry_unref0 (description);
					_g_free0 (name);
					_g_free0 (creator);
					_g_free0 (creator_str);
					_xmpp_stanza_entry_unref0 (content);
					_g_object_unref0 (list);
					_g_object_unref0 (contents);
					return NULL;
				} else {
					_xmpp_stanza_entry_unref0 (description);
					_g_free0 (name);
					_g_free0 (creator);
					_g_free0 (creator_str);
					_xmpp_stanza_entry_unref0 (content);
					_g_object_unref0 (list);
					_g_object_unref0 (contents);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
					g_clear_error (&_inner_error0_);
					return NULL;
				}
			}
			_tmp32_ = content;
			_tmp33_ = xmpp_xep_jingle_get_single_node_anyns (_tmp32_, "security", &_inner_error0_);
			security = _tmp33_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
					g_propagate_error (error, _inner_error0_);
					_xmpp_stanza_entry_unref0 (transport);
					_xmpp_stanza_entry_unref0 (description);
					_g_free0 (name);
					_g_free0 (creator);
					_g_free0 (creator_str);
					_xmpp_stanza_entry_unref0 (content);
					_g_object_unref0 (list);
					_g_object_unref0 (contents);
					return NULL;
				} else {
					_xmpp_stanza_entry_unref0 (transport);
					_xmpp_stanza_entry_unref0 (description);
					_g_free0 (name);
					_g_free0 (creator);
					_g_free0 (creator_str);
					_xmpp_stanza_entry_unref0 (content);
					_g_object_unref0 (list);
					_g_object_unref0 (contents);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
					g_clear_error (&_inner_error0_);
					return NULL;
				}
			}
			_tmp35_ = name;
			if (_tmp35_ == NULL) {
				_tmp34_ = TRUE;
			} else {
				XmppXepJingleRole* _tmp36_;
				_tmp36_ = creator;
				_tmp34_ = _tmp36_ == NULL;
			}
			if (_tmp34_) {
				GError* _tmp37_;
				_tmp37_ = g_error_new_literal (XMPP_XEP_JINGLE_IQ_ERROR, XMPP_XEP_JINGLE_IQ_ERROR_BAD_REQUEST, "missing name or creator");
				_inner_error0_ = _tmp37_;
				if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
					g_propagate_error (error, _inner_error0_);
					_xmpp_stanza_entry_unref0 (security);
					_xmpp_stanza_entry_unref0 (transport);
					_xmpp_stanza_entry_unref0 (description);
					_g_free0 (name);
					_g_free0 (creator);
					_g_free0 (creator_str);
					_xmpp_stanza_entry_unref0 (content);
					_g_object_unref0 (list);
					_g_object_unref0 (contents);
					return NULL;
				} else {
					_xmpp_stanza_entry_unref0 (security);
					_xmpp_stanza_entry_unref0 (transport);
					_xmpp_stanza_entry_unref0 (description);
					_g_free0 (name);
					_g_free0 (creator);
					_g_free0 (creator_str);
					_xmpp_stanza_entry_unref0 (content);
					_g_object_unref0 (list);
					_g_object_unref0 (contents);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
					g_clear_error (&_inner_error0_);
					return NULL;
				}
			}
			_tmp38_ = list;
			_tmp39_ = creator;
			_tmp40_ = name;
			_tmp41_ = g_strdup (_tmp40_);
			_tmp42_ = description;
			_tmp43_ = _xmpp_stanza_entry_ref0 (_tmp42_);
			_tmp44_ = transport;
			_tmp45_ = _xmpp_stanza_entry_ref0 (_tmp44_);
			_tmp46_ = security;
			_tmp47_ = _xmpp_stanza_entry_ref0 (_tmp46_);
			_tmp48_ = xmpp_xep_jingle_content_node_new ();
			_tmp48_->creator = *_tmp39_;
			_g_free0 (_tmp48_->name);
			_tmp48_->name = _tmp41_;
			_tmp48_->senders = senders;
			_xmpp_stanza_entry_unref0 (_tmp48_->description);
			_tmp48_->description = _tmp43_;
			_xmpp_stanza_entry_unref0 (_tmp48_->transport);
			_tmp48_->transport = _tmp45_;
			_xmpp_stanza_entry_unref0 (_tmp48_->security);
			_tmp48_->security = _tmp47_;
			_tmp49_ = _tmp48_;
			gee_collection_add ((GeeCollection*) _tmp38_, _tmp49_);
			_xmpp_xep_jingle_content_node_unref0 (_tmp49_);
			_xmpp_stanza_entry_unref0 (security);
			_xmpp_stanza_entry_unref0 (transport);
			_xmpp_stanza_entry_unref0 (description);
			_g_free0 (name);
			_g_free0 (creator);
			_g_free0 (creator_str);
			_xmpp_stanza_entry_unref0 (content);
		}
	}
	result = list;
	_g_object_unref0 (contents);
	return result;
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

XmppStanzaNode*
xmpp_xep_jingle_get_single_node_anyns (XmppStanzaNode* parent,
                                       const gchar* node_name,
                                       GError** error)
{
	XmppStanzaNode* _result_ = NULL;
	GError* _inner_error0_ = NULL;
	XmppStanzaNode* result;
	g_return_val_if_fail (parent != NULL, NULL);
	_result_ = NULL;
	{
		GeeList* _child_list = NULL;
		GeeList* _tmp0_;
		gint _child_size = 0;
		GeeList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _child_index = 0;
		_tmp0_ = xmpp_stanza_node_get_all_subnodes (parent);
		_child_list = _tmp0_;
		_tmp1_ = _child_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_child_size = _tmp3_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			XmppStanzaNode* child = NULL;
			GeeList* _tmp6_;
			gpointer _tmp7_;
			gboolean _tmp8_ = FALSE;
			_child_index = _child_index + 1;
			_tmp4_ = _child_index;
			_tmp5_ = _child_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _child_list;
			_tmp7_ = gee_list_get (_tmp6_, _child_index);
			child = (XmppStanzaNode*) _tmp7_;
			if (node_name == NULL) {
				_tmp8_ = TRUE;
			} else {
				XmppStanzaNode* _tmp9_;
				const gchar* _tmp10_;
				_tmp9_ = child;
				_tmp10_ = ((XmppStanzaEntry*) _tmp9_)->name;
				_tmp8_ = g_strcmp0 (_tmp10_, node_name) == 0;
			}
			if (_tmp8_) {
				XmppStanzaNode* _tmp11_;
				XmppStanzaNode* _tmp18_;
				XmppStanzaNode* _tmp19_;
				_tmp11_ = _result_;
				if (_tmp11_ != NULL) {
					if (node_name != NULL) {
						const gchar* _tmp12_;
						gchar* _tmp13_;
						gchar* _tmp14_;
						GError* _tmp15_;
						GError* _tmp16_;
						_tmp12_ = string_to_string (node_name);
						_tmp13_ = g_strconcat ("multiple ", _tmp12_, " nodes", NULL);
						_tmp14_ = _tmp13_;
						_tmp15_ = g_error_new_literal (XMPP_XEP_JINGLE_IQ_ERROR, XMPP_XEP_JINGLE_IQ_ERROR_BAD_REQUEST, _tmp14_);
						_tmp16_ = _tmp15_;
						_g_free0 (_tmp14_);
						_inner_error0_ = _tmp16_;
						if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
							g_propagate_error (error, _inner_error0_);
							_xmpp_stanza_entry_unref0 (child);
							_g_object_unref0 (_child_list);
							_xmpp_stanza_entry_unref0 (_result_);
							return NULL;
						} else {
							_xmpp_stanza_entry_unref0 (child);
							_g_object_unref0 (_child_list);
							_xmpp_stanza_entry_unref0 (_result_);
							g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
							g_clear_error (&_inner_error0_);
							return NULL;
						}
					} else {
						GError* _tmp17_;
						_tmp17_ = g_error_new_literal (XMPP_XEP_JINGLE_IQ_ERROR, XMPP_XEP_JINGLE_IQ_ERROR_BAD_REQUEST, "expected single subnode");
						_inner_error0_ = _tmp17_;
						if (_inner_error0_->domain == XMPP_XEP_JINGLE_IQ_ERROR) {
							g_propagate_error (error, _inner_error0_);
							_xmpp_stanza_entry_unref0 (child);
							_g_object_unref0 (_child_list);
							_xmpp_stanza_entry_unref0 (_result_);
							return NULL;
						} else {
							_xmpp_stanza_entry_unref0 (child);
							_g_object_unref0 (_child_list);
							_xmpp_stanza_entry_unref0 (_result_);
							g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
							g_clear_error (&_inner_error0_);
							return NULL;
						}
					}
				}
				_tmp18_ = child;
				_tmp19_ = _xmpp_stanza_entry_ref0 (_tmp18_);
				_xmpp_stanza_entry_unref0 (_result_);
				_result_ = _tmp19_;
			}
			_xmpp_stanza_entry_unref0 (child);
		}
		_g_object_unref0 (_child_list);
	}
	result = _result_;
	return result;
}

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;
}

