/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "E2AP-Containers"
 * 	found in "e2ap-oran-wg3-v01.00.asn"
 * 	`asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER`
 */

#include "ProtocolIE-Field.h"

static const long asn_VAL_4_id_RICaction_ToBeSetup_Item = 19;
static const long asn_VAL_4_ignore = 1;
static const long asn_VAL_4_mandatory = 2;
static const asn_ioc_cell_t asn_IOS_RICaction_ToBeSetup_ItemIEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_4_id_RICaction_ToBeSetup_Item },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_ignore },
	{ "&Value", aioc__type, &asn_DEF_RICaction_ToBeSetup_Item },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_4_mandatory }
};
static const asn_ioc_set_t asn_IOS_RICaction_ToBeSetup_ItemIEs_1[] = {
	{ 1, 4, asn_IOS_RICaction_ToBeSetup_ItemIEs_1_rows }
};
static const long asn_VAL_9_id_RICaction_Admitted_Item = 14;
static const long asn_VAL_9_ignore = 1;
static const long asn_VAL_9_mandatory = 2;
static const asn_ioc_cell_t asn_IOS_RICaction_Admitted_ItemIEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_9_id_RICaction_Admitted_Item },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore },
	{ "&Value", aioc__type, &asn_DEF_RICaction_Admitted_Item },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_9_mandatory }
};
static const asn_ioc_set_t asn_IOS_RICaction_Admitted_ItemIEs_1[] = {
	{ 1, 4, asn_IOS_RICaction_Admitted_ItemIEs_1_rows }
};
static const long asn_VAL_10_id_RICaction_NotAdmitted_Item = 16;
static const long asn_VAL_10_ignore = 1;
static const long asn_VAL_10_mandatory = 2;
static const asn_ioc_cell_t asn_IOS_RICaction_NotAdmitted_ItemIEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_10_id_RICaction_NotAdmitted_Item },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_10_ignore },
	{ "&Value", aioc__type, &asn_DEF_RICaction_NotAdmitted_Item },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_10_mandatory }
};
static const asn_ioc_set_t asn_IOS_RICaction_NotAdmitted_ItemIEs_1[] = {
	{ 1, 4, asn_IOS_RICaction_NotAdmitted_ItemIEs_1_rows }
};
static const long asn_VAL_64_id_RANfunction_Item = 8;
static const long asn_VAL_64_ignore = 1;
static const long asn_VAL_64_mandatory = 2;
static const asn_ioc_cell_t asn_IOS_RANfunction_ItemIEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_64_id_RANfunction_Item },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_64_ignore },
	{ "&Value", aioc__type, &asn_DEF_RANfunction_Item },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_64_mandatory }
};
static const asn_ioc_set_t asn_IOS_RANfunction_ItemIEs_1[] = {
	{ 1, 4, asn_IOS_RANfunction_ItemIEs_1_rows }
};
static const long asn_VAL_65_id_RANfunctionID_Item = 6;
static const long asn_VAL_65_ignore = 1;
static const long asn_VAL_65_mandatory = 2;
static const asn_ioc_cell_t asn_IOS_RANfunctionID_ItemIEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_65_id_RANfunctionID_Item },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_65_ignore },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID_Item },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_65_mandatory }
};
static const asn_ioc_set_t asn_IOS_RANfunctionID_ItemIEs_1[] = {
	{ 1, 4, asn_IOS_RANfunctionID_ItemIEs_1_rows }
};
static const long asn_VAL_68_id_RANfunctionIEcause_Item = 7;
static const long asn_VAL_68_ignore = 1;
static const long asn_VAL_68_mandatory = 2;
static const asn_ioc_cell_t asn_IOS_RANfunctionIDcause_ItemIEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_68_id_RANfunctionIEcause_Item },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_68_ignore },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionIDcause_Item },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_68_mandatory }
};
static const asn_ioc_set_t asn_IOS_RANfunctionIDcause_ItemIEs_1[] = {
	{ 1, 4, asn_IOS_RANfunctionIDcause_ItemIEs_1_rows }
};
static const long asn_VAL_1_id_RICrequestID = 29;
static const long asn_VAL_1_reject = 0;
static const long asn_VAL_1_mandatory = 2;
static const long asn_VAL_2_id_RANfunctionID = 5;
static const long asn_VAL_2_reject = 0;
static const long asn_VAL_2_mandatory = 2;
static const long asn_VAL_3_id_RICsubscriptionDetails = 30;
static const long asn_VAL_3_reject = 0;
static const long asn_VAL_3_mandatory = 2;
static const asn_ioc_cell_t asn_IOS_RICsubscriptionRequest_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_1_id_RICrequestID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject },
	{ "&Value", aioc__type, &asn_DEF_RICrequestID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_1_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_2_id_RANfunctionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_2_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_3_id_RICsubscriptionDetails },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject },
	{ "&Value", aioc__type, &asn_DEF_RICsubscriptionDetails },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_3_mandatory }
};
static const asn_ioc_set_t asn_IOS_RICsubscriptionRequest_IEs_1[] = {
	{ 3, 4, asn_IOS_RICsubscriptionRequest_IEs_1_rows }
};
static const long asn_VAL_5_id_RICrequestID = 29;
static const long asn_VAL_5_reject = 0;
static const long asn_VAL_5_mandatory = 2;
static const long asn_VAL_6_id_RANfunctionID = 5;
static const long asn_VAL_6_reject = 0;
static const long asn_VAL_6_mandatory = 2;
static const long asn_VAL_7_id_RICactions_Admitted = 17;
static const long asn_VAL_7_reject = 0;
static const long asn_VAL_7_mandatory = 2;
static const long asn_VAL_8_id_RICactions_NotAdmitted = 18;
static const long asn_VAL_8_reject = 0;
static const long asn_VAL_8_optional = 0;
static const asn_ioc_cell_t asn_IOS_RICsubscriptionResponse_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_5_id_RICrequestID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject },
	{ "&Value", aioc__type, &asn_DEF_RICrequestID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_5_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_6_id_RANfunctionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_6_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_7_id_RICactions_Admitted },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_reject },
	{ "&Value", aioc__type, &asn_DEF_RICaction_Admitted_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_7_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_8_id_RICactions_NotAdmitted },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_reject },
	{ "&Value", aioc__type, &asn_DEF_RICaction_NotAdmitted_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_8_optional }
};
static const asn_ioc_set_t asn_IOS_RICsubscriptionResponse_IEs_1[] = {
	{ 4, 4, asn_IOS_RICsubscriptionResponse_IEs_1_rows }
};
static const long asn_VAL_11_id_RICrequestID = 29;
static const long asn_VAL_11_reject = 0;
static const long asn_VAL_11_mandatory = 2;
static const long asn_VAL_12_id_RANfunctionID = 5;
static const long asn_VAL_12_reject = 0;
static const long asn_VAL_12_mandatory = 2;
static const long asn_VAL_13_id_RICactions_NotAdmitted = 18;
static const long asn_VAL_13_reject = 0;
static const long asn_VAL_13_mandatory = 2;
static const long asn_VAL_14_id_CriticalityDiagnostics = 2;
static const long asn_VAL_14_ignore = 1;
static const long asn_VAL_14_optional = 0;
static const asn_ioc_cell_t asn_IOS_RICsubscriptionFailure_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_11_id_RICrequestID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_11_reject },
	{ "&Value", aioc__type, &asn_DEF_RICrequestID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_11_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_12_id_RANfunctionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_12_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_12_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_13_id_RICactions_NotAdmitted },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_13_reject },
	{ "&Value", aioc__type, &asn_DEF_RICaction_NotAdmitted_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_13_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_14_id_CriticalityDiagnostics },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_14_ignore },
	{ "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_14_optional }
};
static const asn_ioc_set_t asn_IOS_RICsubscriptionFailure_IEs_1[] = {
	{ 4, 4, asn_IOS_RICsubscriptionFailure_IEs_1_rows }
};
static const long asn_VAL_15_id_RICrequestID = 29;
static const long asn_VAL_15_reject = 0;
static const long asn_VAL_15_mandatory = 2;
static const long asn_VAL_16_id_RANfunctionID = 5;
static const long asn_VAL_16_reject = 0;
static const long asn_VAL_16_mandatory = 2;
static const asn_ioc_cell_t asn_IOS_RICsubscriptionDeleteRequest_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_15_id_RICrequestID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_15_reject },
	{ "&Value", aioc__type, &asn_DEF_RICrequestID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_15_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_16_id_RANfunctionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_16_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_16_mandatory }
};
static const asn_ioc_set_t asn_IOS_RICsubscriptionDeleteRequest_IEs_1[] = {
	{ 2, 4, asn_IOS_RICsubscriptionDeleteRequest_IEs_1_rows }
};
static const long asn_VAL_17_id_RICrequestID = 29;
static const long asn_VAL_17_reject = 0;
static const long asn_VAL_17_mandatory = 2;
static const long asn_VAL_18_id_RANfunctionID = 5;
static const long asn_VAL_18_reject = 0;
static const long asn_VAL_18_mandatory = 2;
static const asn_ioc_cell_t asn_IOS_RICsubscriptionDeleteResponse_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_17_id_RICrequestID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_17_reject },
	{ "&Value", aioc__type, &asn_DEF_RICrequestID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_17_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_18_id_RANfunctionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_18_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_18_mandatory }
};
static const asn_ioc_set_t asn_IOS_RICsubscriptionDeleteResponse_IEs_1[] = {
	{ 2, 4, asn_IOS_RICsubscriptionDeleteResponse_IEs_1_rows }
};
static const long asn_VAL_19_id_RICrequestID = 29;
static const long asn_VAL_19_reject = 0;
static const long asn_VAL_19_mandatory = 2;
static const long asn_VAL_20_id_RANfunctionID = 5;
static const long asn_VAL_20_reject = 0;
static const long asn_VAL_20_mandatory = 2;
static const long asn_VAL_21_id_Cause = 1;
static const long asn_VAL_21_ignore = 1;
static const long asn_VAL_21_mandatory = 2;
static const long asn_VAL_22_id_CriticalityDiagnostics = 2;
static const long asn_VAL_22_ignore = 1;
static const long asn_VAL_22_optional = 0;
static const asn_ioc_cell_t asn_IOS_RICsubscriptionDeleteFailure_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_19_id_RICrequestID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_19_reject },
	{ "&Value", aioc__type, &asn_DEF_RICrequestID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_19_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_20_id_RANfunctionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_20_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_20_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_21_id_Cause },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_21_ignore },
	{ "&Value", aioc__type, &asn_DEF_Cause },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_21_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_22_id_CriticalityDiagnostics },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_22_ignore },
	{ "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_22_optional }
};
static const asn_ioc_set_t asn_IOS_RICsubscriptionDeleteFailure_IEs_1[] = {
	{ 4, 4, asn_IOS_RICsubscriptionDeleteFailure_IEs_1_rows }
};
static const long asn_VAL_23_id_RICrequestID = 29;
static const long asn_VAL_23_reject = 0;
static const long asn_VAL_23_mandatory = 2;
static const long asn_VAL_24_id_RANfunctionID = 5;
static const long asn_VAL_24_reject = 0;
static const long asn_VAL_24_mandatory = 2;
static const long asn_VAL_25_id_RICactionID = 15;
static const long asn_VAL_25_reject = 0;
static const long asn_VAL_25_mandatory = 2;
static const long asn_VAL_26_id_RICindicationSN = 27;
static const long asn_VAL_26_reject = 0;
static const long asn_VAL_26_optional = 0;
static const long asn_VAL_27_id_RICindicationType = 28;
static const long asn_VAL_27_reject = 0;
static const long asn_VAL_27_mandatory = 2;
static const long asn_VAL_28_id_RICindicationHeader = 25;
static const long asn_VAL_28_reject = 0;
static const long asn_VAL_28_mandatory = 2;
static const long asn_VAL_29_id_RICindicationMessage = 26;
static const long asn_VAL_29_reject = 0;
static const long asn_VAL_29_mandatory = 2;
static const long asn_VAL_30_id_RICcallProcessID = 20;
static const long asn_VAL_30_reject = 0;
static const long asn_VAL_30_optional = 0;
static const asn_ioc_cell_t asn_IOS_RICindication_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_23_id_RICrequestID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_23_reject },
	{ "&Value", aioc__type, &asn_DEF_RICrequestID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_23_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_24_id_RANfunctionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_24_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_24_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_25_id_RICactionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_25_reject },
	{ "&Value", aioc__type, &asn_DEF_RICactionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_25_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_26_id_RICindicationSN },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_26_reject },
	{ "&Value", aioc__type, &asn_DEF_RICindicationSN },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_26_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_27_id_RICindicationType },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_27_reject },
	{ "&Value", aioc__type, &asn_DEF_RICindicationType },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_27_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_28_id_RICindicationHeader },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_28_reject },
	{ "&Value", aioc__type, &asn_DEF_RICindicationHeader },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_28_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_29_id_RICindicationMessage },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_29_reject },
	{ "&Value", aioc__type, &asn_DEF_RICindicationMessage },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_29_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_30_id_RICcallProcessID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_30_reject },
	{ "&Value", aioc__type, &asn_DEF_RICcallProcessID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_30_optional }
};
static const asn_ioc_set_t asn_IOS_RICindication_IEs_1[] = {
	{ 8, 4, asn_IOS_RICindication_IEs_1_rows }
};
static const long asn_VAL_31_id_RICrequestID = 29;
static const long asn_VAL_31_reject = 0;
static const long asn_VAL_31_mandatory = 2;
static const long asn_VAL_32_id_RANfunctionID = 5;
static const long asn_VAL_32_reject = 0;
static const long asn_VAL_32_mandatory = 2;
static const long asn_VAL_33_id_RICcallProcessID = 20;
static const long asn_VAL_33_reject = 0;
static const long asn_VAL_33_optional = 0;
static const long asn_VAL_34_id_RICcontrolHeader = 22;
static const long asn_VAL_34_reject = 0;
static const long asn_VAL_34_mandatory = 2;
static const long asn_VAL_35_id_RICcontrolMessage = 23;
static const long asn_VAL_35_reject = 0;
static const long asn_VAL_35_mandatory = 2;
static const long asn_VAL_36_id_RICcontrolAckRequest = 21;
static const long asn_VAL_36_reject = 0;
static const long asn_VAL_36_optional = 0;
static const asn_ioc_cell_t asn_IOS_RICcontrolRequest_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_31_id_RICrequestID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_31_reject },
	{ "&Value", aioc__type, &asn_DEF_RICrequestID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_31_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_32_id_RANfunctionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_32_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_32_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_33_id_RICcallProcessID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_33_reject },
	{ "&Value", aioc__type, &asn_DEF_RICcallProcessID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_33_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_34_id_RICcontrolHeader },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_34_reject },
	{ "&Value", aioc__type, &asn_DEF_RICcontrolHeader },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_34_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_35_id_RICcontrolMessage },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_35_reject },
	{ "&Value", aioc__type, &asn_DEF_RICcontrolMessage },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_35_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_36_id_RICcontrolAckRequest },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_36_reject },
	{ "&Value", aioc__type, &asn_DEF_RICcontrolAckRequest },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_36_optional }
};
static const asn_ioc_set_t asn_IOS_RICcontrolRequest_IEs_1[] = {
	{ 6, 4, asn_IOS_RICcontrolRequest_IEs_1_rows }
};
static const long asn_VAL_37_id_RICrequestID = 29;
static const long asn_VAL_37_reject = 0;
static const long asn_VAL_37_mandatory = 2;
static const long asn_VAL_38_id_RANfunctionID = 5;
static const long asn_VAL_38_reject = 0;
static const long asn_VAL_38_mandatory = 2;
static const long asn_VAL_39_id_RICcallProcessID = 20;
static const long asn_VAL_39_reject = 0;
static const long asn_VAL_39_optional = 0;
static const long asn_VAL_40_id_RICcontrolStatus = 24;
static const long asn_VAL_40_reject = 0;
static const long asn_VAL_40_mandatory = 2;
static const long asn_VAL_41_id_RICcontrolOutcome = 32;
static const long asn_VAL_41_reject = 0;
static const long asn_VAL_41_optional = 0;
static const asn_ioc_cell_t asn_IOS_RICcontrolAcknowledge_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_37_id_RICrequestID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_37_reject },
	{ "&Value", aioc__type, &asn_DEF_RICrequestID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_37_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_38_id_RANfunctionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_38_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_38_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_39_id_RICcallProcessID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_39_reject },
	{ "&Value", aioc__type, &asn_DEF_RICcallProcessID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_39_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_40_id_RICcontrolStatus },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_40_reject },
	{ "&Value", aioc__type, &asn_DEF_RICcontrolStatus },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_40_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_41_id_RICcontrolOutcome },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_41_reject },
	{ "&Value", aioc__type, &asn_DEF_RICcontrolOutcome },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_41_optional }
};
static const asn_ioc_set_t asn_IOS_RICcontrolAcknowledge_IEs_1[] = {
	{ 5, 4, asn_IOS_RICcontrolAcknowledge_IEs_1_rows }
};
static const long asn_VAL_42_id_RICrequestID = 29;
static const long asn_VAL_42_reject = 0;
static const long asn_VAL_42_mandatory = 2;
static const long asn_VAL_43_id_RANfunctionID = 5;
static const long asn_VAL_43_reject = 0;
static const long asn_VAL_43_mandatory = 2;
static const long asn_VAL_44_id_RICcallProcessID = 20;
static const long asn_VAL_44_reject = 0;
static const long asn_VAL_44_optional = 0;
static const long asn_VAL_45_id_Cause = 1;
static const long asn_VAL_45_ignore = 1;
static const long asn_VAL_45_mandatory = 2;
static const long asn_VAL_46_id_RICcontrolOutcome = 32;
static const long asn_VAL_46_reject = 0;
static const long asn_VAL_46_optional = 0;
static const asn_ioc_cell_t asn_IOS_RICcontrolFailure_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_42_id_RICrequestID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_42_reject },
	{ "&Value", aioc__type, &asn_DEF_RICrequestID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_42_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_43_id_RANfunctionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_43_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_43_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_44_id_RICcallProcessID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_44_reject },
	{ "&Value", aioc__type, &asn_DEF_RICcallProcessID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_44_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_45_id_Cause },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_45_ignore },
	{ "&Value", aioc__type, &asn_DEF_Cause },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_45_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_46_id_RICcontrolOutcome },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_46_reject },
	{ "&Value", aioc__type, &asn_DEF_RICcontrolOutcome },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_46_optional }
};
static const asn_ioc_set_t asn_IOS_RICcontrolFailure_IEs_1[] = {
	{ 5, 4, asn_IOS_RICcontrolFailure_IEs_1_rows }
};
static const long asn_VAL_47_id_RICrequestID = 29;
static const long asn_VAL_47_reject = 0;
static const long asn_VAL_47_optional = 0;
static const long asn_VAL_48_id_RANfunctionID = 5;
static const long asn_VAL_48_reject = 0;
static const long asn_VAL_48_optional = 0;
static const long asn_VAL_49_id_Cause = 1;
static const long asn_VAL_49_ignore = 1;
static const long asn_VAL_49_optional = 0;
static const long asn_VAL_50_id_CriticalityDiagnostics = 2;
static const long asn_VAL_50_ignore = 1;
static const long asn_VAL_50_optional = 0;
static const asn_ioc_cell_t asn_IOS_ErrorIndication_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_47_id_RICrequestID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_47_reject },
	{ "&Value", aioc__type, &asn_DEF_RICrequestID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_47_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_48_id_RANfunctionID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_48_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_48_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_49_id_Cause },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_49_ignore },
	{ "&Value", aioc__type, &asn_DEF_Cause },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_49_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_50_id_CriticalityDiagnostics },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_50_ignore },
	{ "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_50_optional }
};
static const asn_ioc_set_t asn_IOS_ErrorIndication_IEs_1[] = {
	{ 4, 4, asn_IOS_ErrorIndication_IEs_1_rows }
};
static const long asn_VAL_51_id_GlobalE2node_ID = 3;
static const long asn_VAL_51_reject = 0;
static const long asn_VAL_51_mandatory = 2;
static const long asn_VAL_52_id_RANfunctionsAdded = 10;
static const long asn_VAL_52_reject = 0;
static const long asn_VAL_52_optional = 0;
static const asn_ioc_cell_t asn_IOS_E2setupRequestIEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_51_id_GlobalE2node_ID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_51_reject },
	{ "&Value", aioc__type, &asn_DEF_GlobalE2node_ID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_51_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_52_id_RANfunctionsAdded },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_52_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctions_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_52_optional }
};
static const asn_ioc_set_t asn_IOS_E2setupRequestIEs_1[] = {
	{ 2, 4, asn_IOS_E2setupRequestIEs_1_rows }
};
static const long asn_VAL_53_id_GlobalRIC_ID = 4;
static const long asn_VAL_53_reject = 0;
static const long asn_VAL_53_mandatory = 2;
static const long asn_VAL_54_id_RANfunctionsAccepted = 9;
static const long asn_VAL_54_reject = 0;
static const long asn_VAL_54_optional = 0;
static const long asn_VAL_55_id_RANfunctionsRejected = 13;
static const long asn_VAL_55_reject = 0;
static const long asn_VAL_55_optional = 0;
static const asn_ioc_cell_t asn_IOS_E2setupResponseIEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_53_id_GlobalRIC_ID },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_53_reject },
	{ "&Value", aioc__type, &asn_DEF_GlobalRIC_ID },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_53_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_54_id_RANfunctionsAccepted },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_54_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionsID_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_54_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_55_id_RANfunctionsRejected },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_55_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionsIDcause_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_55_optional }
};
static const asn_ioc_set_t asn_IOS_E2setupResponseIEs_1[] = {
	{ 3, 4, asn_IOS_E2setupResponseIEs_1_rows }
};
static const long asn_VAL_56_id_Cause = 1;
static const long asn_VAL_56_ignore = 1;
static const long asn_VAL_56_mandatory = 2;
static const long asn_VAL_57_id_TimeToWait = 31;
static const long asn_VAL_57_ignore = 1;
static const long asn_VAL_57_optional = 0;
static const long asn_VAL_58_id_CriticalityDiagnostics = 2;
static const long asn_VAL_58_ignore = 1;
static const long asn_VAL_58_optional = 0;
static const asn_ioc_cell_t asn_IOS_E2setupFailureIEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_56_id_Cause },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_56_ignore },
	{ "&Value", aioc__type, &asn_DEF_Cause },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_56_mandatory },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_57_id_TimeToWait },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_57_ignore },
	{ "&Value", aioc__type, &asn_DEF_TimeToWait },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_57_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_58_id_CriticalityDiagnostics },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_58_ignore },
	{ "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_58_optional }
};
static const asn_ioc_set_t asn_IOS_E2setupFailureIEs_1[] = {
	{ 3, 4, asn_IOS_E2setupFailureIEs_1_rows }
};
static const long asn_VAL_59_id_Cause = 1;
static const long asn_VAL_59_ignore = 1;
static const long asn_VAL_59_mandatory = 2;
static const asn_ioc_cell_t asn_IOS_ResetRequestIEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_59_id_Cause },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_59_ignore },
	{ "&Value", aioc__type, &asn_DEF_Cause },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_59_mandatory }
};
static const asn_ioc_set_t asn_IOS_ResetRequestIEs_1[] = {
	{ 1, 4, asn_IOS_ResetRequestIEs_1_rows }
};
static const long asn_VAL_60_id_CriticalityDiagnostics = 2;
static const long asn_VAL_60_ignore = 1;
static const long asn_VAL_60_optional = 0;
static const asn_ioc_cell_t asn_IOS_ResetResponseIEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_60_id_CriticalityDiagnostics },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_60_ignore },
	{ "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_60_optional }
};
static const asn_ioc_set_t asn_IOS_ResetResponseIEs_1[] = {
	{ 1, 4, asn_IOS_ResetResponseIEs_1_rows }
};
static const long asn_VAL_61_id_RANfunctionsAdded = 10;
static const long asn_VAL_61_reject = 0;
static const long asn_VAL_61_optional = 0;
static const long asn_VAL_62_id_RANfunctionsModified = 12;
static const long asn_VAL_62_reject = 0;
static const long asn_VAL_62_optional = 0;
static const long asn_VAL_63_id_RANfunctionsDeleted = 11;
static const long asn_VAL_63_reject = 0;
static const long asn_VAL_63_optional = 0;
static const asn_ioc_cell_t asn_IOS_RICserviceUpdate_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_61_id_RANfunctionsAdded },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_61_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctions_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_61_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_62_id_RANfunctionsModified },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_62_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctions_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_62_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_63_id_RANfunctionsDeleted },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_63_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionsID_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_63_optional }
};
static const asn_ioc_set_t asn_IOS_RICserviceUpdate_IEs_1[] = {
	{ 3, 4, asn_IOS_RICserviceUpdate_IEs_1_rows }
};
static const long asn_VAL_66_id_RANfunctionsAccepted = 9;
static const long asn_VAL_66_reject = 0;
static const long asn_VAL_66_optional = 0;
static const long asn_VAL_67_id_RANfunctionsRejected = 13;
static const long asn_VAL_67_reject = 0;
static const long asn_VAL_67_optional = 0;
static const asn_ioc_cell_t asn_IOS_RICserviceUpdateAcknowledge_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_66_id_RANfunctionsAccepted },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_66_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionsID_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_66_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_67_id_RANfunctionsRejected },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_67_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionsIDcause_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_67_optional }
};
static const asn_ioc_set_t asn_IOS_RICserviceUpdateAcknowledge_IEs_1[] = {
	{ 2, 4, asn_IOS_RICserviceUpdateAcknowledge_IEs_1_rows }
};
static const long asn_VAL_69_id_RANfunctionsRejected = 13;
static const long asn_VAL_69_ignore = 1;
static const long asn_VAL_69_optional = 0;
static const long asn_VAL_70_id_TimeToWait = 31;
static const long asn_VAL_70_ignore = 1;
static const long asn_VAL_70_optional = 0;
static const long asn_VAL_71_id_CriticalityDiagnostics = 2;
static const long asn_VAL_71_ignore = 1;
static const long asn_VAL_71_optional = 0;
static const asn_ioc_cell_t asn_IOS_RICserviceUpdateFailure_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_69_id_RANfunctionsRejected },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_69_ignore },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionsIDcause_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_69_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_70_id_TimeToWait },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_70_ignore },
	{ "&Value", aioc__type, &asn_DEF_TimeToWait },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_70_optional },
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_71_id_CriticalityDiagnostics },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_71_ignore },
	{ "&Value", aioc__type, &asn_DEF_CriticalityDiagnostics },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_71_optional }
};
static const asn_ioc_set_t asn_IOS_RICserviceUpdateFailure_IEs_1[] = {
	{ 3, 4, asn_IOS_RICserviceUpdateFailure_IEs_1_rows }
};
static const long asn_VAL_72_id_RANfunctionsAccepted = 9;
static const long asn_VAL_72_reject = 0;
static const long asn_VAL_72_optional = 0;
static const asn_ioc_cell_t asn_IOS_RICserviceQuery_IEs_1_rows[] = {
	{ "&id", aioc__value, &asn_DEF_ProtocolIE_ID, &asn_VAL_72_id_RANfunctionsAccepted },
	{ "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_72_reject },
	{ "&Value", aioc__type, &asn_DEF_RANfunctionsID_List },
	{ "&presence", aioc__value, &asn_DEF_Presence, &asn_VAL_72_optional }
};
static const asn_ioc_set_t asn_IOS_RICserviceQuery_IEs_1[] = {
	{ 1, 4, asn_IOS_RICserviceQuery_IEs_1_rows }
};
static int
memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICaction_ToBeSetup_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICaction_ToBeSetup_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_ToBeSetup_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICaction_ToBeSetup_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICaction_ToBeSetup_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_ToBeSetup_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICaction_Admitted_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICaction_Admitted_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_Admitted_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICaction_Admitted_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICaction_Admitted_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_Admitted_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICaction_NotAdmitted_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICaction_NotAdmitted_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_NotAdmitted_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICaction_NotAdmitted_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICaction_NotAdmitted_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICaction_NotAdmitted_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RANfunction_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RANfunction_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunction_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RANfunction_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RANfunction_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunction_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RANfunctionID_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RANfunctionID_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionID_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RANfunctionID_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RANfunctionID_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionID_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RANfunctionIDcause_ItemIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RANfunctionIDcause_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionIDcause_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RANfunctionIDcause_ItemIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RANfunctionIDcause_ItemIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RANfunctionIDcause_ItemIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICsubscriptionRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionRequest_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionRequest_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICsubscriptionRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionRequest_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionRequest_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICsubscriptionResponse_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionResponse_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionResponse_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICsubscriptionResponse_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionResponse_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionResponse_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICsubscriptionFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionFailure_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionFailure_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICsubscriptionFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionFailure_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionFailure_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICsubscriptionDeleteRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteRequest_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteRequest_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICsubscriptionDeleteRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteRequest_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteRequest_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICsubscriptionDeleteResponse_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteResponse_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteResponse_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICsubscriptionDeleteResponse_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteResponse_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteResponse_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICsubscriptionDeleteFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteFailure_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteFailure_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICsubscriptionDeleteFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICsubscriptionDeleteFailure_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICsubscriptionDeleteFailure_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICindication_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICindication_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICindication_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICindication_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICindication_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICindication_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICcontrolRequest_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICcontrolRequest_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolRequest_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICcontrolRequest_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICcontrolRequest_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolRequest_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICcontrolAcknowledge_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICcontrolAcknowledge_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolAcknowledge_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICcontrolAcknowledge_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICcontrolAcknowledge_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolAcknowledge_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICcontrolFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICcontrolFailure_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolFailure_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICcontrolFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICcontrolFailure_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICcontrolFailure_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_ErrorIndication_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_ErrorIndication_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ErrorIndication_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_ErrorIndication_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_ErrorIndication_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ErrorIndication_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_E2setupRequestIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_E2setupRequestIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupRequestIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_E2setupRequestIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_E2setupRequestIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupRequestIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_E2setupResponseIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_E2setupResponseIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupResponseIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_E2setupResponseIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_E2setupResponseIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupResponseIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_E2setupFailureIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_E2setupFailureIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupFailureIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_E2setupFailureIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_E2setupFailureIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct E2setupFailureIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_ResetRequestIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_ResetRequestIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetRequestIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_ResetRequestIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_ResetRequestIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetRequestIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_ResetResponseIEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_ResetResponseIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetResponseIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_ResetResponseIEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_ResetResponseIEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ResetResponseIEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICserviceUpdate_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdate_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdate_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICserviceUpdate_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdate_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdate_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICserviceUpdateAcknowledge_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateAcknowledge_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateAcknowledge_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICserviceUpdateAcknowledge_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateAcknowledge_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateAcknowledge_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICserviceUpdateFailure_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateFailure_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateFailure_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICserviceUpdateFailure_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICserviceUpdateFailure_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceUpdateFailure_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static int
memb_id_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= 0 && value <= 65535)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_type_selector_result_t
select_RICserviceQuery_IEs_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICserviceQuery_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 1; /* &criticality */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceQuery_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_criticality_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_type_selector_result_t
select_RICserviceQuery_IEs_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
	asn_type_selector_result_t result = {0, 0};
	const asn_ioc_set_t *itable = asn_IOS_RICserviceQuery_IEs_1;
	size_t constraining_column = 0; /* &id */
	size_t for_column = 2; /* &Value */
	size_t row, presence_index = 0;
	const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RICserviceQuery_IEs, id));
	
	for(row=0; row < itable->rows_count; row++) {
	    const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
	    const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
	
	    if(type_cell->cell_kind == aioc__undefined)
	        continue;
	
	    presence_index++;
	    if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
	        result.type_descriptor = type_cell->type_descriptor;
	        result.presence_index = presence_index;
	        break;
	    }
	}
	
	return result;
}

