/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "X2AP-PDU-Contents"
 * 	found in "Spec/e2ap-v031ex.asn"
 * 	`asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER`
 */

#include "HandoverPreparationFailure.h"

asn_TYPE_member_t asn_MBR_HandoverPreparationFailure_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct HandoverPreparationFailure, protocolIEs),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_Container_9515P16,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"protocolIEs"
		},
};
static const ber_tlv_tag_t asn_DEF_HandoverPreparationFailure_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_HandoverPreparationFailure_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */
};
asn_SEQUENCE_specifics_t asn_SPC_HandoverPreparationFailure_specs_1 = {
	sizeof(struct HandoverPreparationFailure),
	offsetof(struct HandoverPreparationFailure, _asn_ctx),
	asn_MAP_HandoverPreparationFailure_tag2el_1,
	1,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_HandoverPreparationFailure = {
	"HandoverPreparationFailure",
	"HandoverPreparationFailure",
	&asn_OP_SEQUENCE,
	asn_DEF_HandoverPreparationFailure_tags_1,
	sizeof(asn_DEF_HandoverPreparationFailure_tags_1)
		/sizeof(asn_DEF_HandoverPreparationFailure_tags_1[0]), /* 1 */
	asn_DEF_HandoverPreparationFailure_tags_1,	/* Same as above */
	sizeof(asn_DEF_HandoverPreparationFailure_tags_1)
		/sizeof(asn_DEF_HandoverPreparationFailure_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_HandoverPreparationFailure_1,
	1,	/* Elements count */
	&asn_SPC_HandoverPreparationFailure_specs_1	/* Additional specs */
};

