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

#include "xmpp-vala.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <gee.h>
#include <gobject/gvaluecollector.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  {
	XMPP_XEP_MUJI_MODULE_0_PROPERTY,
	XMPP_XEP_MUJI_MODULE_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_muji_module_properties[XMPP_XEP_MUJI_MODULE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
#define _xmpp_xep_muji_group_call_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_muji_group_call_unref (var), NULL)))
#define _xmpp_stanza_entry_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_stanza_entry_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _xmpp_xep_muc_join_result_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_muc_join_result_unref (var), NULL)))
#define _xmpp_xep_jingle_rtp_payload_type_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_jingle_rtp_payload_type_unref (var), NULL)))
typedef struct _XmppXepMujiModuleJoinCallData XmppXepMujiModuleJoinCallData;
#define _gee_promise_unref0(var) ((var == NULL) ? NULL : (var = (gee_promise_unref (var), NULL)))
typedef struct _XmppXepMujiModuleWaitForPreparingPeersData XmppXepMujiModuleWaitForPreparingPeersData;
typedef struct _XmppXepMujiModuleComputePayloadIntersectionData XmppXepMujiModuleComputePayloadIntersectionData;
typedef struct _XmppXepMujiParamSpecGroupCall XmppXepMujiParamSpecGroupCall;
enum  {
	XMPP_XEP_MUJI_GROUP_CALL_PEER_JOINED_SIGNAL,
	XMPP_XEP_MUJI_GROUP_CALL_PEER_LEFT_SIGNAL,
	XMPP_XEP_MUJI_GROUP_CALL_CODECS_CHANGED_SIGNAL,
	XMPP_XEP_MUJI_GROUP_CALL_NUM_SIGNALS
};
static guint xmpp_xep_muji_group_call_signals[XMPP_XEP_MUJI_GROUP_CALL_NUM_SIGNALS] = {0};
enum  {
	XMPP_XEP_MUJI_FLAG_0_PROPERTY,
	XMPP_XEP_MUJI_FLAG_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_muji_flag_properties[XMPP_XEP_MUJI_FLAG_NUM_PROPERTIES];

struct _XmppXepMujiModuleJoinCallData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepMujiModule* self;
	XmppXmppStream* stream;
	XmppJid* muc_jid;
	gboolean video;
	XmppXepMujiGroupCall* result;
	XmppStanzaNode* initial_muji_node;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_;
	XmppXepMujiGroupCall* group_call;
	XmppXepMujiGroupCall* _tmp8_;
	XmppFlagIdentity* _tmp9_;
	gpointer _tmp10_;
	XmppXepMujiFlag* _tmp11_;
	GeeHashMap* _tmp12_;
	XmppXepMujiGroupCall* _tmp13_;
	XmppXepMujiGroupCall* _tmp14_;
	gchar* _tmp15_;
	XmppFlagIdentity* _tmp16_;
	gpointer _tmp17_;
	XmppBindFlag* _tmp18_;
	XmppJid* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	XmppXepMujiGroupCall* _tmp22_;
	const gchar* _tmp23_;
	XmppXepMucJoinResult* _result_;
	XmppModuleIdentity* _tmp24_;
	gpointer _tmp25_;
	XmppXepMucModule* _tmp26_;
	XmppXepMujiGroupCall* _tmp27_;
	const gchar* _tmp28_;
	XmppStanzaNode* _tmp29_;
	XmppXepMucJoinResult* _tmp30_;
	XmppXepMucJoinResult* _tmp31_;
	gboolean _tmp32_;
	XmppXepMucJoinResult* _tmp33_;
	XmppXepMucJoinResult* _tmp34_;
	const gchar* _tmp35_;
	XmppFlagIdentity* _tmp36_;
	gpointer _tmp37_;
	XmppBindFlag* _tmp38_;
	XmppJid* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	XmppXepMujiGroupCall* _tmp42_;
	const gchar* _tmp43_;
	GeeList* other_presences;
	GeeList* _tmp44_;
	GeeArrayList* finished_real_jids;
	GeeArrayList* _tmp45_;
	GeeList* _presence_list;
	GeeList* _tmp46_;
	gint _presence_size;
	GeeList* _tmp47_;
	gint _tmp48_;
	gint _tmp49_;
	gint _presence_index;
	gint _tmp50_;
	gint _tmp51_;
	XmppPresenceStanza* presence;
	GeeList* _tmp52_;
	gpointer _tmp53_;
	XmppPresenceStanza* _tmp54_;
	XmppStanzaNode* _tmp55_;
	XmppStanzaNode* _tmp56_;
	XmppStanzaNode* _tmp57_;
	gboolean _tmp58_;
	XmppJid* real_jid;
	XmppFlagIdentity* _tmp59_;
	gpointer _tmp60_;
	XmppXepMucFlag* _tmp61_;
	XmppPresenceStanza* _tmp62_;
	XmppJid* _tmp63_;
	XmppJid* _tmp64_;
	XmppJid* _tmp65_;
	XmppJid* _tmp66_;
	XmppJid* _tmp67_;
	XmppJid* _tmp68_;
	XmppPresenceStanza* _tmp69_;
	XmppJid* _tmp70_;
	XmppJid* _tmp71_;
	XmppJid* _tmp72_;
	gchar* _tmp73_;
	gchar* _tmp74_;
	GeeArrayList* _tmp75_;
	XmppJid* _tmp76_;
	XmppXepMujiGroupCall* _tmp77_;
	GeeArrayList* _tmp78_;
	GeeArrayList* _tmp79_;
	XmppStanzaNode* muji_node;
	XmppStanzaNode* _tmp80_;
	XmppStanzaNode* _tmp81_;
	XmppStanzaNode* _tmp82_;
	XmppStanzaNode* _tmp83_;
	gchar** _tmp84_;
	gint _tmp84__length1;
	gint __tmp84__size_;
	gchar* _tmp85_;
	gchar* _tmp86_;
	gchar** _tmp87_;
	gchar* _tmp88_;
	gchar** _tmp89_;
	gchar** media_collection;
	gint media_collection_length1;
	gint _media_collection_size_;
	gint media_it;
	gchar* _tmp90_;
	gchar* media;
	XmppStanzaNode* content_node;
	XmppStanzaNode* _tmp91_;
	XmppStanzaNode* _tmp92_;
	XmppStanzaNode* _tmp93_;
	XmppStanzaNode* _tmp94_;
	const gchar* _tmp95_;
	XmppStanzaNode* _tmp96_;
	XmppStanzaNode* _tmp97_;
	XmppStanzaNode* description_node;
	XmppStanzaNode* _tmp98_;
	XmppStanzaNode* _tmp99_;
	XmppStanzaNode* _tmp100_;
	XmppStanzaNode* _tmp101_;
	const gchar* _tmp102_;
	XmppStanzaNode* _tmp103_;
	XmppStanzaNode* _tmp104_;
	XmppStanzaNode* _tmp105_;
	XmppStanzaNode* _tmp106_;
	XmppStanzaNode* _tmp107_;
	XmppStanzaNode* _tmp108_;
	GeeList* payload_types;
	GeeList* _tmp109_;
	gboolean _tmp110_;
	gboolean _tmp111_;
	XmppModuleIdentity* _tmp112_;
	gpointer _tmp113_;
	XmppXepJingleRtpModule* _tmp114_;
	const gchar* _tmp115_;
	GeeList* _tmp116_;
	XmppXepMujiGroupCall* _tmp117_;
	const gchar* _tmp118_;
	XmppXepMujiGroupCall* _tmp119_;
	GeeHashMap* _tmp120_;
	const gchar* _tmp121_;
	gpointer _tmp122_;
	GeeList* _payload_type_list;
	GeeList* _tmp123_;
	gint _payload_type_size;
	GeeList* _tmp124_;
	gint _tmp125_;
	gint _tmp126_;
	gint _payload_type_index;
	gint _tmp127_;
	gint _tmp128_;
	XmppXepJingleRtpPayloadType* payload_type;
	GeeList* _tmp129_;
	gpointer _tmp130_;
	XmppStanzaNode* _tmp131_;
	XmppXepJingleRtpPayloadType* _tmp132_;
	XmppStanzaNode* _tmp133_;
	XmppStanzaNode* _tmp134_;
	XmppStanzaNode* _tmp135_;
	XmppStanzaNode* _tmp136_;
	XmppStanzaNode* _tmp137_;
	XmppStanzaNode* _tmp138_;
	XmppStanzaNode* _tmp139_;
	XmppStanzaNode* _tmp140_;
	XmppStanzaNode* _tmp141_;
	XmppStanzaNode* _tmp142_;
	XmppJid* _tmp143_;
	XmppXepMujiGroupCall* _tmp144_;
	const gchar* _tmp145_;
	XmppJid* _tmp146_;
	XmppPresenceStanza* presence_stanza;
	XmppJid* _tmp147_;
	XmppPresenceStanza* _tmp148_;
	XmppPresenceStanza* _tmp149_;
	XmppStanzaNode* _tmp150_;
	XmppStanzaNode* _tmp151_;
	XmppStanzaNode* _tmp152_;
	XmppStanzaNode* _tmp153_;
	XmppModuleIdentity* _tmp154_;
	gpointer _tmp155_;
	XmppPresenceModule* _tmp156_;
	XmppPresenceStanza* _tmp157_;
	GError* _inner_error0_;
};

struct _XmppXepMujiModuleWaitForPreparingPeersData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepMujiModule* self;
	XmppXmppStream* stream;
	XmppJid* muc_jid;
	GeeList* result;
	GeePromise* promise;
	GeePromise* _tmp0_;
	GeeArrayList* preparing_peers;
	GeeArrayList* _tmp1_;
	GeeList* presences;
	GeeList* _tmp2_;
	GeeList* _presence_list;
	GeeList* _tmp3_;
	gint _presence_size;
	GeeList* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	gint _presence_index;
	gint _tmp7_;
	gint _tmp8_;
	XmppPresenceStanza* presence;
	GeeList* _tmp9_;
	gpointer _tmp10_;
	XmppStanzaNode* preparing_node;
	XmppPresenceStanza* _tmp11_;
	XmppStanzaNode* _tmp12_;
	XmppStanzaNode* _tmp13_;
	XmppStanzaNode* _tmp14_;
	GeeArrayList* _tmp15_;
	XmppPresenceStanza* _tmp16_;
	XmppJid* _tmp17_;
	XmppJid* _tmp18_;
	XmppJid* _tmp19_;
	XmppFlagIdentity* _tmp20_;
	gpointer _tmp21_;
	XmppBindFlag* _tmp22_;
	XmppJid* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	GeeArrayList* _tmp26_;
	gint _tmp27_;
	gint _tmp28_;
	GeeList* _tmp29_;
	gint _tmp30_;
	gint _tmp31_;
	GeeArrayList* _tmp32_;
	gboolean _tmp33_;
	gboolean _tmp34_;
	XmppXepMujiGroupCall* group_call;
	XmppFlagIdentity* _tmp35_;
	gpointer _tmp36_;
	XmppXepMujiFlag* _tmp37_;
	GeeHashMap* _tmp38_;
	gpointer _tmp39_;
	XmppXepMujiGroupCall* _tmp40_;
	XmppXepMujiGroupCall* _tmp41_;
	GeeHashMap* _tmp42_;
	GeePromise* _tmp43_;
	GeeArrayList* _tmp44_;
	GeeList* _tmp45_;
	GeePromise* _tmp46_;
	GeeFuture* _tmp47_;
	GeeFuture* _tmp48_;
	gconstpointer _tmp49_;
	GeeList* _tmp50_;
	GError* _inner_error0_;
};

struct _XmppXepMujiModuleComputePayloadIntersectionData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepMujiModule* self;
	XmppXmppStream* stream;
	XmppXepMujiGroupCall* group_call;
	gchar* media;
	GeeList* presences;
	XmppJid* _tmp0_;
	GeeList* _tmp1_;
	GeeList* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	GeeList* intersection;
	GeeList* _tmp5_;
	gpointer _tmp6_;
	XmppPresenceStanza* _tmp7_;
	GeeList* _tmp8_;
	GeeList* _tmp9_;
	GeeArrayList* remove_payloads;
	GeeArrayList* _tmp10_;
	GeeList* _presence_list;
	GeeList* _tmp11_;
	gint _presence_size;
	GeeList* _tmp12_;
	gint _tmp13_;
	gint _tmp14_;
	gint _presence_index;
	gint _tmp15_;
	gint _tmp16_;
	XmppPresenceStanza* presence;
	GeeList* _tmp17_;
	gpointer _tmp18_;
	GeeList* peer_payload_types;
	XmppPresenceStanza* _tmp19_;
	GeeList* _tmp20_;
	GeeList* _payload_type_list;
	GeeList* _tmp21_;
	gint _payload_type_size;
	GeeList* _tmp22_;
	gint _tmp23_;
	gint _tmp24_;
	gint _payload_type_index;
	gint _tmp25_;
	gint _tmp26_;
	XmppXepJingleRtpPayloadType* payload_type;
	GeeList* _tmp27_;
	gpointer _tmp28_;
	GeeList* _tmp29_;
	XmppXepJingleRtpPayloadType* _tmp30_;
	GeeArrayList* _tmp31_;
	XmppXepJingleRtpPayloadType* _tmp32_;
	GeeList* _vala1__payload_type_list;
	GeeList* _tmp33_;
	gint _vala1__payload_type_size;
	GeeList* _tmp34_;
	gint _tmp35_;
	gint _tmp36_;
	gint _vala1__payload_type_index;
	gint _tmp37_;
	gint _tmp38_;
	XmppXepJingleRtpPayloadType* _vala1_payload_type;
	GeeList* _tmp39_;
	gpointer _tmp40_;
	XmppModuleIdentity* _tmp41_;
	gpointer _tmp42_;
	XmppXepJingleRtpModule* _tmp43_;
	XmppXepJingleRtpPayloadType* _tmp44_;
	gboolean _tmp45_;
	GeeArrayList* _tmp46_;
	XmppXepJingleRtpPayloadType* _tmp47_;
	GeeArrayList* _vala2__payload_type_list;
	GeeArrayList* _tmp48_;
	gint _vala2__payload_type_size;
	GeeArrayList* _tmp49_;
	gint _tmp50_;
	gint _tmp51_;
	gint _vala2__payload_type_index;
	gint _tmp52_;
	gint _tmp53_;
	XmppXepJingleRtpPayloadType* _vala2_payload_type;
	GeeArrayList* _tmp54_;
	gpointer _tmp55_;
	GeeList* _tmp56_;
	XmppXepJingleRtpPayloadType* _tmp57_;
	gboolean _tmp58_;
	gboolean _tmp59_;
	GeeHashMap* _tmp60_;
	GeeHashMap* _tmp61_;
	gpointer _tmp62_;
	GeeList* _tmp63_;
	GeeList* _tmp64_;
	GeeList* _tmp65_;
	GeeHashMap* _tmp66_;
	gpointer _tmp67_;
	GeeList* _tmp68_;
	gboolean changed;
	GeeHashMap* _tmp69_;
	GeeList* _tmp70_;
	GeeList* _tmp71_;
};