static int
memb_value_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	
	if(1 /* No applicable constraints whatsoever */) {
		/* Nothing is here. See below */
	}
	
	return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}

static asn_per_constraints_t asn_PER_memb_id_constr_2 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_6 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_7 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_8 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_10 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_11 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_12 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_14 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_15 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_16 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_18 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_19 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_20 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_22 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_23 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_24 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_26 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_27 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_28 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_30 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_31 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_32 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_34 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_35 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_36 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_38 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_39 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_40 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_42 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_43 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_44 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_46 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_47 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_48 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_50 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_51 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_52 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_54 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_55 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_56 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_58 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_59 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_60 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_62 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_63 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_64 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_66 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_67 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_68 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_70 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_71 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_72 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_74 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_75 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_76 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_78 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_79 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_80 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_82 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_83 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_84 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_86 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_87 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_88 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_90 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_91 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_92 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_94 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_95 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_96 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_98 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_99 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_100 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_id_constr_102 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 16,  16,  0,  65535 }	/* (0..65535) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_criticality_constr_103 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_value_constr_104 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_TYPE_member_t asn_MBR_value_4[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs__value, choice.RICaction_ToBeSetup_Item),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICaction_ToBeSetup_Item,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICaction-ToBeSetup-Item"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-ToBeSetup-Item */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = {
	sizeof(struct RICaction_ToBeSetup_ItemIEs__value),
	offsetof(struct RICaction_ToBeSetup_ItemIEs__value, _asn_ctx),
	offsetof(struct RICaction_ToBeSetup_ItemIEs__value, present),
	sizeof(((struct RICaction_ToBeSetup_ItemIEs__value *)0)->present),
	asn_MAP_value_tag2el_4,
	1,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_4 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_4,
	1,	/* Elements count */
	&asn_SPC_value_specs_4	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICaction_ToBeSetup_ItemIEs_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_2,  memb_id_constraint_1 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICaction_ToBeSetup_ItemIEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_3,  memb_criticality_constraint_1 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_ToBeSetup_ItemIEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_4,
		select_RICaction_ToBeSetup_ItemIEs_value_type,
		{ 0, &asn_PER_memb_value_constr_4,  memb_value_constraint_1 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICaction_ToBeSetup_ItemIEs_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICaction_ToBeSetup_ItemIEs_specs_1 = {
	sizeof(struct RICaction_ToBeSetup_ItemIEs),
	offsetof(struct RICaction_ToBeSetup_ItemIEs, _asn_ctx),
	asn_MAP_RICaction_ToBeSetup_ItemIEs_tag2el_1,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICaction_ToBeSetup_ItemIEs = {
	"RICaction-ToBeSetup-ItemIEs",
	"RICaction-ToBeSetup-ItemIEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1,
	sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1)
		/sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1[0]), /* 1 */
	asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1,	/* Same as above */
	sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1)
		/sizeof(asn_DEF_RICaction_ToBeSetup_ItemIEs_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICaction_ToBeSetup_ItemIEs_1,
	3,	/* Elements count */
	&asn_SPC_RICaction_ToBeSetup_ItemIEs_specs_1	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_8[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs__value, choice.RICaction_Admitted_Item),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICaction_Admitted_Item,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICaction-Admitted-Item"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_8[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-Admitted-Item */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_8 = {
	sizeof(struct RICaction_Admitted_ItemIEs__value),
	offsetof(struct RICaction_Admitted_ItemIEs__value, _asn_ctx),
	offsetof(struct RICaction_Admitted_ItemIEs__value, present),
	sizeof(((struct RICaction_Admitted_ItemIEs__value *)0)->present),
	asn_MAP_value_tag2el_8,
	1,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_8 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_8,
	1,	/* Elements count */
	&asn_SPC_value_specs_8	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICaction_Admitted_ItemIEs_5[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_6,  memb_id_constraint_5 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICaction_Admitted_ItemIEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_7,  memb_criticality_constraint_5 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_Admitted_ItemIEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_8,
		select_RICaction_Admitted_ItemIEs_value_type,
		{ 0, &asn_PER_memb_value_constr_8,  memb_value_constraint_5 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICaction_Admitted_ItemIEs_tags_5[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICaction_Admitted_ItemIEs_tag2el_5[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICaction_Admitted_ItemIEs_specs_5 = {
	sizeof(struct RICaction_Admitted_ItemIEs),
	offsetof(struct RICaction_Admitted_ItemIEs, _asn_ctx),
	asn_MAP_RICaction_Admitted_ItemIEs_tag2el_5,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICaction_Admitted_ItemIEs = {
	"RICaction-Admitted-ItemIEs",
	"RICaction-Admitted-ItemIEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICaction_Admitted_ItemIEs_tags_5,
	sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5)
		/sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5[0]), /* 1 */
	asn_DEF_RICaction_Admitted_ItemIEs_tags_5,	/* Same as above */
	sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5)
		/sizeof(asn_DEF_RICaction_Admitted_ItemIEs_tags_5[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICaction_Admitted_ItemIEs_5,
	3,	/* Elements count */
	&asn_SPC_RICaction_Admitted_ItemIEs_specs_5	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_12[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs__value, choice.RICaction_NotAdmitted_Item),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICaction_NotAdmitted_Item,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICaction-NotAdmitted-Item"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_12[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICaction-NotAdmitted-Item */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_12 = {
	sizeof(struct RICaction_NotAdmitted_ItemIEs__value),
	offsetof(struct RICaction_NotAdmitted_ItemIEs__value, _asn_ctx),
	offsetof(struct RICaction_NotAdmitted_ItemIEs__value, present),
	sizeof(((struct RICaction_NotAdmitted_ItemIEs__value *)0)->present),
	asn_MAP_value_tag2el_12,
	1,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_12 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_12,
	1,	/* Elements count */
	&asn_SPC_value_specs_12	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICaction_NotAdmitted_ItemIEs_9[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_10,  memb_id_constraint_9 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICaction_NotAdmitted_ItemIEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_11,  memb_criticality_constraint_9 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICaction_NotAdmitted_ItemIEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_12,
		select_RICaction_NotAdmitted_ItemIEs_value_type,
		{ 0, &asn_PER_memb_value_constr_12,  memb_value_constraint_9 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICaction_NotAdmitted_ItemIEs_tag2el_9[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICaction_NotAdmitted_ItemIEs_specs_9 = {
	sizeof(struct RICaction_NotAdmitted_ItemIEs),
	offsetof(struct RICaction_NotAdmitted_ItemIEs, _asn_ctx),
	asn_MAP_RICaction_NotAdmitted_ItemIEs_tag2el_9,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICaction_NotAdmitted_ItemIEs = {
	"RICaction-NotAdmitted-ItemIEs",
	"RICaction-NotAdmitted-ItemIEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9,
	sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9)
		/sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9[0]), /* 1 */
	asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9,	/* Same as above */
	sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9)
		/sizeof(asn_DEF_RICaction_NotAdmitted_ItemIEs_tags_9[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICaction_NotAdmitted_ItemIEs_9,
	3,	/* Elements count */
	&asn_SPC_RICaction_NotAdmitted_ItemIEs_specs_9	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_16[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs__value, choice.RANfunction_Item),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunction_Item,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunction-Item"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_16[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunction-Item */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_16 = {
	sizeof(struct RANfunction_ItemIEs__value),
	offsetof(struct RANfunction_ItemIEs__value, _asn_ctx),
	offsetof(struct RANfunction_ItemIEs__value, present),
	sizeof(((struct RANfunction_ItemIEs__value *)0)->present),
	asn_MAP_value_tag2el_16,
	1,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_16 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_16,
	1,	/* Elements count */
	&asn_SPC_value_specs_16	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RANfunction_ItemIEs_13[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_14,  memb_id_constraint_13 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RANfunction_ItemIEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_15,  memb_criticality_constraint_13 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunction_ItemIEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_16,
		select_RANfunction_ItemIEs_value_type,
		{ 0, &asn_PER_memb_value_constr_16,  memb_value_constraint_13 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RANfunction_ItemIEs_tags_13[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RANfunction_ItemIEs_tag2el_13[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RANfunction_ItemIEs_specs_13 = {
	sizeof(struct RANfunction_ItemIEs),
	offsetof(struct RANfunction_ItemIEs, _asn_ctx),
	asn_MAP_RANfunction_ItemIEs_tag2el_13,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RANfunction_ItemIEs = {
	"RANfunction-ItemIEs",
	"RANfunction-ItemIEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RANfunction_ItemIEs_tags_13,
	sizeof(asn_DEF_RANfunction_ItemIEs_tags_13)
		/sizeof(asn_DEF_RANfunction_ItemIEs_tags_13[0]), /* 1 */
	asn_DEF_RANfunction_ItemIEs_tags_13,	/* Same as above */
	sizeof(asn_DEF_RANfunction_ItemIEs_tags_13)
		/sizeof(asn_DEF_RANfunction_ItemIEs_tags_13[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RANfunction_ItemIEs_13,
	3,	/* Elements count */
	&asn_SPC_RANfunction_ItemIEs_specs_13	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_20[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs__value, choice.RANfunctionID_Item),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunctionID_Item,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID-Item"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_20[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionID-Item */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_20 = {
	sizeof(struct RANfunctionID_ItemIEs__value),
	offsetof(struct RANfunctionID_ItemIEs__value, _asn_ctx),
	offsetof(struct RANfunctionID_ItemIEs__value, present),
	sizeof(((struct RANfunctionID_ItemIEs__value *)0)->present),
	asn_MAP_value_tag2el_20,
	1,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_20 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_20,
	1,	/* Elements count */
	&asn_SPC_value_specs_20	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RANfunctionID_ItemIEs_17[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_18,  memb_id_constraint_17 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RANfunctionID_ItemIEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_19,  memb_criticality_constraint_17 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunctionID_ItemIEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_20,
		select_RANfunctionID_ItemIEs_value_type,
		{ 0, &asn_PER_memb_value_constr_20,  memb_value_constraint_17 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RANfunctionID_ItemIEs_tags_17[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RANfunctionID_ItemIEs_tag2el_17[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RANfunctionID_ItemIEs_specs_17 = {
	sizeof(struct RANfunctionID_ItemIEs),
	offsetof(struct RANfunctionID_ItemIEs, _asn_ctx),
	asn_MAP_RANfunctionID_ItemIEs_tag2el_17,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RANfunctionID_ItemIEs = {
	"RANfunctionID-ItemIEs",
	"RANfunctionID-ItemIEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RANfunctionID_ItemIEs_tags_17,
	sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17)
		/sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17[0]), /* 1 */
	asn_DEF_RANfunctionID_ItemIEs_tags_17,	/* Same as above */
	sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17)
		/sizeof(asn_DEF_RANfunctionID_ItemIEs_tags_17[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RANfunctionID_ItemIEs_17,
	3,	/* Elements count */
	&asn_SPC_RANfunctionID_ItemIEs_specs_17	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_24[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs__value, choice.RANfunctionIDcause_Item),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunctionIDcause_Item,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionIDcause-Item"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_24[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionIDcause-Item */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_24 = {
	sizeof(struct RANfunctionIDcause_ItemIEs__value),
	offsetof(struct RANfunctionIDcause_ItemIEs__value, _asn_ctx),
	offsetof(struct RANfunctionIDcause_ItemIEs__value, present),
	sizeof(((struct RANfunctionIDcause_ItemIEs__value *)0)->present),
	asn_MAP_value_tag2el_24,
	1,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_24 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_24,
	1,	/* Elements count */
	&asn_SPC_value_specs_24	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RANfunctionIDcause_ItemIEs_21[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_22,  memb_id_constraint_21 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RANfunctionIDcause_ItemIEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_23,  memb_criticality_constraint_21 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RANfunctionIDcause_ItemIEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_24,
		select_RANfunctionIDcause_ItemIEs_value_type,
		{ 0, &asn_PER_memb_value_constr_24,  memb_value_constraint_21 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RANfunctionIDcause_ItemIEs_tags_21[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RANfunctionIDcause_ItemIEs_tag2el_21[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RANfunctionIDcause_ItemIEs_specs_21 = {
	sizeof(struct RANfunctionIDcause_ItemIEs),
	offsetof(struct RANfunctionIDcause_ItemIEs, _asn_ctx),
	asn_MAP_RANfunctionIDcause_ItemIEs_tag2el_21,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RANfunctionIDcause_ItemIEs = {
	"RANfunctionIDcause-ItemIEs",
	"RANfunctionIDcause-ItemIEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RANfunctionIDcause_ItemIEs_tags_21,
	sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21)
		/sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21[0]), /* 1 */
	asn_DEF_RANfunctionIDcause_ItemIEs_tags_21,	/* Same as above */
	sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21)
		/sizeof(asn_DEF_RANfunctionIDcause_ItemIEs_tags_21[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RANfunctionIDcause_ItemIEs_21,
	3,	/* Elements count */
	&asn_SPC_RANfunctionIDcause_ItemIEs_specs_21	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_28[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RICrequestID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICrequestID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICrequestID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RANfunctionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs__value, choice.RICsubscriptionDetails),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICsubscriptionDetails,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICsubscriptionDetails"
		},
};
static const unsigned asn_MAP_value_to_canonical_28[] = { 1, 0, 2 };
static const unsigned asn_MAP_value_from_canonical_28[] = { 1, 0, 2 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_28[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RICrequestID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 } /* RICsubscriptionDetails */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_28 = {
	sizeof(struct RICsubscriptionRequest_IEs__value),
	offsetof(struct RICsubscriptionRequest_IEs__value, _asn_ctx),
	offsetof(struct RICsubscriptionRequest_IEs__value, present),
	sizeof(((struct RICsubscriptionRequest_IEs__value *)0)->present),
	asn_MAP_value_tag2el_28,
	3,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_28,
	asn_MAP_value_from_canonical_28,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_28 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_28,
	3,	/* Elements count */
	&asn_SPC_value_specs_28	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICsubscriptionRequest_IEs_25[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_26,  memb_id_constraint_25 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICsubscriptionRequest_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_27,  memb_criticality_constraint_25 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionRequest_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_28,
		select_RICsubscriptionRequest_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_28,  memb_value_constraint_25 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICsubscriptionRequest_IEs_tags_25[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionRequest_IEs_tag2el_25[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionRequest_IEs_specs_25 = {
	sizeof(struct RICsubscriptionRequest_IEs),
	offsetof(struct RICsubscriptionRequest_IEs, _asn_ctx),
	asn_MAP_RICsubscriptionRequest_IEs_tag2el_25,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICsubscriptionRequest_IEs = {
	"RICsubscriptionRequest-IEs",
	"RICsubscriptionRequest-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICsubscriptionRequest_IEs_tags_25,
	sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25)
		/sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25[0]), /* 1 */
	asn_DEF_RICsubscriptionRequest_IEs_tags_25,	/* Same as above */
	sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25)
		/sizeof(asn_DEF_RICsubscriptionRequest_IEs_tags_25[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICsubscriptionRequest_IEs_25,
	3,	/* Elements count */
	&asn_SPC_RICsubscriptionRequest_IEs_specs_25	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_32[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICrequestID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICrequestID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICrequestID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RANfunctionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICaction_Admitted_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICaction_Admitted_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICaction-Admitted-List"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs__value, choice.RICaction_NotAdmitted_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICaction_NotAdmitted_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICaction-NotAdmitted-List"
		},
};
static const unsigned asn_MAP_value_to_canonical_32[] = { 1, 0, 2, 3 };
static const unsigned asn_MAP_value_from_canonical_32[] = { 1, 0, 2, 3 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_32[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 2 }, /* RICrequestID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 1 }, /* RICaction-Admitted-List */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -2, 0 } /* RICaction-NotAdmitted-List */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_32 = {
	sizeof(struct RICsubscriptionResponse_IEs__value),
	offsetof(struct RICsubscriptionResponse_IEs__value, _asn_ctx),
	offsetof(struct RICsubscriptionResponse_IEs__value, present),
	sizeof(((struct RICsubscriptionResponse_IEs__value *)0)->present),
	asn_MAP_value_tag2el_32,
	4,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_32,
	asn_MAP_value_from_canonical_32,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_32 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_32,
	4,	/* Elements count */
	&asn_SPC_value_specs_32	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_IEs_29[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_30,  memb_id_constraint_29 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICsubscriptionResponse_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_31,  memb_criticality_constraint_29 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_32,
		select_RICsubscriptionResponse_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_32,  memb_value_constraint_29 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICsubscriptionResponse_IEs_tags_29[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionResponse_IEs_tag2el_29[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_IEs_specs_29 = {
	sizeof(struct RICsubscriptionResponse_IEs),
	offsetof(struct RICsubscriptionResponse_IEs, _asn_ctx),
	asn_MAP_RICsubscriptionResponse_IEs_tag2el_29,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICsubscriptionResponse_IEs = {
	"RICsubscriptionResponse-IEs",
	"RICsubscriptionResponse-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICsubscriptionResponse_IEs_tags_29,
	sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29)
		/sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29[0]), /* 1 */
	asn_DEF_RICsubscriptionResponse_IEs_tags_29,	/* Same as above */
	sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29)
		/sizeof(asn_DEF_RICsubscriptionResponse_IEs_tags_29[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICsubscriptionResponse_IEs_29,
	3,	/* Elements count */
	&asn_SPC_RICsubscriptionResponse_IEs_specs_29	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_36[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RICrequestID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICrequestID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICrequestID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RANfunctionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.RICaction_NotAdmitted_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICaction_NotAdmitted_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICaction-NotAdmitted-List"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs__value, choice.CriticalityDiagnostics),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_CriticalityDiagnostics,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"CriticalityDiagnostics"
		},
};
static const unsigned asn_MAP_value_to_canonical_36[] = { 1, 0, 2, 3 };
static const unsigned asn_MAP_value_from_canonical_36[] = { 1, 0, 2, 3 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_36[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 2 }, /* RICrequestID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 1 }, /* RICaction-NotAdmitted-List */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -2, 0 } /* CriticalityDiagnostics */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_36 = {
	sizeof(struct RICsubscriptionFailure_IEs__value),
	offsetof(struct RICsubscriptionFailure_IEs__value, _asn_ctx),
	offsetof(struct RICsubscriptionFailure_IEs__value, present),
	sizeof(((struct RICsubscriptionFailure_IEs__value *)0)->present),
	asn_MAP_value_tag2el_36,
	4,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_36,
	asn_MAP_value_from_canonical_36,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_36 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_36,
	4,	/* Elements count */
	&asn_SPC_value_specs_36	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICsubscriptionFailure_IEs_33[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_34,  memb_id_constraint_33 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICsubscriptionFailure_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_35,  memb_criticality_constraint_33 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionFailure_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_36,
		select_RICsubscriptionFailure_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_36,  memb_value_constraint_33 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICsubscriptionFailure_IEs_tags_33[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionFailure_IEs_tag2el_33[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionFailure_IEs_specs_33 = {
	sizeof(struct RICsubscriptionFailure_IEs),
	offsetof(struct RICsubscriptionFailure_IEs, _asn_ctx),
	asn_MAP_RICsubscriptionFailure_IEs_tag2el_33,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICsubscriptionFailure_IEs = {
	"RICsubscriptionFailure-IEs",
	"RICsubscriptionFailure-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICsubscriptionFailure_IEs_tags_33,
	sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33)
		/sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33[0]), /* 1 */
	asn_DEF_RICsubscriptionFailure_IEs_tags_33,	/* Same as above */
	sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33)
		/sizeof(asn_DEF_RICsubscriptionFailure_IEs_tags_33[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICsubscriptionFailure_IEs_33,
	3,	/* Elements count */
	&asn_SPC_RICsubscriptionFailure_IEs_specs_33	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_40[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs__value, choice.RICrequestID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICrequestID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICrequestID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs__value, choice.RANfunctionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID"
		},
};
static const unsigned asn_MAP_value_to_canonical_40[] = { 1, 0 };
static const unsigned asn_MAP_value_from_canonical_40[] = { 1, 0 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_40[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_40 = {
	sizeof(struct RICsubscriptionDeleteRequest_IEs__value),
	offsetof(struct RICsubscriptionDeleteRequest_IEs__value, _asn_ctx),
	offsetof(struct RICsubscriptionDeleteRequest_IEs__value, present),
	sizeof(((struct RICsubscriptionDeleteRequest_IEs__value *)0)->present),
	asn_MAP_value_tag2el_40,
	2,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_40,
	asn_MAP_value_from_canonical_40,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_40 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_40,
	2,	/* Elements count */
	&asn_SPC_value_specs_40	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteRequest_IEs_37[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_38,  memb_id_constraint_37 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICsubscriptionDeleteRequest_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_39,  memb_criticality_constraint_37 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteRequest_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_40,
		select_RICsubscriptionDeleteRequest_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_40,  memb_value_constraint_37 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteRequest_IEs_tag2el_37[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_37 = {
	sizeof(struct RICsubscriptionDeleteRequest_IEs),
	offsetof(struct RICsubscriptionDeleteRequest_IEs, _asn_ctx),
	asn_MAP_RICsubscriptionDeleteRequest_IEs_tag2el_37,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteRequest_IEs = {
	"RICsubscriptionDeleteRequest-IEs",
	"RICsubscriptionDeleteRequest-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37,
	sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37)
		/sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37[0]), /* 1 */
	asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37,	/* Same as above */
	sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37)
		/sizeof(asn_DEF_RICsubscriptionDeleteRequest_IEs_tags_37[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICsubscriptionDeleteRequest_IEs_37,
	3,	/* Elements count */
	&asn_SPC_RICsubscriptionDeleteRequest_IEs_specs_37	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_44[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs__value, choice.RICrequestID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICrequestID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICrequestID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs__value, choice.RANfunctionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID"
		},
};
static const unsigned asn_MAP_value_to_canonical_44[] = { 1, 0 };
static const unsigned asn_MAP_value_from_canonical_44[] = { 1, 0 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_44[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_44 = {
	sizeof(struct RICsubscriptionDeleteResponse_IEs__value),
	offsetof(struct RICsubscriptionDeleteResponse_IEs__value, _asn_ctx),
	offsetof(struct RICsubscriptionDeleteResponse_IEs__value, present),
	sizeof(((struct RICsubscriptionDeleteResponse_IEs__value *)0)->present),
	asn_MAP_value_tag2el_44,
	2,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_44,
	asn_MAP_value_from_canonical_44,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_44 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_44,
	2,	/* Elements count */
	&asn_SPC_value_specs_44	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteResponse_IEs_41[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_42,  memb_id_constraint_41 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICsubscriptionDeleteResponse_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_43,  memb_criticality_constraint_41 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteResponse_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_44,
		select_RICsubscriptionDeleteResponse_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_44,  memb_value_constraint_41 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteResponse_IEs_tag2el_41[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_41 = {
	sizeof(struct RICsubscriptionDeleteResponse_IEs),
	offsetof(struct RICsubscriptionDeleteResponse_IEs, _asn_ctx),
	asn_MAP_RICsubscriptionDeleteResponse_IEs_tag2el_41,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteResponse_IEs = {
	"RICsubscriptionDeleteResponse-IEs",
	"RICsubscriptionDeleteResponse-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41,
	sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41)
		/sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41[0]), /* 1 */
	asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41,	/* Same as above */
	sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41)
		/sizeof(asn_DEF_RICsubscriptionDeleteResponse_IEs_tags_41[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICsubscriptionDeleteResponse_IEs_41,
	3,	/* Elements count */
	&asn_SPC_RICsubscriptionDeleteResponse_IEs_specs_41	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_48[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.RICrequestID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICrequestID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICrequestID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.RANfunctionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.Cause),
		-1 /* Ambiguous tag (CHOICE?) */,
		0,
		&asn_DEF_Cause,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"Cause"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs__value, choice.CriticalityDiagnostics),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_CriticalityDiagnostics,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"CriticalityDiagnostics"
		},
};
static const unsigned asn_MAP_value_to_canonical_48[] = { 1, 0, 3, 2 };
static const unsigned asn_MAP_value_from_canonical_48[] = { 1, 0, 3, 2 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_48[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RICrequestID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 }, /* CriticalityDiagnostics */
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* ricRequest */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* ricService */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transport */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_48 = {
	sizeof(struct RICsubscriptionDeleteFailure_IEs__value),
	offsetof(struct RICsubscriptionDeleteFailure_IEs__value, _asn_ctx),
	offsetof(struct RICsubscriptionDeleteFailure_IEs__value, present),
	sizeof(((struct RICsubscriptionDeleteFailure_IEs__value *)0)->present),
	asn_MAP_value_tag2el_48,
	8,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_48,
	asn_MAP_value_from_canonical_48,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_48 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_48,
	4,	/* Elements count */
	&asn_SPC_value_specs_48	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICsubscriptionDeleteFailure_IEs_45[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_46,  memb_id_constraint_45 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICsubscriptionDeleteFailure_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_47,  memb_criticality_constraint_45 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionDeleteFailure_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_48,
		select_RICsubscriptionDeleteFailure_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_48,  memb_value_constraint_45 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionDeleteFailure_IEs_tag2el_45[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_45 = {
	sizeof(struct RICsubscriptionDeleteFailure_IEs),
	offsetof(struct RICsubscriptionDeleteFailure_IEs, _asn_ctx),
	asn_MAP_RICsubscriptionDeleteFailure_IEs_tag2el_45,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICsubscriptionDeleteFailure_IEs = {
	"RICsubscriptionDeleteFailure-IEs",
	"RICsubscriptionDeleteFailure-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45,
	sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45)
		/sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45[0]), /* 1 */
	asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45,	/* Same as above */
	sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45)
		/sizeof(asn_DEF_RICsubscriptionDeleteFailure_IEs_tags_45[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICsubscriptionDeleteFailure_IEs_45,
	3,	/* Elements count */
	&asn_SPC_RICsubscriptionDeleteFailure_IEs_specs_45	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_52[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICrequestID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICrequestID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICrequestID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RANfunctionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICactionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RICactionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICactionID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationSN),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RICindicationSN,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICindicationSN"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationType),
		(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
		0,
		&asn_DEF_RICindicationType,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICindicationType"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationHeader),
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_RICindicationHeader,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICindicationHeader"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICindicationMessage),
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_RICindicationMessage,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICindicationMessage"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs__value, choice.RICcallProcessID),
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_RICcallProcessID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICcallProcessID"
		},
};
static const unsigned asn_MAP_value_to_canonical_52[] = { 1, 2, 3, 5, 6, 7, 4, 0 };
static const unsigned asn_MAP_value_from_canonical_52[] = { 7, 0, 1, 2, 6, 3, 4, 5 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_52[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 2 }, /* RANfunctionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* RICactionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -2, 0 }, /* RICindicationSN */
    { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 5, 0, 2 }, /* RICindicationHeader */
    { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 6, -1, 1 }, /* RICindicationMessage */
    { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 7, -2, 0 }, /* RICcallProcessID */
    { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* RICindicationType */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_52 = {
	sizeof(struct RICindication_IEs__value),
	offsetof(struct RICindication_IEs__value, _asn_ctx),
	offsetof(struct RICindication_IEs__value, present),
	sizeof(((struct RICindication_IEs__value *)0)->present),
	asn_MAP_value_tag2el_52,
	8,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_52,
	asn_MAP_value_from_canonical_52,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_52 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_52,
	8,	/* Elements count */
	&asn_SPC_value_specs_52	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICindication_IEs_49[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_50,  memb_id_constraint_49 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICindication_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_51,  memb_criticality_constraint_49 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICindication_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_52,
		select_RICindication_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_52,  memb_value_constraint_49 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICindication_IEs_tags_49[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICindication_IEs_tag2el_49[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICindication_IEs_specs_49 = {
	sizeof(struct RICindication_IEs),
	offsetof(struct RICindication_IEs, _asn_ctx),
	asn_MAP_RICindication_IEs_tag2el_49,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICindication_IEs = {
	"RICindication-IEs",
	"RICindication-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICindication_IEs_tags_49,
	sizeof(asn_DEF_RICindication_IEs_tags_49)
		/sizeof(asn_DEF_RICindication_IEs_tags_49[0]), /* 1 */
	asn_DEF_RICindication_IEs_tags_49,	/* Same as above */
	sizeof(asn_DEF_RICindication_IEs_tags_49)
		/sizeof(asn_DEF_RICindication_IEs_tags_49[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICindication_IEs_49,
	3,	/* Elements count */
	&asn_SPC_RICindication_IEs_specs_49	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_56[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICrequestID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICrequestID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICrequestID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RANfunctionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcallProcessID),
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_RICcallProcessID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICcallProcessID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolHeader),
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_RICcontrolHeader,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICcontrolHeader"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolMessage),
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_RICcontrolMessage,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICcontrolMessage"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs__value, choice.RICcontrolAckRequest),
		(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
		0,
		&asn_DEF_RICcontrolAckRequest,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICcontrolAckRequest"
		},
};
static const unsigned asn_MAP_value_to_canonical_56[] = { 1, 2, 3, 4, 5, 0 };
static const unsigned asn_MAP_value_from_canonical_56[] = { 5, 0, 1, 2, 3, 4 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_56[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 2 }, /* RICcallProcessID */
    { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, -1, 1 }, /* RICcontrolHeader */
    { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, -2, 0 }, /* RICcontrolMessage */
    { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, 0, 0 }, /* RICcontrolAckRequest */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_56 = {
	sizeof(struct RICcontrolRequest_IEs__value),
	offsetof(struct RICcontrolRequest_IEs__value, _asn_ctx),
	offsetof(struct RICcontrolRequest_IEs__value, present),
	sizeof(((struct RICcontrolRequest_IEs__value *)0)->present),
	asn_MAP_value_tag2el_56,
	6,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_56,
	asn_MAP_value_from_canonical_56,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_56 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_56,
	6,	/* Elements count */
	&asn_SPC_value_specs_56	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICcontrolRequest_IEs_53[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_54,  memb_id_constraint_53 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICcontrolRequest_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_55,  memb_criticality_constraint_53 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_56,
		select_RICcontrolRequest_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_56,  memb_value_constraint_53 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICcontrolRequest_IEs_tags_53[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICcontrolRequest_IEs_tag2el_53[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_IEs_specs_53 = {
	sizeof(struct RICcontrolRequest_IEs),
	offsetof(struct RICcontrolRequest_IEs, _asn_ctx),
	asn_MAP_RICcontrolRequest_IEs_tag2el_53,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICcontrolRequest_IEs = {
	"RICcontrolRequest-IEs",
	"RICcontrolRequest-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICcontrolRequest_IEs_tags_53,
	sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53)
		/sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53[0]), /* 1 */
	asn_DEF_RICcontrolRequest_IEs_tags_53,	/* Same as above */
	sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53)
		/sizeof(asn_DEF_RICcontrolRequest_IEs_tags_53[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICcontrolRequest_IEs_53,
	3,	/* Elements count */
	&asn_SPC_RICcontrolRequest_IEs_specs_53	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_60[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICrequestID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICrequestID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICrequestID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RANfunctionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcallProcessID),
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_RICcallProcessID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICcallProcessID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcontrolStatus),
		(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
		0,
		&asn_DEF_RICcontrolStatus,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICcontrolStatus"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs__value, choice.RICcontrolOutcome),
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_RICcontrolOutcome,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICcontrolOutcome"
		},
};
static const unsigned asn_MAP_value_to_canonical_60[] = { 1, 2, 4, 3, 0 };
static const unsigned asn_MAP_value_from_canonical_60[] = { 4, 0, 1, 3, 2 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_60[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 1 }, /* RICcallProcessID */
    { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, -1, 0 }, /* RICcontrolOutcome */
    { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 0 }, /* RICcontrolStatus */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RICrequestID */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_60 = {
	sizeof(struct RICcontrolAcknowledge_IEs__value),
	offsetof(struct RICcontrolAcknowledge_IEs__value, _asn_ctx),
	offsetof(struct RICcontrolAcknowledge_IEs__value, present),
	sizeof(((struct RICcontrolAcknowledge_IEs__value *)0)->present),
	asn_MAP_value_tag2el_60,
	5,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_60,
	asn_MAP_value_from_canonical_60,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_60 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_60,
	5,	/* Elements count */
	&asn_SPC_value_specs_60	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICcontrolAcknowledge_IEs_57[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_58,  memb_id_constraint_57 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICcontrolAcknowledge_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_59,  memb_criticality_constraint_57 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolAcknowledge_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_60,
		select_RICcontrolAcknowledge_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_60,  memb_value_constraint_57 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICcontrolAcknowledge_IEs_tags_57[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICcontrolAcknowledge_IEs_tag2el_57[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICcontrolAcknowledge_IEs_specs_57 = {
	sizeof(struct RICcontrolAcknowledge_IEs),
	offsetof(struct RICcontrolAcknowledge_IEs, _asn_ctx),
	asn_MAP_RICcontrolAcknowledge_IEs_tag2el_57,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICcontrolAcknowledge_IEs = {
	"RICcontrolAcknowledge-IEs",
	"RICcontrolAcknowledge-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICcontrolAcknowledge_IEs_tags_57,
	sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57)
		/sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57[0]), /* 1 */
	asn_DEF_RICcontrolAcknowledge_IEs_tags_57,	/* Same as above */
	sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57)
		/sizeof(asn_DEF_RICcontrolAcknowledge_IEs_tags_57[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICcontrolAcknowledge_IEs_57,
	3,	/* Elements count */
	&asn_SPC_RICcontrolAcknowledge_IEs_specs_57	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_64[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RICrequestID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICrequestID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICrequestID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RANfunctionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RICcallProcessID),
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_RICcallProcessID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICcallProcessID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.Cause),
		-1 /* Ambiguous tag (CHOICE?) */,
		0,
		&asn_DEF_Cause,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"Cause"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs__value, choice.RICcontrolOutcome),
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_RICcontrolOutcome,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICcontrolOutcome"
		},
};
static const unsigned asn_MAP_value_to_canonical_64[] = { 1, 2, 4, 0, 3 };
static const unsigned asn_MAP_value_from_canonical_64[] = { 3, 0, 1, 4, 2 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_64[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 1 }, /* RICcallProcessID */
    { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, -1, 0 }, /* RICcontrolOutcome */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* RICrequestID */
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 0 }, /* ricRequest */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* ricService */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 }, /* transport */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* protocol */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* misc */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_64 = {
	sizeof(struct RICcontrolFailure_IEs__value),
	offsetof(struct RICcontrolFailure_IEs__value, _asn_ctx),
	offsetof(struct RICcontrolFailure_IEs__value, present),
	sizeof(((struct RICcontrolFailure_IEs__value *)0)->present),
	asn_MAP_value_tag2el_64,
	9,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_64,
	asn_MAP_value_from_canonical_64,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_64 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_64,
	5,	/* Elements count */
	&asn_SPC_value_specs_64	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICcontrolFailure_IEs_61[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_62,  memb_id_constraint_61 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICcontrolFailure_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_63,  memb_criticality_constraint_61 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICcontrolFailure_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_64,
		select_RICcontrolFailure_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_64,  memb_value_constraint_61 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICcontrolFailure_IEs_tags_61[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICcontrolFailure_IEs_tag2el_61[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICcontrolFailure_IEs_specs_61 = {
	sizeof(struct RICcontrolFailure_IEs),
	offsetof(struct RICcontrolFailure_IEs, _asn_ctx),
	asn_MAP_RICcontrolFailure_IEs_tag2el_61,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICcontrolFailure_IEs = {
	"RICcontrolFailure-IEs",
	"RICcontrolFailure-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICcontrolFailure_IEs_tags_61,
	sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61)
		/sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61[0]), /* 1 */
	asn_DEF_RICcontrolFailure_IEs_tags_61,	/* Same as above */
	sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61)
		/sizeof(asn_DEF_RICcontrolFailure_IEs_tags_61[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICcontrolFailure_IEs_61,
	3,	/* Elements count */
	&asn_SPC_RICcontrolFailure_IEs_specs_61	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_68[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.RICrequestID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RICrequestID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RICrequestID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.RANfunctionID),
		(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
		0,
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.Cause),
		-1 /* Ambiguous tag (CHOICE?) */,
		0,
		&asn_DEF_Cause,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"Cause"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs__value, choice.CriticalityDiagnostics),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_CriticalityDiagnostics,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"CriticalityDiagnostics"
		},
};
static const unsigned asn_MAP_value_to_canonical_68[] = { 1, 0, 3, 2 };
static const unsigned asn_MAP_value_from_canonical_68[] = { 1, 0, 3, 2 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_68[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* RANfunctionID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RICrequestID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 }, /* CriticalityDiagnostics */
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* ricRequest */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* ricService */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transport */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_68 = {
	sizeof(struct ErrorIndication_IEs__value),
	offsetof(struct ErrorIndication_IEs__value, _asn_ctx),
	offsetof(struct ErrorIndication_IEs__value, present),
	sizeof(((struct ErrorIndication_IEs__value *)0)->present),
	asn_MAP_value_tag2el_68,
	8,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_68,
	asn_MAP_value_from_canonical_68,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_68 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_68,
	4,	/* Elements count */
	&asn_SPC_value_specs_68	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_ErrorIndication_IEs_65[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_66,  memb_id_constraint_65 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_ErrorIndication_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_67,  memb_criticality_constraint_65 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ErrorIndication_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_68,
		select_ErrorIndication_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_68,  memb_value_constraint_65 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_ErrorIndication_IEs_tags_65[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ErrorIndication_IEs_tag2el_65[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_ErrorIndication_IEs_specs_65 = {
	sizeof(struct ErrorIndication_IEs),
	offsetof(struct ErrorIndication_IEs, _asn_ctx),
	asn_MAP_ErrorIndication_IEs_tag2el_65,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_ErrorIndication_IEs = {
	"ErrorIndication-IEs",
	"ErrorIndication-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_ErrorIndication_IEs_tags_65,
	sizeof(asn_DEF_ErrorIndication_IEs_tags_65)
		/sizeof(asn_DEF_ErrorIndication_IEs_tags_65[0]), /* 1 */
	asn_DEF_ErrorIndication_IEs_tags_65,	/* Same as above */
	sizeof(asn_DEF_ErrorIndication_IEs_tags_65)
		/sizeof(asn_DEF_ErrorIndication_IEs_tags_65[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_ErrorIndication_IEs_65,
	3,	/* Elements count */
	&asn_SPC_ErrorIndication_IEs_specs_65	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_72[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.GlobalE2node_ID),
		-1 /* Ambiguous tag (CHOICE?) */,
		0,
		&asn_DEF_GlobalE2node_ID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"GlobalE2node-ID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs__value, choice.RANfunctions_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunctions_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctions-List"
		},
};
static const unsigned asn_MAP_value_to_canonical_72[] = { 1, 0 };
static const unsigned asn_MAP_value_from_canonical_72[] = { 1, 0 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_72[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* RANfunctions-List */
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gNB */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* en-gNB */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* ng-eNB */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 } /* eNB */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_72 = {
	sizeof(struct E2setupRequestIEs__value),
	offsetof(struct E2setupRequestIEs__value, _asn_ctx),
	offsetof(struct E2setupRequestIEs__value, present),
	sizeof(((struct E2setupRequestIEs__value *)0)->present),
	asn_MAP_value_tag2el_72,
	5,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_72,
	asn_MAP_value_from_canonical_72,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_72 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_72,
	2,	/* Elements count */
	&asn_SPC_value_specs_72	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_E2setupRequestIEs_69[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_70,  memb_id_constraint_69 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_E2setupRequestIEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_71,  memb_criticality_constraint_69 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupRequestIEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_72,
		select_E2setupRequestIEs_value_type,
		{ 0, &asn_PER_memb_value_constr_72,  memb_value_constraint_69 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_E2setupRequestIEs_tags_69[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_E2setupRequestIEs_tag2el_69[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_E2setupRequestIEs_specs_69 = {
	sizeof(struct E2setupRequestIEs),
	offsetof(struct E2setupRequestIEs, _asn_ctx),
	asn_MAP_E2setupRequestIEs_tag2el_69,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_E2setupRequestIEs = {
	"E2setupRequestIEs",
	"E2setupRequestIEs",
	&asn_OP_SEQUENCE,
	asn_DEF_E2setupRequestIEs_tags_69,
	sizeof(asn_DEF_E2setupRequestIEs_tags_69)
		/sizeof(asn_DEF_E2setupRequestIEs_tags_69[0]), /* 1 */
	asn_DEF_E2setupRequestIEs_tags_69,	/* Same as above */
	sizeof(asn_DEF_E2setupRequestIEs_tags_69)
		/sizeof(asn_DEF_E2setupRequestIEs_tags_69[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_E2setupRequestIEs_69,
	3,	/* Elements count */
	&asn_SPC_E2setupRequestIEs_specs_69	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_76[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.GlobalRIC_ID),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_GlobalRIC_ID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"GlobalRIC-ID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.RANfunctionsID_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunctionsID_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionsID-List"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs__value, choice.RANfunctionsIDcause_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunctionsIDcause_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionsIDcause-List"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_76[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 2 }, /* GlobalRIC-ID */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 1 }, /* RANfunctionsID-List */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 0 } /* RANfunctionsIDcause-List */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_76 = {
	sizeof(struct E2setupResponseIEs__value),
	offsetof(struct E2setupResponseIEs__value, _asn_ctx),
	offsetof(struct E2setupResponseIEs__value, present),
	sizeof(((struct E2setupResponseIEs__value *)0)->present),
	asn_MAP_value_tag2el_76,
	3,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_76 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_76,
	3,	/* Elements count */
	&asn_SPC_value_specs_76	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_E2setupResponseIEs_73[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_74,  memb_id_constraint_73 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_E2setupResponseIEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_75,  memb_criticality_constraint_73 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupResponseIEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_76,
		select_E2setupResponseIEs_value_type,
		{ 0, &asn_PER_memb_value_constr_76,  memb_value_constraint_73 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_E2setupResponseIEs_tags_73[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_E2setupResponseIEs_tag2el_73[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_E2setupResponseIEs_specs_73 = {
	sizeof(struct E2setupResponseIEs),
	offsetof(struct E2setupResponseIEs, _asn_ctx),
	asn_MAP_E2setupResponseIEs_tag2el_73,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_E2setupResponseIEs = {
	"E2setupResponseIEs",
	"E2setupResponseIEs",
	&asn_OP_SEQUENCE,
	asn_DEF_E2setupResponseIEs_tags_73,
	sizeof(asn_DEF_E2setupResponseIEs_tags_73)
		/sizeof(asn_DEF_E2setupResponseIEs_tags_73[0]), /* 1 */
	asn_DEF_E2setupResponseIEs_tags_73,	/* Same as above */
	sizeof(asn_DEF_E2setupResponseIEs_tags_73)
		/sizeof(asn_DEF_E2setupResponseIEs_tags_73[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_E2setupResponseIEs_73,
	3,	/* Elements count */
	&asn_SPC_E2setupResponseIEs_specs_73	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_80[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.Cause),
		-1 /* Ambiguous tag (CHOICE?) */,
		0,
		&asn_DEF_Cause,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"Cause"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.TimeToWait),
		(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
		0,
		&asn_DEF_TimeToWait,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"TimeToWait"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs__value, choice.CriticalityDiagnostics),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_CriticalityDiagnostics,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"CriticalityDiagnostics"
		},
};
static const unsigned asn_MAP_value_to_canonical_80[] = { 1, 2, 0 };
static const unsigned asn_MAP_value_from_canonical_80[] = { 2, 0, 1 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_80[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 }, /* TimeToWait */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 }, /* CriticalityDiagnostics */
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequest */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* ricService */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* transport */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* protocol */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* misc */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_80 = {
	sizeof(struct E2setupFailureIEs__value),
	offsetof(struct E2setupFailureIEs__value, _asn_ctx),
	offsetof(struct E2setupFailureIEs__value, present),
	sizeof(((struct E2setupFailureIEs__value *)0)->present),
	asn_MAP_value_tag2el_80,
	7,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_80,
	asn_MAP_value_from_canonical_80,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_80 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_80,
	3,	/* Elements count */
	&asn_SPC_value_specs_80	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_E2setupFailureIEs_77[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_78,  memb_id_constraint_77 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_E2setupFailureIEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_79,  memb_criticality_constraint_77 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct E2setupFailureIEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_80,
		select_E2setupFailureIEs_value_type,
		{ 0, &asn_PER_memb_value_constr_80,  memb_value_constraint_77 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_E2setupFailureIEs_tags_77[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_E2setupFailureIEs_tag2el_77[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_E2setupFailureIEs_specs_77 = {
	sizeof(struct E2setupFailureIEs),
	offsetof(struct E2setupFailureIEs, _asn_ctx),
	asn_MAP_E2setupFailureIEs_tag2el_77,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_E2setupFailureIEs = {
	"E2setupFailureIEs",
	"E2setupFailureIEs",
	&asn_OP_SEQUENCE,
	asn_DEF_E2setupFailureIEs_tags_77,
	sizeof(asn_DEF_E2setupFailureIEs_tags_77)
		/sizeof(asn_DEF_E2setupFailureIEs_tags_77[0]), /* 1 */
	asn_DEF_E2setupFailureIEs_tags_77,	/* Same as above */
	sizeof(asn_DEF_E2setupFailureIEs_tags_77)
		/sizeof(asn_DEF_E2setupFailureIEs_tags_77[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_E2setupFailureIEs_77,
	3,	/* Elements count */
	&asn_SPC_E2setupFailureIEs_specs_77	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_84[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs__value, choice.Cause),
		-1 /* Ambiguous tag (CHOICE?) */,
		0,
		&asn_DEF_Cause,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"Cause"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_84[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricRequest */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* ricService */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* transport */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* protocol */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* misc */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_84 = {
	sizeof(struct ResetRequestIEs__value),
	offsetof(struct ResetRequestIEs__value, _asn_ctx),
	offsetof(struct ResetRequestIEs__value, present),
	sizeof(((struct ResetRequestIEs__value *)0)->present),
	asn_MAP_value_tag2el_84,
	5,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_84 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_84,
	1,	/* Elements count */
	&asn_SPC_value_specs_84	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_ResetRequestIEs_81[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_82,  memb_id_constraint_81 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_ResetRequestIEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_83,  memb_criticality_constraint_81 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ResetRequestIEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_84,
		select_ResetRequestIEs_value_type,
		{ 0, &asn_PER_memb_value_constr_84,  memb_value_constraint_81 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_ResetRequestIEs_tags_81[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ResetRequestIEs_tag2el_81[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_ResetRequestIEs_specs_81 = {
	sizeof(struct ResetRequestIEs),
	offsetof(struct ResetRequestIEs, _asn_ctx),
	asn_MAP_ResetRequestIEs_tag2el_81,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_ResetRequestIEs = {
	"ResetRequestIEs",
	"ResetRequestIEs",
	&asn_OP_SEQUENCE,
	asn_DEF_ResetRequestIEs_tags_81,
	sizeof(asn_DEF_ResetRequestIEs_tags_81)
		/sizeof(asn_DEF_ResetRequestIEs_tags_81[0]), /* 1 */
	asn_DEF_ResetRequestIEs_tags_81,	/* Same as above */
	sizeof(asn_DEF_ResetRequestIEs_tags_81)
		/sizeof(asn_DEF_ResetRequestIEs_tags_81[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_ResetRequestIEs_81,
	3,	/* Elements count */
	&asn_SPC_ResetRequestIEs_specs_81	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_88[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs__value, choice.CriticalityDiagnostics),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_CriticalityDiagnostics,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"CriticalityDiagnostics"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_88[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* CriticalityDiagnostics */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_88 = {
	sizeof(struct ResetResponseIEs__value),
	offsetof(struct ResetResponseIEs__value, _asn_ctx),
	offsetof(struct ResetResponseIEs__value, present),
	sizeof(((struct ResetResponseIEs__value *)0)->present),
	asn_MAP_value_tag2el_88,
	1,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_88 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_88,
	1,	/* Elements count */
	&asn_SPC_value_specs_88	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_ResetResponseIEs_85[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_86,  memb_id_constraint_85 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_ResetResponseIEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_87,  memb_criticality_constraint_85 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ResetResponseIEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_88,
		select_ResetResponseIEs_value_type,
		{ 0, &asn_PER_memb_value_constr_88,  memb_value_constraint_85 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_ResetResponseIEs_tags_85[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ResetResponseIEs_tag2el_85[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_ResetResponseIEs_specs_85 = {
	sizeof(struct ResetResponseIEs),
	offsetof(struct ResetResponseIEs, _asn_ctx),
	asn_MAP_ResetResponseIEs_tag2el_85,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_ResetResponseIEs = {
	"ResetResponseIEs",
	"ResetResponseIEs",
	&asn_OP_SEQUENCE,
	asn_DEF_ResetResponseIEs_tags_85,
	sizeof(asn_DEF_ResetResponseIEs_tags_85)
		/sizeof(asn_DEF_ResetResponseIEs_tags_85[0]), /* 1 */
	asn_DEF_ResetResponseIEs_tags_85,	/* Same as above */
	sizeof(asn_DEF_ResetResponseIEs_tags_85)
		/sizeof(asn_DEF_ResetResponseIEs_tags_85[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_ResetResponseIEs_85,
	3,	/* Elements count */
	&asn_SPC_ResetResponseIEs_specs_85	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_92[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs__value, choice.RANfunctions_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunctions_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctions-List"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs__value, choice.RANfunctionsID_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunctionsID_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionsID-List"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_92[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RANfunctions-List */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* RANfunctionsID-List */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_92 = {
	sizeof(struct RICserviceUpdate_IEs__value),
	offsetof(struct RICserviceUpdate_IEs__value, _asn_ctx),
	offsetof(struct RICserviceUpdate_IEs__value, present),
	sizeof(((struct RICserviceUpdate_IEs__value *)0)->present),
	asn_MAP_value_tag2el_92,
	2,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_92 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_92,
	2,	/* Elements count */
	&asn_SPC_value_specs_92	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICserviceUpdate_IEs_89[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_90,  memb_id_constraint_89 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICserviceUpdate_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_91,  memb_criticality_constraint_89 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdate_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_92,
		select_RICserviceUpdate_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_92,  memb_value_constraint_89 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICserviceUpdate_IEs_tags_89[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdate_IEs_tag2el_89[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdate_IEs_specs_89 = {
	sizeof(struct RICserviceUpdate_IEs),
	offsetof(struct RICserviceUpdate_IEs, _asn_ctx),
	asn_MAP_RICserviceUpdate_IEs_tag2el_89,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICserviceUpdate_IEs = {
	"RICserviceUpdate-IEs",
	"RICserviceUpdate-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICserviceUpdate_IEs_tags_89,
	sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89)
		/sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89[0]), /* 1 */
	asn_DEF_RICserviceUpdate_IEs_tags_89,	/* Same as above */
	sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89)
		/sizeof(asn_DEF_RICserviceUpdate_IEs_tags_89[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICserviceUpdate_IEs_89,
	3,	/* Elements count */
	&asn_SPC_RICserviceUpdate_IEs_specs_89	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_96[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs__value, choice.RANfunctionsID_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunctionsID_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionsID-List"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs__value, choice.RANfunctionsIDcause_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunctionsIDcause_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionsIDcause-List"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_96[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RANfunctionsID-List */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* RANfunctionsIDcause-List */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_96 = {
	sizeof(struct RICserviceUpdateAcknowledge_IEs__value),
	offsetof(struct RICserviceUpdateAcknowledge_IEs__value, _asn_ctx),
	offsetof(struct RICserviceUpdateAcknowledge_IEs__value, present),
	sizeof(((struct RICserviceUpdateAcknowledge_IEs__value *)0)->present),
	asn_MAP_value_tag2el_96,
	2,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_96 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_96,
	2,	/* Elements count */
	&asn_SPC_value_specs_96	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICserviceUpdateAcknowledge_IEs_93[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_94,  memb_id_constraint_93 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICserviceUpdateAcknowledge_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_95,  memb_criticality_constraint_93 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateAcknowledge_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_96,
		select_RICserviceUpdateAcknowledge_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_96,  memb_value_constraint_93 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateAcknowledge_IEs_tag2el_93[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_93 = {
	sizeof(struct RICserviceUpdateAcknowledge_IEs),
	offsetof(struct RICserviceUpdateAcknowledge_IEs, _asn_ctx),
	asn_MAP_RICserviceUpdateAcknowledge_IEs_tag2el_93,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateAcknowledge_IEs = {
	"RICserviceUpdateAcknowledge-IEs",
	"RICserviceUpdateAcknowledge-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93,
	sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93)
		/sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93[0]), /* 1 */
	asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93,	/* Same as above */
	sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93)
		/sizeof(asn_DEF_RICserviceUpdateAcknowledge_IEs_tags_93[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICserviceUpdateAcknowledge_IEs_93,
	3,	/* Elements count */
	&asn_SPC_RICserviceUpdateAcknowledge_IEs_specs_93	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_100[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.RANfunctionsIDcause_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunctionsIDcause_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionsIDcause-List"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.TimeToWait),
		(ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
		0,
		&asn_DEF_TimeToWait,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"TimeToWait"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs__value, choice.CriticalityDiagnostics),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_CriticalityDiagnostics,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"CriticalityDiagnostics"
		},
};
static const unsigned asn_MAP_value_to_canonical_100[] = { 1, 0, 2 };
static const unsigned asn_MAP_value_from_canonical_100[] = { 1, 0, 2 };
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_100[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 }, /* TimeToWait */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* RANfunctionsIDcause-List */
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 } /* CriticalityDiagnostics */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_100 = {
	sizeof(struct RICserviceUpdateFailure_IEs__value),
	offsetof(struct RICserviceUpdateFailure_IEs__value, _asn_ctx),
	offsetof(struct RICserviceUpdateFailure_IEs__value, present),
	sizeof(((struct RICserviceUpdateFailure_IEs__value *)0)->present),
	asn_MAP_value_tag2el_100,
	3,	/* Count of tags in the map */
	asn_MAP_value_to_canonical_100,
	asn_MAP_value_from_canonical_100,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_100 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_100,
	3,	/* Elements count */
	&asn_SPC_value_specs_100	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICserviceUpdateFailure_IEs_97[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_98,  memb_id_constraint_97 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICserviceUpdateFailure_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_99,  memb_criticality_constraint_97 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceUpdateFailure_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_100,
		select_RICserviceUpdateFailure_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_100,  memb_value_constraint_97 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICserviceUpdateFailure_IEs_tags_97[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICserviceUpdateFailure_IEs_tag2el_97[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICserviceUpdateFailure_IEs_specs_97 = {
	sizeof(struct RICserviceUpdateFailure_IEs),
	offsetof(struct RICserviceUpdateFailure_IEs, _asn_ctx),
	asn_MAP_RICserviceUpdateFailure_IEs_tag2el_97,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICserviceUpdateFailure_IEs = {
	"RICserviceUpdateFailure-IEs",
	"RICserviceUpdateFailure-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICserviceUpdateFailure_IEs_tags_97,
	sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97)
		/sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97[0]), /* 1 */
	asn_DEF_RICserviceUpdateFailure_IEs_tags_97,	/* Same as above */
	sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97)
		/sizeof(asn_DEF_RICserviceUpdateFailure_IEs_tags_97[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICserviceUpdateFailure_IEs_97,
	3,	/* Elements count */
	&asn_SPC_RICserviceUpdateFailure_IEs_specs_97	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_value_104[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs__value, choice.RANfunctionsID_List),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_RANfunctionsID_List,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"RANfunctionsID-List"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_104[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RANfunctionsID-List */
};
static asn_CHOICE_specifics_t asn_SPC_value_specs_104 = {
	sizeof(struct RICserviceQuery_IEs__value),
	offsetof(struct RICserviceQuery_IEs__value, _asn_ctx),
	offsetof(struct RICserviceQuery_IEs__value, present),
	sizeof(((struct RICserviceQuery_IEs__value *)0)->present),
	asn_MAP_value_tag2el_104,
	1,	/* Count of tags in the map */
	0, 0,
	-1	/* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_104 = {
	"value",
	"value",
	&asn_OP_OPEN_TYPE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ 0, 0, OPEN_TYPE_constraint },
	asn_MBR_value_104,
	1,	/* Elements count */
	&asn_SPC_value_specs_104	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_RICserviceQuery_IEs_101[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs, id),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_ID,
		0,
		{ 0, &asn_PER_memb_id_constr_102,  memb_id_constraint_101 },
		0, 0, /* No default value */
		"id"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs, criticality),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_Criticality,
		select_RICserviceQuery_IEs_criticality_type,
		{ 0, &asn_PER_memb_criticality_constr_103,  memb_criticality_constraint_101 },
		0, 0, /* No default value */
		"criticality"
		},
	{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RICserviceQuery_IEs, value),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_value_104,
		select_RICserviceQuery_IEs_value_type,
		{ 0, &asn_PER_memb_value_constr_104,  memb_value_constraint_101 },
		0, 0, /* No default value */
		"value"
		},
};
static const ber_tlv_tag_t asn_DEF_RICserviceQuery_IEs_tags_101[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICserviceQuery_IEs_tag2el_101[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_RICserviceQuery_IEs_specs_101 = {
	sizeof(struct RICserviceQuery_IEs),
	offsetof(struct RICserviceQuery_IEs, _asn_ctx),
	asn_MAP_RICserviceQuery_IEs_tag2el_101,
	3,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RICserviceQuery_IEs = {
	"RICserviceQuery-IEs",
	"RICserviceQuery-IEs",
	&asn_OP_SEQUENCE,
	asn_DEF_RICserviceQuery_IEs_tags_101,
	sizeof(asn_DEF_RICserviceQuery_IEs_tags_101)
		/sizeof(asn_DEF_RICserviceQuery_IEs_tags_101[0]), /* 1 */
	asn_DEF_RICserviceQuery_IEs_tags_101,	/* Same as above */
	sizeof(asn_DEF_RICserviceQuery_IEs_tags_101)
		/sizeof(asn_DEF_RICserviceQuery_IEs_tags_101[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICserviceQuery_IEs_101,
	3,	/* Elements count */
	&asn_SPC_RICserviceQuery_IEs_specs_101	/* Additional specs */
};

