/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "X2AP-PDU-Contents"
 * 	found in "X2AP-15-4-0.asn1"
 * 	`asn1c -D ./asn1_n1 -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example`
 */

#include "E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresent.h"

#include "ProtocolExtensionContainer.h"
asn_TYPE_member_t asn_MBR_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_1[] = {
	{ ATF_POINTER, 1, offsetof(struct E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent, iE_Extensions),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolExtensionContainer_7683P80,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"iE-Extensions"
		},
};
static const int asn_MAP_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_oms_1[] = { 0 };
static const ber_tlv_tag_t asn_DEF_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* iE-Extensions */
};
asn_SEQUENCE_specifics_t asn_SPC_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_specs_1 = {
	sizeof(struct E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent),
	offsetof(struct E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent, _asn_ctx),
	asn_MAP_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_tag2el_1,
	1,	/* Count of tags in the map */
	asn_MAP_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_oms_1,	/* Optional members */
	1, 0,	/* Root/Additions */
	1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent = {
	"E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresent",
	"E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresent",
	&asn_OP_SEQUENCE,
	asn_DEF_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_tags_1,
	sizeof(asn_DEF_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_tags_1)
		/sizeof(asn_DEF_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_tags_1[0]), /* 1 */
	asn_DEF_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_tags_1,	/* Same as above */
	sizeof(asn_DEF_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_tags_1)
		/sizeof(asn_DEF_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_1,
	1,	/* Elements count */
	&asn_SPC_E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent_specs_1	/* Additional specs */
};