struct _XmppXepMujiParamSpecGroupCall {
	GParamSpec parent_instance;
};

static gpointer xmpp_xep_muji_module_parent_class = NULL;
XmppModuleIdentity* xmpp_xep_muji_module_IDENTITY = NULL;
static gpointer xmpp_xep_muji_group_call_parent_class = NULL;
static gpointer xmpp_xep_muji_flag_parent_class = NULL;
XmppFlagIdentity* xmpp_xep_muji_flag_IDENTITY = NULL;

static void xmpp_xep_muji_module_join_call_data_free (gpointer _data);
static gboolean xmpp_xep_muji_module_join_call_co (XmppXepMujiModuleJoinCallData* _data_);
static void xmpp_xep_muji_module_join_call_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_);
static void xmpp_xep_muji_module_wait_for_preparing_peers (XmppXepMujiModule* self,
                                                    XmppXmppStream* stream,
                                                    XmppJid* muc_jid,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
static GeeList* xmpp_xep_muji_module_wait_for_preparing_peers_finish (XmppXepMujiModule* self,
                                                               GAsyncResult* _res_);
static gboolean _xmpp_jid_equals_func_gee_equal_data_func (gconstpointer a,
                                                    gconstpointer b,
                                                    gpointer self);
static void xmpp_xep_muji_module_compute_payload_intersection (XmppXepMujiModule* self,
                                                        XmppXmppStream* stream,
                                                        XmppXepMujiGroupCall* group_call,
                                                        const gchar* media,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
static void xmpp_xep_muji_module_compute_payload_intersection_finish (XmppXepMujiModule* self,
                                                               GAsyncResult* _res_);
static void xmpp_xep_muji_module_wait_for_preparing_peers_data_free (gpointer _data);
static gboolean xmpp_xep_muji_module_wait_for_preparing_peers_co (XmppXepMujiModuleWaitForPreparingPeersData* _data_);
static GeeList* xmpp_xep_muji_module_get_other_presences (XmppXepMujiModule* self,
                                                   XmppXmppStream* stream,
                                                   XmppJid* muc_jid);
static void xmpp_xep_muji_module_wait_for_preparing_peers_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_);
static void xmpp_xep_muji_module_compute_payload_intersection_data_free (gpointer _data);
static gboolean xmpp_xep_muji_module_compute_payload_intersection_co (XmppXepMujiModuleComputePayloadIntersectionData* _data_);
static GeeList* xmpp_xep_muji_module_parse_payload_types (XmppXepMujiModule* self,
                                                   XmppXmppStream* stream,
                                                   const gchar* media,
                                                   XmppPresenceStanza* presence);
static void xmpp_xep_muji_module_compute_payload_intersection_ready (GObject* source_object,
                                                              GAsyncResult* _res_,
                                                              gpointer _user_data_);
static gboolean _xmpp_xep_jingle_rtp_payload_type_equals_func_gee_equal_data_func (gconstpointer a,
                                                                            gconstpointer b,
                                                                            gpointer self);
static void xmpp_xep_muji_module_on_received_available (XmppXepMujiModule* self,
                                                 XmppXmppStream* stream,
                                                 XmppPresenceStanza* presence);
static void xmpp_xep_muji_module_on_jid_finished_preparing (XmppXepMujiModule* self,
                                                     XmppXmppStream* stream,
                                                     XmppJid* jid,
                                                     XmppXepMujiGroupCall* group_call);
static void xmpp_xep_muji_module_on_received_unavailable (XmppXepMujiModule* self,
                                                   XmppXmppStream* stream,
                                                   XmppPresenceStanza* presence);
static void xmpp_xep_muji_module_real_attach (XmppXmppStreamModule* base,
                                       XmppXmppStream* stream);
static void _xmpp_xep_muji_module_on_received_available_xmpp_presence_module_received_available (XmppPresenceModule* _sender,
                                                                                          XmppXmppStream* stream,
                                                                                          XmppPresenceStanza* presence,
                                                                                          gpointer self);
static void _xmpp_xep_muji_module_on_received_unavailable_xmpp_presence_module_received_unavailable (XmppPresenceModule* _sender,
                                                                                              XmppXmppStream* stream,
                                                                                              XmppPresenceStanza* presence,
                                                                                              gpointer self);
static void xmpp_xep_muji_module_real_detach (XmppXmppStreamModule* base,
                                       XmppXmppStream* stream);
static gchar* xmpp_xep_muji_module_real_get_ns (XmppXmppStreamModule* base);
static gchar* xmpp_xep_muji_module_real_get_id (XmppXmppStreamModule* base);
static void xmpp_xep_muji_module_finalize (GObject * obj);
static GType xmpp_xep_muji_module_get_type_once (void);
static guint _xmpp_jid_hash_func_gee_hash_data_func (gconstpointer v,
                                              gpointer self);
static void g_cclosure_user_marshal_VOID__XMPP_JID (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data);
static void xmpp_xep_muji_group_call_finalize (XmppXepMujiGroupCall * obj);
static GType xmpp_xep_muji_group_call_get_type_once (void);
static guint _xmpp_jid_hash_bare_func_gee_hash_data_func (gconstpointer v,
                                                   gpointer self);
static gboolean _xmpp_jid_equals_bare_func_gee_equal_data_func (gconstpointer a,
                                                         gconstpointer b,
                                                         gpointer self);
static gchar* xmpp_xep_muji_flag_real_get_ns (XmppXmppStreamFlag* base);
static gchar* xmpp_xep_muji_flag_real_get_id (XmppXmppStreamFlag* base);
static void xmpp_xep_muji_flag_finalize (GObject * obj);
static GType xmpp_xep_muji_flag_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static void
xmpp_xep_muji_module_join_call_data_free (gpointer _data)
{
	XmppXepMujiModuleJoinCallData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->muc_jid);
	_xmpp_xep_muji_group_call_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepMujiModuleJoinCallData, _data_);
}

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

static gpointer
_xmpp_jid_ref0 (gpointer self)
{
	return self ? xmpp_jid_ref (self) : NULL;
}

void
xmpp_xep_muji_module_join_call (XmppXepMujiModule* self,
                                XmppXmppStream* stream,
                                XmppJid* muc_jid,
                                gboolean video,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_)
{
	XmppXepMujiModuleJoinCallData* _data_;
	XmppXepMujiModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (muc_jid != NULL);
	_data_ = g_slice_new0 (XmppXepMujiModuleJoinCallData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_muji_module_join_call_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_tmp2_ = _xmpp_jid_ref0 (muc_jid);
	_xmpp_jid_unref0 (_data_->muc_jid);
	_data_->muc_jid = _tmp2_;
	_data_->video = video;
	xmpp_xep_muji_module_join_call_co (_data_);
}

XmppXepMujiGroupCall*
xmpp_xep_muji_module_join_call_finish (XmppXepMujiModule* self,
                                       GAsyncResult* _res_)
{
	XmppXepMujiGroupCall* result;
	XmppXepMujiModuleJoinCallData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
xmpp_xep_muji_module_join_call_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_)
{
	XmppXepMujiModuleJoinCallData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_muji_module_join_call_co (_data_);
}

static gboolean
_xmpp_jid_equals_func_gee_equal_data_func (gconstpointer a,
                                           gconstpointer b,
                                           gpointer self)
{
	gboolean result;
	result = xmpp_jid_equals_func ((XmppJid*) a, (XmppJid*) b);
	return result;
}

static gboolean
xmpp_xep_muji_module_join_call_co (XmppXepMujiModuleJoinCallData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = xmpp_stanza_node_new_build ("muji", XMPP_XEP_MUJI_NS_URI, NULL, NULL);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = xmpp_stanza_node_add_self_xmlns (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = xmpp_stanza_node_new_build ("preparing", XMPP_XEP_MUJI_NS_URI, NULL, NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = xmpp_stanza_node_put_node (_data_->_tmp3_, _data_->_tmp5_);
	_data_->_tmp7_ = _data_->_tmp6_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp5_);
	_xmpp_stanza_entry_unref0 (_data_->_tmp3_);
	_xmpp_stanza_entry_unref0 (_data_->_tmp1_);
	_data_->initial_muji_node = _data_->_tmp7_;
	_data_->_tmp8_ = xmpp_xep_muji_group_call_new (_data_->muc_jid);
	_data_->group_call = _data_->_tmp8_;
	_data_->_tmp9_ = xmpp_xep_muji_flag_IDENTITY;
	_data_->_tmp10_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_MUJI_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp9_);
	_data_->_tmp11_ = (XmppXepMujiFlag*) _data_->_tmp10_;
	_data_->_tmp12_ = _data_->_tmp11_->calls;
	_data_->_tmp13_ = _data_->group_call;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp12_, _data_->muc_jid, _data_->_tmp13_);
	_g_object_unref0 (_data_->_tmp11_);
	_data_->_tmp14_ = _data_->group_call;
	_data_->_tmp15_ = g_strdup_printf ("%08x", (guint) g_random_int ());
	_g_free0 (_data_->_tmp14_->our_nick);
	_data_->_tmp14_->our_nick = _data_->_tmp15_;
	_data_->_tmp16_ = xmpp_bind_flag_IDENTITY;
	_data_->_tmp17_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_BIND_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp16_);
	_data_->_tmp18_ = (XmppBindFlag*) _data_->_tmp17_;
	_data_->_tmp19_ = _data_->_tmp18_->my_jid;
	_data_->_tmp20_ = xmpp_jid_to_string (_data_->_tmp19_);
	_data_->_tmp21_ = _data_->_tmp20_;
	_data_->_tmp22_ = _data_->group_call;
	_data_->_tmp23_ = _data_->_tmp22_->our_nick;
	g_debug ("0272_muji.vala:17: [%s] MUJI joining as %s", _data_->_tmp21_, _data_->_tmp23_);
	_g_free0 (_data_->_tmp21_);
	_g_object_unref0 (_data_->_tmp18_);
	_data_->_tmp24_ = xmpp_xep_muc_module_IDENTITY;
	_data_->_tmp25_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_XEP_MUC_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp24_);
	_data_->_tmp26_ = (XmppXepMucModule*) _data_->_tmp25_;
	_data_->_tmp27_ = _data_->group_call;
	_data_->_tmp28_ = _data_->_tmp27_->our_nick;
	_data_->_tmp29_ = _data_->initial_muji_node;
	_data_->_state_ = 1;
	xmpp_xep_muc_module_enter (_data_->_tmp26_, _data_->stream, _data_->muc_jid, _data_->_tmp28_, NULL, NULL, FALSE, _data_->_tmp29_, xmpp_xep_muji_module_join_call_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp30_ = xmpp_xep_muc_module_enter_finish (_data_->_tmp26_, _data_->_res_);
	_data_->_tmp31_ = _data_->_tmp30_;
	_g_object_unref0 (_data_->_tmp26_);
	_data_->_result_ = _data_->_tmp31_;
	_data_->_tmp33_ = _data_->_result_;
	if (_data_->_tmp33_ == NULL) {
		_data_->_tmp32_ = TRUE;
	} else {
		_data_->_tmp34_ = _data_->_result_;
		_data_->_tmp35_ = _data_->_tmp34_->nick;
		_data_->_tmp32_ = _data_->_tmp35_ == NULL;
	}
	if (_data_->_tmp32_) {
		_data_->result = NULL;
		_xmpp_xep_muc_join_result_unref0 (_data_->_result_);
		_xmpp_xep_muji_group_call_unref0 (_data_->group_call);
		_xmpp_stanza_entry_unref0 (_data_->initial_muji_node);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp36_ = xmpp_bind_flag_IDENTITY;
	_data_->_tmp37_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_BIND_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp36_);
	_data_->_tmp38_ = (XmppBindFlag*) _data_->_tmp37_;
	_data_->_tmp39_ = _data_->_tmp38_->my_jid;
	_data_->_tmp40_ = xmpp_jid_to_string (_data_->_tmp39_);
	_data_->_tmp41_ = _data_->_tmp40_;
	_data_->_tmp42_ = _data_->group_call;
	_data_->_tmp43_ = _data_->_tmp42_->our_nick;
	g_debug ("0272_muji.vala:20: [%s] MUJI joining as %s done", _data_->_tmp41_, _data_->_tmp43_);
	_g_free0 (_data_->_tmp41_);
	_g_object_unref0 (_data_->_tmp38_);
	_data_->_state_ = 2;
	xmpp_xep_muji_module_wait_for_preparing_peers (_data_->self, _data_->stream, _data_->muc_jid, xmpp_xep_muji_module_join_call_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp44_ = xmpp_xep_muji_module_wait_for_preparing_peers_finish (_data_->self, _data_->_res_);
	_data_->other_presences = _data_->_tmp44_;
	_data_->_tmp45_ = gee_array_list_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, _xmpp_jid_equals_func_gee_equal_data_func, NULL, NULL);
	_data_->finished_real_jids = _data_->_tmp45_;
	{
		_data_->_tmp46_ = _data_->other_presences;
		_data_->_presence_list = _data_->_tmp46_;
		_data_->_tmp47_ = _data_->_presence_list;
		_data_->_tmp48_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp47_);
		_data_->_tmp49_ = _data_->_tmp48_;
		_data_->_presence_size = _data_->_tmp49_;
		_data_->_presence_index = -1;
		while (TRUE) {
			_data_->_presence_index = _data_->_presence_index + 1;
			_data_->_tmp50_ = _data_->_presence_index;
			_data_->_tmp51_ = _data_->_presence_size;
			if (!(_data_->_tmp50_ < _data_->_tmp51_)) {
				break;
			}
			_data_->_tmp52_ = _data_->_presence_list;
			_data_->_tmp53_ = gee_list_get (_data_->_tmp52_, _data_->_presence_index);
			_data_->presence = (XmppPresenceStanza*) _data_->_tmp53_;
			_data_->_tmp54_ = _data_->presence;
			_data_->_tmp55_ = ((XmppStanza*) _data_->_tmp54_)->stanza;
			_data_->_tmp56_ = xmpp_stanza_node_get_deep_subnode (_data_->_tmp55_, XMPP_XEP_MUJI_NS_URI ":muji", XMPP_XEP_MUJI_NS_URI ":preparing", NULL);
			_data_->_tmp57_ = _data_->_tmp56_;
			_data_->_tmp58_ = _data_->_tmp57_ != NULL;
			_xmpp_stanza_entry_unref0 (_data_->_tmp57_);
			if (_data_->_tmp58_) {
				_g_object_unref0 (_data_->presence);
				continue;
			}
			_data_->_tmp59_ = xmpp_xep_muc_flag_IDENTITY;
			_data_->_tmp60_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp59_);
			_data_->_tmp61_ = (XmppXepMucFlag*) _data_->_tmp60_;
			_data_->_tmp62_ = _data_->presence;
			_data_->_tmp63_ = xmpp_stanza_get_from ((XmppStanza*) _data_->_tmp62_);
			_data_->_tmp64_ = _data_->_tmp63_;
			_data_->_tmp65_ = _data_->_tmp64_;
			_data_->_tmp66_ = xmpp_xep_muc_flag_get_real_jid (_data_->_tmp61_, _data_->_tmp65_);
			_data_->_tmp67_ = _data_->_tmp66_;
			_xmpp_jid_unref0 (_data_->_tmp65_);
			_g_object_unref0 (_data_->_tmp61_);
			_data_->real_jid = _data_->_tmp67_;
			_data_->_tmp68_ = _data_->real_jid;
			if (_data_->_tmp68_ == NULL) {
				_data_->_tmp69_ = _data_->presence;
				_data_->_tmp70_ = xmpp_stanza_get_from ((XmppStanza*) _data_->_tmp69_);
				_data_->_tmp71_ = _data_->_tmp70_;
				_data_->_tmp72_ = _data_->_tmp71_;
				_data_->_tmp73_ = xmpp_jid_to_string (_data_->_tmp72_);
				_data_->_tmp74_ = _data_->_tmp73_;
				g_warning ("0272_muji.vala:29: Don't know the real jid for %s", _data_->_tmp74_);
				_g_free0 (_data_->_tmp74_);
				_xmpp_jid_unref0 (_data_->_tmp72_);
				_xmpp_jid_unref0 (_data_->real_jid);
				_g_object_unref0 (_data_->presence);
				continue;
			}
			_data_->_tmp75_ = _data_->finished_real_jids;
			_data_->_tmp76_ = _data_->real_jid;
			gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp75_, _data_->_tmp76_);
			_xmpp_jid_unref0 (_data_->real_jid);
			_g_object_unref0 (_data_->presence);
		}
	}
	_data_->_tmp77_ = _data_->group_call;
	_data_->_tmp78_ = _data_->_tmp77_->peers_to_connect_to;
	_data_->_tmp79_ = _data_->finished_real_jids;
	gee_array_list_add_all (_data_->_tmp78_, (GeeCollection*) _data_->_tmp79_);
	_data_->_tmp80_ = xmpp_stanza_node_new_build ("muji", XMPP_XEP_MUJI_NS_URI, NULL, NULL);
	_data_->_tmp81_ = _data_->_tmp80_;
	_data_->_tmp82_ = xmpp_stanza_node_add_self_xmlns (_data_->_tmp81_);
	_data_->_tmp83_ = _data_->_tmp82_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp81_);
	_data_->muji_node = _data_->_tmp83_;
	_data_->_tmp84__length1 = 0;
	_data_->__tmp84__size_ = 0;
	if (_data_->video) {
		_data_->_tmp85_ = g_strdup ("audio");
		_data_->_tmp86_ = g_strdup ("video");
		_data_->_tmp87_ = g_new0 (gchar*, 2 + 1);
		_data_->_tmp87_[0] = _data_->_tmp85_;
		_data_->_tmp87_[1] = _data_->_tmp86_;
		_data_->_tmp84_ = (_vala_array_free (_data_->_tmp84_, _data_->_tmp84__length1, (GDestroyNotify) g_free), NULL);
		_data_->_tmp84_ = _data_->_tmp87_;
		_data_->_tmp84__length1 = 2;
		_data_->__tmp84__size_ = _data_->_tmp84__length1;
	} else {
		_data_->_tmp88_ = g_strdup ("audio");
		_data_->_tmp89_ = g_new0 (gchar*, 1 + 1);
		_data_->_tmp89_[0] = _data_->_tmp88_;
		_data_->_tmp84_ = (_vala_array_free (_data_->_tmp84_, _data_->_tmp84__length1, (GDestroyNotify) g_free), NULL);
		_data_->_tmp84_ = _data_->_tmp89_;
		_data_->_tmp84__length1 = 1;
		_data_->__tmp84__size_ = _data_->_tmp84__length1;
	}
	{
		_data_->media_collection_length1 = 0;
		_data_->_media_collection_size_ = 0;
		_data_->media_collection = _data_->_tmp84_;
		_data_->media_collection_length1 = _data_->_tmp84__length1;
		for (_data_->media_it = 0; _data_->media_it < _data_->media_collection_length1; _data_->media_it = _data_->media_it + 1) {
			_data_->_tmp90_ = g_strdup (_data_->media_collection[_data_->media_it]);
			_data_->media = _data_->_tmp90_;
			{
				_data_->_tmp91_ = xmpp_stanza_node_new_build ("content", XMPP_XEP_JINGLE_NS_URI, NULL, NULL);
				_data_->_tmp92_ = _data_->_tmp91_;
				_data_->_tmp93_ = xmpp_stanza_node_add_self_xmlns (_data_->_tmp92_);
				_data_->_tmp94_ = _data_->_tmp93_;
				_data_->_tmp95_ = _data_->media;
				_data_->_tmp96_ = xmpp_stanza_node_put_attribute (_data_->_tmp94_, "name", _data_->_tmp95_, NULL);
				_data_->_tmp97_ = _data_->_tmp96_;
				_xmpp_stanza_entry_unref0 (_data_->_tmp94_);
				_xmpp_stanza_entry_unref0 (_data_->_tmp92_);
				_data_->content_node = _data_->_tmp97_;
				_data_->_tmp98_ = xmpp_stanza_node_new_build ("description", XMPP_XEP_JINGLE_RTP_NS_URI, NULL, NULL);
				_data_->_tmp99_ = _data_->_tmp98_;
				_data_->_tmp100_ = xmpp_stanza_node_add_self_xmlns (_data_->_tmp99_);
				_data_->_tmp101_ = _data_->_tmp100_;
				_data_->_tmp102_ = _data_->media;
				_data_->_tmp103_ = xmpp_stanza_node_put_attribute (_data_->_tmp101_, "media", _data_->_tmp102_, NULL);
				_data_->_tmp104_ = _data_->_tmp103_;
				_xmpp_stanza_entry_unref0 (_data_->_tmp101_);
				_xmpp_stanza_entry_unref0 (_data_->_tmp99_);
				_data_->description_node = _data_->_tmp104_;
				_data_->_tmp105_ = _data_->content_node;
				_data_->_tmp106_ = _data_->description_node;
				_data_->_tmp107_ = xmpp_stanza_node_put_node (_data_->_tmp105_, _data_->_tmp106_);
				_data_->_tmp108_ = _data_->_tmp107_;
				_xmpp_stanza_entry_unref0 (_data_->_tmp108_);
				_data_->payload_types = NULL;
				_data_->_tmp109_ = _data_->other_presences;
				_data_->_tmp110_ = gee_collection_get_is_empty ((GeeCollection*) _data_->_tmp109_);
				_data_->_tmp111_ = _data_->_tmp110_;
				if (_data_->_tmp111_) {
					_data_->_tmp112_ = xmpp_xep_jingle_rtp_module_IDENTITY;
					_data_->_tmp113_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_XEP_JINGLE_RTP_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp112_);
					_data_->_tmp114_ = (XmppXepJingleRtpModule*) _data_->_tmp113_;
					_data_->_tmp115_ = _data_->media;
					_data_->_state_ = 3;
					xmpp_xep_jingle_rtp_module_get_supported_payloads (_data_->_tmp114_, _data_->_tmp115_, xmpp_xep_muji_module_join_call_ready, _data_);
					return FALSE;
					_state_3:
					_data_->_tmp116_ = xmpp_xep_jingle_rtp_module_get_supported_payloads_finish (_data_->_tmp114_, _data_->_res_);
					_g_object_unref0 (_data_->payload_types);
					_data_->payload_types = _data_->_tmp116_;
					_g_object_unref0 (_data_->_tmp114_);
				} else {
					_data_->_tmp117_ = _data_->group_call;
					_data_->_tmp118_ = _data_->media;
					_data_->_state_ = 4;
					xmpp_xep_muji_module_compute_payload_intersection (_data_->self, _data_->stream, _data_->_tmp117_, _data_->_tmp118_, xmpp_xep_muji_module_join_call_ready, _data_);
					return FALSE;
					_state_4:
					xmpp_xep_muji_module_compute_payload_intersection_finish (_data_->self, _data_->_res_);
					_data_->_tmp119_ = _data_->group_call;
					_data_->_tmp120_ = _data_->_tmp119_->current_payload_intersection;
					_data_->_tmp121_ = _data_->media;
					_data_->_tmp122_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp120_, _data_->_tmp121_);
					_g_object_unref0 (_data_->payload_types);
					_data_->payload_types = (GeeList*) _data_->_tmp122_;
				}
				{
					_data_->_tmp123_ = _data_->payload_types;
					_data_->_payload_type_list = _data_->_tmp123_;
					_data_->_tmp124_ = _data_->_payload_type_list;
					_data_->_tmp125_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp124_);
					_data_->_tmp126_ = _data_->_tmp125_;
					_data_->_payload_type_size = _data_->_tmp126_;
					_data_->_payload_type_index = -1;
					while (TRUE) {
						_data_->_payload_type_index = _data_->_payload_type_index + 1;
						_data_->_tmp127_ = _data_->_payload_type_index;
						_data_->_tmp128_ = _data_->_payload_type_size;
						if (!(_data_->_tmp127_ < _data_->_tmp128_)) {
							break;
						}
						_data_->_tmp129_ = _data_->_payload_type_list;
						_data_->_tmp130_ = gee_list_get (_data_->_tmp129_, _data_->_payload_type_index);
						_data_->payload_type = (XmppXepJingleRtpPayloadType*) _data_->_tmp130_;
						_data_->_tmp131_ = _data_->description_node;
						_data_->_tmp132_ = _data_->payload_type;
						_data_->_tmp133_ = xmpp_xep_jingle_rtp_payload_type_to_xml (_data_->_tmp132_);
						_data_->_tmp134_ = _data_->_tmp133_;
						_data_->_tmp135_ = xmpp_stanza_node_add_self_xmlns (_data_->_tmp134_);
						_data_->_tmp136_ = _data_->_tmp135_;
						_data_->_tmp137_ = xmpp_stanza_node_put_node (_data_->_tmp131_, _data_->_tmp136_);
						_data_->_tmp138_ = _data_->_tmp137_;
						_xmpp_stanza_entry_unref0 (_data_->_tmp138_);
						_xmpp_stanza_entry_unref0 (_data_->_tmp136_);
						_xmpp_stanza_entry_unref0 (_data_->_tmp134_);
						_xmpp_xep_jingle_rtp_payload_type_unref0 (_data_->payload_type);
					}
				}
				_data_->_tmp139_ = _data_->muji_node;
				_data_->_tmp140_ = _data_->content_node;
				_data_->_tmp141_ = xmpp_stanza_node_put_node (_data_->_tmp139_, _data_->_tmp140_);
				_data_->_tmp142_ = _data_->_tmp141_;
				_xmpp_stanza_entry_unref0 (_data_->_tmp142_);
				_g_object_unref0 (_data_->payload_types);
				_xmpp_stanza_entry_unref0 (_data_->description_node);
				_xmpp_stanza_entry_unref0 (_data_->content_node);
				_g_free0 (_data_->media);
			}
		}
	}
	_data_->_tmp144_ = _data_->group_call;
	_data_->_tmp145_ = _data_->_tmp144_->our_nick;
	_data_->_tmp146_ = xmpp_jid_with_resource (_data_->muc_jid, _data_->_tmp145_, &_data_->_inner_error0_);
	_data_->_tmp143_ = _data_->_tmp146_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_data_->_tmp84_ = (_vala_array_free (_data_->_tmp84_, _data_->_tmp84__length1, (GDestroyNotify) g_free), NULL);
		_xmpp_stanza_entry_unref0 (_data_->muji_node);
		_g_object_unref0 (_data_->finished_real_jids);
		_g_object_unref0 (_data_->other_presences);
		_xmpp_xep_muc_join_result_unref0 (_data_->_result_);
		_xmpp_xep_muji_group_call_unref0 (_data_->group_call);
		_xmpp_stanza_entry_unref0 (_data_->initial_muji_node);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp147_ = _data_->_tmp143_;
	_data_->_tmp143_ = NULL;
	_data_->_tmp148_ = NULL;
	_data_->_tmp148_ = xmpp_presence_stanza_new (NULL);
	xmpp_stanza_set_to ((XmppStanza*) _data_->_tmp148_, _data_->_tmp147_);
	_xmpp_jid_unref0 (_data_->_tmp147_);
	_data_->presence_stanza = _data_->_tmp148_;
	_data_->_tmp149_ = _data_->presence_stanza;
	_data_->_tmp150_ = ((XmppStanza*) _data_->_tmp149_)->stanza;
	_data_->_tmp151_ = _data_->muji_node;
	_data_->_tmp152_ = xmpp_stanza_node_put_node (_data_->_tmp150_, _data_->_tmp151_);
	_data_->_tmp153_ = _data_->_tmp152_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp153_);
	_data_->_tmp154_ = xmpp_presence_module_IDENTITY;
	_data_->_tmp155_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp154_);
	_data_->_tmp156_ = (XmppPresenceModule*) _data_->_tmp155_;
	_data_->_tmp157_ = _data_->presence_stanza;
	xmpp_presence_module_send_presence (_data_->_tmp156_, _data_->stream, _data_->_tmp157_);
	_g_object_unref0 (_data_->_tmp156_);
	_data_->result = _data_->group_call;
	_g_object_unref0 (_data_->presence_stanza);
	_xmpp_jid_unref0 (_data_->_tmp143_);
	_data_->_tmp84_ = (_vala_array_free (_data_->_tmp84_, _data_->_tmp84__length1, (GDestroyNotify) g_free), NULL);
	_xmpp_stanza_entry_unref0 (_data_->muji_node);
	_g_object_unref0 (_data_->finished_real_jids);
	_g_object_unref0 (_data_->other_presences);
	_xmpp_xep_muc_join_result_unref0 (_data_->_result_);
	_xmpp_stanza_entry_unref0 (_data_->initial_muji_node);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
xmpp_xep_muji_module_wait_for_preparing_peers_data_free (gpointer _data)
{
	XmppXepMujiModuleWaitForPreparingPeersData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->muc_jid);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepMujiModuleWaitForPreparingPeersData, _data_);
}

static void
xmpp_xep_muji_module_wait_for_preparing_peers (XmppXepMujiModule* self,
                                               XmppXmppStream* stream,
                                               XmppJid* muc_jid,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	XmppXepMujiModuleWaitForPreparingPeersData* _data_;
	XmppXepMujiModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (muc_jid != NULL);
	_data_ = g_slice_new0 (XmppXepMujiModuleWaitForPreparingPeersData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_muji_module_wait_for_preparing_peers_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_tmp2_ = _xmpp_jid_ref0 (muc_jid);
	_xmpp_jid_unref0 (_data_->muc_jid);
	_data_->muc_jid = _tmp2_;
	xmpp_xep_muji_module_wait_for_preparing_peers_co (_data_);
}

static GeeList*
xmpp_xep_muji_module_wait_for_preparing_peers_finish (XmppXepMujiModule* self,
                                                      GAsyncResult* _res_)
{
	GeeList* result;
	XmppXepMujiModuleWaitForPreparingPeersData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
xmpp_xep_muji_module_wait_for_preparing_peers_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_)
{
	XmppXepMujiModuleWaitForPreparingPeersData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_muji_module_wait_for_preparing_peers_co (_data_);
}

static gboolean
xmpp_xep_muji_module_wait_for_preparing_peers_co (XmppXepMujiModuleWaitForPreparingPeersData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = gee_promise_new (GEE_TYPE_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref);
	_data_->promise = _data_->_tmp0_;
	_data_->_tmp1_ = gee_array_list_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, _xmpp_jid_equals_func_gee_equal_data_func, NULL, NULL);
	_data_->preparing_peers = _data_->_tmp1_;
	_data_->_tmp2_ = xmpp_xep_muji_module_get_other_presences (_data_->self, _data_->stream, _data_->muc_jid);
	_data_->presences = _data_->_tmp2_;
	{
		_data_->_tmp3_ = _data_->presences;
		_data_->_presence_list = _data_->_tmp3_;
		_data_->_tmp4_ = _data_->_presence_list;
		_data_->_tmp5_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp4_);
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_presence_size = _data_->_tmp6_;
		_data_->_presence_index = -1;
		while (TRUE) {
			_data_->_presence_index = _data_->_presence_index + 1;
			_data_->_tmp7_ = _data_->_presence_index;
			_data_->_tmp8_ = _data_->_presence_size;
			if (!(_data_->_tmp7_ < _data_->_tmp8_)) {
				break;
			}
			_data_->_tmp9_ = _data_->_presence_list;
			_data_->_tmp10_ = gee_list_get (_data_->_tmp9_, _data_->_presence_index);
			_data_->presence = (XmppPresenceStanza*) _data_->_tmp10_;
			_data_->_tmp11_ = _data_->presence;
			_data_->_tmp12_ = ((XmppStanza*) _data_->_tmp11_)->stanza;
			_data_->_tmp13_ = xmpp_stanza_node_get_deep_subnode (_data_->_tmp12_, XMPP_XEP_MUJI_NS_URI ":muji", XMPP_XEP_MUJI_NS_URI ":preparing", NULL);
			_data_->preparing_node = _data_->_tmp13_;
			_data_->_tmp14_ = _data_->preparing_node;
			if (_data_->_tmp14_ != NULL) {
				_data_->_tmp15_ = _data_->preparing_peers;
				_data_->_tmp16_ = _data_->presence;
				_data_->_tmp17_ = xmpp_stanza_get_from ((XmppStanza*) _data_->_tmp16_);
				_data_->_tmp18_ = _data_->_tmp17_;
				_data_->_tmp19_ = _data_->_tmp18_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp15_, _data_->_tmp19_);
				_xmpp_jid_unref0 (_data_->_tmp19_);
			}
			_xmpp_stanza_entry_unref0 (_data_->preparing_node);
			_g_object_unref0 (_data_->presence);
		}
	}
	_data_->_tmp20_ = xmpp_bind_flag_IDENTITY;
	_data_->_tmp21_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_BIND_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp20_);
	_data_->_tmp22_ = (XmppBindFlag*) _data_->_tmp21_;
	_data_->_tmp23_ = _data_->_tmp22_->my_jid;
	_data_->_tmp24_ = xmpp_jid_to_string (_data_->_tmp23_);
	_data_->_tmp25_ = _data_->_tmp24_;
	_data_->_tmp26_ = _data_->preparing_peers;
	_data_->_tmp27_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp26_);
	_data_->_tmp28_ = _data_->_tmp27_;
	_data_->_tmp29_ = _data_->presences;
	_data_->_tmp30_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp29_);
	_data_->_tmp31_ = _data_->_tmp30_;
	g_debug ("0272_muji.vala:80: [%s] MUJI waiting for %i/%i peers", _data_->_tmp25_, _data_->_tmp28_, _data_->_tmp31_);
	_g_free0 (_data_->_tmp25_);
	_g_object_unref0 (_data_->_tmp22_);
	_data_->_tmp32_ = _data_->preparing_peers;
	_data_->_tmp33_ = gee_collection_get_is_empty ((GeeCollection*) _data_->_tmp32_);
	_data_->_tmp34_ = _data_->_tmp33_;
	if (_data_->_tmp34_) {
		_data_->result = _data_->presences;
		_g_object_unref0 (_data_->preparing_peers);
		_gee_promise_unref0 (_data_->promise);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp35_ = xmpp_xep_muji_flag_IDENTITY;
	_data_->_tmp36_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_MUJI_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp35_);
	_data_->_tmp37_ = (XmppXepMujiFlag*) _data_->_tmp36_;
	_data_->_tmp38_ = _data_->_tmp37_->calls;
	_data_->_tmp39_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp38_, _data_->muc_jid);
	_data_->_tmp40_ = (XmppXepMujiGroupCall*) _data_->_tmp39_;
	_g_object_unref0 (_data_->_tmp37_);
	_data_->group_call = _data_->_tmp40_;
	_data_->_tmp41_ = _data_->group_call;
	_data_->_tmp42_ = _data_->_tmp41_->waiting_for_finish_prepares;
	_data_->_tmp43_ = _data_->promise;
	_data_->_tmp44_ = _data_->preparing_peers;
	gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp42_, _data_->_tmp43_, (GeeList*) _data_->_tmp44_);
	_data_->_tmp46_ = _data_->promise;
	_data_->_tmp47_ = gee_promise_get_future (_data_->_tmp46_);
	_data_->_tmp48_ = _data_->_tmp47_;
	_data_->_state_ = 1;
	gee_future_wait_async (_data_->_tmp48_, xmpp_xep_muji_module_wait_for_preparing_peers_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp49_ = gee_future_wait_finish (_data_->_tmp48_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_tmp45_ = (GeeList*) _data_->_tmp49_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_xmpp_xep_muji_group_call_unref0 (_data_->group_call);
		_g_object_unref0 (_data_->presences);
		_g_object_unref0 (_data_->preparing_peers);
		_gee_promise_unref0 (_data_->promise);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp50_ = _g_object_ref0 (_data_->_tmp45_);
	_data_->result = _data_->_tmp50_;
	_xmpp_xep_muji_group_call_unref0 (_data_->group_call);
	_g_object_unref0 (_data_->presences);
	_g_object_unref0 (_data_->preparing_peers);
	_gee_promise_unref0 (_data_->promise);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
xmpp_xep_muji_module_compute_payload_intersection_data_free (gpointer _data)
{
	XmppXepMujiModuleComputePayloadIntersectionData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_xep_muji_group_call_unref0 (_data_->group_call);
	_g_free0 (_data_->media);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepMujiModuleComputePayloadIntersectionData, _data_);
}

static gpointer
_xmpp_xep_muji_group_call_ref0 (gpointer self)
{
	return self ? xmpp_xep_muji_group_call_ref (self) : NULL;
}

static void
xmpp_xep_muji_module_compute_payload_intersection (XmppXepMujiModule* self,
                                                   XmppXmppStream* stream,
                                                   XmppXepMujiGroupCall* group_call,
                                                   const gchar* media,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	XmppXepMujiModuleComputePayloadIntersectionData* _data_;
	XmppXepMujiModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppXepMujiGroupCall* _tmp2_;
	gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (group_call != NULL);
	g_return_if_fail (media != NULL);
	_data_ = g_slice_new0 (XmppXepMujiModuleComputePayloadIntersectionData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_muji_module_compute_payload_intersection_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_tmp2_ = _xmpp_xep_muji_group_call_ref0 (group_call);
	_xmpp_xep_muji_group_call_unref0 (_data_->group_call);
	_data_->group_call = _tmp2_;
	_tmp3_ = g_strdup (media);
	_g_free0 (_data_->media);
	_data_->media = _tmp3_;
	xmpp_xep_muji_module_compute_payload_intersection_co (_data_);
}

static void
xmpp_xep_muji_module_compute_payload_intersection_finish (XmppXepMujiModule* self,
                                                          GAsyncResult* _res_)
{
	XmppXepMujiModuleComputePayloadIntersectionData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
xmpp_xep_muji_module_compute_payload_intersection_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_)
{
	XmppXepMujiModuleComputePayloadIntersectionData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_muji_module_compute_payload_intersection_co (_data_);
}

static gboolean
xmpp_xep_muji_module_compute_payload_intersection_co (XmppXepMujiModuleComputePayloadIntersectionData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->group_call->muc_jid;
	_data_->_tmp1_ = xmpp_xep_muji_module_get_other_presences (_data_->self, _data_->stream, _data_->_tmp0_);
	_data_->presences = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->presences;
	_data_->_tmp3_ = gee_collection_get_is_empty ((GeeCollection*) _data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	if (_data_->_tmp4_) {
		_g_object_unref0 (_data_->presences);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp5_ = _data_->presences;
	_data_->_tmp6_ = gee_list_get (_data_->_tmp5_, 0);
	_data_->_tmp7_ = (XmppPresenceStanza*) _data_->_tmp6_;
	_data_->_tmp8_ = xmpp_xep_muji_module_parse_payload_types (_data_->self, _data_->stream, _data_->media, _data_->_tmp7_);
	_data_->_tmp9_ = _data_->_tmp8_;
	_g_object_unref0 (_data_->_tmp7_);
	_data_->intersection = _data_->_tmp9_;
	_data_->_tmp10_ = gee_array_list_new (XMPP_XEP_JINGLE_RTP_TYPE_PAYLOAD_TYPE, (GBoxedCopyFunc) xmpp_xep_jingle_rtp_payload_type_ref, (GDestroyNotify) xmpp_xep_jingle_rtp_payload_type_unref, NULL, NULL, NULL);
	_data_->remove_payloads = _data_->_tmp10_;
	{
		_data_->_tmp11_ = _data_->presences;
		_data_->_presence_list = _data_->_tmp11_;
		_data_->_tmp12_ = _data_->_presence_list;
		_data_->_tmp13_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp12_);
		_data_->_tmp14_ = _data_->_tmp13_;
		_data_->_presence_size = _data_->_tmp14_;
		_data_->_presence_index = -1;
		while (TRUE) {
			_data_->_presence_index = _data_->_presence_index + 1;
			_data_->_tmp15_ = _data_->_presence_index;
			_data_->_tmp16_ = _data_->_presence_size;
			if (!(_data_->_tmp15_ < _data_->_tmp16_)) {
				break;
			}
			_data_->_tmp17_ = _data_->_presence_list;
			_data_->_tmp18_ = gee_list_get (_data_->_tmp17_, _data_->_presence_index);
			_data_->presence = (XmppPresenceStanza*) _data_->_tmp18_;
			_data_->_tmp19_ = _data_->presence;
			_data_->_tmp20_ = xmpp_xep_muji_module_parse_payload_types (_data_->self, _data_->stream, _data_->media, _data_->_tmp19_);
			_data_->peer_payload_types = _data_->_tmp20_;
			{
				_data_->_tmp21_ = _data_->intersection;
				_data_->_payload_type_list = _data_->_tmp21_;
				_data_->_tmp22_ = _data_->_payload_type_list;
				_data_->_tmp23_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp22_);
				_data_->_tmp24_ = _data_->_tmp23_;
				_data_->_payload_type_size = _data_->_tmp24_;
				_data_->_payload_type_index = -1;
				while (TRUE) {
					_data_->_payload_type_index = _data_->_payload_type_index + 1;
					_data_->_tmp25_ = _data_->_payload_type_index;
					_data_->_tmp26_ = _data_->_payload_type_size;
					if (!(_data_->_tmp25_ < _data_->_tmp26_)) {
						break;
					}
					_data_->_tmp27_ = _data_->_payload_type_list;
					_data_->_tmp28_ = gee_list_get (_data_->_tmp27_, _data_->_payload_type_index);
					_data_->payload_type = (XmppXepJingleRtpPayloadType*) _data_->_tmp28_;
					_data_->_tmp29_ = _data_->peer_payload_types;
					_data_->_tmp30_ = _data_->payload_type;
					if (!gee_collection_contains ((GeeCollection*) _data_->_tmp29_, _data_->_tmp30_)) {
						_data_->_tmp31_ = _data_->remove_payloads;
						_data_->_tmp32_ = _data_->payload_type;
						gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp31_, _data_->_tmp32_);
					}
					_xmpp_xep_jingle_rtp_payload_type_unref0 (_data_->payload_type);
				}
			}
			_g_object_unref0 (_data_->peer_payload_types);
			_g_object_unref0 (_data_->presence);
		}
	}
	{
		_data_->_tmp33_ = _data_->intersection;
		_data_->_vala1__payload_type_list = _data_->_tmp33_;
		_data_->_tmp34_ = _data_->_vala1__payload_type_list;
		_data_->_tmp35_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp34_);
		_data_->_tmp36_ = _data_->_tmp35_;
		_data_->_vala1__payload_type_size = _data_->_tmp36_;
		_data_->_vala1__payload_type_index = -1;
		while (TRUE) {
			_data_->_vala1__payload_type_index = _data_->_vala1__payload_type_index + 1;
			_data_->_tmp37_ = _data_->_vala1__payload_type_index;
			_data_->_tmp38_ = _data_->_vala1__payload_type_size;
			if (!(_data_->_tmp37_ < _data_->_tmp38_)) {
				break;
			}
			_data_->_tmp39_ = _data_->_vala1__payload_type_list;
			_data_->_tmp40_ = gee_list_get (_data_->_tmp39_, _data_->_vala1__payload_type_index);
			_data_->_vala1_payload_type = (XmppXepJingleRtpPayloadType*) _data_->_tmp40_;
			_data_->_tmp41_ = xmpp_xep_jingle_rtp_module_IDENTITY;
			_data_->_tmp42_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_XEP_JINGLE_RTP_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp41_);
			_data_->_tmp43_ = (XmppXepJingleRtpModule*) _data_->_tmp42_;
			_data_->_tmp44_ = _data_->_vala1_payload_type;
			_data_->_state_ = 1;
			xmpp_xep_jingle_rtp_module_is_payload_supported (_data_->_tmp43_, _data_->media, _data_->_tmp44_, xmpp_xep_muji_module_compute_payload_intersection_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp45_ = !xmpp_xep_jingle_rtp_module_is_payload_supported_finish (_data_->_tmp43_, _data_->_res_);
			_g_object_unref0 (_data_->_tmp43_);
			if (_data_->_tmp45_) {
				_data_->_tmp46_ = _data_->remove_payloads;
				_data_->_tmp47_ = _data_->_vala1_payload_type;
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp46_, _data_->_tmp47_);
			}
			_xmpp_xep_jingle_rtp_payload_type_unref0 (_data_->_vala1_payload_type);
		}
	}
	{
		_data_->_tmp48_ = _data_->remove_payloads;
		_data_->_vala2__payload_type_list = _data_->_tmp48_;
		_data_->_tmp49_ = _data_->_vala2__payload_type_list;
		_data_->_tmp50_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp49_);
		_data_->_tmp51_ = _data_->_tmp50_;
		_data_->_vala2__payload_type_size = _data_->_tmp51_;
		_data_->_vala2__payload_type_index = -1;
		while (TRUE) {
			_data_->_vala2__payload_type_index = _data_->_vala2__payload_type_index + 1;
			_data_->_tmp52_ = _data_->_vala2__payload_type_index;
			_data_->_tmp53_ = _data_->_vala2__payload_type_size;
			if (!(_data_->_tmp52_ < _data_->_tmp53_)) {
				break;
			}
			_data_->_tmp54_ = _data_->_vala2__payload_type_list;
			_data_->_tmp55_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp54_, _data_->_vala2__payload_type_index);
			_data_->_vala2_payload_type = (XmppXepJingleRtpPayloadType*) _data_->_tmp55_;
			_data_->_tmp56_ = _data_->intersection;
			_data_->_tmp57_ = _data_->_vala2_payload_type;
			gee_collection_remove ((GeeCollection*) _data_->_tmp56_, _data_->_tmp57_);
			_xmpp_xep_jingle_rtp_payload_type_unref0 (_data_->_vala2_payload_type);
		}
	}
	_data_->_tmp60_ = _data_->group_call->current_payload_intersection;
	if (!gee_abstract_map_has_key ((GeeAbstractMap*) _data_->_tmp60_, _data_->media)) {
		_data_->_tmp59_ = TRUE;
	} else {
		_data_->_tmp61_ = _data_->group_call->current_payload_intersection;
		_data_->_tmp62_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp61_, _data_->media);
		_data_->_tmp63_ = (GeeList*) _data_->_tmp62_;
		_data_->_tmp64_ = _data_->intersection;
		_data_->_tmp59_ = !gee_collection_contains_all ((GeeCollection*) _data_->_tmp63_, (GeeCollection*) _data_->_tmp64_);
		_g_object_unref0 (_data_->_tmp63_);
	}
	if (_data_->_tmp59_) {
		_data_->_tmp58_ = TRUE;
	} else {
		_data_->_tmp65_ = _data_->intersection;
		_data_->_tmp66_ = _data_->group_call->current_payload_intersection;
		_data_->_tmp67_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp66_, _data_->media);
		_data_->_tmp68_ = (GeeList*) _data_->_tmp67_;
		_data_->_tmp58_ = !gee_collection_contains_all ((GeeCollection*) _data_->_tmp65_, (GeeCollection*) _data_->_tmp68_);
		_g_object_unref0 (_data_->_tmp68_);
	}
	_data_->changed = _data_->_tmp58_;
	if (_data_->changed) {
		_data_->_tmp69_ = _data_->group_call->current_payload_intersection;
		_data_->_tmp70_ = _data_->intersection;
		gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp69_, _data_->media, _data_->_tmp70_);
		_data_->_tmp71_ = _data_->intersection;
		g_signal_emit (_data_->group_call, xmpp_xep_muji_group_call_signals[XMPP_XEP_MUJI_GROUP_CALL_CODECS_CHANGED_SIGNAL], 0, _data_->_tmp71_);
	}
	_g_object_unref0 (_data_->remove_payloads);
	_g_object_unref0 (_data_->intersection);
	_g_object_unref0 (_data_->presences);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static gboolean
_xmpp_xep_jingle_rtp_payload_type_equals_func_gee_equal_data_func (gconstpointer a,
                                                                   gconstpointer b,
                                                                   gpointer self)
{
	gboolean result;
	result = xmpp_xep_jingle_rtp_payload_type_equals_func ((XmppXepJingleRtpPayloadType*) a, (XmppXepJingleRtpPayloadType*) b);
	return result;
}

static GeeList*
xmpp_xep_muji_module_parse_payload_types (XmppXepMujiModule* self,
                                          XmppXmppStream* stream,
                                          const gchar* media,
                                          XmppPresenceStanza* presence)
{
	GeeList* ret = NULL;
	GeeArrayList* _tmp0_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (stream != NULL, NULL);
	g_return_val_if_fail (media != NULL, NULL);
	g_return_val_if_fail (presence != NULL, NULL);
	_tmp0_ = gee_array_list_new (XMPP_XEP_JINGLE_RTP_TYPE_PAYLOAD_TYPE, (GBoxedCopyFunc) xmpp_xep_jingle_rtp_payload_type_ref, (GDestroyNotify) xmpp_xep_jingle_rtp_payload_type_unref, _xmpp_xep_jingle_rtp_payload_type_equals_func_gee_equal_data_func, NULL, NULL);
	ret = (GeeList*) _tmp0_;
	{
		GeeList* _content_node_list = NULL;
		XmppStanzaNode* _tmp1_;
		GeeList* _tmp2_;
		gint _content_node_size = 0;
		GeeList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _content_node_index = 0;
		_tmp1_ = ((XmppStanza*) presence)->stanza;
		_tmp2_ = xmpp_stanza_node_get_deep_subnodes (_tmp1_, XMPP_XEP_MUJI_NS_URI ":muji", XMPP_XEP_JINGLE_NS_URI ":content", NULL);
		_content_node_list = _tmp2_;
		_tmp3_ = _content_node_list;
		_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_content_node_size = _tmp5_;
		_content_node_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			XmppStanzaNode* content_node = NULL;
			GeeList* _tmp8_;
			gpointer _tmp9_;
			XmppStanzaNode* description_node = NULL;
			XmppStanzaNode* _tmp10_;
			XmppStanzaNode* _tmp11_;
			XmppStanzaNode* _tmp12_;
			XmppStanzaNode* _tmp13_;
			const gchar* _tmp14_;
			_content_node_index = _content_node_index + 1;
			_tmp6_ = _content_node_index;
			_tmp7_ = _content_node_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _content_node_list;
			_tmp9_ = gee_list_get (_tmp8_, _content_node_index);
			content_node = (XmppStanzaNode*) _tmp9_;
			_tmp10_ = content_node;
			_tmp11_ = xmpp_stanza_node_get_subnode (_tmp10_, "description", XMPP_XEP_JINGLE_RTP_NS_URI, FALSE);
			description_node = _tmp11_;
			_tmp12_ = description_node;
			if (_tmp12_ == NULL) {
				_xmpp_stanza_entry_unref0 (description_node);
				_xmpp_stanza_entry_unref0 (content_node);
				continue;
			}
			_tmp13_ = description_node;
			_tmp14_ = xmpp_stanza_node_get_attribute (_tmp13_, "media", NULL);
			if (g_strcmp0 (_tmp14_, media) == 0) {
				GeeList* payload_nodes = NULL;
				XmppStanzaNode* _tmp15_;
				GeeList* _tmp16_;
				_tmp15_ = description_node;
				_tmp16_ = xmpp_stanza_node_get_subnodes (_tmp15_, "payload-type", XMPP_XEP_JINGLE_RTP_NS_URI, FALSE);
				payload_nodes = _tmp16_;
				{
					GeeList* _payload_node_list = NULL;
					GeeList* _tmp17_;
					gint _payload_node_size = 0;
					GeeList* _tmp18_;
					gint _tmp19_;
					gint _tmp20_;
					gint _payload_node_index = 0;
					_tmp17_ = payload_nodes;
					_payload_node_list = _tmp17_;
					_tmp18_ = _payload_node_list;
					_tmp19_ = gee_collection_get_size ((GeeCollection*) _tmp18_);
					_tmp20_ = _tmp19_;
					_payload_node_size = _tmp20_;
					_payload_node_index = -1;
					while (TRUE) {
						gint _tmp21_;
						gint _tmp22_;
						XmppStanzaNode* payload_node = NULL;
						GeeList* _tmp23_;
						gpointer _tmp24_;
						XmppXepJingleRtpPayloadType* payload_type = NULL;
						XmppStanzaNode* _tmp25_;
						XmppXepJingleRtpPayloadType* _tmp26_;
						GeeList* _tmp27_;
						XmppXepJingleRtpPayloadType* _tmp28_;
						_payload_node_index = _payload_node_index + 1;
						_tmp21_ = _payload_node_index;
						_tmp22_ = _payload_node_size;
						if (!(_tmp21_ < _tmp22_)) {
							break;
						}
						_tmp23_ = _payload_node_list;
						_tmp24_ = gee_list_get (_tmp23_, _payload_node_index);
						payload_node = (XmppStanzaNode*) _tmp24_;
						_tmp25_ = payload_node;
						_tmp26_ = xmpp_xep_jingle_rtp_payload_type_parse (_tmp25_);
						payload_type = _tmp26_;
						_tmp27_ = ret;
						_tmp28_ = payload_type;
						gee_collection_add ((GeeCollection*) _tmp27_, _tmp28_);
						_xmpp_xep_jingle_rtp_payload_type_unref0 (payload_type);
						_xmpp_stanza_entry_unref0 (payload_node);
					}
				}
				_g_object_unref0 (payload_nodes);
			}
			_xmpp_stanza_entry_unref0 (description_node);
			_xmpp_stanza_entry_unref0 (content_node);
		}
		_g_object_unref0 (_content_node_list);
	}
	result = ret;
	return result;
}

static void
xmpp_xep_muji_module_on_received_available (XmppXepMujiModule* self,
                                            XmppXmppStream* stream,
                                            XmppPresenceStanza* presence)
{
	XmppStanzaNode* muji_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppXepMujiFlag* flag = NULL;
	XmppFlagIdentity* _tmp3_;
	gpointer _tmp4_;
	XmppXepMujiGroupCall* group_call = NULL;
	XmppXepMujiFlag* _tmp5_;
	GeeHashMap* _tmp6_;
	XmppJid* _tmp7_;
	XmppJid* _tmp8_;
	XmppJid* _tmp9_;
	XmppJid* _tmp10_;
	XmppJid* _tmp11_;
	XmppJid* _tmp12_;
	gpointer _tmp13_;
	XmppXepMujiGroupCall* _tmp14_;
	XmppXepMujiGroupCall* _tmp15_;
	XmppJid* _tmp16_;
	XmppJid* _tmp17_;
	XmppJid* _tmp18_;
	const gchar* _tmp19_;
	XmppXepMujiGroupCall* _tmp20_;
	const gchar* _tmp21_;
	gboolean _tmp22_;
	XmppStanzaNode* prepare_node = NULL;
	XmppStanzaNode* _tmp41_;
	XmppStanzaNode* _tmp42_;
	XmppStanzaNode* _tmp43_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (presence != NULL);
	_tmp0_ = ((XmppStanza*) presence)->stanza;
	_tmp1_ = xmpp_stanza_node_get_subnode (_tmp0_, "muji", XMPP_XEP_MUJI_NS_URI, FALSE);
	muji_node = _tmp1_;
	_tmp2_ = muji_node;
	if (_tmp2_ == NULL) {
		_xmpp_stanza_entry_unref0 (muji_node);
		return;
	}
	_tmp3_ = xmpp_xep_muji_flag_IDENTITY;
	_tmp4_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUJI_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp3_);
	flag = (XmppXepMujiFlag*) _tmp4_;
	_tmp5_ = flag;
	_tmp6_ = _tmp5_->calls;
	_tmp7_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp8_;
	_tmp10_ = xmpp_jid_get_bare_jid (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_;
	_tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, _tmp12_);
	_tmp14_ = (XmppXepMujiGroupCall*) _tmp13_;
	_xmpp_jid_unref0 (_tmp12_);
	_xmpp_jid_unref0 (_tmp9_);
	group_call = _tmp14_;
	_tmp15_ = group_call;
	if (_tmp15_ == NULL) {
		_xmpp_xep_muji_group_call_unref0 (group_call);
		_g_object_unref0 (flag);
		_xmpp_stanza_entry_unref0 (muji_node);
		return;
	}
	_tmp16_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp17_ = _tmp16_;
	_tmp18_ = _tmp17_;
	_tmp19_ = _tmp18_->resourcepart;
	_tmp20_ = group_call;
	_tmp21_ = _tmp20_->our_nick;
	_tmp22_ = g_strcmp0 (_tmp19_, _tmp21_) == 0;
	_xmpp_jid_unref0 (_tmp18_);
	if (_tmp22_) {
		_xmpp_xep_muji_group_call_unref0 (group_call);
		_g_object_unref0 (flag);
		_xmpp_stanza_entry_unref0 (muji_node);
		return;
	}
	{
		GeeList* _content_node_list = NULL;
		XmppStanzaNode* _tmp23_;
		GeeList* _tmp24_;
		gint _content_node_size = 0;
		GeeList* _tmp25_;
		gint _tmp26_;
		gint _tmp27_;
		gint _content_node_index = 0;
		_tmp23_ = muji_node;
		_tmp24_ = xmpp_stanza_node_get_subnodes (_tmp23_, "content", XMPP_XEP_JINGLE_NS_URI, FALSE);
		_content_node_list = _tmp24_;
		_tmp25_ = _content_node_list;
		_tmp26_ = gee_collection_get_size ((GeeCollection*) _tmp25_);
		_tmp27_ = _tmp26_;
		_content_node_size = _tmp27_;
		_content_node_index = -1;
		while (TRUE) {
			gint _tmp28_;
			gint _tmp29_;
			XmppStanzaNode* content_node = NULL;
			GeeList* _tmp30_;
			gpointer _tmp31_;
			XmppStanzaNode* description_node = NULL;
			XmppStanzaNode* _tmp32_;
			XmppStanzaNode* _tmp33_;
			XmppStanzaNode* _tmp34_;
			gchar* media = NULL;
			XmppStanzaNode* _tmp35_;
			const gchar* _tmp36_;
			gchar* _tmp37_;
			const gchar* _tmp38_;
			XmppXepMujiGroupCall* _tmp39_;
			const gchar* _tmp40_;
			_content_node_index = _content_node_index + 1;
			_tmp28_ = _content_node_index;
			_tmp29_ = _content_node_size;
			if (!(_tmp28_ < _tmp29_)) {
				break;
			}
			_tmp30_ = _content_node_list;
			_tmp31_ = gee_list_get (_tmp30_, _content_node_index);
			content_node = (XmppStanzaNode*) _tmp31_;
			_tmp32_ = content_node;
			_tmp33_ = xmpp_stanza_node_get_subnode (_tmp32_, "description", XMPP_XEP_JINGLE_RTP_NS_URI, FALSE);
			description_node = _tmp33_;
			_tmp34_ = description_node;
			if (_tmp34_ == NULL) {
				_xmpp_stanza_entry_unref0 (description_node);
				_xmpp_stanza_entry_unref0 (content_node);
				continue;
			}
			_tmp35_ = description_node;
			_tmp36_ = xmpp_stanza_node_get_attribute (_tmp35_, "media", NULL);
			_tmp37_ = g_strdup (_tmp36_);
			media = _tmp37_;
			_tmp38_ = media;
			if (_tmp38_ == NULL) {
				_g_free0 (media);
				_xmpp_stanza_entry_unref0 (description_node);
				_xmpp_stanza_entry_unref0 (content_node);
				continue;
			}
			_tmp39_ = group_call;
			_tmp40_ = media;
			xmpp_xep_muji_module_compute_payload_intersection (self, stream, _tmp39_, _tmp40_, NULL, NULL);
			_g_free0 (media);
			_xmpp_stanza_entry_unref0 (description_node);
			_xmpp_stanza_entry_unref0 (content_node);
		}
		_g_object_unref0 (_content_node_list);
	}
	_tmp41_ = muji_node;
	_tmp42_ = xmpp_stanza_node_get_subnode (_tmp41_, "preparing", XMPP_XEP_MUJI_NS_URI, FALSE);
	prepare_node = _tmp42_;
	_tmp43_ = prepare_node;
	if (_tmp43_ == NULL) {
		XmppJid* _tmp44_;
		XmppJid* _tmp45_;
		XmppJid* _tmp46_;
		XmppXepMujiGroupCall* _tmp47_;
		XmppXepMujiGroupCall* _tmp48_;
		GeeArrayList* _tmp49_;
		XmppJid* _tmp50_;
		XmppJid* _tmp51_;
		XmppJid* _tmp52_;
		gboolean _tmp53_;
		_tmp44_ = xmpp_stanza_get_from ((XmppStanza*) presence);
		_tmp45_ = _tmp44_;
		_tmp46_ = _tmp45_;
		_tmp47_ = group_call;
		xmpp_xep_muji_module_on_jid_finished_preparing (self, stream, _tmp46_, _tmp47_);
		_xmpp_jid_unref0 (_tmp46_);
		_tmp48_ = group_call;
		_tmp49_ = _tmp48_->peers;
		_tmp50_ = xmpp_stanza_get_from ((XmppStanza*) presence);
		_tmp51_ = _tmp50_;
		_tmp52_ = _tmp51_;
		_tmp53_ = !gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp49_, _tmp52_);
		_xmpp_jid_unref0 (_tmp52_);
		if (_tmp53_) {
			XmppJid* real_jid = NULL;
			XmppFlagIdentity* _tmp54_;
			gpointer _tmp55_;
			XmppXepMucFlag* _tmp56_;
			XmppJid* _tmp57_;
			XmppJid* _tmp58_;
			XmppJid* _tmp59_;
			XmppJid* _tmp60_;
			XmppJid* _tmp61_;
			XmppJid* _tmp62_;
			XmppJid* _tmp68_;
			gchar* _tmp69_;
			gchar* _tmp70_;
			XmppJid* _tmp71_;
			XmppJid* _tmp72_;
			XmppJid* _tmp73_;
			gchar* _tmp74_;
			gchar* _tmp75_;
			XmppXepMujiGroupCall* _tmp76_;
			GeeArrayList* _tmp77_;
			XmppJid* _tmp78_;
			XmppJid* _tmp79_;
			XmppJid* _tmp80_;
			XmppXepMujiGroupCall* _tmp81_;
			GeeHashMap* _tmp82_;
			XmppJid* _tmp83_;
			XmppJid* _tmp84_;
			XmppJid* _tmp85_;
			XmppJid* _tmp86_;
			XmppXepMujiGroupCall* _tmp87_;
			XmppJid* _tmp88_;
			_tmp54_ = xmpp_xep_muc_flag_IDENTITY;
			_tmp55_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp54_);
			_tmp56_ = (XmppXepMucFlag*) _tmp55_;
			_tmp57_ = xmpp_stanza_get_from ((XmppStanza*) presence);
			_tmp58_ = _tmp57_;
			_tmp59_ = _tmp58_;
			_tmp60_ = xmpp_xep_muc_flag_get_real_jid (_tmp56_, _tmp59_);
			_tmp61_ = _tmp60_;
			_xmpp_jid_unref0 (_tmp59_);
			_g_object_unref0 (_tmp56_);
			real_jid = _tmp61_;
			_tmp62_ = real_jid;
			if (_tmp62_ == NULL) {
				XmppJid* _tmp63_;
				XmppJid* _tmp64_;
				XmppJid* _tmp65_;
				gchar* _tmp66_;
				gchar* _tmp67_;
				_tmp63_ = xmpp_stanza_get_from ((XmppStanza*) presence);
				_tmp64_ = _tmp63_;
				_tmp65_ = _tmp64_;
				_tmp66_ = xmpp_jid_to_string (_tmp65_);
				_tmp67_ = _tmp66_;
				g_warning ("0272_muji.vala:177: Don't know the real jid for %s", _tmp67_);
				_g_free0 (_tmp67_);
				_xmpp_jid_unref0 (_tmp65_);
				_xmpp_jid_unref0 (real_jid);
				_xmpp_stanza_entry_unref0 (prepare_node);
				_xmpp_xep_muji_group_call_unref0 (group_call);
				_g_object_unref0 (flag);
				_xmpp_stanza_entry_unref0 (muji_node);
				return;
			}
			_tmp68_ = real_jid;
			_tmp69_ = xmpp_jid_to_string (_tmp68_);
			_tmp70_ = _tmp69_;
			_tmp71_ = xmpp_stanza_get_from ((XmppStanza*) presence);
			_tmp72_ = _tmp71_;
			_tmp73_ = _tmp72_;
			_tmp74_ = xmpp_jid_to_string (_tmp73_);
			_tmp75_ = _tmp74_;
			g_debug ("0272_muji.vala:180: Muji peer joined %s / %s\n", _tmp70_, _tmp75_);
			_g_free0 (_tmp75_);
			_xmpp_jid_unref0 (_tmp73_);
			_g_free0 (_tmp70_);
			_tmp76_ = group_call;
			_tmp77_ = _tmp76_->peers;
			_tmp78_ = xmpp_stanza_get_from ((XmppStanza*) presence);
			_tmp79_ = _tmp78_;
			_tmp80_ = _tmp79_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp77_, _tmp80_);
			_xmpp_jid_unref0 (_tmp80_);
			_tmp81_ = group_call;
			_tmp82_ = _tmp81_->real_jids;
			_tmp83_ = xmpp_stanza_get_from ((XmppStanza*) presence);
			_tmp84_ = _tmp83_;
			_tmp85_ = _tmp84_;
			_tmp86_ = real_jid;
			gee_abstract_map_set ((GeeAbstractMap*) _tmp82_, _tmp85_, _tmp86_);
			_xmpp_jid_unref0 (_tmp85_);
			_tmp87_ = group_call;
			_tmp88_ = real_jid;
			g_signal_emit (_tmp87_, xmpp_xep_muji_group_call_signals[XMPP_XEP_MUJI_GROUP_CALL_PEER_JOINED_SIGNAL], 0, _tmp88_);
			_xmpp_jid_unref0 (real_jid);
		}
	}
	_xmpp_stanza_entry_unref0 (prepare_node);
	_xmpp_xep_muji_group_call_unref0 (group_call);
	_g_object_unref0 (flag);
	_xmpp_stanza_entry_unref0 (muji_node);
}

static void
xmpp_xep_muji_module_on_received_unavailable (XmppXepMujiModule* self,
                                              XmppXmppStream* stream,
                                              XmppPresenceStanza* presence)
{
	XmppXepMujiFlag* flag = NULL;
	XmppFlagIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepMujiGroupCall* group_call = NULL;
	XmppXepMujiFlag* _tmp2_;
	GeeHashMap* _tmp3_;
	XmppJid* _tmp4_;
	XmppJid* _tmp5_;
	XmppJid* _tmp6_;
	XmppJid* _tmp7_;
	XmppJid* _tmp8_;
	XmppJid* _tmp9_;
	gpointer _tmp10_;
	XmppXepMujiGroupCall* _tmp11_;
	XmppXepMujiGroupCall* _tmp12_;
	gchar* _tmp13_ = NULL;
	XmppXepMujiGroupCall* _tmp14_;
	GeeHashMap* _tmp15_;
	XmppJid* _tmp16_;
	XmppJid* _tmp17_;
	XmppJid* _tmp18_;
	gboolean _tmp19_;
	XmppJid* _tmp29_;
	XmppJid* _tmp30_;
	XmppJid* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	XmppJid* _tmp34_;
	XmppJid* _tmp35_;
	XmppJid* _tmp36_;
	XmppXepMujiGroupCall* _tmp37_;
	XmppXepMujiGroupCall* _tmp38_;
	GeeArrayList* _tmp39_;
	XmppJid* _tmp40_;
	XmppJid* _tmp41_;
	XmppJid* _tmp42_;
	XmppXepMujiGroupCall* _tmp43_;
	GeeArrayList* _tmp44_;
	XmppJid* _tmp45_;
	XmppJid* _tmp46_;
	XmppJid* _tmp47_;
	XmppXepMujiGroupCall* _tmp48_;
	GeeHashMap* _tmp49_;
	XmppJid* _tmp50_;
	XmppJid* _tmp51_;
	XmppJid* _tmp52_;
	gboolean _tmp53_;
	XmppXepMujiGroupCall* _tmp62_;
	GeeHashMap* _tmp63_;
	XmppJid* _tmp64_;
	XmppJid* _tmp65_;
	XmppJid* _tmp66_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (presence != NULL);
	_tmp0_ = xmpp_xep_muji_flag_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUJI_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	flag = (XmppXepMujiFlag*) _tmp1_;
	_tmp2_ = flag;
	_tmp3_ = _tmp2_->calls;
	_tmp4_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp7_ = xmpp_jid_get_bare_jid (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp8_;
	_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp9_);
	_tmp11_ = (XmppXepMujiGroupCall*) _tmp10_;
	_xmpp_jid_unref0 (_tmp9_);
	_xmpp_jid_unref0 (_tmp6_);
	group_call = _tmp11_;
	_tmp12_ = group_call;
	if (_tmp12_ == NULL) {
		_xmpp_xep_muji_group_call_unref0 (group_call);
		_g_object_unref0 (flag);
		return;
	}
	_tmp14_ = group_call;
	_tmp15_ = _tmp14_->real_jids;
	_tmp16_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp17_ = _tmp16_;
	_tmp18_ = _tmp17_;
	_tmp19_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp15_, _tmp18_);
	_xmpp_jid_unref0 (_tmp18_);
	if (_tmp19_) {
		XmppXepMujiGroupCall* _tmp20_;
		GeeHashMap* _tmp21_;
		XmppJid* _tmp22_;
		XmppJid* _tmp23_;
		XmppJid* _tmp24_;
		gpointer _tmp25_;
		XmppJid* _tmp26_;
		gchar* _tmp27_;
		_tmp20_ = group_call;
		_tmp21_ = _tmp20_->real_jids;
		_tmp22_ = xmpp_stanza_get_from ((XmppStanza*) presence);
		_tmp23_ = _tmp22_;
		_tmp24_ = _tmp23_;
		_tmp25_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp21_, _tmp24_);
		_tmp26_ = (XmppJid*) _tmp25_;
		_tmp27_ = xmpp_jid_to_string (_tmp26_);
		_g_free0 (_tmp13_);
		_tmp13_ = _tmp27_;
		_xmpp_jid_unref0 (_tmp26_);
		_xmpp_jid_unref0 (_tmp24_);
	} else {
		gchar* _tmp28_;
		_tmp28_ = g_strdup ("Unknown real JID");
		_g_free0 (_tmp13_);
		_tmp13_ = _tmp28_;
	}
	_tmp29_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp30_ = _tmp29_;
	_tmp31_ = _tmp30_;
	_tmp32_ = xmpp_jid_to_string (_tmp31_);
	_tmp33_ = _tmp32_;
	g_debug ("0272_muji.vala:193: Muji peer left %s / %s", _tmp13_, _tmp33_);
	_g_free0 (_tmp33_);
	_xmpp_jid_unref0 (_tmp31_);
	_tmp34_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp35_ = _tmp34_;
	_tmp36_ = _tmp35_;
	_tmp37_ = group_call;
	xmpp_xep_muji_module_on_jid_finished_preparing (self, stream, _tmp36_, _tmp37_);
	_xmpp_jid_unref0 (_tmp36_);
	_tmp38_ = group_call;
	_tmp39_ = _tmp38_->peers;
	_tmp40_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp41_ = _tmp40_;
	_tmp42_ = _tmp41_;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp39_, _tmp42_);
	_xmpp_jid_unref0 (_tmp42_);
	_tmp43_ = group_call;
	_tmp44_ = _tmp43_->peers_to_connect_to;
	_tmp45_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp46_ = _tmp45_;
	_tmp47_ = _tmp46_;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp44_, _tmp47_);
	_xmpp_jid_unref0 (_tmp47_);
	_tmp48_ = group_call;
	_tmp49_ = _tmp48_->real_jids;
	_tmp50_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp51_ = _tmp50_;
	_tmp52_ = _tmp51_;
	_tmp53_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp49_, _tmp52_);
	_xmpp_jid_unref0 (_tmp52_);
	if (_tmp53_) {
		XmppXepMujiGroupCall* _tmp54_;
		XmppXepMujiGroupCall* _tmp55_;
		GeeHashMap* _tmp56_;
		XmppJid* _tmp57_;
		XmppJid* _tmp58_;
		XmppJid* _tmp59_;
		gpointer _tmp60_;
		XmppJid* _tmp61_;
		_tmp54_ = group_call;
		_tmp55_ = group_call;
		_tmp56_ = _tmp55_->real_jids;
		_tmp57_ = xmpp_stanza_get_from ((XmppStanza*) presence);
		_tmp58_ = _tmp57_;
		_tmp59_ = _tmp58_;
		_tmp60_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp56_, _tmp59_);
		_tmp61_ = (XmppJid*) _tmp60_;
		g_signal_emit (_tmp54_, xmpp_xep_muji_group_call_signals[XMPP_XEP_MUJI_GROUP_CALL_PEER_LEFT_SIGNAL], 0, _tmp61_);
		_xmpp_jid_unref0 (_tmp61_);
		_xmpp_jid_unref0 (_tmp59_);
	}
	_tmp62_ = group_call;
	_tmp63_ = _tmp62_->real_jids;
	_tmp64_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp65_ = _tmp64_;
	_tmp66_ = _tmp65_;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp63_, _tmp66_, NULL);
	_xmpp_jid_unref0 (_tmp66_);
	_g_free0 (_tmp13_);
	_xmpp_xep_muji_group_call_unref0 (group_call);
	_g_object_unref0 (flag);
}

static void
xmpp_xep_muji_module_on_jid_finished_preparing (XmppXepMujiModule* self,
                                                XmppXmppStream* stream,
                                                XmppJid* jid,
                                                XmppXepMujiGroupCall* group_call)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (group_call != NULL);
	_tmp0_ = xmpp_jid_to_string (jid);
	_tmp1_ = _tmp0_;
	g_debug ("0272_muji.vala:204: Muji peer finished preparing %s", _tmp1_);
	_g_free0 (_tmp1_);
	{
		GeeIterator* _promise_it = NULL;
		GeeHashMap* _tmp2_;
		GeeSet* _tmp3_;
		GeeSet* _tmp4_;
		GeeSet* _tmp5_;
		GeeIterator* _tmp6_;
		GeeIterator* _tmp7_;
		_tmp2_ = group_call->waiting_for_finish_prepares;
		_tmp3_ = gee_abstract_map_get_keys ((GeeAbstractMap*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_);
		_tmp7_ = _tmp6_;
		_g_object_unref0 (_tmp5_);
		_promise_it = _tmp7_;
		while (TRUE) {
			GeeIterator* _tmp8_;
			GeePromise* promise = NULL;
			GeeIterator* _tmp9_;
			gpointer _tmp10_;
			GeeHashMap* _tmp11_;
			GeePromise* _tmp12_;
			gpointer _tmp13_;
			GeeList* _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			GeeList* outstanding_prepares = NULL;
			GeeHashMap* _tmp17_;
			GeePromise* _tmp18_;
			gpointer _tmp19_;
			GeeList* _tmp20_;
			_tmp8_ = _promise_it;
			if (!gee_iterator_next (_tmp8_)) {
				break;
			}
			_tmp9_ = _promise_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			promise = (GeePromise*) _tmp10_;
			_tmp11_ = group_call->waiting_for_finish_prepares;
			_tmp12_ = promise;
			_tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, _tmp12_);
			_tmp14_ = (GeeList*) _tmp13_;
			_tmp15_ = gee_collection_get_size ((GeeCollection*) _tmp14_);
			_tmp16_ = _tmp15_;
			g_debug ("0272_muji.vala:206: Waiting for finish prepares %i", _tmp16_);
			_g_object_unref0 (_tmp14_);
			_tmp17_ = group_call->waiting_for_finish_prepares;
			_tmp18_ = promise;
			_tmp19_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp17_, _tmp18_);
			outstanding_prepares = (GeeList*) _tmp19_;
			_tmp20_ = outstanding_prepares;
			if (gee_collection_contains ((GeeCollection*) _tmp20_, jid)) {
				GeeList* _tmp21_;
				GeeHashMap* _tmp22_;
				GeePromise* _tmp23_;
				gpointer _tmp24_;
				GeeList* _tmp25_;
				gint _tmp26_;
				gint _tmp27_;
				GeeList* _tmp28_;
				gboolean _tmp29_;
				gboolean _tmp30_;
				_tmp21_ = outstanding_prepares;
				gee_collection_remove ((GeeCollection*) _tmp21_, jid);
				_tmp22_ = group_call->waiting_for_finish_prepares;
				_tmp23_ = promise;
				_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp22_, _tmp23_);
				_tmp25_ = (GeeList*) _tmp24_;
				_tmp26_ = gee_collection_get_size ((GeeCollection*) _tmp25_);
				_tmp27_ = _tmp26_;
				g_debug ("0272_muji.vala:210: Waiting for finish prepares %i", _tmp27_);
				_g_object_unref0 (_tmp25_);
				_tmp28_ = outstanding_prepares;
				_tmp29_ = gee_collection_get_is_empty ((GeeCollection*) _tmp28_);
				_tmp30_ = _tmp29_;
				if (_tmp30_) {
					GeeList* presences = NULL;
					XmppJid* _tmp31_;
					XmppJid* _tmp32_;
					XmppJid* _tmp33_;
					GeeList* _tmp34_;
					GeeList* _tmp35_;
					GeePromise* _tmp36_;
					GeeList* _tmp37_;
					GeeList* _tmp38_;
					_tmp31_ = xmpp_jid_get_bare_jid (jid);
					_tmp32_ = _tmp31_;
					_tmp33_ = _tmp32_;
					_tmp34_ = xmpp_xep_muji_module_get_other_presences (self, stream, _tmp33_);
					_tmp35_ = _tmp34_;
					_xmpp_jid_unref0 (_tmp33_);
					presences = _tmp35_;
					_tmp36_ = promise;
					_tmp37_ = presences;
					_tmp38_ = _g_object_ref0 (_tmp37_);
					gee_promise_set_value (_tmp36_, _tmp38_);
					_g_object_unref0 (presences);
				}
			}
			_g_object_unref0 (outstanding_prepares);
			_gee_promise_unref0 (promise);
		}
		_g_object_unref0 (_promise_it);
	}
}

static GeeList*
xmpp_xep_muji_module_get_other_presences (XmppXepMujiModule* self,
                                          XmppXmppStream* stream,
                                          XmppJid* muc_jid)
{
	GeeList* presences = NULL;
	XmppFlagIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppPresenceFlag* _tmp2_;
	GeeList* _tmp3_;
	GeeList* _tmp4_;
	gchar* own_nick = NULL;
	XmppFlagIdentity* _tmp5_;
	gpointer _tmp6_;
	XmppXepMujiFlag* _tmp7_;
	GeeHashMap* _tmp8_;
	gpointer _tmp9_;
	XmppXepMujiGroupCall* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	GeeArrayList* remove_presences = NULL;
	GeeArrayList* _tmp14_;
	GeeList* _tmp38_;
	GeeArrayList* _tmp39_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (stream != NULL, NULL);
	g_return_val_if_fail (muc_jid != NULL, NULL);
	_tmp0_ = xmpp_presence_flag_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_flag (stream, XMPP_PRESENCE_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (XmppPresenceFlag*) _tmp1_;
	_tmp3_ = xmpp_presence_flag_get_presences (_tmp2_, muc_jid);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp2_);
	presences = _tmp4_;
	_tmp5_ = xmpp_xep_muji_flag_IDENTITY;
	_tmp6_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUJI_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp5_);
	_tmp7_ = (XmppXepMujiFlag*) _tmp6_;
	_tmp8_ = _tmp7_->calls;
	_tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, muc_jid);
	_tmp10_ = (XmppXepMujiGroupCall*) _tmp9_;
	_tmp11_ = _tmp10_->our_nick;
	_tmp12_ = g_strdup (_tmp11_);
	_tmp13_ = _tmp12_;
	_xmpp_xep_muji_group_call_unref0 (_tmp10_);
	_g_object_unref0 (_tmp7_);
	own_nick = _tmp13_;
	_tmp14_ = gee_array_list_new (XMPP_PRESENCE_TYPE_STANZA, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	remove_presences = _tmp14_;
	{
		GeeList* _presence_list = NULL;
		GeeList* _tmp15_;
		gint _presence_size = 0;
		GeeList* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		gint _presence_index = 0;
		_tmp15_ = presences;
		_presence_list = _tmp15_;
		_tmp16_ = _presence_list;
		_tmp17_ = gee_collection_get_size ((GeeCollection*) _tmp16_);
		_tmp18_ = _tmp17_;
		_presence_size = _tmp18_;
		_presence_index = -1;
		while (TRUE) {
			gint _tmp19_;
			gint _tmp20_;
			XmppPresenceStanza* presence = NULL;
			GeeList* _tmp21_;
			gpointer _tmp22_;
			XmppPresenceStanza* _tmp23_;
			XmppJid* _tmp24_;
			XmppJid* _tmp25_;
			XmppJid* _tmp26_;
			const gchar* _tmp27_;
			const gchar* _tmp28_;
			gboolean _tmp29_;
			XmppStanzaNode* muji_node = NULL;
			XmppPresenceStanza* _tmp32_;
			XmppStanzaNode* _tmp33_;
			XmppStanzaNode* _tmp34_;
			XmppStanzaNode* _tmp35_;
			_presence_index = _presence_index + 1;
			_tmp19_ = _presence_index;
			_tmp20_ = _presence_size;
			if (!(_tmp19_ < _tmp20_)) {
				break;
			}
			_tmp21_ = _presence_list;
			_tmp22_ = gee_list_get (_tmp21_, _presence_index);
			presence = (XmppPresenceStanza*) _tmp22_;
			_tmp23_ = presence;
			_tmp24_ = xmpp_stanza_get_from ((XmppStanza*) _tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = _tmp25_;
			_tmp27_ = _tmp26_->resourcepart;
			_tmp28_ = own_nick;
			_tmp29_ = g_strcmp0 (_tmp27_, _tmp28_) == 0;
			_xmpp_jid_unref0 (_tmp26_);
			if (_tmp29_) {
				GeeArrayList* _tmp30_;
				XmppPresenceStanza* _tmp31_;
				_tmp30_ = remove_presences;
				_tmp31_ = presence;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp30_, _tmp31_);
			}
			_tmp32_ = presence;
			_tmp33_ = ((XmppStanza*) _tmp32_)->stanza;
			_tmp34_ = xmpp_stanza_node_get_subnode (_tmp33_, "muji", XMPP_XEP_MUJI_NS_URI, FALSE);
			muji_node = _tmp34_;
			_tmp35_ = muji_node;
			if (_tmp35_ == NULL) {
				GeeArrayList* _tmp36_;
				XmppPresenceStanza* _tmp37_;
				_tmp36_ = remove_presences;
				_tmp37_ = presence;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp36_, _tmp37_);
			}
			_xmpp_stanza_entry_unref0 (muji_node);
			_g_object_unref0 (presence);
		}
	}
	_tmp38_ = presences;
	_tmp39_ = remove_presences;
	gee_collection_remove_all ((GeeCollection*) _tmp38_, (GeeCollection*) _tmp39_);
	result = presences;
	_g_object_unref0 (remove_presences);
	_g_free0 (own_nick);
	return result;
}

static void
_xmpp_xep_muji_module_on_received_available_xmpp_presence_module_received_available (XmppPresenceModule* _sender,
                                                                                     XmppXmppStream* stream,
                                                                                     XmppPresenceStanza* presence,
                                                                                     gpointer self)
{
	xmpp_xep_muji_module_on_received_available ((XmppXepMujiModule*) self, stream, presence);
}

static void
_xmpp_xep_muji_module_on_received_unavailable_xmpp_presence_module_received_unavailable (XmppPresenceModule* _sender,
                                                                                         XmppXmppStream* stream,
                                                                                         XmppPresenceStanza* presence,
                                                                                         gpointer self)
{
	xmpp_xep_muji_module_on_received_unavailable ((XmppXepMujiModule*) self, stream, presence);
}

static void
xmpp_xep_muji_module_real_attach (XmppXmppStreamModule* base,
                                  XmppXmppStream* stream)
{
	XmppXepMujiModule * self;
	XmppXepMujiFlag* _tmp0_;
	XmppXepMujiFlag* _tmp1_;
	XmppModuleIdentity* _tmp2_;
	gpointer _tmp3_;
	XmppXepServiceDiscoveryModule* _tmp4_;
	XmppModuleIdentity* _tmp5_;
	gpointer _tmp6_;
	XmppPresenceModule* _tmp7_;
	XmppModuleIdentity* _tmp8_;
	gpointer _tmp9_;
	XmppPresenceModule* _tmp10_;
	self = (XmppXepMujiModule*) base;
	g_return_if_fail (stream != NULL);
	_tmp0_ = xmpp_xep_muji_flag_new ();
	_tmp1_ = _tmp0_;
	xmpp_xmpp_stream_add_flag (stream, (XmppXmppStreamFlag*) _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp3_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp2_);
	_tmp4_ = (XmppXepServiceDiscoveryModule*) _tmp3_;
	xmpp_xep_service_discovery_module_add_feature (_tmp4_, stream, XMPP_XEP_MUJI_NS_URI);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = xmpp_presence_module_IDENTITY;
	_tmp6_ = xmpp_xmpp_stream_get_module (stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp5_);
	_tmp7_ = (XmppPresenceModule*) _tmp6_;
	g_signal_connect_object (_tmp7_, "received-available", (GCallback) _xmpp_xep_muji_module_on_received_available_xmpp_presence_module_received_available, self, 0);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = xmpp_presence_module_IDENTITY;
	_tmp9_ = xmpp_xmpp_stream_get_module (stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp8_);
	_tmp10_ = (XmppPresenceModule*) _tmp9_;
	g_signal_connect_object (_tmp10_, "received-unavailable", (GCallback) _xmpp_xep_muji_module_on_received_unavailable_xmpp_presence_module_received_unavailable, self, 0);
	_g_object_unref0 (_tmp10_);
}

static void
xmpp_xep_muji_module_real_detach (XmppXmppStreamModule* base,
                                  XmppXmppStream* stream)
{
	XmppXepMujiModule * self;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepServiceDiscoveryModule* _tmp2_;
	self = (XmppXepMujiModule*) base;
	g_return_if_fail (stream != NULL);
	_tmp0_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (XmppXepServiceDiscoveryModule*) _tmp1_;
	xmpp_xep_service_discovery_module_remove_feature (_tmp2_, stream, XMPP_XEP_MUJI_NS_URI);
	_g_object_unref0 (_tmp2_);
}

static gchar*
xmpp_xep_muji_module_real_get_ns (XmppXmppStreamModule* base)
{
	XmppXepMujiModule * self;
	gchar* _tmp0_;
	gchar* result;
	self = (XmppXepMujiModule*) base;
	_tmp0_ = g_strdup (XMPP_XEP_MUJI_NS_URI);
	result = _tmp0_;
	return result;
}

static gchar*
xmpp_xep_muji_module_real_get_id (XmppXmppStreamModule* base)
{
	XmppXepMujiModule * self;
	XmppModuleIdentity* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	self = (XmppXepMujiModule*) base;
	_tmp0_ = xmpp_xep_muji_module_IDENTITY;
	_tmp1_ = xmpp_module_identity_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}

XmppXepMujiModule*
xmpp_xep_muji_module_construct (GType object_type)
{
	XmppXepMujiModule * self = NULL;
	self = (XmppXepMujiModule*) xmpp_xmpp_stream_module_construct (object_type);
	return self;
}

XmppXepMujiModule*
xmpp_xep_muji_module_new (void)
{
	return xmpp_xep_muji_module_construct (XMPP_XEP_MUJI_TYPE_MODULE);
}

static void
xmpp_xep_muji_module_class_init (XmppXepMujiModuleClass * klass,
                                 gpointer klass_data)
{
	XmppModuleIdentity* _tmp0_;
	xmpp_xep_muji_module_parent_class = g_type_class_peek_parent (klass);
	((XmppXmppStreamModuleClass *) klass)->attach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xep_muji_module_real_attach;
	((XmppXmppStreamModuleClass *) klass)->detach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xep_muji_module_real_detach;
	((XmppXmppStreamModuleClass *) klass)->get_ns = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xep_muji_module_real_get_ns;
	((XmppXmppStreamModuleClass *) klass)->get_id = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xep_muji_module_real_get_id;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_muji_module_finalize;
	_tmp0_ = xmpp_module_identity_new (XMPP_XEP_MUJI_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, XMPP_XEP_MUJI_NS_URI, "0272_muji");
	xmpp_xep_muji_module_IDENTITY = _tmp0_;
}

static void
xmpp_xep_muji_module_instance_init (XmppXepMujiModule * self,
                                    gpointer klass)
{
}

static void
xmpp_xep_muji_module_finalize (GObject * obj)
{
	XmppXepMujiModule * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_MUJI_TYPE_MODULE, XmppXepMujiModule);
	G_OBJECT_CLASS (xmpp_xep_muji_module_parent_class)->finalize (obj);
}

static GType
xmpp_xep_muji_module_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepMujiModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_muji_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepMujiModule), 0, (GInstanceInitFunc) xmpp_xep_muji_module_instance_init, NULL };
	GType xmpp_xep_muji_module_type_id;
	xmpp_xep_muji_module_type_id = g_type_register_static (XMPP_TYPE_XMPP_STREAM_MODULE, "XmppXepMujiModule", &g_define_type_info, 0);
	return xmpp_xep_muji_module_type_id;
}

GType
xmpp_xep_muji_module_get_type (void)
{
	static volatile gsize xmpp_xep_muji_module_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_muji_module_type_id__once)) {
		GType xmpp_xep_muji_module_type_id;
		xmpp_xep_muji_module_type_id = xmpp_xep_muji_module_get_type_once ();
		g_once_init_leave (&xmpp_xep_muji_module_type_id__once, xmpp_xep_muji_module_type_id);
	}
	return xmpp_xep_muji_module_type_id__once;
}

static guint
_xmpp_jid_hash_func_gee_hash_data_func (gconstpointer v,
                                        gpointer self)
{
	guint result;
	result = xmpp_jid_hash_func ((XmppJid*) v);
	return result;
}

XmppXepMujiGroupCall*
xmpp_xep_muji_group_call_construct (GType object_type,
                                    XmppJid* muc_jid)
{
	XmppXepMujiGroupCall* self = NULL;
	XmppJid* _tmp0_;
	g_return_val_if_fail (muc_jid != NULL, NULL);
	self = (XmppXepMujiGroupCall*) g_type_create_instance (object_type);
	_tmp0_ = _xmpp_jid_ref0 (muc_jid);
	_xmpp_jid_unref0 (self->muc_jid);
	self->muc_jid = _tmp0_;
	return self;
}

XmppXepMujiGroupCall*
xmpp_xep_muji_group_call_new (XmppJid* muc_jid)
{
	return xmpp_xep_muji_group_call_construct (XMPP_XEP_MUJI_TYPE_GROUP_CALL, muc_jid);
}

void
xmpp_xep_muji_group_call_leave (XmppXepMujiGroupCall* self,
                                XmppXmppStream* stream)
{
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepMucModule* _tmp2_;
	XmppJid* _tmp3_;
	XmppFlagIdentity* _tmp4_;
	gpointer _tmp5_;
	XmppXepMujiFlag* _tmp6_;
	GeeHashMap* _tmp7_;
	XmppJid* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	_tmp0_ = xmpp_xep_muc_module_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_MUC_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (XmppXepMucModule*) _tmp1_;
	_tmp3_ = self->muc_jid;
	xmpp_xep_muc_module_exit (_tmp2_, stream, _tmp3_);
	_g_object_unref0 (_tmp2_);
	_tmp4_ = xmpp_xep_muji_flag_IDENTITY;
	_tmp5_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUJI_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp4_);
	_tmp6_ = (XmppXepMujiFlag*) _tmp5_;
	_tmp7_ = _tmp6_->calls;
	_tmp8_ = self->muc_jid;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp7_, _tmp8_, NULL);
	_g_object_unref0 (_tmp6_);
}

static void
g_cclosure_user_marshal_VOID__XMPP_JID (GClosure * closure,
                                        GValue * return_value,
                                        guint n_param_values,
                                        const GValue * param_values,
                                        gpointer invocation_hint,
                                        gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__XMPP_JID) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_VOID__XMPP_JID callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 2);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__XMPP_JID) (marshal_data ? marshal_data : cc->callback);
	callback (data1, xmpp_value_get_jid (param_values + 1), data2);
}

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

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

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

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

static gchar*
xmpp_xep_muji_value_group_call_collect_value (GValue* value,
                                              guint n_collect_values,
                                              GTypeCValue* collect_values,
                                              guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		XmppXepMujiGroupCall * 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_muji_group_call_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
xmpp_xep_muji_value_group_call_lcopy_value (const GValue* value,
                                            guint n_collect_values,
                                            GTypeCValue* collect_values,
                                            guint collect_flags)
{
	XmppXepMujiGroupCall ** 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_muji_group_call_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
xmpp_xep_muji_param_spec_group_call (const gchar* name,
                                     const gchar* nick,
                                     const gchar* blurb,
                                     GType object_type,
                                     GParamFlags flags)
{
	XmppXepMujiParamSpecGroupCall* spec;
	g_return_val_if_fail (g_type_is_a (object_type, XMPP_XEP_MUJI_TYPE_GROUP_CALL), 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_muji_value_get_group_call (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_MUJI_TYPE_GROUP_CALL), NULL);
	return value->data[0].v_pointer;
}

void
xmpp_xep_muji_value_set_group_call (GValue* value,
                                    gpointer v_object)
{
	XmppXepMujiGroupCall * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_MUJI_TYPE_GROUP_CALL));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_MUJI_TYPE_GROUP_CALL));
		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_muji_group_call_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_muji_group_call_unref (old);
	}
}

void
xmpp_xep_muji_value_take_group_call (GValue* value,
                                     gpointer v_object)
{
	XmppXepMujiGroupCall * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_MUJI_TYPE_GROUP_CALL));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_MUJI_TYPE_GROUP_CALL));
		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_muji_group_call_unref (old);
	}
}

static void
xmpp_xep_muji_group_call_class_init (XmppXepMujiGroupCallClass * klass,
                                     gpointer klass_data)
{
	xmpp_xep_muji_group_call_parent_class = g_type_class_peek_parent (klass);
	((XmppXepMujiGroupCallClass *) klass)->finalize = xmpp_xep_muji_group_call_finalize;
	xmpp_xep_muji_group_call_signals[XMPP_XEP_MUJI_GROUP_CALL_PEER_JOINED_SIGNAL] = g_signal_new ("peer-joined", XMPP_XEP_MUJI_TYPE_GROUP_CALL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__XMPP_JID, G_TYPE_NONE, 1, XMPP_TYPE_JID);
	xmpp_xep_muji_group_call_signals[XMPP_XEP_MUJI_GROUP_CALL_PEER_LEFT_SIGNAL] = g_signal_new ("peer-left", XMPP_XEP_MUJI_TYPE_GROUP_CALL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__XMPP_JID, G_TYPE_NONE, 1, XMPP_TYPE_JID);
	xmpp_xep_muji_group_call_signals[XMPP_XEP_MUJI_GROUP_CALL_CODECS_CHANGED_SIGNAL] = g_signal_new ("codecs-changed", XMPP_XEP_MUJI_TYPE_GROUP_CALL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_LIST);
}

static void
xmpp_xep_muji_group_call_instance_init (XmppXepMujiGroupCall * self,
                                        gpointer klass)
{
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeHashMap* _tmp2_;
	GeeHashMap* _tmp3_;
	GeeHashMap* _tmp4_;
	_tmp0_ = gee_array_list_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, _xmpp_jid_equals_func_gee_equal_data_func, NULL, NULL);
	self->peers_to_connect_to = _tmp0_;
	_tmp1_ = gee_array_list_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, _xmpp_jid_equals_func_gee_equal_data_func, NULL, NULL);
	self->peers = _tmp1_;
	_tmp2_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, _xmpp_jid_hash_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->real_jids = _tmp2_;
	_tmp3_ = gee_hash_map_new (GEE_TYPE_PROMISE, (GBoxedCopyFunc) gee_promise_ref, (GDestroyNotify) gee_promise_unref, GEE_TYPE_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->waiting_for_finish_prepares = _tmp3_;
	_tmp4_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->current_payload_intersection = _tmp4_;
	self->ref_count = 1;
}

static void
xmpp_xep_muji_group_call_finalize (XmppXepMujiGroupCall * obj)
{
	XmppXepMujiGroupCall * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_MUJI_TYPE_GROUP_CALL, XmppXepMujiGroupCall);
	g_signal_handlers_destroy (self);
	_g_free0 (self->our_nick);
	_xmpp_jid_unref0 (self->muc_jid);
	_g_object_unref0 (self->peers_to_connect_to);
	_g_object_unref0 (self->peers);
	_g_object_unref0 (self->real_jids);
	_g_object_unref0 (self->waiting_for_finish_prepares);
	_g_object_unref0 (self->current_payload_intersection);
}

static GType
xmpp_xep_muji_group_call_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { xmpp_xep_muji_value_group_call_init, xmpp_xep_muji_value_group_call_free_value, xmpp_xep_muji_value_group_call_copy_value, xmpp_xep_muji_value_group_call_peek_pointer, "p", xmpp_xep_muji_value_group_call_collect_value, "p", xmpp_xep_muji_value_group_call_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepMujiGroupCallClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_muji_group_call_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepMujiGroupCall), 0, (GInstanceInitFunc) xmpp_xep_muji_group_call_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_muji_group_call_type_id;
	xmpp_xep_muji_group_call_type_id = g_type_register_fundamental (g_type_fundamental_next (), "XmppXepMujiGroupCall", &g_define_type_info, &g_define_type_fundamental_info, 0);
	return xmpp_xep_muji_group_call_type_id;
}

GType
xmpp_xep_muji_group_call_get_type (void)
{
	static volatile gsize xmpp_xep_muji_group_call_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_muji_group_call_type_id__once)) {
		GType xmpp_xep_muji_group_call_type_id;
		xmpp_xep_muji_group_call_type_id = xmpp_xep_muji_group_call_get_type_once ();
		g_once_init_leave (&xmpp_xep_muji_group_call_type_id__once, xmpp_xep_muji_group_call_type_id);
	}
	return xmpp_xep_muji_group_call_type_id__once;
}

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

void
xmpp_xep_muji_group_call_unref (gpointer instance)
{
	XmppXepMujiGroupCall * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		XMPP_XEP_MUJI_GROUP_CALL_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static guint
_xmpp_jid_hash_bare_func_gee_hash_data_func (gconstpointer v,
                                             gpointer self)
{
	guint result;
	result = xmpp_jid_hash_bare_func ((XmppJid*) v);
	return result;
}

static gboolean
_xmpp_jid_equals_bare_func_gee_equal_data_func (gconstpointer a,
                                                gconstpointer b,
                                                gpointer self)
{
	gboolean result;
	result = xmpp_jid_equals_bare_func ((XmppJid*) a, (XmppJid*) b);
	return result;
}

static gchar*
xmpp_xep_muji_flag_real_get_ns (XmppXmppStreamFlag* base)
{
	XmppXepMujiFlag * self;
	gchar* _tmp0_;
	gchar* result;
	self = (XmppXepMujiFlag*) base;
	_tmp0_ = g_strdup (XMPP_XEP_MUJI_NS_URI);
	result = _tmp0_;
	return result;
}

static gchar*
xmpp_xep_muji_flag_real_get_id (XmppXmppStreamFlag* base)
{
	XmppXepMujiFlag * self;
	XmppFlagIdentity* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	self = (XmppXepMujiFlag*) base;
	_tmp0_ = xmpp_xep_muji_flag_IDENTITY;
	_tmp1_ = xmpp_flag_identity_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}

XmppXepMujiFlag*
xmpp_xep_muji_flag_construct (GType object_type)
{
	XmppXepMujiFlag * self = NULL;
	self = (XmppXepMujiFlag*) xmpp_xmpp_stream_flag_construct (object_type);
	return self;
}

XmppXepMujiFlag*
xmpp_xep_muji_flag_new (void)
{
	return xmpp_xep_muji_flag_construct (XMPP_XEP_MUJI_TYPE_FLAG);
}

static void
xmpp_xep_muji_flag_class_init (XmppXepMujiFlagClass * klass,
                               gpointer klass_data)
{
	XmppFlagIdentity* _tmp0_;
	xmpp_xep_muji_flag_parent_class = g_type_class_peek_parent (klass);
	((XmppXmppStreamFlagClass *) klass)->get_ns = (gchar* (*) (XmppXmppStreamFlag*)) xmpp_xep_muji_flag_real_get_ns;
	((XmppXmppStreamFlagClass *) klass)->get_id = (gchar* (*) (XmppXmppStreamFlag*)) xmpp_xep_muji_flag_real_get_id;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_muji_flag_finalize;
	_tmp0_ = xmpp_flag_identity_new (XMPP_XEP_MUJI_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, XMPP_XEP_MUJI_NS_URI, "muji");
	xmpp_xep_muji_flag_IDENTITY = _tmp0_;
}

static void
xmpp_xep_muji_flag_instance_init (XmppXepMujiFlag * self,
                                  gpointer klass)
{
	GeeHashMap* _tmp0_;
	_tmp0_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, XMPP_XEP_MUJI_TYPE_GROUP_CALL, (GBoxedCopyFunc) xmpp_xep_muji_group_call_ref, (GDestroyNotify) xmpp_xep_muji_group_call_unref, _xmpp_jid_hash_bare_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_bare_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->calls = _tmp0_;
}

static void
xmpp_xep_muji_flag_finalize (GObject * obj)
{
	XmppXepMujiFlag * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_MUJI_TYPE_FLAG, XmppXepMujiFlag);
	_g_object_unref0 (self->calls);
	G_OBJECT_CLASS (xmpp_xep_muji_flag_parent_class)->finalize (obj);
}

static GType
xmpp_xep_muji_flag_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepMujiFlagClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_muji_flag_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepMujiFlag), 0, (GInstanceInitFunc) xmpp_xep_muji_flag_instance_init, NULL };
	GType xmpp_xep_muji_flag_type_id;
	xmpp_xep_muji_flag_type_id = g_type_register_static (XMPP_TYPE_XMPP_STREAM_FLAG, "XmppXepMujiFlag", &g_define_type_info, 0);
	return xmpp_xep_muji_flag_type_id;
}

GType
xmpp_xep_muji_flag_get_type (void)
{
	static volatile gsize xmpp_xep_muji_flag_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_muji_flag_type_id__once)) {
		GType xmpp_xep_muji_flag_type_id;
		xmpp_xep_muji_flag_type_id = xmpp_xep_muji_flag_get_type_once ();
		g_once_init_leave (&xmpp_xep_muji_flag_type_id__once, xmpp_xep_muji_flag_type_id);
	}
	return xmpp_xep_muji_flag_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

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

