(function (_, kotlin_kotlin, kotlin_io_github_pdvrieze_xmlutil_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core) {
  'use strict';
  //region block: imports
  var imul = Math.imul;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
  var CompactFragment_init_$Create$ = kotlin_io_github_pdvrieze_xmlutil_core.$_$.j;
  var Unit_instance = kotlin_kotlin.$_$.m5;
  var siblingsToFragment = kotlin_io_github_pdvrieze_xmlutil_core.$_$.u1;
  var isInterface = kotlin_kotlin.$_$.gc;
  var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.c5;
  var arrayOf = kotlin_kotlin.$_$.wi;
  var createKType = kotlin_kotlin.$_$.b;
  var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s3;
  var THROW_CCE = kotlin_kotlin.$_$.hi;
  var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i3;
  var Companion_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.q;
  var ListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x;
  var buildClassSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u1;
  var protoOf = kotlin_kotlin.$_$.wc;
  var ICompactFragment = kotlin_io_github_pdvrieze_xmlutil_core.$_$.c1;
  var CompactFragment = kotlin_io_github_pdvrieze_xmlutil_core.$_$.b1;
  var toList = kotlin_kotlin.$_$.t9;
  var objectMeta = kotlin_kotlin.$_$.vc;
  var setMetadataFor = kotlin_kotlin.$_$.xc;
  var VOID = kotlin_kotlin.$_$.f;
  var Companion_instance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q;
  var SerializationException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d;
  var single = kotlin_kotlin.$_$.n9;
  var CONTEXTUAL_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k;
  var buildSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v1;
  var StringCompanionObject_instance = kotlin_kotlin.$_$.a5;
  var serializer_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b1;
  var MapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;
  var SEALED_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h;
  var NodeConsts_instance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.p;
  var to = kotlin_kotlin.$_$.nj;
  var mapOf = kotlin_kotlin.$_$.n8;
  var iterator = kotlin_io_github_pdvrieze_xmlutil_core.$_$.z;
  var asSequence = kotlin_kotlin.$_$.zd;
  var toList_0 = kotlin_kotlin.$_$.ne;
  var createDocument = kotlin_io_github_pdvrieze_xmlutil_core.$_$.a1;
  var DomWriter = kotlin_io_github_pdvrieze_xmlutil_core.$_$.d1;
  var writeElement = kotlin_io_github_pdvrieze_xmlutil_core.$_$.c2;
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a2;
  var charSequenceLength = kotlin_kotlin.$_$.jb;
  var iterator_0 = kotlin_io_github_pdvrieze_xmlutil_core.$_$.y;
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v;
  var QName_init_$Create$ = kotlin_io_github_pdvrieze_xmlutil_core.$_$.m;
  var objectCreate = kotlin_kotlin.$_$.uc;
  var Decoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g2;
  var classMeta = kotlin_kotlin.$_$.lb;
  var smartStartTag = kotlin_io_github_pdvrieze_xmlutil_core.$_$.w1;
  var decodeSerializableElement$default = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a;
  var CompositeDecoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d2;
  var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.u1;
  var DeserializationStrategy = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h3;
  var ensureNotNull = kotlin_kotlin.$_$.zi;
  var Enum = kotlin_kotlin.$_$.uh;
  var hashCode = kotlin_kotlin.$_$.wb;
  var equals = kotlin_kotlin.$_$.ob;
  var EmptySerializersModule = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b3;
  var HashMap_init_$Create$ = kotlin_kotlin.$_$.p;
  var HashSet_init_$Create$ = kotlin_kotlin.$_$.s;
  var Map = kotlin_kotlin.$_$.y5;
  var asSequence_0 = kotlin_kotlin.$_$.h6;
  var filterNot = kotlin_kotlin.$_$.ae;
  var map = kotlin_kotlin.$_$.he;
  var sortedWith = kotlin_kotlin.$_$.me;
  var XMLConstants_instance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.s;
  var NamespaceImpl = kotlin_io_github_pdvrieze_xmlutil_core.$_$.j1;
  var StringFormat = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.n3;
  var interfaceMeta = kotlin_kotlin.$_$.xb;
  var Comparator = kotlin_kotlin.$_$.rh;
  var contains = kotlin_kotlin.$_$.p6;
  var compareValues = kotlin_kotlin.$_$.fa;
  var plus = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f3;
  var StringWriter = kotlin_io_github_pdvrieze_xmlutil_core.$_$.u;
  var XmlStreaming_instance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.t;
  var collectionSizeOrDefault = kotlin_kotlin.$_$.n6;
  var mapCapacity = kotlin_kotlin.$_$.m8;
  var coerceAtLeast = kotlin_kotlin.$_$.jd;
  var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.u;
  var skipPreamble = kotlin_io_github_pdvrieze_xmlutil_core.$_$.v1;
  var isEquivalent = kotlin_io_github_pdvrieze_xmlutil_core.$_$.s1;
  var QName = kotlin_io_github_pdvrieze_xmlutil_core.$_$.g1;
  var QName_init_$Create$_0 = kotlin_io_github_pdvrieze_xmlutil_core.$_$.n;
  var Collection = kotlin_kotlin.$_$.p5;
  var SerializersModuleBuilder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c3;
  var getKClass = kotlin_kotlin.$_$.e;
  var QNameSerializer_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.r;
  var MAP_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o;
  var LIST_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.n;
  var toBoolean = kotlin_kotlin.$_$.ng;
  var toByte = kotlin_kotlin.$_$.og;
  var toUByte = kotlin_kotlin.$_$.bh;
  var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.i3;
  var toShort = kotlin_kotlin.$_$.yg;
  var toUShort = kotlin_kotlin.$_$.fh;
  var _UShort___get_data__impl__g0245 = kotlin_kotlin.$_$.k4;
  var toInt = kotlin_kotlin.$_$.ug;
  var toUInt = kotlin_kotlin.$_$.ch;
  var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.s3;
  var toLong = kotlin_kotlin.$_$.xg;
  var toULong = kotlin_kotlin.$_$.eh;
  var _ULong___get_data__impl__fggpzb = kotlin_kotlin.$_$.b4;
  var toDouble = kotlin_kotlin.$_$.rg;
  var single_0 = kotlin_kotlin.$_$.xf;
  var decodeSerializableValue = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f2;
  var EventType_END_DOCUMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.c;
  var EventType_END_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.d;
  var EventType_START_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.f;
  var readSimpleElement = kotlin_io_github_pdvrieze_xmlutil_core.$_$.t1;
  var allConsecutiveTextContent = kotlin_io_github_pdvrieze_xmlutil_core.$_$.n1;
  var allText = kotlin_io_github_pdvrieze_xmlutil_core.$_$.o1;
  var noWhenBranchMatchedException = kotlin_kotlin.$_$.gj;
  var AssertionError_init_$Create$ = kotlin_kotlin.$_$.h1;
  var toString = kotlin_kotlin.$_$.bd;
  var XmlException_init_$Create$ = kotlin_io_github_pdvrieze_xmlutil_core.$_$.o;
  var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.r2;
  var PrimitiveKind = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k1;
  var LIST = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s1;
  var MAP = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t1;
  var decodeSequentially = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;
  var booleanArray = kotlin_kotlin.$_$.eb;
  var ArrayDeque_init_$Create$ = kotlin_kotlin.$_$.k;
  var CompactFragment_init_$Create$_0 = kotlin_io_github_pdvrieze_xmlutil_core.$_$.l;
  var CompactFragment_init_$Create$_1 = kotlin_io_github_pdvrieze_xmlutil_core.$_$.k;
  var AbstractCollectionSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l2;
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.l;
  var plus_0 = kotlin_kotlin.$_$.z8;
  var singleOrNull = kotlin_kotlin.$_$.m9;
  var get_indices = kotlin_kotlin.$_$.x7;
  var checkIndexOverflow = kotlin_kotlin.$_$.l6;
  var IntCompanionObject_instance = kotlin_kotlin.$_$.y4;
  var emptyList = kotlin_kotlin.$_$.i7;
  var STRING_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j;
  var elementContentToFragment = kotlin_io_github_pdvrieze_xmlutil_core.$_$.p1;
  var EndElementEvent = kotlin_io_github_pdvrieze_xmlutil_core.$_$.i1;
  var decodeCollectionSize = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b2;
  var xmlCollapseWhitespace = kotlin_io_github_pdvrieze_xmlutil_core.$_$.d2;
  var split = kotlin_kotlin.$_$.zf;
  var until = kotlin_kotlin.$_$.rd;
  var elementToFragment = kotlin_io_github_pdvrieze_xmlutil_core.$_$.q1;
  var assert = kotlin_io_github_pdvrieze_xmlutil_core.$_$.v;
  var assert_0 = kotlin_io_github_pdvrieze_xmlutil_core.$_$.w;
  var joinToString = kotlin_kotlin.$_$.a8;
  var EventType_CDSECT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.b;
  var EventType_IGNORABLE_WHITESPACE_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.e;
  var EventType_TEXT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.g;
  var XmlBufferedReader = kotlin_io_github_pdvrieze_xmlutil_core.$_$.h1;
  var toCName = kotlin_io_github_pdvrieze_xmlutil_core.$_$.y1;
  var SerializationStrategy = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.m3;
  var last = kotlin_kotlin.$_$.pf;
  var isWhitespace = kotlin_kotlin.$_$.lf;
  var first = kotlin_kotlin.$_$.af;
  var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.lj;
  var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.h3;
  var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.j3;
  var _UShort___init__impl__jigrne = kotlin_kotlin.$_$.j4;
  var UShort__toString_impl_edaoee = kotlin_kotlin.$_$.l4;
  var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.q3;
  var UInt__toString_impl_dbgl21 = kotlin_kotlin.$_$.t3;
  var _ULong___init__impl__c78o9k = kotlin_kotlin.$_$.a4;
  var ULong__toString_impl_f9au7k = kotlin_kotlin.$_$.c4;
  var toString_0 = kotlin_kotlin.$_$.c3;
  var beginCollection = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;
  var Encoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k2;
  var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.f1;
  var encodeSerializableValue = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j2;
  var encodeNotNullMark = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i2;
  var smartStartTag_0 = kotlin_io_github_pdvrieze_xmlutil_core.$_$.x1;
  var endTag = kotlin_io_github_pdvrieze_xmlutil_core.$_$.r1;
  var sortedWith_0 = kotlin_kotlin.$_$.o9;
  var CompositeEncoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e2;
  var Iterator = kotlin_kotlin.$_$.t5;
  var firstOrNull = kotlin_kotlin.$_$.ce;
  var charSequenceGet = kotlin_kotlin.$_$.ib;
  var isDigit = kotlin_kotlin.$_$.ff;
  var numberRangeToNumber = kotlin_kotlin.$_$.oc;
  var asSequence_1 = kotlin_kotlin.$_$.i6;
  var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.h2;
  var writeAttribute = kotlin_io_github_pdvrieze_xmlutil_core.$_$.b2;
  var first_0 = kotlin_kotlin.$_$.r7;
  var PolymorphicKind = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j1;
  var ENUM_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l;
  var OBJECT_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p;
  var CLASS_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.m;
  var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.u2;
  var substringAfterLast = kotlin_kotlin.$_$.cg;
  var toQname = kotlin_io_github_pdvrieze_xmlutil_core.$_$.a2;
  var startsWith = kotlin_kotlin.$_$.bg;
  var lastIndexOf = kotlin_kotlin.$_$.nf;
  var indexOf = kotlin_kotlin.$_$.df;
  var startsWith_0 = kotlin_kotlin.$_$.ag;
  var XmlDeclMode_None_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.h;
  var XmlVersion_XML11_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.a;
  var captureStack = kotlin_kotlin.$_$.fb;
  var SerializationException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l3;
  var SerializationException_init_$Init$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e;
  var getStringHashCode = kotlin_kotlin.$_$.vb;
  var getBooleanHashCode = kotlin_kotlin.$_$.rb;
  var OPEN_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g;
  var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a1;
  var fillArrayVal = kotlin_kotlin.$_$.qb;
  var plus_1 = kotlin_kotlin.$_$.je;
  var filter = kotlin_kotlin.$_$.be;
  var Sequence = kotlin_kotlin.$_$.yd;
  var flatMap = kotlin_kotlin.$_$.ee;
  var charArrayOf = kotlin_kotlin.$_$.gb;
  var split_0 = kotlin_kotlin.$_$.yf;
  var SerializersModuleCollector = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e3;
  var Char = kotlin_kotlin.$_$.ph;
  var Long = kotlin_kotlin.$_$.ai;
  var listOfNotNull = kotlin_kotlin.$_$.i8;
  var getPrefixes = kotlin_io_github_pdvrieze_xmlutil_core.$_$.e1;
  var NamespaceContextImpl = kotlin_io_github_pdvrieze_xmlutil_core.$_$.f1;
  var startDocument$default = kotlin_io_github_pdvrieze_xmlutil_core.$_$.i;
  var namespaceAttr = kotlin_io_github_pdvrieze_xmlutil_core.$_$.k1;
  var processingInstruction = kotlin_io_github_pdvrieze_xmlutil_core.$_$.l1;
  var XmlWriter = kotlin_io_github_pdvrieze_xmlutil_core.$_$.m1;
  var listOf = kotlin_kotlin.$_$.k8;
  var isCharSequence = kotlin_kotlin.$_$.cc;
  var trim = kotlin_kotlin.$_$.jh;
  var lazy = kotlin_kotlin.$_$.fj;
  var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.e2;
  var getKClassFromExpression = kotlin_kotlin.$_$.d;
  var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.x;
  var getPolymorphicDescriptors = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y1;
  var get_capturedKClass = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w1;
  var toNamespace = kotlin_io_github_pdvrieze_xmlutil_core.$_$.z1;
  var Companion_getInstance_0 = kotlin_kotlin.$_$.i5;
  var serializer_1 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f1;
  var Companion_getInstance_1 = kotlin_kotlin.$_$.l5;
  var serializer_2 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c1;
  var Companion_getInstance_2 = kotlin_kotlin.$_$.j5;
  var serializer_3 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d1;
  var Companion_getInstance_3 = kotlin_kotlin.$_$.k5;
  var serializer_4 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g1;
  var requireNoNulls = kotlin_kotlin.$_$.g9;
  var toList_1 = kotlin_kotlin.$_$.u9;
  var get_indices_0 = kotlin_kotlin.$_$.z7;
  var substringBeforeLast = kotlin_kotlin.$_$.hg;
  var dropLast = kotlin_kotlin.$_$.ue;
  var endsWith = kotlin_kotlin.$_$.we;
  var KProperty1 = kotlin_kotlin.$_$.vd;
  var getPropertyCallableRef = kotlin_kotlin.$_$.ub;
  var Pair = kotlin_kotlin.$_$.ei;
  var toMutableList = kotlin_kotlin.$_$.x9;
  var compareTo = kotlin_kotlin.$_$.mb;
  var get_EmptySerializersModuleLegacyJs = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a3;
  var serializerOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r3;
  var get_name = kotlin_io_github_pdvrieze_xmlutil_core.$_$.x;
  var replace = kotlin_kotlin.$_$.vf;
  //endregion
  //region block: pre-declaration
  setMetadataFor(CompactFragmentSerializer, 'CompactFragmentSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(NodeSerializer, 'NodeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(ElementSerializer, 'ElementSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(DocumentDecoder, 'DocumentDecoder', classMeta, VOID, [Decoder]);
  setMetadataFor(DocumentCompositeDecoder, 'DocumentCompositeDecoder', classMeta, VOID, [CompositeDecoder]);
  setMetadataFor(WrappedDeserializationStrategy, 'WrappedDeserializationStrategy', classMeta, VOID, [DeserializationStrategy]);
  setMetadataFor(InputKind, 'InputKind', classMeta, Enum);
  setMetadataFor(InputKind$Element, 'Element', classMeta, InputKind);
  setMetadataFor(InputKind$Attribute, 'Attribute', classMeta, InputKind);
  setMetadataFor(InputKind$Text, 'Text', classMeta, InputKind);
  setMetadataFor(OutputKind, 'OutputKind', classMeta, Enum);
  setMetadataFor(OutputKind$Attribute, 'Attribute', classMeta, OutputKind);
  setMetadataFor(OutputKind$Text, 'Text', classMeta, OutputKind);
  setMetadataFor(PolyBaseInfo, 'PolyBaseInfo', classMeta);
  setMetadataFor(Companion, 'Companion', objectMeta, VOID, [StringFormat]);
  function delegateFormat() {
    return new XML(this.j39(), this.t45());
  }
  setMetadataFor(XmlCodecConfig, 'XmlCodecConfig', interfaceMeta);
  function ensureNamespace(qName) {
    return this.ylh(qName, false);
  }
  setMetadataFor(XmlOutput, 'XmlOutput', interfaceMeta, VOID, [XmlCodecConfig]);
  setMetadataFor(XmlInput, 'XmlInput', interfaceMeta, VOID, [XmlCodecConfig]);
  setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(XML, 'XML', classMeta, VOID, [StringFormat]);
  setMetadataFor(XmlDecoderBase$SerialValueDecoder$decodeInline$1, VOID, classMeta);
  setMetadataFor(XmlCodec, 'XmlCodec', classMeta);
  setMetadataFor(DecodeCommons, 'DecodeCommons', classMeta, XmlCodec, [XmlCodec, XmlInput, Decoder]);
  setMetadataFor(XmlDecoder, 'XmlDecoder', classMeta, DecodeCommons, [DecodeCommons, Decoder, XmlInput]);
  setMetadataFor(StringDecoder, 'StringDecoder', classMeta, DecodeCommons, [Decoder, XmlInput, DecodeCommons]);
  setMetadataFor(SerialValueDecoder, 'SerialValueDecoder', classMeta, XmlDecoder);
  setMetadataFor(NullDecoder, 'NullDecoder', classMeta, XmlDecoder, [XmlDecoder, CompositeDecoder]);
  setMetadataFor(XmlTagCodec, 'XmlTagCodec', classMeta);
  setMetadataFor(TagDecoderBase, 'TagDecoderBase', classMeta, XmlTagCodec, [XmlTagCodec, CompositeDecoder, XmlInput]);
  setMetadataFor(TagDecoder, 'TagDecoder', classMeta, TagDecoderBase);
  setMetadataFor(AttributeMapDecoder, 'AttributeMapDecoder', classMeta, TagDecoderBase, [TagDecoderBase, Decoder]);
  setMetadataFor(AttributeListDecoder, 'AttributeListDecoder', classMeta, TagDecoderBase);
  setMetadataFor(AnonymousListDecoder, 'AnonymousListDecoder', classMeta, TagDecoderBase);
  setMetadataFor(NamedListDecoder, 'NamedListDecoder', classMeta, TagDecoderBase);
  setMetadataFor(MapDecoderBase, 'MapDecoderBase', classMeta, TagDecoderBase);
  setMetadataFor(AnonymousMapDecoder, 'AnonymousMapDecoder', classMeta, MapDecoderBase);
  setMetadataFor(NamedMapDecoder, 'NamedMapDecoder', classMeta, MapDecoderBase);
  setMetadataFor(PolymorphicDecoder, 'PolymorphicDecoder', classMeta, TagDecoderBase);
  setMetadataFor(XmlCodecBase, 'XmlCodecBase', classMeta);
  setMetadataFor(XmlDecoderBase, 'XmlDecoderBase', classMeta, XmlCodecBase);
  setMetadataFor(PolyInfo, 'PolyInfo', classMeta);
  setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(XmlEncoder, 'XmlEncoder', classMeta, XmlCodec, [XmlCodec, Encoder, XmlOutput]);
  setMetadataFor(NSAttrXmlEncoder, 'NSAttrXmlEncoder', classMeta, XmlEncoder);
  setMetadataFor(PrimitiveEncoder, 'PrimitiveEncoder', classMeta, VOID, [Encoder, XmlOutput]);
  setMetadataFor(InlineEncoder, 'InlineEncoder', classMeta, XmlEncoder);
  setMetadataFor(TagEncoder, 'TagEncoder', classMeta, XmlTagCodec, [XmlTagCodec, CompositeEncoder, XmlOutput]);
  setMetadataFor(InlineTagEncoder, 'InlineTagEncoder', classMeta, TagEncoder);
  setMetadataFor(PolymorphicEncoder, 'PolymorphicEncoder', classMeta, TagEncoder, [TagEncoder, XmlOutput]);
  setMetadataFor(AttributeMapEncoder, 'AttributeMapEncoder', classMeta, TagEncoder);
  setMetadataFor(AttributeListEncoder, 'AttributeListEncoder', classMeta, TagEncoder);
  setMetadataFor(ListEncoder, 'ListEncoder', classMeta, TagEncoder, [TagEncoder, XmlOutput]);
  setMetadataFor(MapEncoder, 'MapEncoder', classMeta, TagEncoder);
  setMetadataFor(XmlEncoderBase, 'XmlEncoderBase', classMeta, XmlCodecBase);
  setMetadataFor(Companion_0, 'Companion', objectMeta);
  setMetadataFor(sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0, 'sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0', classMeta);
  setMetadataFor(sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0_0, 'sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0', classMeta);
  setMetadataFor(sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0_1, 'sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0', classMeta);
  setMetadataFor(Builder, 'Builder', classMeta, VOID, VOID, Builder);
  setMetadataFor(Companion_1, 'Companion', objectMeta);
  setMetadataFor(XmlConfig, 'XmlConfig', classMeta);
  setMetadataFor(XmlSerialException, 'XmlSerialException', classMeta, SerializationException);
  setMetadataFor(UnknownXmlFieldException, 'UnknownXmlFieldException', classMeta, XmlSerialException);
  setMetadataFor(XmlParsingException, 'XmlParsingException', classMeta, XmlSerialException);
  setMetadataFor(DeclaredNameInfo, 'DeclaredNameInfo', classMeta);
  setMetadataFor(ActualNameInfo, 'ActualNameInfo', classMeta);
  setMetadataFor(XmlEncodeDefault, 'XmlEncodeDefault', classMeta, Enum);
  function get_defaultPrimitiveOutputKind() {
    return OutputKind_Attribute_getInstance();
  }
  function get_defaultObjectOutputKind() {
    return OutputKind_Element_getInstance();
  }
  function get_isStrictNames() {
    return false;
  }
  function get_verifyElementOrder() {
    return false;
  }
  function defaultOutputKind(serialKind) {
    var tmp;
    if (equals(serialKind, ENUM_getInstance()) ? true : equals(serialKind, OBJECT_getInstance())) {
      tmp = this.cm3();
    } else {
      if (serialKind instanceof PrimitiveKind) {
        tmp = this.bm3();
      } else {
        if (equals(serialKind, OPEN_getInstance())) {
          tmp = OutputKind_Element_getInstance();
        } else {
          tmp = OutputKind_Element_getInstance();
        }
      }
    }
    return tmp;
  }
  function invalidOutputKind(message) {
    return this.fm3(message);
  }
  function serialTypeNameToQName(typeNameInfo, parentNamespace) {
    return this.km3(typeNameInfo.wm2_1, parentNamespace);
  }
  function serialUseNameToQName(useNameInfo, parentNamespace) {
    return this.km3(useNameInfo.wm2_1, parentNamespace);
  }
  function effectiveOutputKind(serializerParent, tagParent, canBeAttribute) {
    var base = this.mm3(serializerParent, tagParent);
    if (!canBeAttribute ? base.equals(OutputKind_Attribute_getInstance()) : false) {
      return this.om3(serializerParent, tagParent, base);
    }
    return base;
  }
  function overrideSerializerOrNull(serializerParent, tagParent) {
    return null;
  }
  function handleUnknownContentRecovering(input, inputKind, descriptor, name, candidates) {
    this.qm3(input, inputKind, name, candidates);
    return emptyList();
  }
  function onElementRepeated(parentDescriptor, childIndex) {
  }
  function handleAttributeOrderConflict(serializerParent, tagParent, outputKind) {
    throw SerializationException_init_$Create$('Node ' + serializerParent.rm3().wm2_1 + ' wants to be an attribute but cannot due to ordering constraints');
  }
  function initialChildReorderMap(parentDescriptor) {
    return null;
  }
  function enumEncoding(enumDescriptor, index) {
    return enumDescriptor.m46(index);
  }
  function preserveSpace(serializerParent, tagParent) {
    return true;
  }
  function mapKeyName(serializerParent) {
    return DeclaredNameInfo_init_$Create$('key');
  }
  function mapValueName(serializerParent, isListEluded) {
    return DeclaredNameInfo_init_$Create$('value');
  }
  function mapEntryName(serializerParent, isListEluded) {
    return QName_init_$Create$_0(serializerParent.xm3().ll5(), 'entry');
  }
  function isMapValueCollapsed(mapParent, valueDescriptor) {
    return false;
  }
  function elementNamespaceDecls(serializerParent) {
    return emptyList();
  }
  function attributeListDelimiters(serializerParent, tagParent) {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [' ', '\n', '\t', '\r'];
  }
  setMetadataFor(XmlSerializationPolicy, 'XmlSerializationPolicy', interfaceMeta);
  setMetadataFor(Builder_0, 'Builder', classMeta);
  setMetadataFor(DefaultXmlSerializationPolicy, 'DefaultXmlSerializationPolicy', classMeta, VOID, [XmlSerializationPolicy]);
  setMetadataFor(XmlSerialName, 'XmlSerialName', classMeta);
  setMetadataFor(XmlPolyChildren, 'XmlPolyChildren', classMeta);
  setMetadataFor(XmlElement, 'XmlElement', classMeta);
  setMetadataFor(XmlId, 'XmlId', classMeta);
  setMetadataFor(XmlValue, 'XmlValue', classMeta);
  setMetadataFor(XmlChildrenName, 'XmlChildrenName', classMeta);
  setMetadataFor(XmlCData, 'XmlCData', classMeta);
  setMetadataFor(XmlDefault, 'XmlDefault', classMeta);
  setMetadataFor(XmlOtherAttributes, 'XmlOtherAttributes', classMeta);
  setMetadataFor(XmlBefore, 'XmlBefore', classMeta);
  setMetadataFor(XmlAfter, 'XmlAfter', classMeta);
  setMetadataFor(XmlIgnoreWhitespace, 'XmlIgnoreWhitespace', classMeta);
  setMetadataFor(XmlNamespaceDeclSpec, 'XmlNamespaceDeclSpec', classMeta);
  setMetadataFor(ChildCollector, 'ChildCollector', classMeta, VOID, [SerializersModuleCollector], ChildCollector);
  setMetadataFor(DummyDecoder, 'DummyDecoder', classMeta, VOID, [Decoder]);
  setMetadataFor(NamespaceCollectingXmlWriter$namespaceContext$1, VOID, classMeta, VOID, [NamespaceContextImpl]);
  setMetadataFor(NamespaceCollectingXmlWriter, 'NamespaceCollectingXmlWriter', classMeta, VOID, [XmlWriter]);
  setMetadataFor(PrefixWrappingPolicy, 'PrefixWrappingPolicy', classMeta, VOID, [XmlSerializationPolicy]);
  setMetadataFor(XmlQNameSerializer, 'XmlQNameSerializer', objectMeta, VOID, [KSerializer]);
  function get_isNullable() {
    return this.qlk().b46();
  }
  function get_kind() {
    return this.qlk().i46();
  }
  function get_isCData() {
    return false;
  }
  function isElementOptional(index) {
    return this.qlk().n46(index);
  }
  setMetadataFor(SafeXmlDescriptor, 'SafeXmlDescriptor', interfaceMeta);
  setMetadataFor(XmlDescriptor, 'XmlDescriptor', classMeta, VOID, [SafeXmlDescriptor]);
  setMetadataFor(XmlRootDescriptor, 'XmlRootDescriptor', classMeta, XmlDescriptor);
  setMetadataFor(Companion_2, 'Companion', objectMeta);
  setMetadataFor(XmlValueDescriptor, 'XmlValueDescriptor', classMeta, XmlDescriptor);
  setMetadataFor(XmlPolymorphicDescriptor, 'XmlPolymorphicDescriptor', classMeta, XmlValueDescriptor);
  function copy$default(useNameInfo, useOutputKind, overriddenSerializer, $super) {
    useNameInfo = useNameInfo === VOID ? this.rm3() : useNameInfo;
    useOutputKind = useOutputKind === VOID ? this.dm4() : useOutputKind;
    overriddenSerializer = overriddenSerializer === VOID ? this.im5() : overriddenSerializer;
    return $super === VOID ? this.pm5(useNameInfo, useOutputKind, overriddenSerializer) : $super.pm5.call(this, useNameInfo, useOutputKind, overriddenSerializer);
  }
  setMetadataFor(SafeParentInfo, 'SafeParentInfo', interfaceMeta);
  setMetadataFor(DetachedParent, 'DetachedParent', classMeta, VOID, [SafeParentInfo]);
  setMetadataFor(XmlListLikeDescriptor, 'XmlListLikeDescriptor', classMeta, XmlDescriptor);
  setMetadataFor(XmlListDescriptor, 'XmlListDescriptor', classMeta, XmlListLikeDescriptor);
  setMetadataFor(XmlPrimitiveDescriptor, 'XmlPrimitiveDescriptor', classMeta, XmlValueDescriptor);
  setMetadataFor(XmlAttributeMapDescriptor, 'XmlAttributeMapDescriptor', classMeta, XmlValueDescriptor);
  setMetadataFor(XmlMapDescriptor, 'XmlMapDescriptor', classMeta, XmlListLikeDescriptor);
  setMetadataFor(Companion_3, 'Companion', objectMeta);
  setMetadataFor(XmlInlineDescriptor, 'XmlInlineDescriptor', classMeta, XmlValueDescriptor);
  setMetadataFor(XmlCompositeDescriptor, 'XmlCompositeDescriptor', classMeta, XmlValueDescriptor);
  setMetadataFor(UNSET, 'UNSET', objectMeta);
  setMetadataFor(PolymorphicMode, 'PolymorphicMode', classMeta);
  setMetadataFor(TRANSPARENT, 'TRANSPARENT', objectMeta, PolymorphicMode);
  setMetadataFor(TAG, 'TAG', objectMeta, PolymorphicMode);
  setMetadataFor(ATTR, 'ATTR', classMeta, PolymorphicMode);
  setMetadataFor(ParentInfo, 'ParentInfo', classMeta, VOID, [SafeParentInfo]);
  setMetadataFor(InjectedParentTag, 'InjectedParentTag', classMeta, VOID, [SafeParentInfo]);
  setMetadataFor(Companion_4, 'Companion', objectMeta);
  setMetadataFor(XmlOrderConstraint, 'XmlOrderConstraint', classMeta);
  setMetadataFor(OrderWildcard, 'OrderWildcard', classMeta, Enum);
  setMetadataFor(XmlOrderNode, 'XmlOrderNode', classMeta);
  setMetadataFor(XmlTypeDescriptor, 'XmlTypeDescriptor', classMeta);
  //endregion
  function readCompactFragmentContent($this, input) {
    var tmp;
    if (isInterface(input, XmlInput)) {
      // Inline function 'kotlin.run' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.CompactFragmentSerializer.readCompactFragmentContent.<anonymous>' call
      var $this$run = input.nlf();
      $this$run.e();
      tmp = siblingsToFragment($this$run);
    } else {
      // Inline function 'kotlin.collections.mutableListOf' call
      var namespaces = ArrayList_init_$Create$();
      var content = '';
      var index = input.y48($this.mlf_1);
      while (index >= 0) {
        var tmp0_subject = index;
        if (tmp0_subject === 0)
          namespaces = input.v48($this.mlf_1, index, $this.llf_1);
        else if (tmp0_subject === 1)
          content = input.s48($this.mlf_1, index);
        index = input.y48($this.mlf_1);
      }
      tmp = CompactFragment_init_$Create$(namespaces, content);
    }
    return tmp;
  }
  function CompactFragmentSerializer$descriptor$lambda($this$buildClassSerialDescriptor) {
    $this$buildClassSerialDescriptor.b45('namespaces', CompactFragmentSerializer_getInstance().llf_1.q44());
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false));
    var tmp$ret$2 = (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).q44();
    $this$buildClassSerialDescriptor.b45('content', tmp$ret$2);
    return Unit_instance;
  }
  function CompactFragmentSerializer() {
    CompactFragmentSerializer_instance = this;
    this.llf_1 = ListSerializer(Companion_getInstance());
    var tmp = this;
    tmp.mlf_1 = buildClassSerialDescriptor('compactFragment', [], CompactFragmentSerializer$descriptor$lambda);
  }
  protoOf(CompactFragmentSerializer).q44 = function () {
    return this.mlf_1;
  };
  protoOf(CompactFragmentSerializer).s44 = function (decoder) {
    // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
    var descriptor = this.mlf_1;
    var composite = decoder.i48(descriptor);
    // Inline function 'nl.adaptivity.xmlutil.serialization.CompactFragmentSerializer.deserialize.<anonymous>' call
    var result = readCompactFragmentContent(CompactFragmentSerializer_getInstance(), composite);
    composite.j48(descriptor);
    return result;
  };
  protoOf(CompactFragmentSerializer).olf = function (encoder, value) {
    this.plf(encoder, isInterface(value, ICompactFragment) ? value : THROW_CCE());
  };
  protoOf(CompactFragmentSerializer).r44 = function (encoder, value) {
    return this.olf(encoder, value instanceof CompactFragment ? value : THROW_CCE());
  };
  protoOf(CompactFragmentSerializer).plf = function (output, value) {
    // Inline function 'kotlinx.serialization.encoding.encodeStructure' call
    var descriptor = this.mlf_1;
    var composite = output.i48(descriptor);
    // Inline function 'nl.adaptivity.xmlutil.serialization.CompactFragmentSerializer.serialize.<anonymous>' call
    CompactFragmentSerializer_getInstance().qlf(composite, value);
    composite.j48(descriptor);
  };
  protoOf(CompactFragmentSerializer).qlf = function (encoder, value) {
    var xmlOutput = isInterface(encoder, XmlOutput) ? encoder : null;
    if (!(xmlOutput == null)) {
      var writer = xmlOutput.el7();
      var tmp0_iterator = value.sle().w();
      while (tmp0_iterator.f()) {
        var namespace = tmp0_iterator.e();
        if (writer.ql7(namespace.ll5()) == null) {
          writer.tl7(namespace);
        }
      }
      value.ule(writer);
    } else {
      encoder.y49(this.mlf_1, 0, this.llf_1, toList(value.sle()));
      encoder.w49(this.mlf_1, 1, value.tle());
    }
  };
  var CompactFragmentSerializer_instance;
  function CompactFragmentSerializer_getInstance() {
    if (CompactFragmentSerializer_instance == null)
      new CompactFragmentSerializer();
    return CompactFragmentSerializer_instance;
  }
  function deserialize($this, decoder) {
    var result = {_v: null};
    // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
    var descriptor = $this.tlf_1;
    var composite = decoder.i48(descriptor);
    var type = null;
    var nextValue = composite.y48(NodeSerializer_getInstance().tlf_1);
    $l$loop: while (true) {
      var tmp = nextValue;
      if (!!(tmp === -1)) {
        break $l$loop;
      }
      var tmp0_subject = nextValue;
      if (tmp0_subject === 0)
        type = composite.s48(NodeSerializer_getInstance().tlf_1, 0);
      else if (tmp0_subject === 1) {
        switch (type) {
          case null:
            throw SerializationException_init_$Create$('Missing type');
          case 'element':
            result._v = composite.v48(NodeSerializer_getInstance().tlf_1, 1, ElementSerializer_getInstance());
            break;
          case 'attr':
            var map = composite.v48(NodeSerializer_getInstance().tlf_1, 1, NodeSerializer_getInstance().rlf_1);
            if (!(map.u() === 1))
              throw SerializationException_init_$Create$('Only a single attribute pair expected');
            // Inline function 'kotlin.apply' call

            var this_0 = decoder.vlf_1.createAttribute(single(map.o2()));
            // Inline function 'kotlin.contracts.contract' call

            // Inline function 'nl.adaptivity.xmlutil.serialization.NodeSerializer.deserialize.<anonymous>.<anonymous>' call

            this_0.value = single(map.p2());
            result._v = this_0;
            break;
          case 'text':
            result._v = decoder.vlf_1.createTextNode(composite.s48(NodeSerializer_getInstance().tlf_1, 1));
            break;
          case 'comment':
            result._v = decoder.vlf_1.createComment(composite.s48(NodeSerializer_getInstance().tlf_1, 1));
            break;
          default:
            throw SerializationException_init_$Create$('unsupported type: ' + type);
        }
      }
      nextValue = composite.y48(NodeSerializer_getInstance().tlf_1);
    }
    var result_0 = Unit_instance;
    composite.j48(descriptor);
    var tmp0_elvis_lhs = result._v;
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      throw SerializationException_init_$Create$('Missing value');
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    return tmp_0;
  }
  function NodeSerializer$ed$lambda($this$buildSerialDescriptor) {
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false));
    var tmp$ret$2 = (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).q44();
    $this$buildSerialDescriptor.b45('text', tmp$ret$2);
    var tmp = CONTEXTUAL_getInstance();
    $this$buildSerialDescriptor.b45('element', buildSerialDescriptor('element', tmp, [], NodeSerializer$ed$lambda$lambda));
    return Unit_instance;
  }
  function NodeSerializer$ed$lambda$lambda($this$buildSerialDescriptor) {
    return Unit_instance;
  }
  function NodeSerializer$descriptor$lambda($this$buildSerialDescriptor) {
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false));
    var tmp$ret$2 = (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).q44();
    $this$buildSerialDescriptor.b45('type', tmp$ret$2);
    $this$buildSerialDescriptor.b45('value', NodeSerializer_getInstance().slf_1);
    return Unit_instance;
  }
  function NodeSerializer() {
    NodeSerializer_instance = this;
    this.rlf_1 = MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance));
    var tmp = this;
    var tmp_0 = CONTEXTUAL_getInstance();
    tmp.slf_1 = buildSerialDescriptor('org.w3c.dom.Node', tmp_0, [], NodeSerializer$ed$lambda);
    var tmp_1 = this;
    var tmp_2 = SEALED_getInstance();
    tmp_1.tlf_1 = buildSerialDescriptor('node', tmp_2, [], NodeSerializer$descriptor$lambda);
  }
  protoOf(NodeSerializer).q44 = function () {
    return this.tlf_1;
  };
  protoOf(NodeSerializer).s44 = function (decoder) {
    var tmp;
    if (decoder instanceof DocumentDecoder) {
      tmp = deserialize(this, decoder);
    } else {
      tmp = deserialize(this, DocumentDecoder_init_$Create$(decoder));
    }
    return tmp;
  };
  protoOf(NodeSerializer).wlf = function (encoder, value) {
    // Inline function 'kotlinx.serialization.encoding.encodeStructure' call
    var descriptor = this.tlf_1;
    var composite = encoder.i48(descriptor);
    // Inline function 'nl.adaptivity.xmlutil.serialization.NodeSerializer.serialize.<anonymous>' call
    var tmp0_subject = value.nodeType;
    var tmp;
    var tmp_0 = tmp0_subject;
    if (tmp_0 === 9) {
      tmp = true;
    } else {
      var tmp_1 = tmp0_subject;
      tmp = tmp_1 === 11;
    }
    if (tmp) {
      var tmp_2;
      var tmp_3 = value.nodeType;
      if (tmp_3 === 11) {
        tmp_2 = 'fragment';
      } else {
        tmp_2 = 'document';
      }
      var type = tmp_2;
      composite.w49(NodeSerializer_getInstance().tlf_1, 0, type);
      var children = toList_0(asSequence(iterator(value.childNodes)));
      composite.y49(NodeSerializer_getInstance().tlf_1, 1, ListSerializer(NodeSerializer_getInstance()), children);
    } else {
      var tmp_4 = tmp0_subject;
      if (tmp_4 === 1) {
        composite.w49(NodeSerializer_getInstance().tlf_1, 0, 'element');
        var tmp_5 = NodeSerializer_getInstance().tlf_1;
        var tmp_6 = ElementSerializer_getInstance();
        composite.y49(tmp_5, 1, tmp_6, !(value == null) ? value : THROW_CCE());
      } else {
        var tmp_7 = tmp0_subject;
        if (tmp_7 === 2) {
          composite.w49(NodeSerializer_getInstance().tlf_1, 0, 'attr');
          var tmp_8 = NodeSerializer_getInstance().tlf_1;
          var tmp_9 = NodeSerializer_getInstance().rlf_1;
          composite.y49(tmp_8, 1, tmp_9, mapOf(to((!(value == null) ? value : THROW_CCE()).name, value.value)));
        } else {
          var tmp_10;
          var tmp_11 = tmp0_subject;
          if (tmp_11 === 3) {
            tmp_10 = true;
          } else {
            var tmp_12 = tmp0_subject;
            tmp_10 = tmp_12 === 4;
          }
          if (tmp_10) {
            composite.w49(NodeSerializer_getInstance().tlf_1, 0, 'text');
            var tmp_13 = NodeSerializer_getInstance().tlf_1;
            var tmp1_elvis_lhs = value.textContent;
            composite.w49(tmp_13, 1, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
          } else {
            var tmp_14 = tmp0_subject;
            if (tmp_14 === 8) {
              composite.w49(NodeSerializer_getInstance().tlf_1, 0, 'comment');
              var tmp_15 = NodeSerializer_getInstance().tlf_1;
              var tmp2_elvis_lhs = value.textContent;
              composite.w49(tmp_15, 1, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
            } else {
              var tmp_16 = tmp0_subject;
              if (tmp_16 === 7)
                throw SerializationException_init_$Create$('Processing instructions can not be serialized');
              else {
                throw SerializationException_init_$Create$('Cannot serialize: ' + value);
              }
            }
          }
        }
      }
    }
    composite.j48(descriptor);
  };
  protoOf(NodeSerializer).r44 = function (encoder, value) {
    return this.wlf(encoder, (!(value == null) ? !(value == null) : false) ? value : THROW_CCE());
  };
  var NodeSerializer_instance;
  function NodeSerializer_getInstance() {
    if (NodeSerializer_instance == null)
      new NodeSerializer();
    return NodeSerializer_instance;
  }
  function deserializeInput($this, decoder) {
    var document = createDocument(decoder.nlf().dc());
    var fragment = document.createDocumentFragment();
    var out = new DomWriter(fragment);
    writeElement(out, null, decoder.nlf());
    var e = fragment.firstChild;
    $l$loop: while (true) {
      var tmp;
      if (!(e == null)) {
        var tmp_0 = e.nodeType;
        tmp = !(tmp_0 === 1);
      } else {
        tmp = false;
      }
      if (!tmp) {
        break $l$loop;
      }
      e = e.nextSibling;
    }
    var tmp0_elvis_lhs = (e == null ? true : !(e == null)) ? e : THROW_CCE();
    var tmp_1;
    if (tmp0_elvis_lhs == null) {
      throw SerializationException_init_$Create$('Expected element, but did not find it');
    } else {
      tmp_1 = tmp0_elvis_lhs;
    }
    return tmp_1;
  }
  function deserialize_0($this, decoder) {
    // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
    var descriptor = $this.ylf_1;
    var composite = decoder.i48(descriptor);
    // Inline function 'nl.adaptivity.xmlutil.serialization.ElementSerializer.deserialize.<anonymous>' call
    var contentSerializer = ListSerializer(NodeSerializer_getInstance());
    var idx = composite.y48(ElementSerializer_getInstance().ylf_1);
    var nameSpace = null;
    var localName = null;
    var attributes = null;
    var content = null;
    $l$loop: while (true) {
      var tmp = idx;
      if (!!(tmp === -1)) {
        break $l$loop;
      }
      var tmp0_subject = idx;
      if (tmp0_subject === 0)
        nameSpace = composite.s48(ElementSerializer_getInstance().ylf_1, 0);
      else {
        if (tmp0_subject === 1)
          localName = composite.s48(ElementSerializer_getInstance().ylf_1, 1);
        else {
          if (tmp0_subject === 2)
            attributes = ElementSerializer_getInstance().xlf_1.s44(decoder);
          else {
            if (tmp0_subject === 3)
              content = contentSerializer.s44(decoder);
            else {
              if (tmp0_subject === -3)
                throw SerializationException_init_$Create$('Found unexpected child at index: ' + idx);
              else {
                throw IllegalStateException_init_$Create$('Received an unexpected decoder value: ' + idx);
              }
            }
          }
        }
      }
      idx = composite.y48(ElementSerializer_getInstance().ylf_1);
    }
    if (localName == null)
      throw SerializationException_init_$Create$('Missing localName');
    if (attributes == null)
      throw SerializationException_init_$Create$('Missing attributes');
    if (content == null)
      throw SerializationException_init_$Create$('Missing content');
    var doc = decoder.vlf_1;
    // Inline function 'kotlin.apply' call
    var tmp_0;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    var this_0 = nameSpace;
    // Inline function 'kotlin.contracts.contract' call
    if (this_0 == null ? true : charSequenceLength(this_0) === 0) {
      tmp_0 = doc.createElement(localName);
    } else {
      tmp_0 = doc.createElementNS(nameSpace, localName);
    }
    var this_1 = tmp_0;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.ElementSerializer.deserialize.<anonymous>.<anonymous>' call
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = attributes.q2().w();
    while (tmp0_iterator.f()) {
      var tmp1_loop_parameter = tmp0_iterator.e();
      // Inline function 'kotlin.collections.component1' call
      var name = tmp1_loop_parameter.s2();
      // Inline function 'kotlin.collections.component2' call
      var value = tmp1_loop_parameter.t2();
      this_1.setAttribute(name, value);
    }
    var tmp2_iterator = content.w();
    while (tmp2_iterator.f()) {
      var node = tmp2_iterator.e();
      this_1.appendChild(doc.adoptNode(node));
    }
    var result = this_1;
    composite.j48(descriptor);
    return result;
  }
  function ElementSerializer$descriptor$lambda($this$buildClassSerialDescriptor) {
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false));
    var tmp$ret$2 = (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).q44();
    $this$buildClassSerialDescriptor.b45('namespace', tmp$ret$2, VOID, true);
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_1 = serializer(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false));
    var tmp$ret$5 = (isInterface(this_1, KSerializer) ? this_1 : THROW_CCE()).q44();
    $this$buildClassSerialDescriptor.b45('localname', tmp$ret$5);
    $this$buildClassSerialDescriptor.b45('attributes', ElementSerializer_getInstance().xlf_1.q44());
    $this$buildClassSerialDescriptor.b45('content', ListSerializer(NodeSerializer_getInstance()).q44());
    return Unit_instance;
  }
  function ElementSerializer() {
    ElementSerializer_instance = this;
    this.xlf_1 = MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance));
    var tmp = this;
    tmp.ylf_1 = buildClassSerialDescriptor('element', [], ElementSerializer$descriptor$lambda);
  }
  protoOf(ElementSerializer).q44 = function () {
    return this.ylf_1;
  };
  protoOf(ElementSerializer).s44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeInput(this, decoder);
    } else {
      if (decoder instanceof DocumentDecoder) {
        tmp = deserialize_0(this, decoder);
      } else {
        tmp = deserialize_0(this, DocumentDecoder_init_$Create$(decoder));
      }
    }
    return tmp;
  };
  protoOf(ElementSerializer).zlf = function (encoder, value) {
    if (isInterface(encoder, XmlOutput)) {
      serialize(encoder.el7(), value);
    } else {
      // Inline function 'kotlinx.serialization.encoding.encodeStructure' call
      var descriptor = this.ylf_1;
      var composite = encoder.i48(descriptor);
      // Inline function 'nl.adaptivity.xmlutil.serialization.ElementSerializer.serialize.<anonymous>' call
      var ln = value.localName;
      if (ln == null) {
        composite.w49(ElementSerializer_getInstance().ylf_1, 1, value.tagName);
      } else {
        var namespaceURI = value.namespaceURI;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        // Inline function 'kotlin.contracts.contract' call
        if (!(namespaceURI == null ? true : charSequenceLength(namespaceURI) === 0)) {
          composite.w49(ElementSerializer_getInstance().ylf_1, 0, namespaceURI);
        }
        composite.w49(ElementSerializer_getInstance().ylf_1, 1, value.localName);
      }
      var attrIterator = iterator_0(value.attributes);
      // Inline function 'kotlin.sequences.associate' call
      // Inline function 'kotlin.sequences.associateTo' call
      var this_0 = asSequence(attrIterator);
      var destination = LinkedHashMap_init_$Create$();
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'kotlin.collections.plusAssign' call
        // Inline function 'nl.adaptivity.xmlutil.serialization.ElementSerializer.serialize.<anonymous>.<anonymous>' call
        var pair = to(element.nodeName, element.value);
        destination.s(pair.w6_1, pair.x6_1);
      }
      var m = destination;
      composite.y49(ElementSerializer_getInstance().ylf_1, 2, ElementSerializer_getInstance().xlf_1, m);
      var n = toList_0(asSequence(iterator(value.childNodes)));
      composite.y49(ElementSerializer_getInstance().ylf_1, 3, ListSerializer(NodeSerializer_getInstance()), n);
      composite.j48(descriptor);
    }
  };
  protoOf(ElementSerializer).r44 = function (encoder, value) {
    return this.zlf(encoder, (!(value == null) ? !(value == null) : false) ? value : THROW_CCE());
  };
  var ElementSerializer_instance;
  function ElementSerializer_getInstance() {
    if (ElementSerializer_instance == null)
      new ElementSerializer();
    return ElementSerializer_instance;
  }
  function DocumentDecoder_init_$Init$(delegate, $this) {
    // Inline function 'kotlin.apply' call
    var this_0 = createDocument(QName_init_$Create$('dummy'));
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.DocumentDecoder.<init>.<anonymous>' call
    var tmp0_safe_receiver = this_0.documentElement;
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      this_0.removeChild(tmp0_safe_receiver);
    }
    DocumentDecoder.call($this, delegate, this_0);
    return $this;
  }
  function DocumentDecoder_init_$Create$(delegate) {
    return DocumentDecoder_init_$Init$(delegate, objectCreate(protoOf(DocumentDecoder)));
  }
  function DocumentDecoder(delegate, document) {
    this.ulf_1 = delegate;
    this.vlf_1 = document;
  }
  protoOf(DocumentDecoder).v47 = function () {
    return this.ulf_1.v47();
  };
  protoOf(DocumentDecoder).w47 = function () {
    return this.ulf_1.w47();
  };
  protoOf(DocumentDecoder).c48 = function () {
    return this.ulf_1.c48();
  };
  protoOf(DocumentDecoder).b48 = function () {
    return this.ulf_1.b48();
  };
  protoOf(DocumentDecoder).e48 = function (enumDescriptor) {
    return this.ulf_1.e48(enumDescriptor);
  };
  protoOf(DocumentDecoder).a48 = function () {
    return this.ulf_1.a48();
  };
  protoOf(DocumentDecoder).f48 = function (descriptor) {
    return this.ulf_1.f48(descriptor);
  };
  protoOf(DocumentDecoder).y47 = function () {
    return this.ulf_1.y47();
  };
  protoOf(DocumentDecoder).z47 = function () {
    return this.ulf_1.z47();
  };
  protoOf(DocumentDecoder).t47 = function () {
    return this.ulf_1.t47();
  };
  protoOf(DocumentDecoder).u47 = function () {
    return this.ulf_1.u47();
  };
  protoOf(DocumentDecoder).h48 = function (deserializer) {
    return this.ulf_1.h48(deserializer);
  };
  protoOf(DocumentDecoder).x47 = function () {
    return this.ulf_1.x47();
  };
  protoOf(DocumentDecoder).d48 = function () {
    return this.ulf_1.d48();
  };
  protoOf(DocumentDecoder).i48 = function (descriptor) {
    return new DocumentCompositeDecoder(this.ulf_1.i48(descriptor), this.vlf_1);
  };
  function serialize(encoder, value) {
    // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call
    var nsUri = value.namespaceURI;
    var tmp0_elvis_lhs = value.localName;
    var localName = tmp0_elvis_lhs == null ? value.tagName : tmp0_elvis_lhs;
    var prefix = value.prefix;
    smartStartTag(encoder, nsUri, localName, prefix);
    // Inline function 'nl.adaptivity.xmlutil.serialization.serialize.<anonymous>' call
    var tmp0_iterator = iterator_0(value.attributes);
    while (tmp0_iterator.f()) {
      var n = tmp0_iterator.e();
      serialize_0(encoder, n);
    }
    var tmp1_iterator = iterator(value.childNodes);
    while (tmp1_iterator.f()) {
      var child = tmp1_iterator.e();
      serialize_1(encoder, child);
    }
    encoder.ol7(nsUri, localName, prefix);
  }
  function DocumentCompositeDecoder(delegate, document) {
    this.alg_1 = delegate;
    this.blg_1 = document;
  }
  protoOf(DocumentCompositeDecoder).t45 = function () {
    return this.alg_1.t45();
  };
  protoOf(DocumentCompositeDecoder).k48 = function (descriptor, index) {
    return this.alg_1.k48(descriptor, index);
  };
  protoOf(DocumentCompositeDecoder).l48 = function (descriptor, index) {
    return this.alg_1.l48(descriptor, index);
  };
  protoOf(DocumentCompositeDecoder).r48 = function (descriptor, index) {
    return this.alg_1.r48(descriptor, index);
  };
  protoOf(DocumentCompositeDecoder).z48 = function (descriptor) {
    return this.alg_1.z48(descriptor);
  };
  protoOf(DocumentCompositeDecoder).q48 = function (descriptor, index) {
    return this.alg_1.q48(descriptor, index);
  };
  protoOf(DocumentCompositeDecoder).y48 = function (descriptor) {
    return this.alg_1.y48(descriptor);
  };
  protoOf(DocumentCompositeDecoder).p48 = function (descriptor, index) {
    return this.alg_1.p48(descriptor, index);
  };
  protoOf(DocumentCompositeDecoder).t48 = function (descriptor, index) {
    return this.alg_1.t48(descriptor, index);
  };
  protoOf(DocumentCompositeDecoder).n48 = function (descriptor, index) {
    return this.alg_1.n48(descriptor, index);
  };
  protoOf(DocumentCompositeDecoder).o48 = function (descriptor, index) {
    return this.alg_1.o48(descriptor, index);
  };
  protoOf(DocumentCompositeDecoder).x48 = function () {
    return this.alg_1.x48();
  };
  protoOf(DocumentCompositeDecoder).m48 = function (descriptor, index) {
    return this.alg_1.m48(descriptor, index);
  };
  protoOf(DocumentCompositeDecoder).s48 = function (descriptor, index) {
    return this.alg_1.s48(descriptor, index);
  };
  protoOf(DocumentCompositeDecoder).j48 = function (descriptor) {
    this.alg_1.j48(descriptor);
  };
  protoOf(DocumentCompositeDecoder).u48 = function (descriptor, index, deserializer, previousValue) {
    return this.alg_1.u48(descriptor, index, wrap(deserializer, this.blg_1), previousValue);
  };
  protoOf(DocumentCompositeDecoder).w48 = function (descriptor, index, deserializer, previousValue) {
    return this.alg_1.w48(descriptor, index, wrap(deserializer, this.blg_1), previousValue);
  };
  function serialize_0(encoder, value) {
    var tmp = value.namespaceURI;
    var tmp0_elvis_lhs = value.localName;
    encoder.kl7(tmp, tmp0_elvis_lhs == null ? value.name : tmp0_elvis_lhs, value.prefix, value.value);
  }
  function serialize_1(encoder, value) {
    var tmp0_subject = value.nodeType;
    var tmp;
    var tmp_0 = tmp0_subject;
    if (tmp_0 === 1) {
      serialize(encoder, !(value == null) ? value : THROW_CCE());
      tmp = Unit_instance;
    } else {
      var tmp_1 = tmp0_subject;
      if (tmp_1 === 2) {
        serialize_0(encoder, !(value == null) ? value : THROW_CCE());
        tmp = Unit_instance;
      } else {
        var tmp_2 = tmp0_subject;
        if (tmp_2 === 4) {
          serialize_2(encoder, !(value == null) ? value : THROW_CCE());
          tmp = Unit_instance;
        } else {
          var tmp_3 = tmp0_subject;
          if (tmp_3 === 3) {
            serialize_3(encoder, !(value == null) ? value : THROW_CCE());
            tmp = Unit_instance;
          } else {
            var tmp_4 = tmp0_subject;
            if (tmp_4 === 8) {
              serialize_4(encoder, !(value == null) ? value : THROW_CCE());
              tmp = Unit_instance;
            } else {
              var tmp_5 = tmp0_subject;
              if (tmp_5 === 7) {
                serialize_5(encoder, !(value == null) ? value : THROW_CCE());
                tmp = Unit_instance;
              } else {
                throw IllegalArgumentException_init_$Create$('Can not serialize node: ' + value);
              }
            }
          }
        }
      }
    }
    return tmp;
  }
  function WrappedDeserializationStrategy(delegate, document) {
    this.clg_1 = delegate;
    this.dlg_1 = document;
  }
  protoOf(WrappedDeserializationStrategy).q44 = function () {
    return this.clg_1.q44();
  };
  protoOf(WrappedDeserializationStrategy).s44 = function (decoder) {
    return this.clg_1.s44(new DocumentDecoder(decoder, this.dlg_1));
  };
  function wrap(_this__u8e3s4, document) {
    return new WrappedDeserializationStrategy(_this__u8e3s4, document);
  }
  function serialize_2(encoder, value) {
    encoder.il7(ensureNotNull(value.textContent));
  }
  function serialize_3(encoder, value) {
    encoder.hl7(ensureNotNull(value.textContent));
  }
  function serialize_4(encoder, value) {
    encoder.al7(ensureNotNull(value.textContent));
  }
  function serialize_5(encoder, value) {
    // Inline function 'nl.adaptivity.xmlutil.dom.getTarget' call
    var tmp = value.target;
    var tmp0_elvis_lhs = value.textContent;
    encoder.bl7(tmp + ' ' + (tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs));
  }
  function InputKind$Element() {
    InputKind.call(this, 'Element', 0);
    InputKind_Element_instance = this;
  }
  protoOf(InputKind$Element).glg = function (outputKind) {
    return outputKind.equals(OutputKind_Element_getInstance());
  };
  var InputKind_Element_instance;
  function InputKind$Attribute() {
    InputKind.call(this, 'Attribute', 1);
    InputKind_Attribute_instance = this;
  }
  protoOf(InputKind$Attribute).glg = function (outputKind) {
    return outputKind.equals(OutputKind_Attribute_getInstance());
  };
  var InputKind_Attribute_instance;
  function InputKind$Text() {
    InputKind.call(this, 'Text', 2);
    InputKind_Text_instance = this;
  }
  protoOf(InputKind$Text).glg = function (outputKind) {
    return outputKind.equals(OutputKind_Text_getInstance());
  };
  var InputKind_Text_instance;
  var InputKind_entriesInitialized;
  function InputKind_initEntries() {
    if (InputKind_entriesInitialized)
      return Unit_instance;
    InputKind_entriesInitialized = true;
    InputKind_Element_instance = new InputKind$Element();
    InputKind_Attribute_instance = new InputKind$Attribute();
    InputKind_Text_instance = new InputKind$Text();
  }
  function InputKind(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  protoOf(InputKind).jlg = function (xmlDescriptor) {
    return this.glg(xmlDescriptor.olg());
  };
  function InputKind_Element_getInstance() {
    InputKind_initEntries();
    return InputKind_Element_instance;
  }
  function InputKind_Attribute_getInstance() {
    InputKind_initEntries();
    return InputKind_Attribute_instance;
  }
  function InputKind_Text_getInstance() {
    InputKind_initEntries();
    return InputKind_Text_instance;
  }
  var OutputKind_Element_instance;
  function OutputKind$Attribute() {
    OutputKind.call(this, 'Attribute', 1);
    OutputKind_Attribute_instance = this;
  }
  protoOf(OutputKind$Attribute).rlg = function () {
    return true;
  };
  var OutputKind_Attribute_instance;
  function OutputKind$Text() {
    OutputKind.call(this, 'Text', 2);
    OutputKind_Text_instance = this;
  }
  protoOf(OutputKind$Text).rlg = function () {
    return true;
  };
  var OutputKind_Text_instance;
  var OutputKind_Mixed_instance;
  var OutputKind_Inline_instance;
  var OutputKind_entriesInitialized;
  function OutputKind_initEntries() {
    if (OutputKind_entriesInitialized)
      return Unit_instance;
    OutputKind_entriesInitialized = true;
    OutputKind_Element_instance = new OutputKind('Element', 0);
    OutputKind_Attribute_instance = new OutputKind$Attribute();
    OutputKind_Text_instance = new OutputKind$Text();
    OutputKind_Mixed_instance = new OutputKind('Mixed', 3);
    OutputKind_Inline_instance = new OutputKind('Inline', 4);
  }
  function OutputKind(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  protoOf(OutputKind).rlg = function () {
    return false;
  };
  function OutputKind_Element_getInstance() {
    OutputKind_initEntries();
    return OutputKind_Element_instance;
  }
  function OutputKind_Attribute_getInstance() {
    OutputKind_initEntries();
    return OutputKind_Attribute_instance;
  }
  function OutputKind_Text_getInstance() {
    OutputKind_initEntries();
    return OutputKind_Text_instance;
  }
  function OutputKind_Mixed_getInstance() {
    OutputKind_initEntries();
    return OutputKind_Mixed_instance;
  }
  function OutputKind_Inline_getInstance() {
    OutputKind_initEntries();
    return OutputKind_Inline_instance;
  }
  function PolyBaseInfo(tagName, descriptor) {
    this.wlg_1 = tagName;
    this.xlg_1 = descriptor;
  }
  protoOf(PolyBaseInfo).ylg = function () {
    return this.xlg_1.q45();
  };
  protoOf(PolyBaseInfo).toString = function () {
    return 'PolyBaseInfo(tagName=' + this.wlg_1 + ', descriptor=' + this.xlg_1 + ')';
  };
  protoOf(PolyBaseInfo).hashCode = function () {
    var result = this.wlg_1.hashCode();
    result = imul(result, 31) + hashCode(this.xlg_1) | 0;
    return result;
  };
  protoOf(PolyBaseInfo).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PolyBaseInfo))
      return false;
    var tmp0_other_with_cast = other instanceof PolyBaseInfo ? other : THROW_CCE();
    if (!this.wlg_1.equals(tmp0_other_with_cast.wlg_1))
      return false;
    if (!equals(this.xlg_1, tmp0_other_with_cast.xlg_1))
      return false;
    return true;
  };
  function get_defaultXmlModule() {
    _init_properties_XML_kt__j4k93v();
    return defaultXmlModule;
  }
  var defaultXmlModule;
  function XML$Companion$defaultInstance$lambda($this$$receiver) {
    return Unit_instance;
  }
  function XML_init_$Init$(serializersModule, configure, $this) {
    serializersModule = serializersModule === VOID ? EmptySerializersModule() : serializersModule;
    var tmp;
    if (configure === VOID) {
      tmp = XML$_init_$lambda_gk87g4;
    } else {
      tmp = configure;
    }
    configure = tmp;
    // Inline function 'kotlin.apply' call
    var this_0 = new Builder();
    // Inline function 'kotlin.contracts.contract' call
    configure(this_0);
    XML_init_$Init$_0(this_0, serializersModule, $this);
    return $this;
  }
  function XML_init_$Create$(serializersModule, configure) {
    return XML_init_$Init$(serializersModule, configure, objectCreate(protoOf(XML)));
  }
  function collectNamespaces($this, xmlDescriptor, xmlEncoderBase, serializer, value) {
    var prefixToNamespaceMap = HashMap_init_$Create$();
    var namespaceToPrefixMap = HashMap_init_$Create$();
    var pendingNamespaces = HashSet_init_$Create$();
    var seenDescriptors = HashSet_init_$Create$();
    var hasSeenDynamicQname = {_v: false};
    var polyCollector = new ChildCollector(null);
    xmlEncoderBase.zlg_1.n4o(polyCollector);
    collectNamespaces$collect_0(hasSeenDynamicQname, seenDescriptors, namespaceToPrefixMap, prefixToNamespaceMap, pendingNamespaces, xmlDescriptor);
    var tmp0_iterator = polyCollector.clh_1.w();
    while (tmp0_iterator.f()) {
      var childSerializer = tmp0_iterator.e();
      collectNamespaces$collect_0(hasSeenDynamicQname, seenDescriptors, namespaceToPrefixMap, prefixToNamespaceMap, pendingNamespaces, $this.flh(childSerializer));
    }
    if (hasSeenDynamicQname._v) {
      var collector = new NamespaceCollectingXmlWriter(prefixToNamespaceMap, namespaceToPrefixMap, pendingNamespaces);
      var base = new XmlEncoderBase(xmlEncoderBase.zlg_1, xmlEncoderBase.alh_1, collector);
      (new XmlEncoder(base, xmlDescriptor, -1)).z49(serializer, value);
    }
    var nsIdx = 1;
    var tmp1_iterator = pendingNamespaces.w();
    while (tmp1_iterator.f()) {
      var namespaceUri = tmp1_iterator.e();
      $l$loop: while (true) {
        // Inline function 'kotlin.collections.contains' call
        // Inline function 'kotlin.collections.containsKey' call
        var key = 'ns' + nsIdx;
        if (!(isInterface(prefixToNamespaceMap, Map) ? prefixToNamespaceMap : THROW_CCE()).r(key)) {
          break $l$loop;
        }
        nsIdx = nsIdx + 1 | 0;
      }
      var prefix = 'ns' + nsIdx;
      // Inline function 'kotlin.collections.set' call
      prefixToNamespaceMap.s(prefix, namespaceUri);
      // Inline function 'kotlin.collections.set' call
      namespaceToPrefixMap.s(namespaceUri, prefix);
    }
    // Inline function 'kotlin.sequences.sortedBy' call
    var tmp = asSequence_0(prefixToNamespaceMap);
    var tmp_0 = filterNot(tmp, XML$collectNamespaces$lambda);
    var this_0 = map(tmp_0, XML$collectNamespaces$lambda_0);
    // Inline function 'kotlin.comparisons.compareBy' call
    var tmp_1 = XML$collectNamespaces$lambda_1;
    var tmp$ret$2 = new sam$kotlin_Comparator$0(tmp_1);
    var tmp$ret$3 = sortedWith(this_0, tmp$ret$2);
    return toList_0(tmp$ret$3);
  }
  function xmlDescriptor($this, serialDescriptor, rootName) {
    var tmp;
    if (rootName == null) {
      var tmp$ret$0;
      $l$block: {
        // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
        var tmp0_iterator = serialDescriptor.f46().w();
        while (tmp0_iterator.f()) {
          var e = tmp0_iterator.e();
          if (e instanceof XmlSerialName) {
            tmp$ret$0 = e;
            break $l$block;
          }
        }
        tmp$ret$0 = null;
      }
      var tmp0_safe_receiver = tmp$ret$0;
      tmp = tmp0_safe_receiver == null ? null : toQName(tmp0_safe_receiver, serialDescriptor.q45(), null);
    } else {
      tmp = rootName;
    }
    var tmp2_elvis_lhs = tmp;
    var tmp_0;
    if (tmp2_elvis_lhs == null) {
      var tmp_1 = DeclaredNameInfo_init_$Create$(serialDescriptor.q45());
      tmp_0 = $this.dlh_1.olh_1.tlh(tmp_1, new NamespaceImpl('', ''));
    } else {
      tmp_0 = tmp2_elvis_lhs;
    }
    var serialName = tmp_0;
    return new XmlRootDescriptor($this.dlh_1, $this.elh_1, serialDescriptor, serialName, false);
  }
  function XML_init_$Init$_0(config, serializersModule, $this) {
    serializersModule = serializersModule === VOID ? EmptySerializersModule() : serializersModule;
    XML.call($this, XmlConfig_init_$Create$(config), serializersModule);
    return $this;
  }
  function Companion() {
    Companion_instance_0 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.ulh_1 = [XmlQNameSerializer_getInstance(), NodeSerializer_getInstance(), ElementSerializer_getInstance(), CompactFragmentSerializer_getInstance()];
    var tmp_0 = this;
    tmp_0.vlh_1 = XML_init_$Create$(VOID, XML$Companion$defaultInstance$lambda);
  }
  protoOf(Companion).t45 = function () {
    return this.vlh_1.elh_1;
  };
  protoOf(Companion).r45 = function (serializer, value) {
    return this.vlh_1.r45(serializer, value);
  };
  protoOf(Companion).s45 = function (deserializer, string) {
    return this.vlh_1.s45(deserializer, string);
  };
  var Companion_instance_0;
  function Companion_getInstance_4() {
    if (Companion_instance_0 == null)
      new Companion();
    return Companion_instance_0;
  }
  function XmlCodecConfig() {
  }
  function XmlOutput() {
  }
  function XmlInput() {
  }
  function sam$kotlin_Comparator$0(function_0) {
    this.zlh_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0).pa = function (a, b) {
    return this.zlh_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
    return this.pa(a, b);
  };
  function collectNamespaces$collect(namespaceToPrefixMap, prefixToNamespaceMap, pendingNamespaces, prefix, namespaceUri) {
    // Inline function 'kotlin.collections.contains' call
    // Inline function 'kotlin.collections.containsKey' call
    if (!(isInterface(namespaceToPrefixMap, Map) ? namespaceToPrefixMap : THROW_CCE()).r(namespaceUri)) {
      // Inline function 'kotlin.collections.contains' call
      // Inline function 'kotlin.collections.containsKey' call
      if ((isInterface(prefixToNamespaceMap, Map) ? prefixToNamespaceMap : THROW_CCE()).r(prefix)) {
        // Inline function 'kotlin.text.isEmpty' call
        if (charSequenceLength(namespaceUri) === 0) {
          var tmp0_safe_receiver = prefixToNamespaceMap.q('');
          if (tmp0_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'nl.adaptivity.xmlutil.serialization.XML.collectNamespaces.collect.<anonymous>' call
            pendingNamespaces.i1(tmp0_safe_receiver);
            namespaceToPrefixMap.u2(tmp0_safe_receiver);
          }
          // Inline function 'kotlin.collections.set' call
          prefixToNamespaceMap.s('', '');
          // Inline function 'kotlin.collections.set' call
          namespaceToPrefixMap.s('', '');
        } else {
          pendingNamespaces.i1(namespaceUri);
        }
      } else {
        if (pendingNamespaces.a1(namespaceUri)) {
          pendingNamespaces.j1(namespaceUri);
        }
        // Inline function 'kotlin.collections.set' call
        prefixToNamespaceMap.s(prefix, namespaceUri);
        // Inline function 'kotlin.collections.set' call
        namespaceToPrefixMap.s(namespaceUri, prefix);
      }
    }
  }
  function collectNamespaces$collect_0(hasSeenDynamicQname, seenDescriptors, namespaceToPrefixMap, prefixToNamespaceMap, pendingNamespaces, descriptor) {
    // Inline function 'nl.adaptivity.xmlutil.prefix' call
    var prefix = descriptor.gli().ml9();
    // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
    var namespaceUri = descriptor.gli().kl9();
    var tmp;
    var tmp_0;
    if (!descriptor.hli().equals(OutputKind_Attribute_getInstance())) {
      tmp_0 = true;
    } else {
      // Inline function 'kotlin.text.isNotEmpty' call
      tmp_0 = charSequenceLength(namespaceUri) > 0;
    }
    if (tmp_0) {
      tmp = true;
    } else {
      // Inline function 'kotlin.text.isNotEmpty' call
      tmp = charSequenceLength(prefix) > 0;
    }
    if (tmp) {
      collectNamespaces$collect(namespaceToPrefixMap, prefixToNamespaceMap, pendingNamespaces, prefix, namespaceUri);
    }
    // Inline function 'kotlin.collections.mutableListOf' call
    var childrenToCollect = ArrayList_init_$Create$();
    if (descriptor instanceof XmlPolymorphicDescriptor) {
      childrenToCollect.m1(descriptor.tli_1.p2());
    }
    var inductionVariable = 0;
    var last = descriptor.g46();
    if (inductionVariable < last)
      do {
        var elementIndex = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        childrenToCollect.i1(descriptor.k46(elementIndex));
      }
       while (inductionVariable < last);
    var tmp1_iterator = childrenToCollect.w();
    while (tmp1_iterator.f()) {
      var childDescriptor = tmp1_iterator.e();
      if (!hasSeenDynamicQname._v ? contains(Companion_getInstance_4().ulh_1, childDescriptor.bli_1) : false) {
        hasSeenDynamicQname._v = true;
      }
      if (!seenDescriptors.a1(childDescriptor)) {
        seenDescriptors.i1(childDescriptor);
        collectNamespaces$collect_0(hasSeenDynamicQname, seenDescriptors, namespaceToPrefixMap, prefixToNamespaceMap, pendingNamespaces, childDescriptor);
      }
    }
  }
  function XML$_init_$lambda_gk87g4($this$null) {
    return Unit_instance;
  }
  function XML$collectNamespaces$lambda(_name_for_destructuring_parameter_0__wldtmu) {
    // Inline function 'kotlin.collections.component1' call
    var prefix = _name_for_destructuring_parameter_0__wldtmu.s2();
    // Inline function 'kotlin.collections.component2' call
    var ns = _name_for_destructuring_parameter_0__wldtmu.t2();
    var tmp;
    // Inline function 'kotlin.text.isEmpty' call
    if (charSequenceLength(prefix) === 0) {
      // Inline function 'kotlin.text.isEmpty' call
      tmp = charSequenceLength(ns) === 0;
    } else {
      tmp = false;
    }
    return tmp;
  }
  function XML$collectNamespaces$lambda_0(it) {
    return new NamespaceImpl(it.s2(), it.t2());
  }
  function XML$collectNamespaces$lambda_1(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.XML.collectNamespaces.<anonymous>' call
    var tmp = a.vlc_1;
    // Inline function 'nl.adaptivity.xmlutil.serialization.XML.collectNamespaces.<anonymous>' call
    var tmp$ret$1 = b.vlc_1;
    return compareValues(tmp, tmp$ret$1);
  }
  function XML(config, serializersModule) {
    Companion_getInstance_4();
    serializersModule = serializersModule === VOID ? EmptySerializersModule() : serializersModule;
    this.dlh_1 = config;
    this.elh_1 = plus(serializersModule, get_defaultXmlModule());
  }
  protoOf(XML).t45 = function () {
    return this.elh_1;
  };
  protoOf(XML).r45 = function (serializer, value) {
    return this.wli(serializer, value, null);
  };
  protoOf(XML).wli = function (serializer, value, prefix) {
    var stringWriter = new StringWriter();
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.core.impl.multiplatform.use' call
      var this_0 = XmlStreaming_instance.wle(stringWriter, this.dlh_1.llh_1, this.dlh_1.mlh_1);
      try {
        this.xli(this_0, serializer, value, prefix);
        break $l$block;
      }finally {
        this_0.n();
      }
    }
    return stringWriter.toString();
  };
  protoOf(XML).xli = function (target, serializer, value, prefix) {
    target.rl7(this.dlh_1.nlh_1);
    if (!(prefix == null)) {
      var root = XmlRootDescriptor_init_$Create$(this.dlh_1, this.elh_1, serializer.q44());
      var serialQName = copy(root.k46(0).gli(), prefix);
      this.yli(target, serializer, value, serialQName);
    } else {
      this.yli(target, serializer, value, null);
    }
  };
  protoOf(XML).yli = function (target, serializer, value, rootName) {
    target.rl7(this.dlh_1.nlh_1);
    if (target.pl5() === 0) {
      switch (this.dlh_1.mlh_1.za_1) {
        case 1:
          target.ml7(this.dlh_1.qlh_1.nld_1);
          break;
        case 3:
          target.ml7(this.dlh_1.qlh_1.nld_1, 'UTF-8');
          break;
        case 0:
        case 2:
          break;
      }
    }
    var root = new XmlRootDescriptor(this.dlh_1, this.elh_1, serializer.q44(), rootName, false);
    var xmlDescriptor = root.k46(0);
    var xmlEncoderBase = new XmlEncoderBase(this.elh_1, this.dlh_1, target);
    var tmp;
    if (this.dlh_1.slh_1) {
      var collectedNamespaces = collectNamespaces(this, xmlDescriptor, xmlEncoderBase, serializer, value);
      // Inline function 'kotlin.collections.associate' call
      var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(collectedNamespaces, 10)), 16);
      // Inline function 'kotlin.collections.associateTo' call
      var destination = LinkedHashMap_init_$Create$_0(capacity);
      var tmp0_iterator = collectedNamespaces.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'kotlin.collections.plusAssign' call
        // Inline function 'nl.adaptivity.xmlutil.serialization.XML.encodeToWriter.<anonymous>' call
        var pair = to(element.ll5(), element.nl5());
        destination.s(pair.w6_1, pair.x6_1);
      }
      var prefixMap = destination;
      // Inline function 'kotlin.apply' call
      var this_0 = Builder_init_$Create$(this.dlh_1);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.XML.encodeToWriter.<anonymous>' call
      var tmp_0 = this_0;
      var tmp0_elvis_lhs = this_0.klj_1;
      tmp_0.klj_1 = new PrefixWrappingPolicy(tmp0_elvis_lhs == null ? this_0.rlj().f3() : tmp0_elvis_lhs, prefixMap);
      var newConfig = XmlConfig_init_$Create$(this_0);
      var remappedEncoderBase = new XmlEncoderBase(this.elh_1, newConfig, target);
      var newRootName = rootName == null ? null : remapPrefix_0(rootName, prefixMap);
      var newRoot = new XmlRootDescriptor(newConfig, this.elh_1, serializer.q44(), newRootName, false);
      var newDescriptor = newRoot.k46(0);
      tmp = new NSAttrXmlEncoder(remappedEncoderBase, newDescriptor, collectedNamespaces, -1);
    } else {
      tmp = new XmlEncoder(xmlEncoderBase, xmlDescriptor, -1);
    }
    var encoder = tmp;
    serializer.r44(encoder, value);
  };
  protoOf(XML).s45 = function (deserializer, string) {
    return this.alk(deserializer, XmlStreaming_instance.vle(string));
  };
  protoOf(XML).blk = function (deserializer, reader, rootName) {
    var tmp;
    if (rootName == null) {
      var tmp$ret$0;
      $l$block: {
        // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
        var tmp0_iterator = deserializer.q44().f46().w();
        while (tmp0_iterator.f()) {
          var e = tmp0_iterator.e();
          if (e instanceof XmlSerialName) {
            tmp$ret$0 = e;
            break $l$block;
          }
        }
        tmp$ret$0 = null;
      }
      var tmp0_safe_receiver = tmp$ret$0;
      tmp = tmp0_safe_receiver == null ? null : toQName(tmp0_safe_receiver, deserializer.q44().q45(), null);
    } else {
      tmp = rootName;
    }
    var serialName = tmp;
    skipPreamble(reader);
    var xmlDecoderBase = new XmlDecoderBase(this.elh_1, this.dlh_1, reader);
    var rootDescriptor = new XmlRootDescriptor(this.dlh_1, this.elh_1, deserializer.q44(), serialName, false);
    var elementDescriptor = rootDescriptor.k46(0);
    var tmp2_safe_receiver = elementDescriptor instanceof XmlPolymorphicDescriptor ? elementDescriptor : null;
    var tmp_0;
    if (tmp2_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.run' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.XML.decodeFromReader.<anonymous>' call
      var tagName = serialName == null ? reader.dc() : serialName;
      var tmp$ret$2;
      $l$block_1: {
        // Inline function 'kotlin.collections.singleOrNull' call
        var single = null;
        var found = false;
        var tmp0_iterator_0 = tmp2_safe_receiver.tli_1.p2().w();
        while (tmp0_iterator_0.f()) {
          var element = tmp0_iterator_0.e();
          // Inline function 'nl.adaptivity.xmlutil.serialization.XML.decodeFromReader.<anonymous>.<anonymous>' call
          if (isEquivalent(tagName, element.gli())) {
            if (found) {
              tmp$ret$2 = null;
              break $l$block_1;
            }
            single = element;
            found = true;
          }
        }
        if (!found) {
          tmp$ret$2 = null;
          break $l$block_1;
        }
        tmp$ret$2 = single;
      }
      var tmp1_safe_receiver = tmp$ret$2;
      var tmp_1;
      if (tmp1_safe_receiver == null) {
        tmp_1 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'nl.adaptivity.xmlutil.serialization.XML.decodeFromReader.<anonymous>.<anonymous>' call
        tmp_1 = new PolyInfo(tagName, 0, tmp1_safe_receiver);
      }
      tmp_0 = tmp_1;
    }
    var polyInfo = tmp_0;
    var decoder = new XmlDecoder(xmlDecoderBase, elementDescriptor, polyInfo);
    return decoder.h48(deserializer);
  };
  protoOf(XML).alk = function (deserializer, reader, rootName, $super) {
    rootName = rootName === VOID ? null : rootName;
    return $super === VOID ? this.blk(deserializer, reader, rootName) : $super.blk.call(this, deserializer, reader, rootName);
  };
  protoOf(XML).jlk = function (deserializer, rootName) {
    return xmlDescriptor(this, deserializer.q44(), rootName);
  };
  protoOf(XML).flh = function (deserializer, rootName, $super) {
    rootName = rootName === VOID ? null : rootName;
    return $super === VOID ? this.jlk(deserializer, rootName) : $super.jlk.call(this, deserializer, rootName);
  };
  function copy(_this__u8e3s4, prefix) {
    var tmp;
    if (prefix === VOID) {
      // Inline function 'nl.adaptivity.xmlutil.prefix' call
      tmp = _this__u8e3s4.ml9();
    } else {
      tmp = prefix;
    }
    prefix = tmp;
    _init_properties_XML_kt__j4k93v();
    var tmp_0;
    // Inline function 'nl.adaptivity.xmlutil.prefix' call
    if (prefix === _this__u8e3s4.ml9()) {
      tmp_0 = _this__u8e3s4;
    } else {
      // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
      var tmp_1 = _this__u8e3s4.kl9();
      // Inline function 'nl.adaptivity.xmlutil.localPart' call
      var tmp$ret$3 = _this__u8e3s4.ll9();
      tmp_0 = new QName(tmp_1, tmp$ret$3, prefix);
    }
    return tmp_0;
  }
  function toQName(_this__u8e3s4, serialName, parentNamespace) {
    _init_properties_XML_kt__j4k93v();
    var tmp;
    if (_this__u8e3s4.llk_1 === get_UNSET_ANNOTATION_VALUE()) {
      var tmp_0;
      if (_this__u8e3s4.klk_1 === get_UNSET_ANNOTATION_VALUE()) {
        var tmp_1;
        if (parentNamespace == null) {
          tmp_1 = null;
        } else {
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'nl.adaptivity.xmlutil.serialization.toQName.<anonymous>' call
          tmp_1 = QName_init_$Create$_0(parentNamespace.ll5(), serialName);
        }
        var tmp2_elvis_lhs = tmp_1;
        tmp_0 = tmp2_elvis_lhs == null ? QName_init_$Create$(serialName) : tmp2_elvis_lhs;
      } else {
        var tmp_2;
        if (parentNamespace == null) {
          tmp_2 = null;
        } else {
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'nl.adaptivity.xmlutil.serialization.toQName.<anonymous>' call
          tmp_2 = QName_init_$Create$_0(parentNamespace.ll5(), _this__u8e3s4.klk_1);
        }
        var tmp4_elvis_lhs = tmp_2;
        tmp_0 = tmp4_elvis_lhs == null ? QName_init_$Create$(_this__u8e3s4.klk_1) : tmp4_elvis_lhs;
      }
      tmp = tmp_0;
    } else if (_this__u8e3s4.klk_1 === get_UNSET_ANNOTATION_VALUE()) {
      tmp = _this__u8e3s4.mlk_1 === get_UNSET_ANNOTATION_VALUE() ? QName_init_$Create$_0(serialName, _this__u8e3s4.llk_1) : new QName(serialName, _this__u8e3s4.llk_1, _this__u8e3s4.mlk_1);
    } else if (_this__u8e3s4.mlk_1 === get_UNSET_ANNOTATION_VALUE()) {
      tmp = QName_init_$Create$_0(_this__u8e3s4.llk_1, _this__u8e3s4.klk_1);
    } else {
      tmp = new QName(_this__u8e3s4.llk_1, _this__u8e3s4.klk_1, _this__u8e3s4.mlk_1);
    }
    return tmp;
  }
  function toQName_0(_this__u8e3s4) {
    _init_properties_XML_kt__j4k93v();
    return _this__u8e3s4.olk_1 === get_UNSET_ANNOTATION_VALUE() ? QName_init_$Create$(_this__u8e3s4.nlk_1) : _this__u8e3s4.plk_1 === get_UNSET_ANNOTATION_VALUE() ? QName_init_$Create$_0(_this__u8e3s4.olk_1, _this__u8e3s4.nlk_1) : new QName(_this__u8e3s4.olk_1, _this__u8e3s4.nlk_1, _this__u8e3s4.plk_1);
  }
  function getValueChild(_this__u8e3s4) {
    _init_properties_XML_kt__j4k93v();
    var inductionVariable = 0;
    var last = _this__u8e3s4.g46();
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp$ret$0;
        $l$block_0: {
          // Inline function 'kotlin.collections.any' call
          var this_0 = _this__u8e3s4.qlk().j46(i);
          var tmp;
          if (isInterface(this_0, Collection)) {
            tmp = this_0.c1();
          } else {
            tmp = false;
          }
          if (tmp) {
            tmp$ret$0 = false;
            break $l$block_0;
          }
          var tmp0_iterator = this_0.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            // Inline function 'nl.adaptivity.xmlutil.serialization.getValueChild.<anonymous>' call
            if (element instanceof XmlValue) {
              tmp$ret$0 = true;
              break $l$block_0;
            }
          }
          tmp$ret$0 = false;
        }
        if (tmp$ret$0)
          return i;
      }
       while (inductionVariable < last);
    return -1;
  }
  function getAttrMap(_this__u8e3s4) {
    _init_properties_XML_kt__j4k93v();
    var inductionVariable = 0;
    var last = _this__u8e3s4.g46();
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = _this__u8e3s4.k46(i);
        if (tmp instanceof XmlAttributeMapDescriptor)
          return i;
      }
       while (inductionVariable < last);
    return -1;
  }
  function copy_0(_this__u8e3s4, namespaceURI, localPart, prefix) {
    var tmp;
    if (namespaceURI === VOID) {
      // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
      tmp = _this__u8e3s4.kl9();
    } else {
      tmp = namespaceURI;
    }
    namespaceURI = tmp;
    var tmp_0;
    if (localPart === VOID) {
      // Inline function 'nl.adaptivity.xmlutil.localPart' call
      tmp_0 = _this__u8e3s4.ll9();
    } else {
      tmp_0 = localPart;
    }
    localPart = tmp_0;
    var tmp_1;
    if (prefix === VOID) {
      // Inline function 'nl.adaptivity.xmlutil.prefix' call
      tmp_1 = _this__u8e3s4.ml9();
    } else {
      tmp_1 = prefix;
    }
    prefix = tmp_1;
    _init_properties_XML_kt__j4k93v();
    return new QName(namespaceURI, localPart, prefix);
  }
  function getValueChild_0(_this__u8e3s4) {
    _init_properties_XML_kt__j4k93v();
    var inductionVariable = 0;
    var last = _this__u8e3s4.g46();
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp$ret$0;
        $l$block_0: {
          // Inline function 'kotlin.collections.any' call
          var this_0 = _this__u8e3s4.j46(i);
          var tmp;
          if (isInterface(this_0, Collection)) {
            tmp = this_0.c1();
          } else {
            tmp = false;
          }
          if (tmp) {
            tmp$ret$0 = false;
            break $l$block_0;
          }
          var tmp0_iterator = this_0.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            // Inline function 'nl.adaptivity.xmlutil.serialization.getValueChild.<anonymous>' call
            if (element instanceof XmlValue) {
              tmp$ret$0 = true;
              break $l$block_0;
            }
          }
          tmp$ret$0 = false;
        }
        if (tmp$ret$0)
          return i;
      }
       while (inductionVariable < last);
    return -3;
  }
  var properties_initialized_XML_kt_umqxeh;
  function _init_properties_XML_kt__j4k93v() {
    if (!properties_initialized_XML_kt_umqxeh) {
      properties_initialized_XML_kt_umqxeh = true;
      var tmp = getPlatformDefaultModule();
      // Inline function 'kotlinx.serialization.modules.SerializersModule' call
      var builder = new SerializersModuleBuilder();
      // Inline function 'nl.adaptivity.xmlutil.serialization.defaultXmlModule.<anonymous>' call
      builder.s4o(getKClass(CompactFragment), CompactFragmentSerializer_getInstance());
      builder.s4o(getKClass(QName), QNameSerializer_getInstance());
      var tmp$ret$0 = builder.f3();
      defaultXmlModule = plus(tmp, tmp$ret$0);
    }
  }
  function XmlDecoderBase$SerialValueDecoder$decodeInline$1() {
    this.rlk_1 = null;
  }
  protoOf(XmlDecoderBase$SerialValueDecoder$decodeInline$1).slk = function (_set____db54di) {
    this.rlk_1 = _set____db54di;
  };
  protoOf(XmlDecoderBase$SerialValueDecoder$decodeInline$1).tlk = function () {
    return this.rlk_1;
  };
  function toNonTransparentChild(_this__u8e3s4, $this) {
    var result = _this__u8e3s4;
    $l$loop: while (true) {
      var tmp;
      if (result instanceof XmlInlineDescriptor) {
        tmp = true;
      } else {
        var tmp_0;
        if (result instanceof XmlListDescriptor) {
          tmp_0 = result.bll();
        } else {
          tmp_0 = false;
        }
        tmp = tmp_0;
      }
      if (!tmp) {
        break $l$loop;
      }
      result = result.k46(0);
    }
    var tmp_1;
    var tmp_2;
    if (result instanceof XmlMapDescriptor) {
      tmp_2 = result.bll();
    } else {
      tmp_2 = false;
    }
    if (tmp_2) {
      tmp_1 = result.nll();
    } else {
      tmp_1 = false;
    }
    if (tmp_1) {
      return toNonTransparentChild(result.k46(1), $this);
    }
    return result;
  }
  function nextNulledItemsIdx($this) {
    var inductionVariable = $this.zll_1 + 1 | 0;
    var last = $this.yll_1.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (!($this.yll_1[i] ? true : $this.glm_1.n46(i))) {
          var childDesc = $this.glm_1.k46(i);
          var tmp1_safe_receiver = childDesc instanceof XmlValueDescriptor ? childDesc : null;
          var default_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.plm_1;
          var tmp;
          if (i === getValueChild($this.glm_1)) {
            tmp = true;
          } else if (!(default_0 == null)) {
            tmp = true;
          } else {
            var tmp_0;
            if (childDesc.b46()) {
              tmp_0 = true;
            } else {
              var tmp2_subject = childDesc.i46();
              tmp_0 = (equals(tmp2_subject, LIST_getInstance()) ? true : equals(tmp2_subject, MAP_getInstance())) ? true : false;
            }
            tmp = tmp_0;
          }
          var defaultOrList = tmp;
          if (defaultOrList) {
            $this.zll_1 = i;
            return Unit_instance;
          }
        }
      }
       while (inductionVariable < last);
    $this.zll_1 = $this.yll_1.length;
  }
  function indexOf$checkInputType(_this__u8e3s4, $inputType, this$0) {
    return $inputType.jlg(this$0.glm_1.k46(_this__u8e3s4)) ? _this__u8e3s4 : null;
  }
  function indexOf$checkInputType_0(_this__u8e3s4, $inputType) {
    return $inputType.jlg(_this__u8e3s4.tlm_1) ? _this__u8e3s4 : null;
  }
  function _get_parentXmlDescriptor__yo818r($this) {
    var tmp = $this.glm_1.ali_1.q44();
    return tmp instanceof XmlDescriptor ? tmp : THROW_CCE();
  }
  function XmlDecoderBase$AnonymousMapDecoder$decodeElementIndex$lambda(this$0) {
    return function () {
      return '' + this$0.glm_1.ulm() + ' != ' + this$0.nlf().dc();
    };
  }
  function DecodeCommons($outer, xmlDescriptor) {
    this.xlm_1 = $outer;
    XmlCodec.call(this, $outer, xmlDescriptor);
  }
  protoOf(DecodeCommons).j39 = function () {
    return this.xlm_1.alh_1;
  };
  protoOf(DecodeCommons).t45 = function () {
    return this.xlm_1.zlg_1;
  };
  protoOf(DecodeCommons).nlf = function () {
    return this.xlm_1.aln_1;
  };
  protoOf(DecodeCommons).u47 = function () {
    return null;
  };
  protoOf(DecodeCommons).v47 = function () {
    return toBoolean(this.cln());
  };
  protoOf(DecodeCommons).w47 = function () {
    var tmp;
    if (this.dln_1.fln()) {
      // Inline function 'kotlin.UByte.toByte' call
      var this_0 = toUByte(this.cln());
      tmp = _UByte___get_data__impl__jof9qr(this_0);
    } else {
      tmp = toByte(this.cln());
    }
    return tmp;
  };
  protoOf(DecodeCommons).x47 = function () {
    var tmp;
    if (this.dln_1.fln()) {
      // Inline function 'kotlin.UShort.toShort' call
      var this_0 = toUShort(this.cln());
      tmp = _UShort___get_data__impl__g0245(this_0);
    } else {
      tmp = toShort(this.cln());
    }
    return tmp;
  };
  protoOf(DecodeCommons).y47 = function () {
    var tmp;
    if (this.dln_1.fln()) {
      // Inline function 'kotlin.UInt.toInt' call
      var this_0 = toUInt(this.cln());
      tmp = _UInt___get_data__impl__f0vqqw(this_0);
    } else {
      tmp = toInt(this.cln());
    }
    return tmp;
  };
  protoOf(DecodeCommons).z47 = function () {
    var tmp;
    if (this.dln_1.fln()) {
      // Inline function 'kotlin.ULong.toLong' call
      var this_0 = toULong(this.cln());
      tmp = _ULong___get_data__impl__fggpzb(this_0);
    } else {
      tmp = toLong(this.cln());
    }
    return tmp;
  };
  protoOf(DecodeCommons).a48 = function () {
    // Inline function 'kotlin.text.toFloat' call
    var this_0 = this.cln();
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return toDouble(this_0);
  };
  protoOf(DecodeCommons).b48 = function () {
    return toDouble(this.cln());
  };
  protoOf(DecodeCommons).c48 = function () {
    return single_0(this.cln());
  };
  protoOf(DecodeCommons).e48 = function (enumDescriptor) {
    var stringName = this.cln();
    var inductionVariable = 0;
    var last = enumDescriptor.g46();
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (stringName === this.j39().olh_1.gln(enumDescriptor, i))
          return i;
      }
       while (inductionVariable < last);
    throw SerializationException_init_$Create$('No enum constant found for name ' + stringName + ' in ' + enumDescriptor.q45());
  };
  protoOf(DecodeCommons).cln = function (defaultOverEmpty, $super) {
    defaultOverEmpty = defaultOverEmpty === VOID ? true : defaultOverEmpty;
    return $super === VOID ? this.hln(defaultOverEmpty) : $super.hln.call(this, defaultOverEmpty);
  };
  protoOf(DecodeCommons).d48 = function () {
    return this.hln(false);
  };
  function XmlDecoder($outer, xmlDescriptor, polyInfo, attrIndex) {
    polyInfo = polyInfo === VOID ? null : polyInfo;
    attrIndex = attrIndex === VOID ? -1 : attrIndex;
    this.ilk_1 = $outer;
    DecodeCommons.call(this, $outer, xmlDescriptor);
    this.flk_1 = polyInfo;
    this.glk_1 = attrIndex;
    this.hlk_1 = false;
  }
  protoOf(XmlDecoder).iln = function () {
    return null;
  };
  protoOf(XmlDecoder).t47 = function () {
    if (this.ilk_1.jln())
      return false;
    return !this.nlf().ul5().equals(EventType_END_DOCUMENT_getInstance());
  };
  protoOf(XmlDecoder).u47 = function () {
    if (this.ilk_1.jln()) {
      this.nlf().clb();
      var tmp = this.nlf();
      var tmp_0 = EventType_END_ELEMENT_getInstance();
      // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
      var tmp_1 = this.q45().kl9();
      // Inline function 'nl.adaptivity.xmlutil.localPart' call
      var tmp$ret$1 = this.q45().ll9();
      tmp.el6(tmp_0, tmp_1, tmp$ret$1);
      return null;
    }
    return protoOf(DecodeCommons).u47.call(this);
  };
  protoOf(XmlDecoder).f48 = function (descriptor) {
    this.hlk_1 = true;
    return this;
  };
  protoOf(XmlDecoder).hln = function (defaultOverEmpty) {
    var tmp = this.dln_1;
    var tmp0_safe_receiver = tmp instanceof XmlValueDescriptor ? tmp : null;
    var defaultString = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.plm_1;
    var descOutputKind = this.dln_1.olg();
    var tmp_0;
    if (this.glk_1 >= 0) {
      tmp_0 = this.nlf().dl6(this.glk_1);
    } else {
      var tmp_1;
      switch (descOutputKind.za_1) {
        case 0:
          var tmp_2 = this.nlf();
          var tmp_3 = EventType_START_ELEMENT_getInstance();
          // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call

          var tmp_4 = this.q45().kl9();
          // Inline function 'nl.adaptivity.xmlutil.localPart' call

          var tmp$ret$1 = this.q45().ll9();
          tmp_2.el6(tmp_3, tmp_4, tmp$ret$1);
          tmp_1 = readSimpleElement(this.nlf());
          break;
        case 1:
          throw SerializationException_init_$Create$('Attribute parsing without a concrete index is unsupported');
        case 4:
          throw SerializationException_init_$Create$('Inline classes can not be decoded directly');
        case 3:
          tmp_1 = allConsecutiveTextContent(this.nlf());
          break;
        case 2:
          var tmp_5;
          if (this.dln_1.kln()) {
            tmp_5 = allConsecutiveTextContent(this.nlf());
          } else {
            tmp_5 = allText(this.nlf());
          }

          tmp_1 = tmp_5;
          break;
        default:
          noWhenBranchMatchedException();
          break;
      }
      tmp_0 = tmp_1;
    }
    var stringValue = tmp_0;
    var tmp_6;
    var tmp_7;
    var tmp_8;
    if (defaultOverEmpty) {
      // Inline function 'kotlin.text.isEmpty' call
      tmp_8 = charSequenceLength(stringValue) === 0;
    } else {
      tmp_8 = false;
    }
    if (tmp_8) {
      tmp_7 = !(defaultString == null);
    } else {
      tmp_7 = false;
    }
    if (tmp_7) {
      tmp_6 = defaultString;
    } else {
      tmp_6 = stringValue;
    }
    return tmp_6;
  };
  protoOf(XmlDecoder).i48 = function (descriptor) {
    throw AssertionError_init_$Create$('This should not happen as decodeSerializableValue should be called first');
  };
  protoOf(XmlDecoder).h48 = function (deserializer) {
    var deser = this.dln_1.lln(deserializer);
    var tmp;
    var tmp_0;
    if (this.hlk_1) {
      var tmp_1 = this.dln_1;
      tmp_0 = tmp_1 instanceof XmlInlineDescriptor;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.dln_1.k46(0);
    } else {
      tmp = this.dln_1;
    }
    var desc = tmp;
    var serialValueDecoder = new SerialValueDecoder(this.ilk_1, desc, this.flk_1, this.glk_1, this.iln());
    var value = deser.s44(serialValueDecoder);
    var tmp0_safe_receiver = serialValueDecoder.vln_1;
    var tagId = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tlk();
    if (!(tagId == null)) {
      // Inline function 'kotlin.checkNotNull' call
      // Inline function 'kotlin.contracts.contract' call
      $l$block: {
        // Inline function 'kotlin.checkNotNull' call
        // Inline function 'kotlin.contracts.contract' call
        if (value == null) {
          // Inline function 'kotlin.checkNotNull.<anonymous>' call
          var message = 'Required value was null.';
          throw IllegalStateException_init_$Create$(toString(message));
        } else {
          break $l$block;
        }
      }
      if (!(this.ilk_1.bln_1.s(tagId, value) == null))
        throw XmlException_init_$Create$('Duplicate use of id ' + tagId);
    }
    return value;
  };
  function StringDecoder($outer, xmlDescriptor, stringValue) {
    this.clo_1 = $outer;
    DecodeCommons.call(this, $outer, xmlDescriptor);
    this.blo_1 = stringValue;
  }
  protoOf(StringDecoder).i48 = function (descriptor) {
    throw UnsupportedOperationException_init_$Create$('Strings cannot be decoded to structures');
  };
  protoOf(StringDecoder).t47 = function () {
    return true;
  };
  protoOf(StringDecoder).f48 = function (descriptor) {
    return new StringDecoder(this.clo_1, this.dln_1.k46(0), this.blo_1);
  };
  protoOf(StringDecoder).hln = function (defaultOverEmpty) {
    var tmp = this.dln_1;
    var tmp0_safe_receiver = tmp instanceof XmlValueDescriptor ? tmp : null;
    var defaultString = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.plm_1;
    var tmp_0;
    if (defaultOverEmpty ? !(defaultString == null) : false) {
      // Inline function 'kotlin.text.isEmpty' call
      var this_0 = this.blo_1;
      tmp_0 = charSequenceLength(this_0) === 0;
    } else {
      tmp_0 = false;
    }
    if (tmp_0)
      return defaultString;
    return this.blo_1;
  };
  protoOf(StringDecoder).h48 = function (deserializer) {
    var deser = this.dln_1.lln(deserializer);
    return deser.s44(this);
  };
  function SerialValueDecoder($outer, xmlDescriptor, polyInfo, attrIndex, typeDiscriminatorName) {
    this.xln_1 = $outer;
    XmlDecoder.call(this, $outer, xmlDescriptor, polyInfo, attrIndex);
    this.tln_1 = typeDiscriminatorName;
    this.uln_1 = false;
    this.vln_1 = null;
    var tmp = this;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp.wln_1 = ArrayList_init_$Create$();
  }
  protoOf(SerialValueDecoder).iln = function () {
    return this.tln_1;
  };
  protoOf(SerialValueDecoder).dlo = function (name) {
    this.wln_1.i1(name);
  };
  protoOf(SerialValueDecoder).hln = function (defaultOverEmpty) {
    var value = protoOf(XmlDecoder).hln.call(this, defaultOverEmpty);
    if (this.glk_1 >= 0 ? this.dln_1.elo() : false) {
      var tmp0_safe_receiver = this.vln_1;
      if (tmp0_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.run' call
        // Inline function 'kotlin.contracts.contract' call
        tmp0_safe_receiver.slk(value);
      }
    }
    return value;
  };
  protoOf(SerialValueDecoder).t47 = function () {
    this.uln_1 = true;
    return protoOf(XmlDecoder).t47.call(this);
  };
  protoOf(SerialValueDecoder).h48 = function (deserializer) {
    return this.uln_1 ? deserializer.s44(this) : protoOf(XmlDecoder).h48.call(this, deserializer);
  };
  protoOf(SerialValueDecoder).f48 = function (descriptor) {
    var tmp = this;
    tmp.vln_1 = new XmlDecoderBase$SerialValueDecoder$decodeInline$1();
    return protoOf(XmlDecoder).f48.call(this, descriptor);
  };
  protoOf(SerialValueDecoder).i48 = function (descriptor) {
    if (descriptor.b46()) {
      // Inline function 'kotlin.also' call
      var this_0 = new TagDecoder(this.xln_1, this.dln_1, this.iln());
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.SerialValueDecoder.beginStructure.<anonymous>' call
      this.vln_1 = this_0;
      return this_0;
    }
    // Inline function 'kotlin.also' call
    var tmp;
    var tmp_0 = this.dln_1.i46();
    if (tmp_0 instanceof PrimitiveKind) {
      throw AssertionError_init_$Create$('A primitive is not a composite');
    } else {
      var tmp_1 = this.dln_1;
      if (tmp_1 instanceof XmlPolymorphicDescriptor) {
        // Inline function 'kotlin.also' call
        var this_1 = new PolymorphicDecoder(this.xln_1, this.dln_1, this.flk_1);
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'nl.adaptivity.xmlutil.serialization.SerialValueDecoder.beginStructure.<anonymous>' call
        this.vln_1 = this_1;
        tmp = this_1;
      } else {
        var tmp_2 = this.dln_1;
        if (tmp_2 instanceof XmlListDescriptor) {
          var tmp_3;
          if (this.dln_1.olg().equals(OutputKind_Attribute_getInstance())) {
            // Inline function 'kotlin.also' call
            var this_2 = new AttributeListDecoder(this.xln_1, this.dln_1, this.glk_1);
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'nl.adaptivity.xmlutil.serialization.SerialValueDecoder.beginStructure.<anonymous>' call
            this.vln_1 = this_2;
            tmp_3 = this_2;
          } else if (this.dln_1.bll()) {
            // Inline function 'kotlin.also' call
            var this_3 = new AnonymousListDecoder(this.xln_1, this.dln_1, this.flk_1, this.iln());
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'nl.adaptivity.xmlutil.serialization.SerialValueDecoder.beginStructure.<anonymous>' call
            this.vln_1 = this_3;
            tmp_3 = this_3;
          } else {
            // Inline function 'kotlin.also' call
            var this_4 = new NamedListDecoder(this.xln_1, this.dln_1, this.iln());
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'nl.adaptivity.xmlutil.serialization.SerialValueDecoder.beginStructure.<anonymous>' call
            this.vln_1 = this_4;
            tmp_3 = this_4;
          }
          tmp = tmp_3;
        } else {
          var tmp_4 = this.dln_1;
          if (tmp_4 instanceof XmlMapDescriptor) {
            var tmp_5;
            if (this.dln_1.bll()) {
              // Inline function 'kotlin.also' call
              var this_5 = new AnonymousMapDecoder(this.xln_1, this.dln_1, this.flk_1, this.iln());
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'nl.adaptivity.xmlutil.serialization.SerialValueDecoder.beginStructure.<anonymous>' call
              this.vln_1 = this_5;
              tmp_5 = this_5;
            } else {
              // Inline function 'kotlin.also' call
              var this_6 = new NamedMapDecoder(this.xln_1, this.dln_1, this.flk_1, this.iln());
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'nl.adaptivity.xmlutil.serialization.SerialValueDecoder.beginStructure.<anonymous>' call
              this.vln_1 = this_6;
              tmp_5 = this_6;
            }
            tmp = tmp_5;
          } else {
            // Inline function 'kotlin.also' call
            var this_7 = new TagDecoder(this.xln_1, this.dln_1, this.iln());
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'nl.adaptivity.xmlutil.serialization.SerialValueDecoder.beginStructure.<anonymous>' call
            this.vln_1 = this_7;
            tmp = this_7;
          }
        }
      }
    }
    var this_8 = tmp;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.SerialValueDecoder.beginStructure.<anonymous>' call
    var tmp0_iterator = this.wln_1.w();
    while (tmp0_iterator.f()) {
      var attrName = tmp0_iterator.e();
      this_8.dlo(attrName);
    }
    return this_8;
  };
  function NullDecoder($outer, xmlDescriptor) {
    this.mlo_1 = $outer;
    XmlDecoder.call(this, $outer, xmlDescriptor);
  }
  protoOf(NullDecoder).t47 = function () {
    return false;
  };
  protoOf(NullDecoder).u48 = function (descriptor, index, deserializer, previousValue) {
    var tmp = this.dln_1;
    var tmp0_safe_receiver = tmp instanceof XmlValueDescriptor ? tmp : null;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nlo(this.mlo_1, deserializer);
    var default_0 = tmp1_elvis_lhs == null ? previousValue : tmp1_elvis_lhs;
    return (default_0 == null ? true : !(default_0 == null)) ? default_0 : THROW_CCE();
  };
  protoOf(NullDecoder).w48 = function (descriptor, index, deserializer, previousValue) {
    return null;
  };
  protoOf(NullDecoder).i48 = function (descriptor) {
    return this;
  };
  protoOf(NullDecoder).j48 = function (descriptor) {
  };
  protoOf(NullDecoder).y48 = function (descriptor) {
    var tmp0_subject = descriptor.i46();
    var tmp;
    if (tmp0_subject instanceof MAP) {
      tmp = true;
    } else {
      tmp = tmp0_subject instanceof LIST;
    }
    if (tmp) {
      return -1;
    } else {
      throw AssertionError_init_$Create$('Null objects have no members');
    }
  };
  protoOf(NullDecoder).k48 = function (descriptor, index) {
    throw AssertionError_init_$Create$('Null objects have no members');
  };
  protoOf(NullDecoder).l48 = function (descriptor, index) {
    throw AssertionError_init_$Create$('Null objects have no members');
  };
  protoOf(NullDecoder).m48 = function (descriptor, index) {
    throw AssertionError_init_$Create$('Null objects have no members');
  };
  protoOf(NullDecoder).n48 = function (descriptor, index) {
    throw AssertionError_init_$Create$('Null objects have no members');
  };
  protoOf(NullDecoder).z48 = function (descriptor) {
    return 0;
  };
  protoOf(NullDecoder).o48 = function (descriptor, index) {
    throw AssertionError_init_$Create$('Null objects have no members');
  };
  protoOf(NullDecoder).p48 = function (descriptor, index) {
    throw AssertionError_init_$Create$('Null objects have no members');
  };
  protoOf(NullDecoder).q48 = function (descriptor, index) {
    throw AssertionError_init_$Create$('Null objects have no members');
  };
  protoOf(NullDecoder).r48 = function (descriptor, index) {
    throw AssertionError_init_$Create$('Null objects have no members');
  };
  protoOf(NullDecoder).s48 = function (descriptor, index) {
    throw AssertionError_init_$Create$('Null objects have no members');
  };
  protoOf(NullDecoder).t48 = function (descriptor, index) {
    throw AssertionError_init_$Create$('Null objects have no members');
  };
  function TagDecoder($outer, xmlDescriptor, typeDiscriminatorName) {
    this.hlp_1 = $outer;
    TagDecoderBase.call(this, $outer, xmlDescriptor, typeDiscriminatorName);
    this.glp_1 = this.nlf().dc();
  }
  protoOf(TagDecoder).j48 = function (descriptor) {
    if (!this.elm_1) {
      var index = this.y48(descriptor);
      if (!(index === -1))
        throw new XmlSerialException('Unexpected content in end structure');
    }
    this.nlf().flb(EventType_END_ELEMENT_getInstance(), this.glp_1);
  };
  function TagDecoderBase($outer, xmlDescriptor, typeDiscriminatorName) {
    this.flm_1 = $outer;
    XmlTagCodec.call(this, $outer, xmlDescriptor);
    this.qll_1 = typeDiscriminatorName;
    this.rll_1 = null;
    var tmp = this;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp.sll_1 = ArrayList_init_$Create$();
    this.vll_1 = xmlDescriptor.kln();
    this.wll_1 = this.nlf().ul5().equals(EventType_START_ELEMENT_getInstance()) ? this.nlf().tl5() : 0;
    this.xll_1 = this.nlf().pl5();
    this.yll_1 = booleanArray(xmlDescriptor.g46());
    this.zll_1 = -1;
    this.alm_1 = -1;
    this.blm_1 = null;
    this.clm_1 = getAttrMap(xmlDescriptor);
    this.dlm_1 = ArrayDeque_init_$Create$();
    this.elm_1 = false;
    // Inline function 'kotlin.collections.mutableMapOf' call
    var polyMap = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.collections.mutableMapOf' call
    var nameMap = LinkedHashMap_init_$Create$();
    var inductionVariable = 0;
    var last = xmlDescriptor.g46();
    if (inductionVariable < last)
      do {
        var idx = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var child = toNonTransparentChild(xmlDescriptor.k46(idx), this);
        var tmp_0;
        if (child instanceof XmlPolymorphicDescriptor) {
          tmp_0 = child.plp();
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          // Inline function 'kotlin.collections.iterator' call
          var tmp1_iterator = child.tli_1.q2().w();
          while (tmp1_iterator.f()) {
            // Inline function 'kotlin.collections.component2' call
            var childDescriptor = tmp1_iterator.e().t2();
            var tagName = this.olp(childDescriptor.gli());
            // Inline function 'kotlin.collections.set' call
            var value = new PolyInfo(tagName, idx, childDescriptor);
            polyMap.s(tagName, value);
          }
        } else {
          // Inline function 'kotlin.collections.set' call
          var key = this.olp(child.gli());
          nameMap.s(key, idx);
        }
      }
       while (inductionVariable < last);
    this.ull_1 = polyMap;
    this.tll_1 = nameMap;
  }
  protoOf(TagDecoderBase).slk = function (_set____db54di) {
    this.rll_1 = _set____db54di;
  };
  protoOf(TagDecoderBase).tlk = function () {
    return this.rll_1;
  };
  protoOf(TagDecoderBase).nlf = function () {
    return this.flm_1.aln_1;
  };
  protoOf(TagDecoderBase).ilp = function (desc, index, deserializer) {
    var childXmlDescriptor = this.glm_1.k46(index);
    var effectiveDeserializer = childXmlDescriptor.lln(deserializer);
    var tmp;
    if (this.zll_1 >= 0) {
      tmp = null;
    } else {
      var tmp_0 = effectiveDeserializer.q44().i46();
      if (tmp_0 instanceof PrimitiveKind) {
        tmp = new XmlDecoder(this.flm_1, childXmlDescriptor, this.blm_1, this.alm_1);
      } else {
        tmp = new SerialValueDecoder(this.flm_1, childXmlDescriptor, this.blm_1, this.alm_1, null);
      }
    }
    return tmp;
  };
  protoOf(TagDecoderBase).u48 = function (descriptor, index, deserializer, previousValue) {
    // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.handleRecovery' call
    this.flm_1;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.dlm_1.c1()) {
      var d = this.dlm_1.kf();
      if (!(d.qlp_1 === index)) {
        throw IllegalStateException_init_$Create$('Recovery state is inconsistent');
      }
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeSerializableElement.<anonymous>' call
      var tmp = d.rlp_1;
      var it = (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();
      return (it == null ? true : !(it == null)) ? it : THROW_CCE();
    }
    var childXmlDescriptor = this.glm_1.k46(index);
    var effectiveDeserializer = childXmlDescriptor.lln(deserializer);
    var tmp_0;
    if (equals(isInterface(effectiveDeserializer, DeserializationStrategy) ? effectiveDeserializer : THROW_CCE(), CompactFragmentSerializer_getInstance())) {
      tmp_0 = getValueChild(this.glm_1) === index;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      if (this.zll_1 >= 0) {
        var tmp_1 = CompactFragment_init_$Create$_0('');
        return !(tmp_1 == null) ? tmp_1 : THROW_CCE();
      }
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeSerializableElement.<anonymous>' call
      var it_0 = siblingsToFragment(this.nlf());
      this.nlf().rla();
      var tmp0_elvis_lhs = it_0 instanceof CompactFragment ? it_0 : null;
      var tmp_2 = tmp0_elvis_lhs == null ? CompactFragment_init_$Create$_1(it_0) : tmp0_elvis_lhs;
      return !(tmp_2 == null) ? tmp_2 : THROW_CCE();
    }
    var tmp_3;
    var tmp_4;
    if (this.alm_1 >= 0) {
      tmp_4 = childXmlDescriptor instanceof XmlAttributeMapDescriptor;
    } else {
      tmp_4 = false;
    }
    if (tmp_4) {
      tmp_3 = new AttributeMapDecoder(this.flm_1, childXmlDescriptor, this.alm_1);
    } else {
      var tmp0_elvis_lhs_0 = this.ilp(descriptor, index, effectiveDeserializer);
      tmp_3 = tmp0_elvis_lhs_0 == null ? new NullDecoder(this.flm_1, childXmlDescriptor) : tmp0_elvis_lhs_0;
    }
    var decoder = tmp_3;
    var tmp_5;
    if (effectiveDeserializer instanceof AbstractCollectionSerializer) {
      tmp_5 = effectiveDeserializer.a4c(decoder, previousValue);
    } else {
      tmp_5 = effectiveDeserializer.s44(decoder);
    }
    var result = tmp_5;
    var tmp1_safe_receiver = decoder instanceof SerialValueDecoder ? decoder : null;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vln_1;
    var tagId = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.tlk();
    if (!(tagId == null)) {
      // Inline function 'kotlin.checkNotNull' call
      // Inline function 'kotlin.contracts.contract' call
      $l$block: {
        // Inline function 'kotlin.checkNotNull' call
        // Inline function 'kotlin.contracts.contract' call
        if (result == null) {
          // Inline function 'kotlin.checkNotNull.<anonymous>' call
          var message = 'Required value was null.';
          throw IllegalStateException_init_$Create$(toString(message));
        } else {
          break $l$block;
        }
      }
      if (!(this.flm_1.bln_1.s(tagId, result) == null))
        throw XmlException_init_$Create$('Duplicate use of id ' + tagId);
    }
    this.yll_1[index] = true;
    return result;
  };
  protoOf(TagDecoderBase).w48 = function (descriptor, index, deserializer, previousValue) {
    // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.handleRecovery' call
    this.flm_1;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.dlm_1.c1()) {
      var d = this.dlm_1.kf();
      if (!(d.qlp_1 === index)) {
        throw IllegalStateException_init_$Create$('Recovery state is inconsistent');
      }
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeNullableSerializableElement.<anonymous>' call
      var tmp = d.rlp_1;
      var it = (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();
      return !(it == null) ? it : THROW_CCE();
    }
    if (this.flm_1.jln()) {
      if (!this.nlf().clb().equals(EventType_END_ELEMENT_getInstance()))
        throw SerializationException_init_$Create$('Elements with nil tags may not have content');
      return null;
    }
    var tmp0_elvis_lhs = this.ilp(descriptor, index, deserializer);
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      return null;
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    var decoder = tmp_0;
    var effectiveDeserializer = this.glm_1.k46(index).lln(deserializer);
    var tmp_1;
    if (effectiveDeserializer instanceof AbstractCollectionSerializer) {
      tmp_1 = effectiveDeserializer.a4c(decoder, previousValue);
    } else {
      tmp_1 = effectiveDeserializer.s44(decoder);
    }
    var result = tmp_1;
    var tmp1_safe_receiver = decoder instanceof SerialValueDecoder ? decoder : null;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vln_1;
    var tagId = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.tlk();
    if (!(tagId == null)) {
      // Inline function 'kotlin.checkNotNull' call
      // Inline function 'kotlin.contracts.contract' call
      $l$block: {
        // Inline function 'kotlin.checkNotNull' call
        // Inline function 'kotlin.contracts.contract' call
        if (result == null) {
          // Inline function 'kotlin.checkNotNull.<anonymous>' call
          var message = 'Required value was null.';
          throw IllegalStateException_init_$Create$(toString(message));
        } else {
          break $l$block;
        }
      }
      if (!(this.flm_1.bln_1.s(tagId, result) == null))
        throw XmlException_init_$Create$('Duplicate use of id ' + tagId);
    }
    this.yll_1[index] = true;
    return result;
  };
  protoOf(TagDecoderBase).t48 = function (descriptor, index) {
    // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.handleRecovery' call
    this.flm_1;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.dlm_1.c1()) {
      var d = this.dlm_1.kf();
      if (!(d.qlp_1 === index)) {
        throw IllegalStateException_init_$Create$('Recovery state is inconsistent');
      }
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeInlineElement.<anonymous>' call
      var tmp = d.rlp_1;
      var it = (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();
      return new DummyDecoder(it);
    }
    var childXmlDescriptor = this.glm_1.k46(index);
    var tmp_0;
    if (descriptor.i46() instanceof PrimitiveKind) {
      tmp_0 = new XmlDecoder(this.flm_1, childXmlDescriptor, this.blm_1, this.alm_1);
    } else {
      tmp_0 = new SerialValueDecoder(this.flm_1, childXmlDescriptor, this.blm_1, this.alm_1, this.qll_1);
    }
    return tmp_0;
  };
  protoOf(TagDecoderBase).jlp = function (name, inputType) {
    var isNameOfAttr = inputType.equals(InputKind_Attribute_getInstance());
    this.blm_1 = null;
    var polyMap = this.ull_1;
    var nameMap = this.tll_1;
    var normalizedName = this.olp(name);
    var tmp0_safe_receiver = nameMap.q(normalizedName);
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : indexOf$checkInputType(tmp0_safe_receiver, inputType, this);
    if (tmp1_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      return this.llp(tmp1_safe_receiver, inputType);
    }
    var tmp2_safe_receiver = polyMap.q(normalizedName);
    var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : indexOf$checkInputType_0(tmp2_safe_receiver, inputType);
    if (tmp3_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.apply' call
      var this_0 = this.llp(tmp3_safe_receiver.slm_1, inputType);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.indexOf.<anonymous>.<anonymous>' call
      this.blm_1 = tmp3_safe_receiver;
      return this_0;
    }
    // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
    var containingNamespaceUri = this.q45().kl9();
    if (isNameOfAttr ? !this.j39().olh_1.tlp() : false) {
      // Inline function 'kotlin.text.isEmpty' call
      // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
      var this_1 = name.kl9();
      if (charSequenceLength(this_1) === 0) {
        var attrName = copy_0(normalizedName, containingNamespaceUri);
        var tmp4_safe_receiver = nameMap.q(attrName);
        var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : indexOf$checkInputType(tmp4_safe_receiver, inputType, this);
        if (tmp5_safe_receiver == null)
          null;
        else {
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          return this.klp(tmp5_safe_receiver);
        }
        var tmp6_safe_receiver = polyMap.q(attrName);
        var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : indexOf$checkInputType_0(tmp6_safe_receiver, inputType);
        if (tmp7_safe_receiver == null)
          null;
        else {
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          this.blm_1 = tmp7_safe_receiver;
          return this.klp(tmp7_safe_receiver.slm_1);
        }
      }
      // Inline function 'kotlin.text.isEmpty' call
      // Inline function 'nl.adaptivity.xmlutil.prefix' call
      var this_2 = name.ml9();
      if (charSequenceLength(this_2) === 0) {
        var emptyNsPrefix = this.nlf().fl5('');
        if (!(emptyNsPrefix == null)) {
          var attrName_0 = copy_0(normalizedName, emptyNsPrefix);
          var tmp8_safe_receiver = nameMap.q(attrName_0);
          var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : indexOf$checkInputType(tmp8_safe_receiver, inputType, this);
          if (tmp9_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            return this.klp(tmp9_safe_receiver);
          }
          var tmp10_safe_receiver = polyMap.q(attrName_0);
          var tmp11_safe_receiver = tmp10_safe_receiver == null ? null : indexOf$checkInputType_0(tmp10_safe_receiver, inputType);
          if (tmp11_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            return this.klp(tmp11_safe_receiver.slm_1);
          }
        }
      }
    }
    var tmp;
    var tmp_0;
    if (!this.j39().olh_1.tlp()) {
      // Inline function 'kotlin.text.isNotEmpty' call
      tmp_0 = charSequenceLength(containingNamespaceUri) > 0;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
      tmp = containingNamespaceUri === name.kl9();
    } else {
      tmp = false;
    }
    if (tmp) {
      var tmp12_safe_receiver = nameMap.q(QName_init_$Create$(name.ll9()));
      var tmp13_safe_receiver = tmp12_safe_receiver == null ? null : indexOf$checkInputType(tmp12_safe_receiver, inputType, this);
      if (tmp13_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        return this.llp(tmp13_safe_receiver, inputType);
      }
    }
    var tmp_1;
    if (inputType.equals(InputKind_Attribute_getInstance())) {
      var containsUpper = this.wll_1;
      var containsArg = this.alm_1;
      tmp_1 = 0 <= containsArg ? containsArg < containsUpper : false;
    } else {
      tmp_1 = false;
    }
    if (tmp_1) {
      // Inline function 'kotlin.takeIf' call
      var this_3 = this.clm_1;
      // Inline function 'kotlin.contracts.contract' call
      var tmp_2;
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.indexOf.<anonymous>' call
      if (this_3 >= 0) {
        tmp_2 = this_3;
      } else {
        tmp_2 = null;
      }
      var tmp14_safe_receiver = tmp_2;
      if (tmp14_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        return tmp14_safe_receiver;
      }
    } else {
      // Inline function 'kotlin.takeIf' call
      var this_4 = getValueChild(this.glm_1);
      // Inline function 'kotlin.contracts.contract' call
      var tmp_3;
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.indexOf.<anonymous>' call
      if (this_4 >= 0) {
        tmp_3 = this_4;
      } else {
        tmp_3 = null;
      }
      var tmp15_safe_receiver = tmp_3;
      if (tmp15_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        var valChildDesc = this.glm_1.k46(tmp15_safe_receiver);
        $l$loop: while (true) {
          var tmp_4;
          var tmp_5;
          if (valChildDesc instanceof XmlListDescriptor) {
            tmp_5 = valChildDesc.bll();
          } else {
            tmp_5 = false;
          }
          if (tmp_5) {
            tmp_4 = true;
          } else {
            tmp_4 = valChildDesc instanceof XmlInlineDescriptor;
          }
          if (!tmp_4) {
            break $l$loop;
          }
          valChildDesc = valChildDesc.k46(0);
        }
        var tmp_6;
        if (equals(valChildDesc.qlk(), CompactFragmentSerializer_getInstance().mlf_1)) {
          return this.klp(tmp15_safe_receiver);
        }
      }
    }
    // Inline function 'kotlin.let' call
    var tmp_7 = this.j39().olh_1;
    var tmp_8 = this.nlf();
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(nameMap.u());
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = nameMap.q2().w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.indexOf.<anonymous>' call
      // Inline function 'kotlin.collections.component1' call
      var k = item.s2();
      // Inline function 'kotlin.collections.component2' call
      var v = item.t2();
      var tmp$ret$24 = new PolyInfo(k, v, this.glm_1.k46(v));
      destination.i1(tmp$ret$24);
    }
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.indexOf.<anonymous>' call
    var it = tmp_7.ulp(tmp_8, inputType, this.glm_1, name, plus_0(destination, polyMap.p2()));
    var singleParsed = singleOrNull(it);
    if ((singleParsed == null ? null : singleParsed.slp_1) === true) {
      return singleParsed.qlp_1;
    }
    this.dlm_1.m1(it);
    return -3;
  };
  protoOf(TagDecoderBase).klp = function (_this__u8e3s4) {
    // Inline function 'kotlin.also' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.checkRepeat.<anonymous>' call
    if (_this__u8e3s4 >= 0 ? this.yll_1[_this__u8e3s4] : false) {
      var desc = this.glm_1.k46(_this__u8e3s4);
      var tmp;
      if (!(desc instanceof XmlListLikeDescriptor)) {
        tmp = true;
      } else {
        tmp = !desc.bll();
      }
      if (tmp) {
        this.j39().olh_1.vlp(this.glm_1, _this__u8e3s4);
      }
    }
    return _this__u8e3s4;
  };
  protoOf(TagDecoderBase).llp = function (_this__u8e3s4, inputType) {
    // Inline function 'kotlin.also' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.checkRepeatAndOrder.<anonymous>' call
    this.klp(_this__u8e3s4);
    if (this.j39().olh_1.mlq() ? inputType.equals(InputKind_Element_getInstance()) : false) {
      var tmp = this.glm_1;
      if (tmp instanceof XmlCompositeDescriptor) {
        var constraints = this.glm_1.jlq();
        // Inline function 'kotlin.collections.isNullOrEmpty' call
        // Inline function 'kotlin.contracts.contract' call
        if (!(constraints == null ? true : constraints.c1())) {
          var orderedBefore = booleanArray(this.yll_1.length);
          var orderedAfter = booleanArray(this.yll_1.length);
          var tmp0_iterator = constraints.w();
          while (tmp0_iterator.f()) {
            var tmp1_loop_parameter = tmp0_iterator.e();
            var before = tmp1_loop_parameter.y6();
            var after = tmp1_loop_parameter.z6();
            if (before === -2) {
              orderedAfter[after] = true;
            }
            if (after === -2) {
              orderedBefore[before] = true;
            }
          }
          var tmp2_iterator = constraints.w();
          while (tmp2_iterator.f()) {
            var tmp3_loop_parameter = tmp2_iterator.e();
            var before_0 = tmp3_loop_parameter.y6();
            var after_0 = tmp3_loop_parameter.z6();
            if (before_0 === _this__u8e3s4) {
              if (after_0 === -2) {
                var tmp$ret$2;
                $l$block: {
                  // Inline function 'kotlin.collections.indexOfFirst' call
                  var index = 0;
                  var tmp0_iterator_0 = get_indices(this.yll_1).w();
                  while (tmp0_iterator_0.f()) {
                    var item = tmp0_iterator_0.e();
                    checkIndexOverflow(index);
                    // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.checkRepeatAndOrder.<anonymous>.<anonymous>' call
                    if ((this.yll_1[item] ? this.glm_1.k46(item).hli().equals(OutputKind_Element_getInstance()) : false) ? !orderedBefore[item] : false) {
                      tmp$ret$2 = index;
                      break $l$block;
                    }
                    index = index + 1 | 0;
                  }
                  tmp$ret$2 = -1;
                }
                var seenSiblingIndex = tmp$ret$2;
                if (seenSiblingIndex >= 0) {
                  throw new XmlSerialException('Found element ' + this.glm_1.k46(seenSiblingIndex).gli() + ' before ' + this.glm_1.k46(_this__u8e3s4).gli() + ' in conflict with ordering constraints');
                }
              } else {
                if (this.yll_1[after_0]) {
                  throw new XmlSerialException('Found element ' + this.glm_1.k46(after_0).gli() + ' before ' + this.glm_1.k46(_this__u8e3s4).gli() + ' in conflict with ordering constraints');
                }
              }
            }
            if (!orderedAfter[_this__u8e3s4]) {
              var tmp$ret$4;
              $l$block_0: {
                // Inline function 'kotlin.collections.indexOfFirst' call
                var index_0 = 0;
                var tmp0_iterator_1 = get_indices(this.yll_1).w();
                while (tmp0_iterator_1.f()) {
                  var item_0 = tmp0_iterator_1.e();
                  checkIndexOverflow(index_0);
                  // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.checkRepeatAndOrder.<anonymous>.<anonymous>' call
                  if (this.yll_1[item_0] ? orderedAfter[item_0] : false) {
                    tmp$ret$4 = index_0;
                    break $l$block_0;
                  }
                  index_0 = index_0 + 1 | 0;
                }
                tmp$ret$4 = -1;
              }
              var alreadySeenTrailingIndex = tmp$ret$4;
              if (alreadySeenTrailingIndex > 0) {
                throw new XmlSerialException('Found element ' + this.glm_1.k46(_this__u8e3s4).gli() + ' after ' + this.glm_1.k46(alreadySeenTrailingIndex) + ' in conflict with ordering constraints');
              }
            }
          }
        }
      }
    }
    return _this__u8e3s4;
  };
  protoOf(TagDecoderBase).y48 = function (descriptor) {
    if (!this.elm_1 ? this.nlf().pl5() < this.xll_1 : false) {
      return -1;
    }
    this.elm_1 = true;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.dlm_1.c1()) {
      return this.dlm_1.gf().qlp_1;
    }
    if (this.zll_1 >= 0) {
      this.nlf().flb(EventType_END_ELEMENT_getInstance(), this.glm_1.gli());
      if (this.zll_1 >= this.yll_1.length) {
        return -1;
      }
      // Inline function 'kotlin.also' call
      var this_0 = this.zll_1;
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeElementIndex.<anonymous>' call
      nextNulledItemsIdx(this);
      return this_0;
    }
    this.alm_1 = this.alm_1 + 1 | 0;
    $l$loop: while (true) {
      var tmp;
      var containsUpper = this.wll_1;
      var containsArg = this.alm_1;
      if (0 <= containsArg ? containsArg < containsUpper : false) {
        var tmp$ret$2;
        $l$block_0: {
          // Inline function 'kotlin.collections.any' call
          var this_1 = this.sll_1;
          var tmp_0;
          if (isInterface(this_1, Collection)) {
            tmp_0 = this_1.c1();
          } else {
            tmp_0 = false;
          }
          if (tmp_0) {
            tmp$ret$2 = false;
            break $l$block_0;
          }
          var tmp0_iterator = this_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeElementIndex.<anonymous>' call
            if (isEquivalent(element, this.nlf().glb(this.alm_1))) {
              tmp$ret$2 = true;
              break $l$block_0;
            }
          }
          tmp$ret$2 = false;
        }
        tmp = tmp$ret$2;
      } else {
        tmp = false;
      }
      if (!tmp) {
        break $l$loop;
      }
      this.alm_1 = this.alm_1 + 1 | 0;
    }
    var containsUpper_0 = this.wll_1;
    var containsArg_0 = this.alm_1;
    if (0 <= containsArg_0 ? containsArg_0 < containsUpper_0 : false) {
      var name = this.nlf().glb(this.alm_1);
      var tmp_1;
      var tmp_2;
      var tmp_3;
      if (name.equals(this.qll_1)) {
        tmp_3 = true;
      } else {
        var tmp_4 = name.kl9();
        tmp_3 = tmp_4 === 'http://www.w3.org/2000/xmlns/';
      }
      if (tmp_3) {
        tmp_2 = true;
      } else {
        // Inline function 'nl.adaptivity.xmlutil.prefix' call
        var tmp_5 = name.ml9();
        tmp_2 = tmp_5 === 'xmlns';
      }
      if (tmp_2) {
        tmp_1 = true;
      } else {
        var tmp_6;
        // Inline function 'kotlin.text.isEmpty' call
        // Inline function 'nl.adaptivity.xmlutil.prefix' call
        var this_2 = name.ml9();
        if (charSequenceLength(this_2) === 0) {
          // Inline function 'nl.adaptivity.xmlutil.localPart' call
          var tmp_7 = name.ll9();
          tmp_6 = tmp_7 === 'xmlns';
        } else {
          tmp_6 = false;
        }
        tmp_1 = tmp_6;
      }
      if (tmp_1) {
        return this.y48(descriptor);
      } else {
        var tmp_8;
        var tmp_9 = name.kl9();
        if (tmp_9 === 'http://www.w3.org/XML/1998/namespace') {
          // Inline function 'nl.adaptivity.xmlutil.localPart' call
          tmp_8 = name.ll9() === 'space';
        } else {
          tmp_8 = false;
        }
        if (tmp_8) {
          var tmp3_subject = this.nlf().dl6(this.alm_1);
          if (tmp3_subject === 'preserve')
            this.vll_1 = true;
          else if (tmp3_subject === 'default')
            this.vll_1 = this.glm_1.kln();
          var tmp4_safe_receiver = this.tll_1.q(name);
          var tmp_10;
          if (tmp4_safe_receiver == null) {
            tmp_10 = null;
          } else {
            // Inline function 'kotlin.also' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeElementIndex.<anonymous>' call
            this.yll_1[tmp4_safe_receiver] = true;
            tmp_10 = tmp4_safe_receiver;
          }
          var tmp5_elvis_lhs = tmp_10;
          return tmp5_elvis_lhs == null ? this.y48(descriptor) : tmp5_elvis_lhs;
        }
      }
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.markSeenOrHandleUnknown' call
      this.flm_1;
      var this_3 = this.jlp(name, InputKind_Attribute_getInstance());
      var tmp_11;
      if (this_3 === -3) {
        // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeElementIndex.<anonymous>' call
        tmp_11 = this.y48(descriptor);
      } else {
        this.yll_1[this_3] = true;
        tmp_11 = this_3;
      }
      return tmp_11;
    }
    this.alm_1 = IntCompanionObject_instance.MIN_VALUE;
    // Inline function 'kotlin.collections.iterator' call
    var tmp6_iterator = this.nlf();
    while (tmp6_iterator.f()) {
      var eventType = tmp6_iterator.e();
      switch (eventType.za_1) {
        case 2:
          return this.mlp(descriptor);
        case 0:
        case 3:
        case 6:
        case 11:
          break;
        case 8:
        case 5:
        case 9:
        case 4:
          var valueChild = getValueChild_0(descriptor);
          if (this.nlf().hlb()) {
            var tmp_12;
            if (!(valueChild === -3)) {
              tmp_12 = this.vll_1;
            } else {
              tmp_12 = false;
            }
            if (tmp_12) {
              var valueKind = this.glm_1.k46(valueChild).i46();
              if (equals(valueKind, LIST_getInstance()) ? true : equals(valueKind, STRING_getInstance())) {
                this.yll_1[valueChild] = true;
                return valueChild;
              }
            }
          } else if (!this.nlf().hlb()) {
            // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.markSeenOrHandleUnknown' call
            this.flm_1;
            var tmp_13;
            if (valueChild === -3) {
              // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeElementIndex.<anonymous>' call
              // Inline function 'kotlin.let' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeElementIndex.<anonymous>.<anonymous>' call
              var it = this.j39().olh_1.ulp(this.nlf(), InputKind_Text_getInstance(), this.glm_1, QName_init_$Create$('<CDATA>'), emptyList());
              this.dlm_1.m1(it);
              tmp_13 = this.y48(descriptor);
            } else {
              this.yll_1[valueChild] = true;
              tmp_13 = valueChild;
            }
            return tmp_13;
          }

          break;
        case 10:
          // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.markSeenOrHandleUnknown' call

          this.flm_1;
          var this_4 = this.jlp(this.nlf().dc(), InputKind_Attribute_getInstance());
          var tmp_14;
          if (this_4 === -3) {
            // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeElementIndex.<anonymous>' call
            tmp_14 = this.y48(descriptor);
          } else {
            this.yll_1[this_4] = true;
            tmp_14 = this_4;
          }

          return tmp_14;
        case 1:
          var i = this.jlp(this.nlf().dc(), InputKind_Element_getInstance());
          if (i === -3) {
            // Inline function 'kotlin.collections.isNotEmpty' call
            if (!this.dlm_1.c1()) {
              return this.dlm_1.gf().qlp_1;
            }
            elementContentToFragment(this.nlf());
          } else {
            // Inline function 'kotlin.also' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeElementIndex.<anonymous>' call
            this.yll_1[i] = true;
            return i;
          }

          break;
        case 7:
          throw new XmlSerialException('End document in unexpected location');
      }
    }
    return -1;
  };
  protoOf(TagDecoderBase).j48 = function (descriptor) {
    if (!this.elm_1) {
      var index = this.y48(descriptor);
      if (!(index === -1))
        throw new XmlSerialException('Unexpected content in end structure');
    }
    if (this.qll_1 == null) {
      this.nlf().flb(EventType_END_ELEMENT_getInstance(), this.q45());
    } else {
      this.nlf().flb(EventType_END_ELEMENT_getInstance(), null);
    }
  };
  protoOf(TagDecoderBase).mlp = function (desc) {
    nextNulledItemsIdx(this);
    var tmp;
    if (this.zll_1 < this.yll_1.length) {
      tmp = this.zll_1;
    } else {
      tmp = -1;
    }
    return tmp;
  };
  protoOf(TagDecoderBase).nlp = function (lastAttrIndex) {
    return this.nlf().dl6(this.alm_1);
  };
  protoOf(TagDecoderBase).s48 = function (descriptor, index) {
    // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.handleRecovery' call
    this.flm_1;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.dlm_1.c1()) {
      var d = this.dlm_1.kf();
      if (!(d.qlp_1 === index)) {
        throw IllegalStateException_init_$Create$('Recovery state is inconsistent');
      }
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeStringElement.<anonymous>' call
      var tmp = d.rlp_1;
      return (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE();
    }
    var childDesc = this.glm_1.k46(index);
    this.yll_1[index] = true;
    var isAttribute = this.alm_1 >= 0;
    if (isAttribute) {
      var a = this.nlp(this.alm_1);
      if (this.glm_1.k46(index).elo()) {
        this.slk(a);
      }
      return a;
    } else if (this.zll_1 >= 0) {
      var tmp0_safe_receiver = childDesc instanceof XmlValueDescriptor ? childDesc : null;
      var default_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.plm_1;
      var tmp_0;
      if (!(default_0 == null)) {
        tmp_0 = default_0;
      } else if (index === getValueChild(this.glm_1)) {
        tmp_0 = '';
      } else {
        throw new XmlSerialException('Missing child ' + descriptor.m46(index) + ':' + index);
      }
      return tmp_0;
    }
    var tmp_1;
    switch (childDesc.olg().za_1) {
      case 4:
        throw new XmlSerialException('Inline elements can not be directly decoded');
      case 0:
        tmp_1 = readSimpleElement(this.nlf());
        break;
      case 3:
      case 2:
        // Inline function 'kotlin.also' call

        var this_0 = allConsecutiveTextContent(this.nlf());
        // Inline function 'kotlin.contracts.contract' call

        // Inline function 'nl.adaptivity.xmlutil.serialization.TagDecoderBase.decodeStringElement.<anonymous>' call

        var peek = this.nlf().alb();
        if (!(peek instanceof EndElementEvent)) {
          throw new XmlSerialException('Missing end tag after text only content (found: ' + peek + ')');
        } else {
          // Inline function 'nl.adaptivity.xmlutil.localPart' call
          var tmp$ret$1 = this.q45().ll9();
          if (!(peek.dlc_1 === tmp$ret$1)) {
            // Inline function 'nl.adaptivity.xmlutil.localPart' call
            var tmp$ret$2 = this.q45().ll9();
            throw new XmlSerialException('Expected end tag local name ' + tmp$ret$2 + ', found ' + peek.dlc_1);
          }
        }

        tmp_1 = this_0;
        break;
      case 1:
        var message = 'Attributes should already be read now';
        throw IllegalStateException_init_$Create$(toString(message));
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp_1;
  };
  protoOf(TagDecoderBase).n48 = function (descriptor, index) {
    return toInt(this.s48(descriptor, index));
  };
  protoOf(TagDecoderBase).k48 = function (descriptor, index) {
    return toBoolean(this.s48(descriptor, index));
  };
  protoOf(TagDecoderBase).l48 = function (descriptor, index) {
    return toByte(this.s48(descriptor, index));
  };
  protoOf(TagDecoderBase).m48 = function (descriptor, index) {
    return toShort(this.s48(descriptor, index));
  };
  protoOf(TagDecoderBase).o48 = function (descriptor, index) {
    return toLong(this.s48(descriptor, index));
  };
  protoOf(TagDecoderBase).p48 = function (descriptor, index) {
    // Inline function 'kotlin.text.toFloat' call
    var this_0 = this.s48(descriptor, index);
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return toDouble(this_0);
  };
  protoOf(TagDecoderBase).q48 = function (descriptor, index) {
    return toDouble(this.s48(descriptor, index));
  };
  protoOf(TagDecoderBase).r48 = function (descriptor, index) {
    return single_0(this.s48(descriptor, index));
  };
  protoOf(TagDecoderBase).dlo = function (attrName) {
    this.sll_1.i1(attrName);
  };
  function AttributeMapDecoder($outer, xmlDescriptor, attrIndex) {
    this.ilr_1 = $outer;
    TagDecoderBase.call(this, $outer, xmlDescriptor, null);
    this.flr_1 = attrIndex;
    this.glr_1 = -1;
    this.hlr_1 = 0;
  }
  protoOf(AttributeMapDecoder).x48 = function () {
    return true;
  };
  protoOf(AttributeMapDecoder).z48 = function (descriptor) {
    return 1;
  };
  protoOf(AttributeMapDecoder).y48 = function (descriptor) {
    var tmp;
    switch (this.hlr_1) {
      case 0:
      case 1:
        var tmp2 = this.hlr_1;
        this.hlr_1 = tmp2 + 1 | 0;
        tmp = tmp2;
        break;
      default:
        tmp = -1;
        break;
    }
    return tmp;
  };
  protoOf(AttributeMapDecoder).u48 = function (descriptor, index, deserializer, previousValue) {
    if (this.glr_1 < 0)
      this.glr_1 = index;
    var fixedIndex = (index - this.glr_1 | 0) % 2 | 0;
    var effectiveDeserializer = this.glm_1.k46(fixedIndex).lln(deserializer);
    if (fixedIndex === 0) {
      if (equals(effectiveDeserializer, XmlQNameSerializer_getInstance())) {
        var tmp = this.nlf().glb(this.flr_1);
        return !(tmp == null) ? tmp : THROW_CCE();
      }
    }
    return effectiveDeserializer.s44(new StringDecoder(this.ilr_1, this.glm_1.ulr(), xmlCollapseWhitespace(this.nlf().dl6(this.flr_1))));
  };
  protoOf(AttributeMapDecoder).s48 = function (descriptor, index) {
    var tmp;
    if ((index % 2 | 0) === 0) {
      var name = this.nlf().glb(this.flr_1);
      var tmp_0;
      var tmp_1;
      // Inline function 'kotlin.text.isEmpty' call
      // Inline function 'nl.adaptivity.xmlutil.prefix' call
      var this_0 = name.ml9();
      if (charSequenceLength(this_0) === 0) {
        tmp_1 = true;
      } else {
        // Inline function 'kotlin.text.isEmpty' call
        // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
        var this_1 = name.kl9();
        tmp_1 = charSequenceLength(this_1) === 0;
      }
      if (tmp_1) {
        // Inline function 'nl.adaptivity.xmlutil.localPart' call
        tmp_0 = name.ll9();
      } else {
        throw new XmlSerialException('A QName in a namespace cannot be converted to a string');
      }
      tmp = tmp_0;
    } else {
      tmp = this.nlf().dl6(this.flr_1);
    }
    return tmp;
  };
  protoOf(AttributeMapDecoder).j48 = function (descriptor) {
  };
  protoOf(AttributeMapDecoder).i48 = function (descriptor) {
    return this;
  };
  protoOf(AttributeMapDecoder).v47 = function () {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  protoOf(AttributeMapDecoder).w47 = function () {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  protoOf(AttributeMapDecoder).c48 = function () {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  protoOf(AttributeMapDecoder).b48 = function () {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  protoOf(AttributeMapDecoder).e48 = function (enumDescriptor) {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  protoOf(AttributeMapDecoder).a48 = function () {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  protoOf(AttributeMapDecoder).f48 = function (descriptor) {
    return this;
  };
  protoOf(AttributeMapDecoder).y47 = function () {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  protoOf(AttributeMapDecoder).z47 = function () {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  protoOf(AttributeMapDecoder).t47 = function () {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  protoOf(AttributeMapDecoder).u47 = function () {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  protoOf(AttributeMapDecoder).x47 = function () {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  protoOf(AttributeMapDecoder).d48 = function () {
    throw UnsupportedOperationException_init_$Create$('Expect map structure');
  };
  function AttributeListDecoder($outer, xmlDescriptor, attrIndex) {
    this.pls_1 = $outer;
    TagDecoderBase.call(this, $outer, xmlDescriptor, null);
    this.nls_1 = 0;
    this.ols_1 = split(xmlCollapseWhitespace(this.nlf().dl6(attrIndex)), xmlDescriptor.yls_1.slice());
  }
  protoOf(AttributeListDecoder).x48 = function () {
    return true;
  };
  protoOf(AttributeListDecoder).z48 = function (descriptor) {
    return this.ols_1.u();
  };
  protoOf(AttributeListDecoder).u48 = function (descriptor, index, deserializer, previousValue) {
    var tmp = this.glm_1.k46(index);
    var tmp1 = this.nls_1;
    this.nls_1 = tmp1 + 1 | 0;
    var decoder = new StringDecoder(this.pls_1, tmp, this.ols_1.v(tmp1));
    return decoder.h48(deserializer);
  };
  protoOf(AttributeListDecoder).s48 = function (descriptor, index) {
    var tmp1 = this.nls_1;
    this.nls_1 = tmp1 + 1 | 0;
    return this.ols_1.v(tmp1);
  };
  protoOf(AttributeListDecoder).j48 = function (descriptor) {
  };
  function AnonymousListDecoder($outer, xmlDescriptor, polyInfo, typeDiscriminatorName) {
    this.vlt_1 = $outer;
    TagDecoderBase.call(this, $outer, xmlDescriptor, typeDiscriminatorName);
    this.slt_1 = polyInfo;
    var tmp = this;
    var tmp$ret$2;
    $l$block_0: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = until(0, _get_parentXmlDescriptor__yo818r(this).g46()).w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'nl.adaptivity.xmlutil.serialization.AnonymousListDecoder.listChildIdx.<anonymous>' call
        var tmp$ret$0;
        $l$block: {
          // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
          var tmp0_iterator_0 = _get_parentXmlDescriptor__yo818r(this).qlk().j46(element).w();
          while (tmp0_iterator_0.f()) {
            var e = tmp0_iterator_0.e();
            if (e instanceof XmlValue) {
              tmp$ret$0 = e;
              break $l$block;
            }
          }
          tmp$ret$0 = null;
        }
        var tmp0_safe_receiver = tmp$ret$0;
        if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wlt_1) === true) {
          tmp$ret$2 = element;
          break $l$block_0;
        }
      }
      tmp$ret$2 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$2;
    tmp.tlt_1 = tmp0_elvis_lhs == null ? -1 : tmp0_elvis_lhs;
    this.ult_1 = false;
  }
  protoOf(AnonymousListDecoder).y48 = function (descriptor) {
    var tmp;
    if (this.ult_1) {
      tmp = -1;
    } else {
      this.ult_1 = true;
      tmp = 0;
    }
    return tmp;
  };
  protoOf(AnonymousListDecoder).u48 = function (descriptor, index, deserializer, previousValue) {
    var childXmlDescriptor = this.glm_1.k46(0);
    var effectiveDeserializer = childXmlDescriptor.lln(deserializer);
    var tmp;
    if (equals(isInterface(effectiveDeserializer, DeserializationStrategy) ? effectiveDeserializer : THROW_CCE(), CompactFragmentSerializer_getInstance())) {
      tmp = getValueChild(_get_parentXmlDescriptor__yo818r(this)) === this.tlt_1;
    } else {
      tmp = false;
    }
    if (tmp) {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.AnonymousListDecoder.decodeSerializableElement.<anonymous>' call
      var it = elementToFragment(this.nlf());
      var tmp0_elvis_lhs = it instanceof CompactFragment ? it : null;
      var tmp_0 = tmp0_elvis_lhs == null ? CompactFragment_init_$Create$_1(it) : tmp0_elvis_lhs;
      return !(tmp_0 == null) ? tmp_0 : THROW_CCE();
    }
    var decoder = new SerialValueDecoder(this.vlt_1, childXmlDescriptor, this.slt_1, IntCompanionObject_instance.MIN_VALUE, this.qll_1);
    var result = deserializer.s44(decoder);
    var tmp0_safe_receiver = decoder instanceof SerialValueDecoder ? decoder : null;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vln_1;
    var tagId = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.tlk();
    if (!(tagId == null)) {
      // Inline function 'kotlin.checkNotNull' call
      // Inline function 'kotlin.contracts.contract' call
      $l$block: {
        // Inline function 'kotlin.checkNotNull' call
        // Inline function 'kotlin.contracts.contract' call
        if (result == null) {
          // Inline function 'kotlin.checkNotNull.<anonymous>' call
          var message = 'Required value was null.';
          throw IllegalStateException_init_$Create$(toString(message));
        } else {
          break $l$block;
        }
      }
      if (!(this.vlt_1.bln_1.s(tagId, result) == null))
        throw XmlException_init_$Create$('Duplicate use of id ' + tagId);
    }
    return result;
  };
  protoOf(AnonymousListDecoder).j48 = function (descriptor) {
  };
  protoOf(AnonymousListDecoder).z48 = function (descriptor) {
    return 1;
  };
  function NamedListDecoder($outer, xmlDescriptor, typeDiscriminatorName) {
    this.qlu_1 = $outer;
    TagDecoderBase.call(this, $outer, xmlDescriptor, typeDiscriminatorName);
    this.plu_1 = 0;
  }
  protoOf(NamedListDecoder).y48 = function (descriptor) {
    this.elm_1 = true;
    var tmp;
    if (this.nlf().clb().za_1 === 2) {
      tmp = -1;
    } else {
      var tmp2 = this.plu_1;
      this.plu_1 = tmp2 + 1 | 0;
      tmp = tmp2;
    }
    return tmp;
  };
  protoOf(NamedListDecoder).u48 = function (descriptor, index, deserializer, previousValue) {
    var childXmlDescriptor = this.glm_1.k46(0);
    var decoder = new SerialValueDecoder(this.qlu_1, childXmlDescriptor, this.blm_1, this.alm_1, null);
    var tmp;
    if (deserializer instanceof AbstractCollectionSerializer) {
      tmp = deserializer.a4c(decoder, previousValue);
    } else {
      tmp = deserializer.s44(decoder);
    }
    var result = tmp;
    var tmp1_safe_receiver = decoder instanceof SerialValueDecoder ? decoder : null;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vln_1;
    var tagId = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.tlk();
    if (!(tagId == null)) {
      // Inline function 'kotlin.checkNotNull' call
      // Inline function 'kotlin.contracts.contract' call
      $l$block: {
        // Inline function 'kotlin.checkNotNull' call
        // Inline function 'kotlin.contracts.contract' call
        if (result == null) {
          // Inline function 'kotlin.checkNotNull.<anonymous>' call
          var message = 'Required value was null.';
          throw IllegalStateException_init_$Create$(toString(message));
        } else {
          break $l$block;
        }
      }
      if (!(this.qlu_1.bln_1.s(tagId, result) == null))
        throw XmlException_init_$Create$('Duplicate use of id ' + tagId);
    }
    return result;
  };
  function MapDecoderBase($outer, xmlDescriptor, polyInfo, typeDiscriminatorName) {
    this.llv_1 = $outer;
    TagDecoderBase.call(this, $outer, xmlDescriptor, typeDiscriminatorName);
    this.jlv_1 = polyInfo;
    this.klv_1 = -1;
  }
  protoOf(MapDecoderBase).u48 = function (descriptor, index, deserializer, previousValue) {
    this.klv_1 = index;
    var keyDescriptor = this.glm_1.k46(0);
    if ((index % 2 | 0) === 0) {
      if (keyDescriptor.hli().equals(OutputKind_Attribute_getInstance())) {
        var tmp0_elvis_lhs = this.nlf().elb(keyDescriptor.gli());
        var tmp;
        if (tmp0_elvis_lhs == null) {
          throw new XmlSerialException('Missing key attribute (' + keyDescriptor.gli() + ') on ' + this.nlf().dc() + '@' + this.nlf().vl5());
        } else {
          tmp = tmp0_elvis_lhs;
        }
        var key = tmp;
        return deserializer.s44(new StringDecoder(this.llv_1, keyDescriptor, key));
      } else {
        assert(!this.glm_1.nll());
        // Inline function 'kotlin.check' call
        // Inline function 'kotlin.contracts.contract' call
        if (!isEquivalent(this.nlf().dc(), keyDescriptor.gli())) {
          // Inline function 'nl.adaptivity.xmlutil.serialization.MapDecoderBase.decodeSerializableElement.<anonymous>' call
          var message = '' + this.nlf().dc() + ' != ' + this.glm_1.ulm();
          throw IllegalStateException_init_$Create$(toString(message));
        }
        return protoOf(TagDecoderBase).u48.call(this, descriptor, index % 2 | 0, deserializer, previousValue);
      }
    }
    var valueDescriptor = this.glm_1.k46(1);
    var decoder = new SerialValueDecoder(this.llv_1, valueDescriptor, this.jlv_1, IntCompanionObject_instance.MIN_VALUE, this.qll_1);
    if (this.glm_1.nll()) {
      decoder.dlo(keyDescriptor.gli());
    }
    var result = deserializer.s44(decoder);
    var tmp1_safe_receiver = decoder instanceof SerialValueDecoder ? decoder : null;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vln_1;
    var tagId = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.tlk();
    if (!(tagId == null)) {
      // Inline function 'kotlin.checkNotNull' call
      // Inline function 'kotlin.contracts.contract' call
      $l$block: {
        // Inline function 'kotlin.checkNotNull' call
        // Inline function 'kotlin.contracts.contract' call
        if (result == null) {
          // Inline function 'kotlin.checkNotNull.<anonymous>' call
          var message_0 = 'Required value was null.';
          throw IllegalStateException_init_$Create$(toString(message_0));
        } else {
          break $l$block;
        }
      }
      if (!(this.llv_1.bln_1.s(tagId, result) == null))
        throw XmlException_init_$Create$('Duplicate use of id ' + tagId);
    }
    return result;
  };
  function AnonymousMapDecoder($outer, xmlDescriptor, polyInfo, typeDiscriminatorName) {
    this.hlw_1 = $outer;
    MapDecoderBase.call(this, $outer, xmlDescriptor, polyInfo, typeDiscriminatorName);
  }
  protoOf(AnonymousMapDecoder).y48 = function (descriptor) {
    if (!this.glm_1.nll()) {
      if (this.klv_1 < 0) {
        // Inline function 'kotlin.check' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'kotlin.check' call
        // Inline function 'kotlin.contracts.contract' call
        if (!this.nlf().ul5().equals(EventType_START_ELEMENT_getInstance())) {
          // Inline function 'kotlin.check.<anonymous>' call
          var message = 'Check failed.';
          throw IllegalStateException_init_$Create$(toString(message));
        }
        if (!isEquivalent(this.glm_1.ulm(), this.nlf().dc()))
          throw new XmlSerialException('Map entry not found. Found ' + this.nlf().dc() + '@' + this.nlf().vl5() + ' instead');
      }
      if ((this.klv_1 % 2 | 0) === 0) {
        var tmp = isEquivalent(this.glm_1.ulm(), this.nlf().dc());
        assert_0(tmp, XmlDecoderBase$AnonymousMapDecoder$decodeElementIndex$lambda(this));
      }
      var rawIndex = protoOf(MapDecoderBase).y48.call(this, descriptor);
      if (rawIndex < 0)
        return rawIndex;
      this.klv_1 = (this.klv_1 - (this.klv_1 % 2 | 0) | 0) + (rawIndex % 2 | 0) | 0;
      return this.klv_1;
    } else {
      var tmp_0;
      if (this.klv_1 >= 0 ? (this.klv_1 % 2 | 0) === 1 : false) {
        tmp_0 = -1;
      } else {
        this.klv_1 = this.klv_1 + 1 | 0;
        tmp_0 = this.klv_1;
      }
      return tmp_0;
    }
  };
  protoOf(AnonymousMapDecoder).j48 = function (descriptor) {
    if (!this.glm_1.nll()) {
      // Inline function 'kotlin.check' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.check' call
      // Inline function 'kotlin.contracts.contract' call
      if (!this.nlf().ul5().equals(EventType_END_ELEMENT_getInstance())) {
        // Inline function 'kotlin.check.<anonymous>' call
        var message = 'Check failed.';
        throw IllegalStateException_init_$Create$(toString(message));
      }
    }
    // Inline function 'kotlin.check' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.check' call
    // Inline function 'kotlin.contracts.contract' call
    if (!isEquivalent(this.nlf().dc(), this.glm_1.ulm())) {
      // Inline function 'kotlin.check.<anonymous>' call
      var message_0 = 'Check failed.';
      throw IllegalStateException_init_$Create$(toString(message_0));
    }
  };
  protoOf(AnonymousMapDecoder).z48 = function (descriptor) {
    return 2;
  };
  function NamedMapDecoder($outer, xmlDescriptor, polyInfo, typeDiscriminatorName) {
    this.dlx_1 = $outer;
    MapDecoderBase.call(this, $outer, xmlDescriptor, polyInfo, typeDiscriminatorName);
  }
  protoOf(NamedMapDecoder).klp = function (_this__u8e3s4) {
    return _this__u8e3s4;
  };
  protoOf(NamedMapDecoder).y48 = function (descriptor) {
    if (!this.glm_1.nll()) {
      var tmp;
      // Inline function 'kotlin.mod' call
      var r = this.klv_1 % 2 | 0;
      if ((r + (2 & ((r ^ 2) & (r | (-r | 0))) >> 31) | 0) === 1) {
        var tmp0_safe_receiver = this.nlf().alb();
        tmp = equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ul5(), EventType_START_ELEMENT_getInstance());
      } else {
        tmp = false;
      }
      if (tmp) {
        this.nlf().clb();
      }
      if (protoOf(MapDecoderBase).y48.call(this, descriptor) < 0) {
        return -1;
      }
    } else {
      var tmp_0;
      // Inline function 'kotlin.mod' call
      var r_0 = this.klv_1 % 2 | 0;
      if ((r_0 + (2 & ((r_0 ^ 2) & (r_0 | (-r_0 | 0))) >> 31) | 0) === 1) {
        tmp_0 = protoOf(MapDecoderBase).y48.call(this, descriptor) < 0;
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        return -1;
      }
    }
    this.klv_1 = this.klv_1 + 1 | 0;
    return this.klv_1;
  };
  protoOf(NamedMapDecoder).u48 = function (descriptor, index, deserializer, previousValue) {
    // Inline function 'kotlin.also' call
    var this_0 = protoOf(MapDecoderBase).u48.call(this, descriptor, index, deserializer, previousValue);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.NamedMapDecoder.decodeSerializableElement.<anonymous>' call
    if ((index % 2 | 0) === 1 ? !this.glm_1.nll() : false) {
      // Inline function 'kotlin.check' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.check' call
      // Inline function 'kotlin.contracts.contract' call
      if (!this.nlf().clb().equals(EventType_END_ELEMENT_getInstance())) {
        // Inline function 'kotlin.check.<anonymous>' call
        var message = 'Check failed.';
        throw IllegalStateException_init_$Create$(toString(message));
      }
      assert(isEquivalent(this.glm_1.ulm(), this.nlf().dc()));
    }
    return this_0;
  };
  protoOf(NamedMapDecoder).j48 = function (descriptor) {
    assert(isEquivalent(this.glm_1.gli(), this.nlf().dc()));
    protoOf(MapDecoderBase).j48.call(this, descriptor);
  };
  protoOf(NamedMapDecoder).z48 = function (descriptor) {
    return -1;
  };
  function PolymorphicDecoder($outer, xmlDescriptor, polyInfo) {
    this.aly_1 = $outer;
    TagDecoderBase.call(this, $outer, xmlDescriptor, null);
    this.wlx_1 = polyInfo;
    this.xlx_1 = 0;
    this.ylx_1 = null;
    this.zlx_1 = null;
  }
  protoOf(PolymorphicDecoder).y48 = function (descriptor) {
    var polyMode = this.glm_1.sli_1;
    if (equals(polyMode, TRANSPARENT_getInstance())) {
      var tmp;
      switch (this.xlx_1) {
        case 0:
        case 1:
          var tmp2 = this.xlx_1;
          this.xlx_1 = tmp2 + 1 | 0;
          tmp = tmp2;
          break;
        default:
          tmp = -1;
          break;
      }
      return tmp;
    } else {
      if (!(this.ylx_1 == null)) {
        var tmp_0;
        if (this.xlx_1 === 1) {
          tmp_0 = 1;
        } else {
          tmp_0 = -1;
        }
        return tmp_0;
      }
      if (this.xlx_1 === 0) {
        var inductionVariable = 0;
        var last = this.wll_1;
        if (inductionVariable < last)
          do {
            var i = inductionVariable;
            inductionVariable = inductionVariable + 1 | 0;
            var attrName = this.nlf().glb(i);
            var tmp_1;
            var tmp_2;
            // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
            var tmp_3 = attrName.kl9();
            if (tmp_3 === 'http://www.w3.org/2001/XMLSchema-instance') {
              // Inline function 'nl.adaptivity.xmlutil.localPart' call
              tmp_2 = attrName.ll9() === 'type';
            } else {
              tmp_2 = false;
            }
            if (tmp_2) {
              tmp_1 = true;
            } else {
              var tmp5_safe_receiver = polyMode instanceof ATTR ? polyMode : null;
              tmp_1 = attrName.equals(tmp5_safe_receiver == null ? null : tmp5_safe_receiver.bly_1);
            }
            if (tmp_1) {
              var sdec = new StringDecoder(this.aly_1, this.glm_1.k46(0), this.nlf().dl6(i));
              var typeQName_0 = XmlQNameSerializer_getInstance().s44(sdec);
              // Inline function 'kotlin.collections.map' call
              var this_0 = this.glm_1.tli_1;
              // Inline function 'kotlin.collections.mapTo' call
              var destination = ArrayList_init_$Create$_0(this_0.u());
              // Inline function 'kotlin.collections.iterator' call
              var tmp0_iterator = this_0.q2().w();
              while (tmp0_iterator.f()) {
                var item = tmp0_iterator.e();
                // Inline function 'nl.adaptivity.xmlutil.serialization.PolymorphicDecoder.decodeElementIndex.<anonymous>' call
                // Inline function 'kotlin.collections.component1' call
                var childSerialName = item.s2();
                // Inline function 'kotlin.collections.component2' call
                var childDesc = item.t2();
                var tmp$ret$5 = to(childSerialName, typeQName(this.j39().olh_1, childDesc));
                destination.i1(tmp$ret$5);
              }
              var childQnames = destination;
              var tmp_4 = this;
              var tmp$ret$9;
              $l$block: {
                // Inline function 'kotlin.collections.firstOrNull' call
                var tmp0_iterator_0 = childQnames.w();
                while (tmp0_iterator_0.f()) {
                  var element = tmp0_iterator_0.e();
                  // Inline function 'nl.adaptivity.xmlutil.serialization.PolymorphicDecoder.decodeElementIndex.<anonymous>' call
                  if (element.x6_1.equals(typeQName_0)) {
                    tmp$ret$9 = element;
                    break $l$block;
                  }
                }
                tmp$ret$9 = null;
              }
              var tmp6_safe_receiver = tmp$ret$9;
              var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.w6_1;
              var tmp_5;
              if (tmp7_elvis_lhs == null) {
                throw new XmlSerialException('Could not find child for type with qName: ' + typeQName_0 + '. Candidates are: ' + joinToString(childQnames));
              } else {
                tmp_5 = tmp7_elvis_lhs;
              }
              tmp_4.ylx_1 = tmp_5;
              this.zlx_1 = attrName;
              this.xlx_1 = 1;
              return 0;
            }
          }
           while (inductionVariable < last);
      }
      // Inline function 'kotlin.also' call
      var this_1 = protoOf(TagDecoderBase).y48.call(this, descriptor);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.PolymorphicDecoder.decodeElementIndex.<anonymous>' call
      this.xlx_1 = this_1 + 1 | 0;
      return this_1;
    }
  };
  protoOf(PolymorphicDecoder).s48 = function (descriptor, index) {
    var isMixed = this.glm_1.rli_1.equals(OutputKind_Mixed_getInstance());
    var tmp;
    if (index === 0) {
      var tmp_0;
      if (!(this.ylx_1 == null)) {
        tmp_0 = ensureNotNull(this.ylx_1);
      } else if (!this.glm_1.plp()) {
        var typeTag = this.glm_1.k46(0).gli();
        var tmp_1 = this.nlf();
        // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
        var tmp_2 = typeTag.kl9();
        // Inline function 'nl.adaptivity.xmlutil.localPart' call
        var tmp$ret$1 = typeTag.ll9();
        var tmp1_safe_receiver = tmp_1.m7d(tmp_2, tmp$ret$1);
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : Companion_instance_1.dly(tmp1_safe_receiver, this.glm_1.uli_1);
        var tmp_3;
        if (tmp2_elvis_lhs == null) {
          throw new XmlParsingException(this.nlf().vl5(), 'Missing type for polymorphic value');
        } else {
          tmp_3 = tmp2_elvis_lhs;
        }
        tmp_0 = tmp_3;
      } else if (isMixed ? (this.nlf().ul5().equals(EventType_TEXT_getInstance()) ? true : this.nlf().ul5().equals(EventType_IGNORABLE_WHITESPACE_getInstance())) ? true : this.nlf().ul5().equals(EventType_CDSECT_getInstance()) : false) {
        tmp_0 = 'kotlin.String';
      } else if (this.wlx_1 == null) {
        var message = 'PolyInfo is null for a transparent polymorphic decoder';
        throw IllegalStateException_init_$Create$(toString(message));
      } else {
        tmp_0 = this.wlx_1.ylg();
      }
      tmp = tmp_0;
    } else {
      var tmp_4;
      if (!this.glm_1.plp()) {
        throw new XmlSerialException('NonTransparent polymorphic values cannot have text content only');
      } else if (isMixed) {
        tmp_4 = allConsecutiveTextContent(this.nlf());
      } else {
        tmp_4 = protoOf(TagDecoderBase).s48.call(this, descriptor, index);
      }
      tmp = tmp_4;
    }
    return tmp;
  };
  protoOf(PolymorphicDecoder).ilp = function (desc, index, deserializer) {
    var tmp0_safe_receiver = this.wlx_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tlm_1;
    var childXmlDescriptor = tmp1_elvis_lhs == null ? this.glm_1.ely(deserializer.q44().q45()) : tmp1_elvis_lhs;
    return new SerialValueDecoder(this.aly_1, childXmlDescriptor, this.blm_1, this.alm_1, this.zlx_1);
  };
  protoOf(PolymorphicDecoder).u48 = function (descriptor, index, deserializer, previousValue) {
    var tmp0_safe_receiver = this.ylx_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      var childXmlDescriptor = this.glm_1.ely(tmp0_safe_receiver);
      var decoder = new SerialValueDecoder(this.aly_1, childXmlDescriptor, this.blm_1, this.alm_1, this.zlx_1);
      this.xlx_1 = 2;
      var result = deserializer.s44(decoder);
      var tmp0_safe_receiver_0 = decoder instanceof SerialValueDecoder ? decoder : null;
      var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.vln_1;
      var tagId = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.tlk();
      if (!(tagId == null)) {
        // Inline function 'kotlin.checkNotNull' call
        // Inline function 'kotlin.contracts.contract' call
        $l$block: {
          // Inline function 'kotlin.checkNotNull' call
          // Inline function 'kotlin.contracts.contract' call
          if (result == null) {
            // Inline function 'kotlin.checkNotNull.<anonymous>' call
            var message = 'Required value was null.';
            throw IllegalStateException_init_$Create$(toString(message));
          } else {
            break $l$block;
          }
        }
        if (!(this.aly_1.bln_1.s(tagId, result) == null))
          throw XmlException_init_$Create$('Duplicate use of id ' + tagId);
      }
      return result;
    }
    if (!this.glm_1.plp()) {
      this.nlf().el6(EventType_START_ELEMENT_getInstance(), null, 'value');
      return protoOf(TagDecoderBase).u48.call(this, descriptor, index, deserializer, previousValue);
    }
    var isMixed = this.glm_1.rli_1.equals(OutputKind_Mixed_getInstance());
    var tmp;
    var tmp_0;
    if (isMixed) {
      var tmp_1 = deserializer.q44().i46();
      tmp_0 = tmp_1 instanceof PrimitiveKind;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      var childXmlDescriptor_0 = this.glm_1.ely(deserializer.q44().q45());
      tmp = deserializer.s44(new XmlDecoder(this.aly_1, childXmlDescriptor_0));
    } else {
      tmp = protoOf(TagDecoderBase).u48.call(this, descriptor, index, deserializer, previousValue);
    }
    return tmp;
  };
  protoOf(PolymorphicDecoder).j48 = function (descriptor) {
    if (!this.glm_1.plp()) {
      var tmp = this.nlf();
      var tmp_0 = EventType_END_ELEMENT_getInstance();
      // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
      var tmp_1 = this.q45().kl9();
      // Inline function 'nl.adaptivity.xmlutil.localPart' call
      var tmp$ret$1 = this.q45().ll9();
      tmp.el6(tmp_0, tmp_1, tmp$ret$1);
    } else {
      var isMixed = this.glm_1.rli_1.equals(OutputKind_Mixed_getInstance());
      if (!isMixed ? true : !this.glm_1.plp()) {
        var tmp0_safe_receiver = this.wlx_1;
        var t = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rlm_1;
        if (!(t == null)) {
          var tmp_2 = this.nlf();
          var tmp_3 = EventType_END_ELEMENT_getInstance();
          // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
          var tmp_4 = t.kl9();
          // Inline function 'nl.adaptivity.xmlutil.localPart' call
          var tmp$ret$3 = t.ll9();
          tmp_2.el6(tmp_3, tmp_4, tmp$ret$3);
        } else {
          protoOf(TagDecoderBase).j48.call(this, descriptor);
        }
      }
    }
  };
  function XmlDecoderBase(context, config, input) {
    XmlCodecBase.call(this, context, config);
    this.aln_1 = new XmlBufferedReader(input);
    var tmp = this;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp.bln_1 = LinkedHashMap_init_$Create$();
  }
  protoOf(XmlDecoderBase).jln = function () {
    if (this.aln_1.ul5().equals(EventType_START_ELEMENT_getInstance())) {
      var tmp$ret$0;
      $l$block_0: {
        // Inline function 'kotlin.collections.any' call
        var this_0 = until(0, this.aln_1.tl5());
        var tmp;
        if (isInterface(this_0, Collection)) {
          tmp = this_0.c1();
        } else {
          tmp = false;
        }
        if (tmp) {
          tmp$ret$0 = false;
          break $l$block_0;
        }
        var tmp0_iterator = this_0.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'nl.adaptivity.xmlutil.serialization.XmlDecoderBase.hasNullMark.<anonymous>' call
          var tmp_0;
          var tmp_1;
          var tmp_2;
          var tmp_3 = this.aln_1.al6(element);
          if (tmp_3 === 'http://www.w3.org/2001/XMLSchema-instance') {
            tmp_2 = this.aln_1.cl6(element) === 'nil';
          } else {
            tmp_2 = false;
          }
          if (tmp_2) {
            tmp_1 = this.aln_1.dl6(element) === 'true';
          } else {
            tmp_1 = false;
          }
          if (tmp_1) {
            tmp_0 = true;
          } else {
            var tmp_4;
            var tmp_5 = this.aln_1.glb(element);
            var tmp0_safe_receiver = this.alh_1.plh_1;
            if (tmp_5.equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w6_1)) {
              tmp_4 = this.aln_1.dl6(element) === this.alh_1.plh_1.x6_1;
            } else {
              tmp_4 = false;
            }
            tmp_0 = tmp_4;
          }
          if (tmp_0) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
        tmp$ret$0 = false;
      }
      var hasNilAttr = tmp$ret$0;
      if (hasNilAttr)
        return true;
    }
    return false;
  };
  function PolyInfo(tagName, index, descriptor) {
    this.rlm_1 = tagName;
    this.slm_1 = index;
    this.tlm_1 = descriptor;
  }
  protoOf(PolyInfo).ylg = function () {
    return this.tlm_1.qlk().q45();
  };
  protoOf(PolyInfo).toString = function () {
    return 'PolyInfo(tagName=' + this.rlm_1 + ', index=' + this.slm_1 + ', descriptor=' + this.tlm_1 + ')';
  };
  protoOf(PolyInfo).hashCode = function () {
    var result = this.rlm_1.hashCode();
    result = imul(result, 31) + this.slm_1 | 0;
    result = imul(result, 31) + this.tlm_1.hashCode() | 0;
    return result;
  };
  protoOf(PolyInfo).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PolyInfo))
      return false;
    var tmp0_other_with_cast = other instanceof PolyInfo ? other : THROW_CCE();
    if (!this.rlm_1.equals(tmp0_other_with_cast.rlm_1))
      return false;
    if (!(this.slm_1 === tmp0_other_with_cast.slm_1))
      return false;
    if (!this.tlm_1.equals(tmp0_other_with_cast.tlm_1))
      return false;
    return true;
  };
  function encodeQName($this, value) {
    var effectiveQName = $this.ylh(value, false);
    XmlQNameSerializer_getInstance().gl9($this, effectiveQName);
  }
  function writeDiscriminatorAttributeIfNeeded($this) {
    if (!($this.hly_1 == null)) {
      var typeName = $this.ylh(typeQName($this.j39().olh_1, $this.glm_1), true);
      smartWriteAttribute($this.lly_1, $this.hly_1, toCName(typeName));
    }
  }
  function encodeQName_0($this, elementDescriptor, index, value) {
    var effectiveQName = $this.ylh(value, false);
    var encoder = new XmlEncoder($this.lly_1, elementDescriptor, index);
    $this.mly(index, XmlEncoderBase$TagEncoder$encodeQName$lambda(encoder, effectiveQName));
  }
  function sam$kotlin_Comparator$0_0(function_0) {
    this.nly_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_0).pa = function (a, b) {
    return this.nly_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
    return this.pa(a, b);
  };
  function XmlEncoderBase$TagEncoder$encodeSerializableElement$lambda($value) {
    return function ($this$defer) {
      var tmp = CompactFragmentSerializer_getInstance();
      tmp.qlf($this$defer, (!($value == null) ? isInterface($value, ICompactFragment) : false) ? $value : THROW_CCE());
      return Unit_instance;
    };
  }
  function XmlEncoderBase$TagEncoder$encodeSerializableElement$lambda_0($effectiveSerializer, $encoder, $value) {
    return function ($this$defer) {
      $effectiveSerializer.r44($encoder, $value);
      return Unit_instance;
    };
  }
  function XmlEncoderBase$TagEncoder$encodeSerializableElement$lambda_1($effectiveSerializer, $encoder, $value) {
    return function ($this$defer) {
      $effectiveSerializer.r44($encoder, $value);
      return Unit_instance;
    };
  }
  function XmlEncoderBase$TagEncoder$encodeNullableSerializableElement$lambda($serializer, $encoder) {
    return function ($this$defer) {
      (isInterface($serializer, SerializationStrategy) ? $serializer : THROW_CCE()).r44($encoder, null);
      return Unit_instance;
    };
  }
  function XmlEncoderBase$TagEncoder$encodeNullableSerializableElement$lambda_0(this$0, $elemDescriptor, this$1, $nilAttr) {
    return function ($this$defer) {
      var this_0 = this$0.el7();
      var qName = $elemDescriptor.gli();
      var nsUri = qName.kl9();
      var localName = qName.ll9();
      var prefix = qName.ml9();
      smartStartTag(this_0, nsUri, localName, prefix);
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagEncoder.encodeNullableSerializableElement.<anonymous>.<anonymous>' call
      smartWriteAttribute(this$1, $nilAttr.w6_1, $nilAttr.x6_1);
      this_0.ol7(nsUri, localName, prefix);
      return Unit_instance;
    };
  }
  function XmlEncoderBase$TagEncoder$encodeQName$lambda($encoder, $effectiveQName) {
    return function ($this$defer) {
      XmlQNameSerializer_getInstance().gl9($encoder, $effectiveQName);
      return Unit_instance;
    };
  }
  function XmlEncoderBase$TagEncoder$encodeStringElement$lambda(this$0, $elementDescriptor, $value) {
    return function ($this$defer) {
      var this_0 = this$0.el7();
      var qName = $elementDescriptor.gli();
      var nsUri = qName.kl9();
      var localName = qName.ll9();
      var prefix = qName.ml9();
      smartStartTag(this_0, nsUri, localName, prefix);
      // Inline function 'nl.adaptivity.xmlutil.serialization.TagEncoder.encodeStringElement.<anonymous>.<anonymous>' call
      if (!$elementDescriptor.kln() ? isWhitespace(first($value)) ? true : isWhitespace(last($value)) : false) {
        var tmp = this$0.el7();
        tmp.kl7('http://www.w3.org/XML/1998/namespace', 'space', 'xml', 'preserve');
      }
      if ($elementDescriptor.oly()) {
        this$0.el7().il7($value);
      } else {
        this$0.el7().hl7($value);
      }
      this_0.ol7(nsUri, localName, prefix);
      return Unit_instance;
    };
  }
  function XmlEncoderBase$TagEncoder$encodeStringElement$lambda_0($elementDescriptor, this$0, $value) {
    return function ($this$defer) {
      var tmp;
      if ($elementDescriptor.oly()) {
        this$0.el7().il7($value);
        tmp = Unit_instance;
      } else {
        this$0.el7().hl7($value);
        tmp = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function XmlEncoderBase$TagEncoder$flushDeferred$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.TagEncoder.flushDeferred.<anonymous>' call
    var tmp = a.w6_1;
    // Inline function 'nl.adaptivity.xmlutil.serialization.TagEncoder.flushDeferred.<anonymous>' call
    var tmp$ret$1 = b.w6_1;
    return compareValues(tmp, tmp$ret$1);
  }
  function XmlEncoderBase$TagEncoder$doWriteAttribute$lambda(this$0, $actualAttrName, $value) {
    return function ($this$null) {
      smartWriteAttribute(this$0, $actualAttrName, $value);
      return Unit_instance;
    };
  }
  function _get_entryKey__gkoau6($this) {
    var tmp = $this.wly_1;
    if (!(tmp == null))
      return tmp;
    else {
      throwUninitializedPropertyAccessException('entryKey');
    }
  }
  function _get_parentXmlDescriptor__yo818r_0($this) {
    var tmp = $this.glm_1.ali_1.q44();
    return tmp instanceof XmlDescriptor ? tmp : THROW_CCE();
  }
  function _get_mapDescriptor__1b9wli($this) {
    var tmp = $this.glm_1;
    return tmp instanceof XmlMapDescriptor ? tmp : THROW_CCE();
  }
  function _get_keySerializer__nwm36o($this) {
    var tmp = $this.flz_1;
    if (!(tmp == null))
      return tmp;
    else {
      throwUninitializedPropertyAccessException('keySerializer');
    }
  }
  function XmlEncoderBase$MapEncoder$encodeSerializableElement$lambda(this$0, $valueDescriptor, this$1, $keyDescriptor, $effectiveSerializer, $value) {
    return function ($this$defer) {
      var this_0 = this$0.el7();
      var qName = $valueDescriptor.gli();
      var nsUri = qName.kl9();
      var localName = qName.ll9();
      var prefix = qName.ml9();
      smartStartTag(this_0, nsUri, localName, prefix);
      // Inline function 'nl.adaptivity.xmlutil.serialization.MapEncoder.encodeSerializableElement.<anonymous>.<anonymous>' call
      var keyEncoder = new PrimitiveEncoder(this$1, $this$defer.t45(), $keyDescriptor);
      var tmp = _get_keySerializer__nwm36o(this$0);
      keyEncoder.z49(isInterface(tmp, SerializationStrategy) ? tmp : THROW_CCE(), this$0.glz_1);
      var serializedKey = keyEncoder.klz_1.toString();
      smartWriteAttribute(this$1, $keyDescriptor.gli(), serializedKey);
      $effectiveSerializer.r44(new InlineEncoder(this$1, this$0, 1), $value);
      this_0.ol7(nsUri, localName, prefix);
      return Unit_instance;
    };
  }
  function XmlEncoder($outer, xmlDescriptor, elementIndex, discriminatorName) {
    discriminatorName = discriminatorName === VOID ? null : discriminatorName;
    this.klh_1 = $outer;
    XmlCodec.call(this, $outer, xmlDescriptor);
    this.ilh_1 = elementIndex;
    this.jlh_1 = discriminatorName;
  }
  protoOf(XmlEncoder).el7 = function () {
    return this.klh_1.olz_1;
  };
  protoOf(XmlEncoder).t45 = function () {
    return this.klh_1.zlg_1;
  };
  protoOf(XmlEncoder).j39 = function () {
    return this.klh_1.alh_1;
  };
  protoOf(XmlEncoder).ylh = function (qName, isAttr) {
    return ensureNamespace_1(this.klh_1, qName, isAttr);
  };
  protoOf(XmlEncoder).d49 = function (value) {
    return this.l49(value.toString());
  };
  protoOf(XmlEncoder).e49 = function (value) {
    var tmp;
    if (this.dln_1.fln() === true) {
      // Inline function 'kotlin.toUByte' call
      var tmp$ret$0 = _UByte___init__impl__g9hnc4(value);
      this.l49(UByte__toString_impl_v72jg(tmp$ret$0));
      tmp = Unit_instance;
    } else {
      this.l49(value.toString());
      tmp = Unit_instance;
    }
    return tmp;
  };
  protoOf(XmlEncoder).f49 = function (value) {
    var tmp;
    if (this.dln_1.fln() === true) {
      // Inline function 'kotlin.toUShort' call
      var tmp$ret$0 = _UShort___init__impl__jigrne(value);
      this.l49(UShort__toString_impl_edaoee(tmp$ret$0));
      tmp = Unit_instance;
    } else {
      this.l49(value.toString());
      tmp = Unit_instance;
    }
    return tmp;
  };
  protoOf(XmlEncoder).g49 = function (value) {
    var tmp;
    if (this.dln_1.fln() === true) {
      // Inline function 'kotlin.toUInt' call
      var tmp$ret$0 = _UInt___init__impl__l7qpdl(value);
      this.l49(UInt__toString_impl_dbgl21(tmp$ret$0));
      tmp = Unit_instance;
    } else {
      this.l49(value.toString());
      tmp = Unit_instance;
    }
    return tmp;
  };
  protoOf(XmlEncoder).h49 = function (value) {
    var tmp;
    if (this.dln_1.fln() === true) {
      // Inline function 'kotlin.toULong' call
      var tmp$ret$0 = _ULong___init__impl__c78o9k(value);
      this.l49(ULong__toString_impl_f9au7k(tmp$ret$0));
      tmp = Unit_instance;
    } else {
      this.l49(value.toString());
      tmp = Unit_instance;
    }
    return tmp;
  };
  protoOf(XmlEncoder).i49 = function (value) {
    return this.l49(value.toString());
  };
  protoOf(XmlEncoder).j49 = function (value) {
    return this.l49(value.toString());
  };
  protoOf(XmlEncoder).k49 = function (value) {
    return this.l49(toString_0(value));
  };
  protoOf(XmlEncoder).l49 = function (value) {
    var tmp = this.dln_1;
    var defaultValue = (tmp instanceof XmlValueDescriptor ? tmp : THROW_CCE()).plm_1;
    if (value === defaultValue)
      return Unit_instance;
    switch (this.dln_1.olg().za_1) {
      case 4:
      case 0:
        // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call

        var this_0 = this.el7();
        var qName = this.q45();
        // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call

        var nsUri = qName.kl9();
        var localName = qName.ll9();
        var prefix = qName.ml9();
        smartStartTag(this_0, nsUri, localName, prefix);
        // Inline function 'nl.adaptivity.xmlutil.serialization.XmlEncoder.encodeString.<anonymous>' call

        if (!(this.jlh_1 == null)) {
          var typeRef = this.ylh(typeQName(this.j39().olh_1, this.dln_1), false);
          smartWriteAttribute(this.klh_1, this.jlh_1, toCName(typeRef));
        }

        if (!this.dln_1.kln() ? isWhitespace(first(value)) ? true : isWhitespace(last(value)) : false) {
          var tmp_0 = this.el7();
          tmp_0.kl7('http://www.w3.org/XML/1998/namespace', 'space', 'xml', 'preserve');
        }

        if (this.dln_1.oly()) {
          this.el7().il7(value);
        } else {
          this.el7().hl7(value);
        }

        this_0.ol7(nsUri, localName, prefix);
        break;
      case 1:
        smartWriteAttribute(this.klh_1, this.q45(), value);
        break;
      case 3:
      case 2:
        if (this.dln_1.oly()) {
          this.el7().il7(value);
        } else {
          this.el7().hl7(value);
        }

        break;
    }
  };
  protoOf(XmlEncoder).m49 = function (enumDescriptor, index) {
    var stringRepr = this.j39().olh_1.gln(enumDescriptor, index);
    this.l49(stringRepr);
  };
  protoOf(XmlEncoder).c4a = function () {
  };
  protoOf(XmlEncoder).c49 = function () {
    var nilAttr = this.j39().plh_1;
    if (this.dln_1.olg().equals(OutputKind_Element_getInstance()) ? !(nilAttr == null) : false) {
      // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call
      var this_0 = this.el7();
      var qName = this.q45();
      // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call
      var nsUri = qName.kl9();
      var localName = qName.ll9();
      var prefix = qName.ml9();
      smartStartTag(this_0, nsUri, localName, prefix);
      // Inline function 'nl.adaptivity.xmlutil.serialization.XmlEncoder.encodeNull.<anonymous>' call
      if (!(this.jlh_1 == null)) {
        var typeRef = this.ylh(typeQName(this.j39().olh_1, this.dln_1), true);
        smartWriteAttribute(this.klh_1, this.jlh_1, toCName(typeRef));
      }
      smartWriteAttribute(this.klh_1, nilAttr.w6_1, nilAttr.x6_1);
      this_0.ol7(nsUri, localName, prefix);
    }
  };
  protoOf(XmlEncoder).z49 = function (serializer, value) {
    var effectiveSerializer = this.dln_1.qlz(serializer);
    if (equals(effectiveSerializer, XmlQNameSerializer_getInstance())) {
      encodeQName(this, value instanceof QName ? value : THROW_CCE());
    } else {
      effectiveSerializer.r44(this, value);
    }
  };
  protoOf(XmlEncoder).n49 = function (descriptor) {
    return new XmlEncoder(this.klh_1, this.dln_1.k46(0), this.ilh_1, this.jlh_1);
  };
  protoOf(XmlEncoder).i48 = function (descriptor) {
    // Inline function 'kotlin.apply' call
    var this_0 = this.klh_1.rlz(this.dln_1, this.ilh_1, this.jlh_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.XmlEncoder.beginStructure.<anonymous>' call
    this_0.slz();
    return this_0;
  };
  function NSAttrXmlEncoder($outer, xmlDescriptor, namespaces, elementIndex) {
    this.zlz_1 = $outer;
    XmlEncoder.call(this, $outer, xmlDescriptor, elementIndex);
    this.ylz_1 = toList(namespaces);
  }
  protoOf(NSAttrXmlEncoder).i48 = function (descriptor) {
    var compositeEncoder = protoOf(XmlEncoder).i48.call(this, descriptor);
    var tmp0_iterator = this.ylz_1.w();
    while (tmp0_iterator.f()) {
      var namespace = tmp0_iterator.e();
      if (this.el7().pl7(namespace.nl5()) == null) {
        this.el7().tl7(namespace);
      }
    }
    return compositeEncoder;
  };
  function PrimitiveEncoder($outer, serializersModule, xmlDescriptor) {
    this.llz_1 = $outer;
    this.ilz_1 = serializersModule;
    this.jlz_1 = xmlDescriptor;
    this.klz_1 = StringBuilder_init_$Create$();
  }
  protoOf(PrimitiveEncoder).t45 = function () {
    return this.ilz_1;
  };
  protoOf(PrimitiveEncoder).j39 = function () {
    return this.llz_1.alh_1;
  };
  protoOf(PrimitiveEncoder).el7 = function () {
    return this.llz_1.olz_1;
  };
  protoOf(PrimitiveEncoder).ylh = function (qName, isAttr) {
    return ensureNamespace_1(this.llz_1, qName, isAttr);
  };
  protoOf(PrimitiveEncoder).i48 = function (descriptor) {
    throw IllegalArgumentException_init_$Create$('Primitives cannot be structs');
  };
  protoOf(PrimitiveEncoder).d49 = function (value) {
    return this.l49(value.toString());
  };
  protoOf(PrimitiveEncoder).e49 = function (value) {
    var tmp;
    if (this.jlz_1.fln() === true) {
      // Inline function 'kotlin.toUByte' call
      var tmp$ret$0 = _UByte___init__impl__g9hnc4(value);
      this.l49(UByte__toString_impl_v72jg(tmp$ret$0));
      tmp = Unit_instance;
    } else {
      this.l49(value.toString());
      tmp = Unit_instance;
    }
    return tmp;
  };
  protoOf(PrimitiveEncoder).k49 = function (value) {
    return this.l49(toString_0(value));
  };
  protoOf(PrimitiveEncoder).j49 = function (value) {
    return this.l49(value.toString());
  };
  protoOf(PrimitiveEncoder).m49 = function (enumDescriptor, index) {
    var tagName = this.jlz_1.k46(index).gli();
    var tmp;
    // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
    if (tagName.kl9() === '') {
      // Inline function 'nl.adaptivity.xmlutil.prefix' call
      tmp = tagName.ml9() === '';
    } else {
      tmp = false;
    }
    if (tmp) {
      // Inline function 'nl.adaptivity.xmlutil.localPart' call
      var tmp$ret$2 = tagName.ll9();
      this.l49(tmp$ret$2);
    } else {
      this.z49(QNameSerializer_getInstance(), tagName);
    }
  };
  protoOf(PrimitiveEncoder).i49 = function (value) {
    return this.l49(value.toString());
  };
  protoOf(PrimitiveEncoder).n49 = function (descriptor) {
    return this;
  };
  protoOf(PrimitiveEncoder).g49 = function (value) {
    var tmp;
    if (this.jlz_1.fln() === true) {
      // Inline function 'kotlin.toUInt' call
      var tmp$ret$0 = _UInt___init__impl__l7qpdl(value);
      this.l49(UInt__toString_impl_dbgl21(tmp$ret$0));
      tmp = Unit_instance;
    } else {
      this.l49(value.toString());
      tmp = Unit_instance;
    }
    return tmp;
  };
  protoOf(PrimitiveEncoder).h49 = function (value) {
    var tmp;
    if (this.jlz_1.fln() === true) {
      // Inline function 'kotlin.toULong' call
      var tmp$ret$0 = _ULong___init__impl__c78o9k(value);
      this.l49(ULong__toString_impl_f9au7k(tmp$ret$0));
      tmp = Unit_instance;
    } else {
      this.l49(value.toString());
      tmp = Unit_instance;
    }
    return tmp;
  };
  protoOf(PrimitiveEncoder).c49 = function () {
    return Unit_instance;
  };
  protoOf(PrimitiveEncoder).f49 = function (value) {
    var tmp;
    if (this.jlz_1.fln() === true) {
      // Inline function 'kotlin.toUShort' call
      var tmp$ret$0 = _UShort___init__impl__jigrne(value);
      this.l49(UShort__toString_impl_edaoee(tmp$ret$0));
      tmp = Unit_instance;
    } else {
      this.l49(value.toString());
      tmp = Unit_instance;
    }
    return tmp;
  };
  protoOf(PrimitiveEncoder).l49 = function (value) {
    this.klz_1.y5(value);
  };
  protoOf(PrimitiveEncoder).z49 = function (serializer, value) {
    var tmp0_subject = this.jlz_1.qlz(serializer);
    if (equals(tmp0_subject, XmlQNameSerializer_getInstance())) {
      var tmp = XmlQNameSerializer_getInstance();
      tmp.gl9(this, this.xlh(value instanceof QName ? value : THROW_CCE()));
    } else {
      encodeSerializableValue.call(this, serializer, value);
    }
  };
  function InlineEncoder($outer, parent, childIndex) {
    this.hm0_1 = $outer;
    XmlEncoder.call(this, $outer, parent.glm_1.k46(childIndex), childIndex, null);
    this.fm0_1 = parent;
    this.gm0_1 = childIndex;
  }
  protoOf(InlineEncoder).l49 = function (value) {
    var d = this.dln_1.k46(0);
    this.fm0_1.im0(d, this.gm0_1, value);
  };
  protoOf(InlineEncoder).z49 = function (serializer, value) {
    var d = this.dln_1.k46(0);
    this.fm0_1.jm0(d, this.gm0_1, serializer, value);
  };
  protoOf(InlineEncoder).n49 = function (descriptor) {
    return this;
  };
  protoOf(InlineEncoder).i48 = function (descriptor) {
    // Inline function 'kotlin.apply' call
    var this_0 = new InlineTagEncoder(this.hm0_1, this.hm0_1.rlz(this.dln_1, this.ilh_1, this.jlh_1));
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.InlineEncoder.beginStructure.<anonymous>' call
    this_0.slz();
    return this_0;
  };
  function InlineTagEncoder($outer, delegate) {
    this.sm0_1 = $outer;
    TagEncoder.call(this, $outer, delegate.glm_1, null);
    this.rm0_1 = delegate;
  }
  protoOf(InlineTagEncoder).slz = function () {
  };
  protoOf(InlineTagEncoder).jm0 = function (elementDescriptor, index, serializer, value) {
    this.rm0_1.jm0(elementDescriptor, index, serializer, value);
  };
  protoOf(InlineTagEncoder).x49 = function (descriptor, index) {
    return this.rm0_1.x49(descriptor, index);
  };
  protoOf(InlineTagEncoder).e4a = function (descriptor, index) {
    return this.rm0_1.e4a(descriptor, index);
  };
  protoOf(InlineTagEncoder).a4a = function (descriptor, index, serializer, value) {
    this.rm0_1.a4a(descriptor, index, serializer, value);
  };
  protoOf(InlineTagEncoder).im0 = function (elementDescriptor, index, value) {
    this.rm0_1.im0(elementDescriptor, index, value);
  };
  protoOf(InlineTagEncoder).j48 = function (descriptor) {
    this.rm0_1.tm0();
  };
  function TagEncoder($outer, xmlDescriptor, discriminatorName, deferring) {
    deferring = deferring === VOID ? true : deferring;
    this.lly_1 = $outer;
    XmlTagCodec.call(this, $outer, xmlDescriptor);
    this.hly_1 = discriminatorName;
    this.ily_1 = deferring;
    var tmp = this;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp.jly_1 = ArrayList_init_$Create$();
    var tmp_0 = this;
    var tmp0_safe_receiver = xmlDescriptor instanceof XmlCompositeDescriptor ? xmlDescriptor : null;
    tmp_0.kly_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wm0();
  }
  protoOf(TagEncoder).el7 = function () {
    return this.lly_1.olz_1;
  };
  protoOf(TagEncoder).ylh = function (qName, isAttr) {
    return ensureNamespace_1(this.lly_1, qName, isAttr);
  };
  protoOf(TagEncoder).slz = function () {
    smartStartTag_0(this.el7(), this.q45());
    this.um0();
    writeDiscriminatorAttributeIfNeeded(this);
  };
  protoOf(TagEncoder).um0 = function () {
    var tmp0_iterator = this.glm_1.eli_1.w();
    while (tmp0_iterator.f()) {
      var namespace = tmp0_iterator.e();
      ensureNamespace_0(this.lly_1, namespace);
    }
  };
  protoOf(TagEncoder).mly = function (index, deferred) {
    if (this.glm_1.k46(index).xm0()) {
      deferred(this);
    } else if (!this.ily_1) {
      deferred(this);
    } else if (!(this.kly_1 == null)) {
      this.jly_1.i1(to(this.kly_1[index], deferred));
    } else {
      var outputKind = this.glm_1.k46(index).olg();
      if (outputKind.equals(OutputKind_Attribute_getInstance())) {
        deferred(this);
      } else {
        this.jly_1.i1(to(index, deferred));
      }
    }
  };
  protoOf(TagEncoder).y49 = function (descriptor, index, serializer, value) {
    this.jm0(this.glm_1.k46(index), index, serializer, value);
  };
  protoOf(TagEncoder).jm0 = function (elementDescriptor, index, serializer, value) {
    var encoder = elementDescriptor.xm0() ? new InlineEncoder(this.lly_1, this, index) : new XmlEncoder(this.lly_1, elementDescriptor, index);
    var effectiveSerializer = this.glm_1.k46(index).qlz(serializer);
    if (equals(effectiveSerializer, XmlQNameSerializer_getInstance())) {
      encodeQName_0(this, elementDescriptor, index, value instanceof QName ? value : THROW_CCE());
    } else if (equals(effectiveSerializer, CompactFragmentSerializer_getInstance()))
      if (getValueChild(this.glm_1) === index) {
        this.mly(index, XmlEncoderBase$TagEncoder$encodeSerializableElement$lambda(value));
      } else {
        this.mly(index, XmlEncoderBase$TagEncoder$encodeSerializableElement$lambda_0(effectiveSerializer, encoder, value));
      }
     else {
      this.mly(index, XmlEncoderBase$TagEncoder$encodeSerializableElement$lambda_1(effectiveSerializer, encoder, value));
    }
  };
  protoOf(TagEncoder).x49 = function (descriptor, index) {
    return new InlineEncoder(this.lly_1, this, index);
  };
  protoOf(TagEncoder).e4a = function (descriptor, index) {
    var elementDescriptor = this.glm_1.k46(index);
    return this.j39().olh_1.ym0(elementDescriptor);
  };
  protoOf(TagEncoder).o49 = function (descriptor, index, value) {
    this.w49(descriptor, index, value.toString());
  };
  protoOf(TagEncoder).p49 = function (descriptor, index, value) {
    if (this.glm_1.fln() === true) {
      // Inline function 'kotlin.toUByte' call
      var tmp$ret$0 = _UByte___init__impl__g9hnc4(value);
      this.w49(descriptor, index, UByte__toString_impl_v72jg(tmp$ret$0));
    } else {
      this.w49(descriptor, index, value.toString());
    }
  };
  protoOf(TagEncoder).q49 = function (descriptor, index, value) {
    if (this.glm_1.fln() === true) {
      // Inline function 'kotlin.toUShort' call
      var tmp$ret$0 = _UShort___init__impl__jigrne(value);
      this.w49(descriptor, index, UShort__toString_impl_edaoee(tmp$ret$0));
    } else {
      this.w49(descriptor, index, value.toString());
    }
  };
  protoOf(TagEncoder).r49 = function (descriptor, index, value) {
    if (this.glm_1.fln() === true) {
      // Inline function 'kotlin.toUInt' call
      var tmp$ret$0 = _UInt___init__impl__l7qpdl(value);
      this.w49(descriptor, index, UInt__toString_impl_dbgl21(tmp$ret$0));
    } else {
      this.w49(descriptor, index, value.toString());
    }
  };
  protoOf(TagEncoder).s49 = function (descriptor, index, value) {
    if (this.glm_1.fln() === true) {
      // Inline function 'kotlin.toULong' call
      var tmp$ret$0 = _ULong___init__impl__c78o9k(value);
      this.w49(descriptor, index, ULong__toString_impl_f9au7k(tmp$ret$0));
    } else {
      this.w49(descriptor, index, value.toString());
    }
  };
  protoOf(TagEncoder).t49 = function (descriptor, index, value) {
    this.w49(descriptor, index, value.toString());
  };
  protoOf(TagEncoder).u49 = function (descriptor, index, value) {
    this.w49(descriptor, index, value.toString());
  };
  protoOf(TagEncoder).v49 = function (descriptor, index, value) {
    this.w49(descriptor, index, toString_0(value));
  };
  protoOf(TagEncoder).a4a = function (descriptor, index, serializer, value) {
    var nilAttr = this.j39().plh_1;
    var elemDescriptor = this.glm_1.k46(index);
    if (!(value == null)) {
      this.y49(descriptor, index, serializer, value);
    } else if (serializer.q44().b46()) {
      var encoder = elemDescriptor.xm0() ? new InlineEncoder(this.lly_1, this, index) : new XmlEncoder(this.lly_1, elemDescriptor, index);
      this.mly(index, XmlEncoderBase$TagEncoder$encodeNullableSerializableElement$lambda(serializer, encoder));
    } else if (!(nilAttr == null) ? elemDescriptor.hli().equals(OutputKind_Element_getInstance()) : false) {
      this.mly(index, XmlEncoderBase$TagEncoder$encodeNullableSerializableElement$lambda_0(this, elemDescriptor, this.lly_1, nilAttr));
    }
  };
  protoOf(TagEncoder).w49 = function (descriptor, index, value) {
    var elementDescriptor = this.glm_1.k46(index);
    this.im0(elementDescriptor, index, value);
  };
  protoOf(TagEncoder).im0 = function (elementDescriptor, index, value) {
    var tmp0_safe_receiver = elementDescriptor instanceof XmlValueDescriptor ? elementDescriptor : null;
    var defaultValue = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.plm_1;
    if (value === defaultValue)
      return Unit_instance;
    switch (elementDescriptor.olg().za_1) {
      case 4:
      case 0:
        this.mly(index, XmlEncoderBase$TagEncoder$encodeStringElement$lambda(this, elementDescriptor, value));
        break;
      case 1:
        this.vm0(index, elementDescriptor.gli(), value);
        break;
      case 3:
      case 2:
        if (!elementDescriptor.kln() ? isWhitespace(first(value)) ? true : isWhitespace(last(value)) : false) {
          var tmp = this.el7();
          tmp.kl7('http://www.w3.org/XML/1998/namespace', 'space', 'xml', 'preserve');
        }

        this.mly(index, XmlEncoderBase$TagEncoder$encodeStringElement$lambda_0(elementDescriptor, this, value));
        break;
    }
  };
  protoOf(TagEncoder).j48 = function (descriptor) {
    this.tm0();
    endTag(this.el7(), this.q45());
  };
  protoOf(TagEncoder).tm0 = function () {
    this.ily_1 = false;
    // Inline function 'kotlin.collections.sortedBy' call
    var this_0 = this.jly_1;
    // Inline function 'kotlin.comparisons.compareBy' call
    var tmp = XmlEncoderBase$TagEncoder$flushDeferred$lambda;
    var tmp$ret$0 = new sam$kotlin_Comparator$0_0(tmp);
    var actions = sortedWith_0(this_0, tmp$ret$0);
    var tmp0_iterator = actions.w();
    while (tmp0_iterator.f()) {
      var deferred = tmp0_iterator.e().z6();
      deferred(this);
    }
  };
  protoOf(TagEncoder).vm0 = function (index, name, value) {
    var tmp;
    var tmp_0;
    // Inline function 'kotlin.text.isEmpty' call
    var this_0 = name.kl9();
    if (charSequenceLength(this_0) === 0) {
      tmp_0 = true;
    } else {
      var tmp_1;
      if (this.q45().kl9() === name.kl9()) {
        // Inline function 'nl.adaptivity.xmlutil.prefix' call
        var tmp_2 = this.q45().ml9();
        // Inline function 'nl.adaptivity.xmlutil.prefix' call
        tmp_1 = tmp_2 === name.ml9();
      } else {
        tmp_1 = false;
      }
      tmp_0 = tmp_1;
    }
    if (tmp_0) {
      // Inline function 'nl.adaptivity.xmlutil.localPart' call
      var tmp$ret$3 = name.ll9();
      tmp = QName_init_$Create$(tmp$ret$3);
    } else {
      tmp = name;
    }
    var actualAttrName = tmp;
    if (!(this.kly_1 == null)) {
      var deferred = XmlEncoderBase$TagEncoder$doWriteAttribute$lambda(this.lly_1, actualAttrName, value);
      this.jly_1.i1(to(this.kly_1[index], deferred));
    } else {
      smartWriteAttribute(this.lly_1, actualAttrName, value);
    }
  };
  function nextAutoPrefix(_this__u8e3s4, $this) {
    var prefix;
    do {
      prefix = 'n' + $this.plz_1;
    }
     while (!(_this__u8e3s4.fl5(prefix) == null));
    return prefix;
  }
  function ensureNamespace_0($this, namespace) {
    if (!($this.wl5().gl5(namespace.ll5()) == null))
      return Unit_instance;
    var effectivePrefix = $this.wl5().fl5(namespace.nl5()) == null ? namespace.nl5() : nextAutoPrefix($this.wl5(), $this);
    $this.olz_1.fl7(effectivePrefix, namespace.ll5());
  }
  function ensureNamespace_1($this, qName, isAttr) {
    if (isAttr) {
      // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
      if (qName.kl9() === '')
        return copy(qName, '');
      else {
        // Inline function 'nl.adaptivity.xmlutil.prefix' call
        if (qName.ml9() === '') {
          var tmp$ret$6;
          $l$block: {
            // Inline function 'kotlin.sequences.firstOrNull' call
            // Inline function 'nl.adaptivity.xmlutil.prefixesFor' call
            var this_0 = $this.olz_1.wl5();
            // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
            var namespaceURI = qName.kl9();
            var tmp = this_0.kl5(namespaceURI);
            var tmp$ret$3 = isInterface(tmp, Iterator) ? tmp : THROW_CCE();
            var tmp0_iterator = asSequence(tmp$ret$3).w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              // Inline function 'nl.adaptivity.xmlutil.serialization.XmlEncoderBase.ensureNamespace.<anonymous>' call
              // Inline function 'kotlin.text.isNotEmpty' call
              if (charSequenceLength(element) > 0) {
                tmp$ret$6 = element;
                break $l$block;
              }
            }
            tmp$ret$6 = null;
          }
          var tmp0_elvis_lhs = tmp$ret$6;
          var tmp_0;
          if (tmp0_elvis_lhs == null) {
            // Inline function 'kotlin.also' call
            var this_1 = nextAutoPrefix($this.wl5(), $this);
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'nl.adaptivity.xmlutil.serialization.XmlEncoderBase.ensureNamespace.<anonymous>' call
            // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
            var tmp$ret$7 = qName.kl9();
            $this.olz_1.fl7(this_1, tmp$ret$7);
            tmp_0 = this_1;
          } else {
            tmp_0 = tmp0_elvis_lhs;
          }
          var effectivePrefix = tmp_0;
          return copy(qName, effectivePrefix);
        }
      }
    }
    var registeredNamespace = $this.olz_1.pl7(qName.ml9());
    // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
    if (registeredNamespace === qName.kl9())
      return qName;
    // Inline function 'nl.adaptivity.xmlutil.prefixesFor' call
    var this_2 = $this.olz_1.wl5();
    // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
    var namespaceURI_0 = qName.kl9();
    var tmp_1 = this_2.kl5(namespaceURI_0);
    var tmp$ret$11 = isInterface(tmp_1, Iterator) ? tmp_1 : THROW_CCE();
    var tmp_2 = asSequence(tmp$ret$11);
    var registeredPrefix = firstOrNull(filterNot(tmp_2, XmlEncoderBase$ensureNamespace$lambda(isAttr)));
    var tmp_3;
    if (!(registeredPrefix == null)) {
      tmp_3 = copy(qName, registeredPrefix);
    } else if (!(registeredNamespace == null)) {
      // Inline function 'nl.adaptivity.xmlutil.prefix' call
      var prefix = qName.ml9();
      var lastDigitIdx = prefix.length;
      while (lastDigitIdx > 0 ? isDigit(charSequenceGet(prefix, lastDigitIdx - 1 | 0)) : false) {
        lastDigitIdx = lastDigitIdx - 1 | 0;
      }
      var prefixBase;
      var prefixStart;
      if (lastDigitIdx === 0) {
        prefixBase = 'ns';
        prefixStart = 0;
      } else if (lastDigitIdx < prefix.length) {
        // Inline function 'kotlin.text.substring' call
        var endIndex = lastDigitIdx;
        // Inline function 'kotlin.js.asDynamic' call
        prefixBase = prefix.substring(0, endIndex);
        // Inline function 'kotlin.text.substring' call
        var startIndex = lastDigitIdx;
        // Inline function 'kotlin.js.asDynamic' call
        var tmp$ret$16 = prefix.substring(startIndex);
        prefixStart = toInt(tmp$ret$16);
      } else {
        prefixBase = prefix;
        prefixStart = 0;
      }
      var tmp$ret$18;
      $l$block_0: {
        // Inline function 'kotlin.sequences.first' call
        var tmp_4 = asSequence_1(numberRangeToNumber(prefixStart, IntCompanionObject_instance.MAX_VALUE));
        var tmp0_iterator_0 = map(tmp_4, XmlEncoderBase$ensureNamespace$lambda_0(prefixBase)).w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'nl.adaptivity.xmlutil.serialization.XmlEncoderBase.ensureNamespace.<anonymous>' call
          if ($this.olz_1.pl7(element_0) == null) {
            tmp$ret$18 = element_0;
            break $l$block_0;
          }
        }
        throw NoSuchElementException_init_$Create$('Sequence contains no element matching the predicate.');
      }
      var newPrefix = tmp$ret$18;
      // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
      var tmp$ret$19 = qName.kl9();
      $this.olz_1.fl7(newPrefix, tmp$ret$19);
      tmp_3 = copy(qName, newPrefix);
    } else {
      // Inline function 'nl.adaptivity.xmlutil.prefix' call
      var tmp_5 = qName.ml9();
      // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
      var tmp$ret$21 = qName.kl9();
      $this.olz_1.fl7(tmp_5, tmp$ret$21);
      tmp_3 = qName;
    }
    return tmp_3;
  }
  function smartWriteAttribute($this, name, value) {
    var argPrefix = name.ml9();
    var resolvedNamespace = $this.olz_1.pl7(argPrefix);
    var tmp;
    // Inline function 'kotlin.text.isEmpty' call
    // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
    var this_0 = name.kl9();
    if (charSequenceLength(this_0) === 0) {
      // Inline function 'nl.adaptivity.xmlutil.localPart' call
      var tmp$ret$2 = name.ll9();
      tmp = QName_init_$Create$(tmp$ret$2);
    } else {
      // Inline function 'kotlin.text.isEmpty' call
      if (charSequenceLength(argPrefix) === 0) {
        // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
        name.kl9();
        tmp = ensureNamespace_1($this, name, true);
      } else {
        if (!(resolvedNamespace == null)) {
          tmp = name;
        } else {
          tmp = ensureNamespace_1($this, name, true);
        }
      }
    }
    var effectiveQName = tmp;
    writeAttribute($this.olz_1, effectiveQName, value);
  }
  function PolymorphicEncoder($outer, xmlDescriptor) {
    this.gm1_1 = $outer;
    TagEncoder.call(this, $outer, xmlDescriptor, null, false);
  }
  protoOf(PolymorphicEncoder).mly = function (index, deferred) {
    deferred(this);
  };
  protoOf(PolymorphicEncoder).slz = function () {
    if (equals(this.glm_1.sli_1, TAG_getInstance())) {
      protoOf(TagEncoder).slz.call(this);
    }
  };
  protoOf(PolymorphicEncoder).im0 = function (elementDescriptor, index, value) {
    var isMixed = this.glm_1.rli_1.equals(OutputKind_Mixed_getInstance());
    var polymorphicMode = this.glm_1.sli_1;
    if (index === 0) {
      if (equals(polymorphicMode, TAG_getInstance())) {
        var childDesc = this.glm_1.k46(0);
        switch (childDesc.olg().za_1) {
          case 1:
            this.vm0(0, childDesc.gli(), Companion_instance_1.hm1(value, this.glm_1.uli_1));
            break;
          case 3:
          case 4:
          case 0:
            // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call

            var this_0 = this.el7();
            var qName = childDesc.gli();
            // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call

            var nsUri = qName.kl9();
            var localName = qName.ll9();
            var prefix = qName.ml9();
            smartStartTag(this_0, nsUri, localName, prefix);
            // Inline function 'nl.adaptivity.xmlutil.serialization.PolymorphicEncoder.encodeStringElement.<anonymous>' call

            this_0.hl7(value);
            this_0.ol7(nsUri, localName, prefix);
            break;
          case 2:
            throw new XmlSerialException('the type for a polymorphic child cannot be a text');
        }
      }
    } else {
      if (equals(polymorphicMode, TRANSPARENT_getInstance())) {
        if (isMixed) {
          this.el7().hl7(value);
        } else {
          // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call
          var this_1 = this.el7();
          var qName_0 = this.q45();
          // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call
          var nsUri_0 = qName_0.kl9();
          var localName_0 = qName_0.ll9();
          var prefix_0 = qName_0.ml9();
          smartStartTag(this_1, nsUri_0, localName_0, prefix_0);
          // Inline function 'nl.adaptivity.xmlutil.serialization.PolymorphicEncoder.encodeStringElement.<anonymous>' call
          this_1.hl7(value);
          this_1.ol7(nsUri_0, localName_0, prefix_0);
        }
      } else {
        if (polymorphicMode instanceof ATTR) {
          // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call
          var this_2 = this.el7();
          var qName_1 = this.q45();
          // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call
          var nsUri_1 = qName_1.kl9();
          var localName_1 = qName_1.ll9();
          var prefix_1 = qName_1.ml9();
          smartStartTag(this_2, nsUri_1, localName_1, prefix_1);
          // Inline function 'nl.adaptivity.xmlutil.serialization.PolymorphicEncoder.encodeStringElement.<anonymous>' call
          var attrQName = this.ylh(typeQName(this.j39().olh_1, elementDescriptor), true);
          smartWriteAttribute(this.gm1_1, polymorphicMode.bly_1, toCName(attrQName));
          this_2.hl7(value);
          this_2.ol7(nsUri_1, localName_1, prefix_1);
        } else {
          protoOf(TagEncoder).im0.call(this, elementDescriptor, index, value);
        }
      }
    }
  };
  protoOf(PolymorphicEncoder).jm0 = function (elementDescriptor, index, serializer, value) {
    var childXmlDescriptor = this.glm_1.ely(serializer.q44().q45());
    var tmp = this.glm_1.sli_1;
    var tmp0_safe_receiver = tmp instanceof ATTR ? tmp : null;
    var discriminatorName = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bly_1;
    var encoder = new XmlEncoder(this.gm1_1, childXmlDescriptor, index, discriminatorName);
    serializer.r44(encoder, value);
  };
  protoOf(PolymorphicEncoder).j48 = function (descriptor) {
    if (equals(this.glm_1.sli_1, TAG_getInstance())) {
      protoOf(TagEncoder).j48.call(this, descriptor);
    }
  };
  function AttributeMapEncoder($outer, xmlDescriptor) {
    this.xly_1 = $outer;
    TagEncoder.call(this, $outer, xmlDescriptor, null);
  }
  protoOf(AttributeMapEncoder).mly = function (index, deferred) {
    deferred(this);
  };
  protoOf(AttributeMapEncoder).im0 = function (elementDescriptor, index, value) {
    var tmp0_subject = index % 2 | 0;
    if (tmp0_subject === 0)
      this.wly_1 = QName_init_$Create$(value);
    else if (tmp0_subject === 1) {
      smartWriteAttribute(this.xly_1, _get_entryKey__gkoau6(this), value);
    }
  };
  protoOf(AttributeMapEncoder).jm0 = function (elementDescriptor, index, serializer, value) {
    if ((index % 2 | 0) === 0) {
      var effectiveSerializer = elementDescriptor.qlz(serializer);
      var tmp = this;
      var tmp_0;
      if (equals(effectiveSerializer, XmlQNameSerializer_getInstance())) {
        tmp_0 = value instanceof QName ? value : THROW_CCE();
      } else {
        // Inline function 'kotlin.apply' call
        var this_0 = new PrimitiveEncoder(this.xly_1, this.t45(), this.glm_1);
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'nl.adaptivity.xmlutil.serialization.AttributeMapEncoder.encodeSerializableElement.<anonymous>' call
        this_0.z49(effectiveSerializer, value);
        tmp_0 = QName_init_$Create$(this_0.klz_1.toString());
      }
      tmp.wly_1 = tmp_0;
    } else {
      var effectiveSerializer_0 = this.glm_1.k46(1).qlz(serializer);
      // Inline function 'kotlin.apply' call
      var this_1 = new PrimitiveEncoder(this.xly_1, this.t45(), this.glm_1);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.AttributeMapEncoder.encodeSerializableElement.<anonymous>' call
      this_1.z49(effectiveSerializer_0, value);
      var entryValue = this_1.klz_1.toString();
      this.vm0(index, _get_entryKey__gkoau6(this), entryValue);
    }
  };
  protoOf(AttributeMapEncoder).slz = function () {
  };
  protoOf(AttributeMapEncoder).j48 = function (descriptor) {
  };
  function AttributeListEncoder($outer, xmlDescriptor, elementIndex) {
    this.sm1_1 = $outer;
    TagEncoder.call(this, $outer, xmlDescriptor, null);
    this.pm1_1 = elementIndex;
    this.qm1_1 = StringBuilder_init_$Create$();
    this.rm1_1 = first_0(xmlDescriptor.yls_1);
    var d = xmlDescriptor;
    var ok;
    do {
      d = d.k46(0);
      ok = d.olg();
    }
     while (ok.equals(OutputKind_Inline_getInstance()));
    if (!ok.equals(OutputKind_Attribute_getInstance()) ? !ok.equals(OutputKind_Text_getInstance()) : false) {
      throw IllegalArgumentException_init_$Create$('An xml list stored in an attribute must store atomics, not structs');
    }
  }
  protoOf(AttributeListEncoder).mly = function (index, deferred) {
    return deferred(this);
  };
  protoOf(AttributeListEncoder).slz = function () {
  };
  protoOf(AttributeListEncoder).jm0 = function (elementDescriptor, index, serializer, value) {
    var encoder = new PrimitiveEncoder(this.sm1_1, this.t45(), elementDescriptor);
    encoder.z49(serializer, value);
    this.im0(elementDescriptor, index, encoder.klz_1.toString());
  };
  protoOf(AttributeListEncoder).im0 = function (elementDescriptor, index, value) {
    // Inline function 'kotlin.text.isNotEmpty' call
    var this_0 = this.qm1_1;
    if (charSequenceLength(this_0) > 0) {
      this.qm1_1.y5(this.rm1_1);
    }
    this.qm1_1.y5(value);
  };
  protoOf(AttributeListEncoder).j48 = function (descriptor) {
    this.vm0(this.pm1_1, this.glm_1.gli(), this.qm1_1.toString());
  };
  function ListEncoder($outer, xmlDescriptor, listChildIdx, discriminatorName) {
    this.bm2_1 = $outer;
    TagEncoder.call(this, $outer, xmlDescriptor, discriminatorName, false);
    this.am2_1 = listChildIdx;
  }
  protoOf(ListEncoder).mly = function (index, deferred) {
    deferred(this);
  };
  protoOf(ListEncoder).slz = function () {
    if (!this.glm_1.bll()) {
      var childName = this.glm_1.k46(0).gli();
      protoOf(TagEncoder).slz.call(this);
      var tagName = this.q45();
      var tmp;
      // Inline function 'nl.adaptivity.xmlutil.prefix' call
      var tmp_0 = tagName.ml9();
      // Inline function 'nl.adaptivity.xmlutil.prefix' call
      if (!(tmp_0 === childName.ml9())) {
        var tmp_1 = this.el7();
        // Inline function 'nl.adaptivity.xmlutil.prefix' call
        var tmp$ret$2 = childName.ml9();
        var tmp_2 = tmp_1.pl7(tmp$ret$2);
        // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
        tmp = !(tmp_2 === childName.kl9());
      } else {
        tmp = false;
      }
      if (tmp) {
        var tmp_3 = this.el7();
        // Inline function 'nl.adaptivity.xmlutil.prefix' call
        var tmp_4 = childName.ml9();
        // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
        var tmp$ret$5 = childName.kl9();
        tmp_3.fl7(tmp_4, tmp$ret$5);
      }
    }
  };
  protoOf(ListEncoder).jm0 = function (elementDescriptor, index, serializer, value) {
    var childDescriptor = this.glm_1.k46(0);
    var tmp0_subject = elementDescriptor.qlz(serializer);
    if (equals(tmp0_subject, CompactFragmentSerializer_getInstance()))
      if (getValueChild(_get_parentXmlDescriptor__yo818r_0(this)) === this.am2_1) {
        var tmp = CompactFragmentSerializer_getInstance();
        tmp.qlf(this, (!(value == null) ? isInterface(value, ICompactFragment) : false) ? value : THROW_CCE());
      } else {
        serializer.r44(new XmlEncoder(this.bm2_1, childDescriptor, index), value);
      }
     else {
      serializer.r44(new XmlEncoder(this.bm2_1, childDescriptor, index), value);
    }
  };
  protoOf(ListEncoder).im0 = function (elementDescriptor, index, value) {
    if (index > 0) {
      (new XmlEncoder(this.bm2_1, elementDescriptor, index)).l49(value);
    }
  };
  protoOf(ListEncoder).j48 = function (descriptor) {
    if (!this.glm_1.bll()) {
      protoOf(TagEncoder).j48.call(this, descriptor);
    }
  };
  function MapEncoder($outer, xmlDescriptor, discriminatorName) {
    discriminatorName = discriminatorName === VOID ? null : discriminatorName;
    this.hlz_1 = $outer;
    TagEncoder.call(this, $outer, xmlDescriptor, discriminatorName);
    this.glz_1 = null;
  }
  protoOf(MapEncoder).mly = function (index, deferred) {
    deferred(this);
  };
  protoOf(MapEncoder).im0 = function (elementDescriptor, index, value) {
    var tmp0_subject = index % 2 | 0;
    if (tmp0_subject === 0) {
      this.flz_1 = serializer_0(StringCompanionObject_instance);
      this.glz_1 = value;
    } else if (tmp0_subject === 1) {
      this.jm0(this.glm_1, index, serializer_0(StringCompanionObject_instance), value);
    }
  };
  protoOf(MapEncoder).jm0 = function (elementDescriptor, index, serializer, value) {
    if ((index % 2 | 0) === 0) {
      this.flz_1 = elementDescriptor.qlz(serializer);
      this.glz_1 = value;
    } else {
      var valueDescriptor = this.glm_1.k46(1);
      var effectiveSerializer = valueDescriptor.qlz(serializer);
      var keyDescriptor = this.glm_1.k46(0);
      if (_get_mapDescriptor__1b9wli(this).nll()) {
        this.mly(index, XmlEncoderBase$MapEncoder$encodeSerializableElement$lambda(this, valueDescriptor, this.hlz_1, keyDescriptor, effectiveSerializer, value));
      } else {
        // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call
        var this_0 = this.el7();
        var qName = _get_mapDescriptor__1b9wli(this).ulm();
        // Inline function 'nl.adaptivity.xmlutil.smartStartTag' call
        var nsUri = qName.kl9();
        var localName = qName.ll9();
        var prefix = qName.ml9();
        smartStartTag(this_0, nsUri, localName, prefix);
        // Inline function 'nl.adaptivity.xmlutil.serialization.MapEncoder.encodeSerializableElement.<anonymous>' call
        var keyEncoder = new XmlEncoder(this.hlz_1, keyDescriptor, index - 1 | 0);
        var tmp = _get_keySerializer__nwm36o(this);
        keyEncoder.z49(isInterface(tmp, SerializationStrategy) ? tmp : THROW_CCE(), this.glz_1);
        effectiveSerializer.r44(new XmlEncoder(this.hlz_1, valueDescriptor, index), value);
        this_0.ol7(nsUri, localName, prefix);
      }
    }
  };
  protoOf(MapEncoder).slz = function () {
    if (!_get_mapDescriptor__1b9wli(this).bll()) {
      protoOf(TagEncoder).slz.call(this);
    }
  };
  protoOf(MapEncoder).j48 = function (descriptor) {
    if (!_get_mapDescriptor__1b9wli(this).bll()) {
      protoOf(TagEncoder).j48.call(this, descriptor);
    }
  };
  function XmlEncoderBase$ensureNamespace$lambda($isAttr) {
    return function (it) {
      var tmp;
      if ($isAttr) {
        // Inline function 'kotlin.text.isEmpty' call
        tmp = charSequenceLength(it) === 0;
      } else {
        tmp = false;
      }
      return tmp;
    };
  }
  function XmlEncoderBase$ensureNamespace$lambda_0($prefixBase) {
    return function (it) {
      return $prefixBase + it;
    };
  }
  function XmlEncoderBase(context, config, target) {
    XmlCodecBase.call(this, context, config);
    this.olz_1 = target;
    this.plz_1 = 1;
  }
  protoOf(XmlEncoderBase).wl5 = function () {
    return this.olz_1.wl5();
  };
  protoOf(XmlEncoderBase).rlz = function (xmlDescriptor, elementIndex, discriminatorName) {
    var tmp0_subject = xmlDescriptor.cm2();
    var tmp;
    if (tmp0_subject instanceof PrimitiveKind) {
      throw AssertionError_init_$Create$('A primitive is not a composite');
    } else {
      if (equals(tmp0_subject, CONTEXTUAL_getInstance()) ? true : equals(tmp0_subject, MAP_getInstance())) {
        var tmp_0;
        if (xmlDescriptor.olg().za_1 === 1) {
          var valueType = xmlDescriptor.k46(1);
          if (!valueType.hli().rlg() ? !equals(valueType.bli_1, XmlQNameSerializer_getInstance()) : false) {
            throw new XmlSerialException('Values of an attribute map must be textual or a qname');
          }
          var keyType = xmlDescriptor.k46(0);
          if (!equals(keyType.bli_1, XmlQNameSerializer_getInstance()) ? !keyType.hli().rlg() : false) {
            throw new XmlSerialException('The keys of an attribute map must be string or qname');
          }
          tmp_0 = new AttributeMapEncoder(this, xmlDescriptor);
        } else {
          tmp_0 = new MapEncoder(this, xmlDescriptor instanceof XmlMapDescriptor ? xmlDescriptor : THROW_CCE(), discriminatorName);
        }
        tmp = tmp_0;
      } else {
        if ((equals(tmp0_subject, CLASS_getInstance()) ? true : equals(tmp0_subject, OBJECT_getInstance())) ? true : equals(tmp0_subject, ENUM_getInstance())) {
          tmp = new TagEncoder(this, xmlDescriptor, discriminatorName);
        } else {
          if (equals(tmp0_subject, LIST_getInstance())) {
            var tmp_1;
            if (xmlDescriptor.olg().za_1 === 1) {
              tmp_1 = new AttributeListEncoder(this, xmlDescriptor instanceof XmlListDescriptor ? xmlDescriptor : THROW_CCE(), elementIndex);
            } else {
              tmp_1 = new ListEncoder(this, xmlDescriptor instanceof XmlListDescriptor ? xmlDescriptor : THROW_CCE(), elementIndex, discriminatorName);
            }
            tmp = tmp_1;
          } else {
            if (tmp0_subject instanceof PolymorphicKind) {
              tmp = new PolymorphicEncoder(this, xmlDescriptor instanceof XmlPolymorphicDescriptor ? xmlDescriptor : THROW_CCE());
            } else {
              noWhenBranchMatchedException();
            }
          }
        }
      }
    }
    return tmp;
  };
  function Companion_0() {
  }
  protoOf(Companion_0).dm2 = function (_this__u8e3s4, parentNamespace) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator = _this__u8e3s4.f46().w();
      while (tmp0_iterator.f()) {
        var e = tmp0_iterator.e();
        if (e instanceof XmlSerialName) {
          tmp$ret$0 = e;
          break $l$block;
        }
      }
      tmp$ret$0 = null;
    }
    var tmp0_safe_receiver = tmp$ret$0;
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      return toQName(tmp0_safe_receiver, _this__u8e3s4.q45(), parentNamespace);
    }
    return toQname(substringAfterLast(_this__u8e3s4.q45(), _Char___init__impl__6a9atx(46)), parentNamespace);
  };
  protoOf(Companion_0).dly = function (_this__u8e3s4, parentType) {
    if (parentType == null ? true : !startsWith(_this__u8e3s4, _Char___init__impl__6a9atx(46)))
      return _this__u8e3s4;
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.Companion.expandTypeNameIfNeeded.<anonymous>' call
    var idx = lastIndexOf(parentType, _Char___init__impl__6a9atx(46));
    if (idx < 0) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      return _this__u8e3s4.substring(1);
    }
    // Inline function 'kotlin.text.substring' call
    // Inline function 'kotlin.js.asDynamic' call
    var parentPkg = parentType.substring(0, idx);
    return parentPkg + _this__u8e3s4;
  };
  protoOf(Companion_0).hm1 = function (_this__u8e3s4, parentType) {
    if (parentType == null)
      return _this__u8e3s4;
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.Companion.tryShortenTypeName.<anonymous>' call
    var idx = lastIndexOf(parentType, _Char___init__impl__6a9atx(46));
    if (idx < 0)
      return _this__u8e3s4;
    // Inline function 'kotlin.text.substring' call
    // Inline function 'kotlin.js.asDynamic' call
    var parentPkg = parentType.substring(0, idx);
    if (startsWith_0(_this__u8e3s4, parentPkg) ? indexOf(_this__u8e3s4, _Char___init__impl__6a9atx(46), parentPkg.length + 1 | 0) < 0 : false) {
      // Inline function 'kotlin.text.substring' call
      var startIndex = parentPkg.length;
      // Inline function 'kotlin.js.asDynamic' call
      return _this__u8e3s4.substring(startIndex);
    }
    return _this__u8e3s4;
  };
  var Companion_instance_1;
  function Companion_getInstance_5() {
    return Companion_instance_1;
  }
  function XmlCodec($outer, xmlDescriptor) {
    this.eln_1 = $outer;
    this.dln_1 = xmlDescriptor;
  }
  protoOf(XmlCodec).q45 = function () {
    return this.dln_1.gli();
  };
  function XmlTagCodec($outer, xmlDescriptor) {
    this.hlm_1 = $outer;
    this.glm_1 = xmlDescriptor;
  }
  protoOf(XmlTagCodec).j39 = function () {
    return this.hlm_1.alh_1;
  };
  protoOf(XmlTagCodec).t45 = function () {
    return this.hlm_1.zlg_1;
  };
  protoOf(XmlTagCodec).q45 = function () {
    return this.glm_1.gli();
  };
  protoOf(XmlTagCodec).olp = function (_this__u8e3s4) {
    return copy(_this__u8e3s4, '');
  };
  function XmlCodecBase(serializersModule, config) {
    this.zlg_1 = serializersModule;
    this.alh_1 = config;
  }
  function Builder_init_$Init$(config, $this) {
    var tmp = config.olh_1;
    var tmp0_safe_receiver = tmp instanceof DefaultXmlSerializationPolicy ? tmp : null;
    Builder.call($this, config.llh_1, config.mlh_1, config.nlh_1, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fm2_1, null, config.olh_1);
    $this.olj_1 = config.plh_1;
    $this.nlj_1 = config.rlh_1;
    $this.qlj_1 = config.slh_1;
    $this.plj_1 = config.qlh_1;
    return $this;
  }
  function Builder_init_$Create$(config) {
    return Builder_init_$Init$(config, objectCreate(protoOf(Builder)));
  }
  function sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0(function_0) {
    this.mm2_1 = function_0;
  }
  protoOf(sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0).nm2 = function (input, inputKind, descriptor, name, candidates) {
    return this.mm2_1(input, inputKind, descriptor, name, candidates);
  };
  function sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0_0(function_0) {
    this.om2_1 = function_0;
  }
  protoOf(sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0_0).nm2 = function (input, inputKind, descriptor, name, candidates) {
    return this.om2_1(input, inputKind, descriptor, name, candidates);
  };
  function sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0_1(function_0) {
    this.pm2_1 = function_0;
  }
  protoOf(sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0_1).nm2 = function (input, inputKind, descriptor, name, candidates) {
    return this.pm2_1(input, inputKind, descriptor, name, candidates);
  };
  function XmlConfig$Companion$DEFAULT_UNKNOWN_CHILD_HANDLER$lambda(input, inputKind, descriptor, name, candidates) {
    var tmp;
    var tmp_0;
    if (inputKind.equals(InputKind_Attribute_getInstance())) {
      var tmp_1 = Companion_getInstance_6().qm2_1;
      var tmp_2;
      if (name == null) {
        tmp_2 = null;
      } else {
        // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
        tmp_2 = name.kl9();
      }
      tmp_0 = contains(tmp_1, tmp_2);
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = emptyList();
    } else {
      var tmp_3 = input.vl5();
      var tmp_4 = descriptor.qlk().q45();
      var tmp_5 = descriptor.gli();
      throw new UnknownXmlFieldException(tmp_3, '(' + tmp_4 + ') ' + tmp_5 + '/' + toString(name == null ? '<CDATA>' : name) + ' (' + inputKind + ')', candidates);
    }
    return tmp;
  }
  function XmlConfig$Companion$IGNORING_UNKNOWN_CHILD_HANDLER$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd, _anonymous_parameter_2__qggqfi, _anonymous_parameter_3__qggqen, _anonymous_parameter_4__qggqds) {
    return emptyList();
  }
  function XmlConfig$Companion$IGNORING_UNKNOWN_NAMESPACE_HANDLER$lambda(input, inputKind, descriptor, name, candidates) {
    var inputNs = input.ll5();
    // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
    var contextNs = descriptor.gli().kl9();
    var tmp;
    var tmp_0;
    if (!(inputNs === contextNs)) {
      tmp_0 = true;
    } else {
      var tmp_1;
      if (inputKind.equals(InputKind_Attribute_getInstance())) {
        var tmp_2;
        if (name == null) {
          tmp_2 = null;
        } else {
          // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
          tmp_2 = name.kl9();
        }
        var tmp_3 = tmp_2;
        tmp_1 = tmp_3 === 'http://www.w3.org/2001/XMLSchema-instance';
      } else {
        tmp_1 = false;
      }
      tmp_0 = tmp_1;
    }
    if (tmp_0) {
      tmp = emptyList();
    } else {
      var tmp_4 = input.vl5();
      var tmp_5 = descriptor.qlk().q45();
      var tmp_6 = descriptor.gli();
      throw new UnknownXmlFieldException(tmp_4, '(' + tmp_5 + ') ' + tmp_6 + '/' + toString(name == null ? '<CDATA>' : name) + ' (' + inputKind + ')', candidates);
    }
    return tmp;
  }
  function XmlConfig$Companion$DEFAULT_NONRECOVERABLE_CHILD_HANDLER$lambda(input, inputKind, name, candidates) {
    var tmp = input.vl5();
    var tmp1_elvis_lhs = name == null ? null : name.toString();
    throw new UnknownXmlFieldException(tmp, tmp1_elvis_lhs == null ? '<CDATA>' : tmp1_elvis_lhs, candidates);
  }
  function XmlConfig_init_$Init$(builder, $this) {
    builder = builder === VOID ? new Builder() : builder;
    var tmp = builder.glj_1;
    var tmp_0 = builder.hlj_1;
    var tmp_1 = builder.ilj_1;
    var tmp2_elvis_lhs = builder.klj_1;
    var tmp_2;
    if (tmp2_elvis_lhs == null) {
      var tmp0_elvis_lhs = builder.vm2();
      var tmp_3 = tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs;
      var tmp_4 = builder.mlj_1;
      var tmp1_elvis_lhs = builder.jlj_1;
      tmp_2 = DefaultXmlSerializationPolicy_init_$Create$(false, tmp_3, tmp_4, tmp1_elvis_lhs == null ? Companion_getInstance_6().rm2_1 : tmp1_elvis_lhs);
    } else {
      tmp_2 = tmp2_elvis_lhs;
    }
    XmlConfig.call($this, tmp, tmp_0, tmp_1, tmp_2, builder.olj_1, builder.plj_1);
    $this.rlh_1 = builder.nlj_1;
    $this.slh_1 = builder.qlj_1;
    return $this;
  }
  function XmlConfig_init_$Create$(builder) {
    return XmlConfig_init_$Init$(builder, objectCreate(protoOf(XmlConfig)));
  }
  function Builder(repairNamespaces, xmlDeclMode, indentString, autoPolymorphic, unknownChildHandler, policy) {
    repairNamespaces = repairNamespaces === VOID ? true : repairNamespaces;
    xmlDeclMode = xmlDeclMode === VOID ? XmlDeclMode_None_getInstance() : xmlDeclMode;
    indentString = indentString === VOID ? '' : indentString;
    autoPolymorphic = autoPolymorphic === VOID ? null : autoPolymorphic;
    unknownChildHandler = unknownChildHandler === VOID ? Companion_getInstance_6().rm2_1 : unknownChildHandler;
    policy = policy === VOID ? null : policy;
    this.glj_1 = repairNamespaces;
    this.hlj_1 = xmlDeclMode;
    this.ilj_1 = indentString;
    this.jlj_1 = unknownChildHandler;
    this.klj_1 = policy;
    this.llj_1 = autoPolymorphic;
    this.mlj_1 = XmlEncodeDefault_ANNOTATED_getInstance();
    this.nlj_1 = true;
    this.olj_1 = null;
    this.plj_1 = XmlVersion_XML11_getInstance();
    this.qlj_1 = false;
  }
  protoOf(Builder).vm2 = function () {
    var tmp1_elvis_lhs = this.llj_1;
    var tmp;
    if (tmp1_elvis_lhs == null) {
      var tmp_0 = this.klj_1;
      var tmp0_safe_receiver = tmp_0 instanceof DefaultXmlSerializationPolicy ? tmp_0 : null;
      tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fm2_1;
    } else {
      tmp = tmp1_elvis_lhs;
    }
    return tmp;
  };
  protoOf(Builder).rlj = function () {
    var p = this.klj_1;
    var tmp;
    if (p instanceof DefaultXmlSerializationPolicy) {
      tmp = Builder_init_$Create$_0(p);
    } else {
      tmp = new Builder_0();
    }
    return tmp;
  };
  function Companion_1() {
    Companion_instance_2 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.qm2_1 = ['http://www.w3.org/2001/XMLSchema-instance', 'http://www.w3.org/XML/1998/namespace'];
    var tmp_0 = this;
    var tmp_1 = XmlConfig$Companion$DEFAULT_UNKNOWN_CHILD_HANDLER$lambda;
    tmp_0.rm2_1 = new sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0(tmp_1);
    var tmp_2 = this;
    var tmp_3 = XmlConfig$Companion$IGNORING_UNKNOWN_CHILD_HANDLER$lambda;
    tmp_2.sm2_1 = new sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0_0(tmp_3);
    var tmp_4 = this;
    var tmp_5 = XmlConfig$Companion$IGNORING_UNKNOWN_NAMESPACE_HANDLER$lambda;
    tmp_4.tm2_1 = new sam$nl_adaptivity_xmlutil_serialization_UnknownChildHandler$0_1(tmp_5);
    var tmp_6 = this;
    tmp_6.um2_1 = XmlConfig$Companion$DEFAULT_NONRECOVERABLE_CHILD_HANDLER$lambda;
  }
  var Companion_instance_2;
  function Companion_getInstance_6() {
    if (Companion_instance_2 == null)
      new Companion_1();
    return Companion_instance_2;
  }
  function XmlConfig(repairNamespaces, xmlDeclMode, indentString, policy, nilAttribute, xmlVersion) {
    Companion_getInstance_6();
    repairNamespaces = repairNamespaces === VOID ? true : repairNamespaces;
    xmlDeclMode = xmlDeclMode === VOID ? XmlDeclMode_None_getInstance() : xmlDeclMode;
    indentString = indentString === VOID ? '' : indentString;
    nilAttribute = nilAttribute === VOID ? null : nilAttribute;
    xmlVersion = xmlVersion === VOID ? XmlVersion_XML11_getInstance() : xmlVersion;
    this.llh_1 = repairNamespaces;
    this.mlh_1 = xmlDeclMode;
    this.nlh_1 = indentString;
    this.olh_1 = policy;
    this.plh_1 = nilAttribute;
    this.qlh_1 = xmlVersion;
    this.rlh_1 = true;
    this.slh_1 = false;
  }
  function UnknownXmlFieldException(locationInfo, xmlName, candidates) {
    candidates = candidates === VOID ? emptyList() : candidates;
    var tmp = candidateString(candidates);
    var tmp_0;
    if (locationInfo == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.UnknownXmlFieldException.<init>.<anonymous>' call
      tmp_0 = ' at position ' + locationInfo;
    }
    var tmp1_elvis_lhs = tmp_0;
    XmlSerialException.call(this, 'Could not find a field for name ' + xmlName + tmp + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs));
    captureStack(this, UnknownXmlFieldException);
  }
  function XmlSerialException(message, cause) {
    cause = cause === VOID ? null : cause;
    SerializationException_init_$Init$(message, cause, this);
    captureStack(this, XmlSerialException);
  }
  function XmlParsingException(locationInfo, message, cause) {
    cause = cause === VOID ? null : cause;
    XmlSerialException.call(this, 'Invalid XML value at position: ' + locationInfo + ': ' + message, cause);
    captureStack(this, XmlParsingException);
  }
  function candidateString(candidates) {
    var tmp;
    if (candidates.w().f() === true) {
      tmp = joinToString(candidates, VOID, '\n  candidates: ', VOID, VOID, VOID, candidateString$lambda);
    } else {
      tmp = '';
    }
    return tmp;
  }
  function candidateString$lambda(it) {
    var tmp;
    if (it instanceof PolyInfo) {
      tmp = '' + it.rlm_1 + ' (' + it.tlm_1.olg() + ')';
    } else {
      tmp = toString(it);
    }
    return tmp;
  }
  function DeclaredNameInfo_init_$Init$(serialName, $this) {
    DeclaredNameInfo.call($this, serialName, null, false);
    return $this;
  }
  function DeclaredNameInfo_init_$Create$(serialName) {
    return DeclaredNameInfo_init_$Init$(serialName, objectCreate(protoOf(DeclaredNameInfo)));
  }
  var XmlEncodeDefault_ALWAYS_instance;
  var XmlEncodeDefault_ANNOTATED_instance;
  var XmlEncodeDefault_NEVER_instance;
  var XmlEncodeDefault_entriesInitialized;
  function XmlEncodeDefault_initEntries() {
    if (XmlEncodeDefault_entriesInitialized)
      return Unit_instance;
    XmlEncodeDefault_entriesInitialized = true;
    XmlEncodeDefault_ALWAYS_instance = new XmlEncodeDefault('ALWAYS', 0);
    XmlEncodeDefault_ANNOTATED_instance = new XmlEncodeDefault('ANNOTATED', 1);
    XmlEncodeDefault_NEVER_instance = new XmlEncodeDefault('NEVER', 2);
  }
  function DeclaredNameInfo(serialName, annotatedName, isDefaultNamespace) {
    this.wm2_1 = serialName;
    this.xm2_1 = annotatedName;
    this.ym2_1 = isDefaultNamespace;
    // Inline function 'kotlin.check' call
    // Inline function 'kotlin.contracts.contract' call
    if (!!(this.ym2_1 ? this.xm2_1 == null : false)) {
      // Inline function 'nl.adaptivity.xmlutil.serialization.DeclaredNameInfo.<anonymous>' call
      var message = 'Default namespace requires there to be an annotated name';
      throw IllegalStateException_init_$Create$(toString(message));
    }
  }
  protoOf(DeclaredNameInfo).toString = function () {
    return 'DeclaredNameInfo(serialName=' + this.wm2_1 + ', annotatedName=' + this.xm2_1 + ', isDefaultNamespace=' + this.ym2_1 + ')';
  };
  protoOf(DeclaredNameInfo).hashCode = function () {
    var result = getStringHashCode(this.wm2_1);
    result = imul(result, 31) + (this.xm2_1 == null ? 0 : this.xm2_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ym2_1) | 0;
    return result;
  };
  protoOf(DeclaredNameInfo).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DeclaredNameInfo))
      return false;
    var tmp0_other_with_cast = other instanceof DeclaredNameInfo ? other : THROW_CCE();
    if (!(this.wm2_1 === tmp0_other_with_cast.wm2_1))
      return false;
    if (!equals(this.xm2_1, tmp0_other_with_cast.xm2_1))
      return false;
    if (!(this.ym2_1 === tmp0_other_with_cast.ym2_1))
      return false;
    return true;
  };
  function ActualNameInfo(serialName, annotatedName) {
    this.zm2_1 = serialName;
    this.am3_1 = annotatedName;
  }
  protoOf(ActualNameInfo).toString = function () {
    return 'ActualNameInfo(serialName=' + this.zm2_1 + ', annotatedName=' + this.am3_1 + ')';
  };
  protoOf(ActualNameInfo).hashCode = function () {
    var result = getStringHashCode(this.zm2_1);
    result = imul(result, 31) + this.am3_1.hashCode() | 0;
    return result;
  };
  protoOf(ActualNameInfo).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActualNameInfo))
      return false;
    var tmp0_other_with_cast = other instanceof ActualNameInfo ? other : THROW_CCE();
    if (!(this.zm2_1 === tmp0_other_with_cast.zm2_1))
      return false;
    if (!this.am3_1.equals(tmp0_other_with_cast.am3_1))
      return false;
    return true;
  };
  function XmlEncodeDefault(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function XmlEncodeDefault_ANNOTATED_getInstance() {
    XmlEncodeDefault_initEntries();
    return XmlEncodeDefault_ANNOTATED_instance;
  }
  function XmlSerializationPolicy() {
  }
  function Builder_init_$Init$_0(policy, $this) {
    Builder_0.call($this, policy.em2_1, policy.fm2_1, policy.gm2_1, policy.hm2_1, policy.im2_1, policy.jm2_1, policy.mlq(), policy.tlp());
    return $this;
  }
  function Builder_init_$Create$_0(policy) {
    return Builder_init_$Init$_0(policy, objectCreate(protoOf(Builder_0)));
  }
  function DefaultXmlSerializationPolicy_init_$Init$(pedantic, autoPolymorphic, encodeDefault, unknownChildHandler, typeDiscriminatorName, throwOnRepeatedElement, verifyElementOrder, $this) {
    autoPolymorphic = autoPolymorphic === VOID ? false : autoPolymorphic;
    encodeDefault = encodeDefault === VOID ? XmlEncodeDefault_ANNOTATED_getInstance() : encodeDefault;
    unknownChildHandler = unknownChildHandler === VOID ? Companion_getInstance_6().rm2_1 : unknownChildHandler;
    typeDiscriminatorName = typeDiscriminatorName === VOID ? null : typeDiscriminatorName;
    throwOnRepeatedElement = throwOnRepeatedElement === VOID ? false : throwOnRepeatedElement;
    verifyElementOrder = verifyElementOrder === VOID ? false : verifyElementOrder;
    DefaultXmlSerializationPolicy.call($this, pedantic, autoPolymorphic, encodeDefault, unknownChildHandler, typeDiscriminatorName, throwOnRepeatedElement, verifyElementOrder, false);
    return $this;
  }
  function DefaultXmlSerializationPolicy_init_$Create$(pedantic, autoPolymorphic, encodeDefault, unknownChildHandler, typeDiscriminatorName, throwOnRepeatedElement, verifyElementOrder) {
    return DefaultXmlSerializationPolicy_init_$Init$(pedantic, autoPolymorphic, encodeDefault, unknownChildHandler, typeDiscriminatorName, throwOnRepeatedElement, verifyElementOrder, objectCreate(protoOf(DefaultXmlSerializationPolicy)));
  }
  function DefaultXmlSerializationPolicy_init_$Init$_0(builder, $this) {
    DefaultXmlSerializationPolicy.call($this, builder.slj_1, builder.tlj_1, builder.ulj_1, builder.vlj_1, builder.wlj_1, builder.xlj_1, builder.ylj_1, builder.zlj_1);
    return $this;
  }
  function DefaultXmlSerializationPolicy_init_$Create$_0(builder) {
    return DefaultXmlSerializationPolicy_init_$Init$_0(builder, objectCreate(protoOf(DefaultXmlSerializationPolicy)));
  }
  function Builder_0(pedantic, autoPolymorphic, encodeDefault, unknownChildHandler, typeDiscriminatorName, throwOnRepeatedElement, verifyElementOrder, isStrictAttributeNames) {
    pedantic = pedantic === VOID ? false : pedantic;
    autoPolymorphic = autoPolymorphic === VOID ? false : autoPolymorphic;
    encodeDefault = encodeDefault === VOID ? XmlEncodeDefault_ANNOTATED_getInstance() : encodeDefault;
    unknownChildHandler = unknownChildHandler === VOID ? Companion_getInstance_6().rm2_1 : unknownChildHandler;
    typeDiscriminatorName = typeDiscriminatorName === VOID ? null : typeDiscriminatorName;
    throwOnRepeatedElement = throwOnRepeatedElement === VOID ? false : throwOnRepeatedElement;
    verifyElementOrder = verifyElementOrder === VOID ? false : verifyElementOrder;
    isStrictAttributeNames = isStrictAttributeNames === VOID ? false : isStrictAttributeNames;
    this.slj_1 = pedantic;
    this.tlj_1 = autoPolymorphic;
    this.ulj_1 = encodeDefault;
    this.vlj_1 = unknownChildHandler;
    this.wlj_1 = typeDiscriminatorName;
    this.xlj_1 = throwOnRepeatedElement;
    this.ylj_1 = verifyElementOrder;
    this.zlj_1 = isStrictAttributeNames;
  }
  protoOf(Builder_0).f3 = function () {
    return DefaultXmlSerializationPolicy_init_$Create$_0(this);
  };
  function initialChildReorderMap$toChildIndex(_this__u8e3s4, nameToIdx, $parentDescriptor) {
    var tmp;
    if (_this__u8e3s4 === '*') {
      tmp = -2;
    } else {
      var tmp1_elvis_lhs = nameToIdx.q(_this__u8e3s4);
      var tmp_0;
      if (tmp1_elvis_lhs == null) {
        throw new XmlSerialException('Could not find the attribute in ' + $parentDescriptor.q45() + ' with the name: ' + _this__u8e3s4 + '\n  Candidates were: ' + joinToString(nameToIdx.o2()));
      } else {
        tmp_0 = tmp1_elvis_lhs;
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function DefaultXmlSerializationPolicy$effectiveName$lambda() {
    return 'Type name info should match';
  }
  function DefaultXmlSerializationPolicy$elementNamespaceDecls$lambda(it) {
    return it instanceof XmlNamespaceDeclSpec;
  }
  function DefaultXmlSerializationPolicy$elementNamespaceDecls$lambda_0(decl) {
    return get_namespaces(decl);
  }
  function DefaultXmlSerializationPolicy(pedantic, autoPolymorphic, encodeDefault, unknownChildHandler, typeDiscriminatorName, throwOnRepeatedElement, verifyElementOrder, isStrictNames) {
    autoPolymorphic = autoPolymorphic === VOID ? false : autoPolymorphic;
    encodeDefault = encodeDefault === VOID ? XmlEncodeDefault_ANNOTATED_getInstance() : encodeDefault;
    unknownChildHandler = unknownChildHandler === VOID ? Companion_getInstance_6().rm2_1 : unknownChildHandler;
    typeDiscriminatorName = typeDiscriminatorName === VOID ? null : typeDiscriminatorName;
    throwOnRepeatedElement = throwOnRepeatedElement === VOID ? false : throwOnRepeatedElement;
    verifyElementOrder = verifyElementOrder === VOID ? false : verifyElementOrder;
    this.em2_1 = pedantic;
    this.fm2_1 = autoPolymorphic;
    this.gm2_1 = encodeDefault;
    this.hm2_1 = unknownChildHandler;
    this.im2_1 = typeDiscriminatorName;
    this.jm2_1 = throwOnRepeatedElement;
    this.km2_1 = verifyElementOrder;
    this.lm2_1 = isStrictNames;
  }
  protoOf(DefaultXmlSerializationPolicy).mlq = function () {
    return this.km2_1;
  };
  protoOf(DefaultXmlSerializationPolicy).tlp = function () {
    return this.lm2_1;
  };
  protoOf(DefaultXmlSerializationPolicy).jm3 = function (serializerParent, tagParent) {
    return this.im2_1;
  };
  protoOf(DefaultXmlSerializationPolicy).hm3 = function (serializerParent, tagParent) {
    var useAnnotations = tagParent.bm4();
    var tmp$ret$0;
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator = useAnnotations.w();
      while (tmp0_iterator.f()) {
        var e = tmp0_iterator.e();
        if (e instanceof XmlValue) {
          tmp$ret$0 = e;
          break $l$block;
        }
      }
      tmp$ret$0 = null;
    }
    var tmp0_safe_receiver = tmp$ret$0;
    var isMixed = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wlt_1) === true;
    if (isMixed)
      return true;
    var tmp$ret$1;
    $l$block_0: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator_0 = useAnnotations.w();
      while (tmp0_iterator_0.f()) {
        var e_0 = tmp0_iterator_0.e();
        if (e_0 instanceof XmlChildrenName) {
          tmp$ret$1 = e_0;
          break $l$block_0;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp1_safe_receiver = tmp$ret$1;
    var reqChildrenName = tmp1_safe_receiver == null ? null : toQName_0(tmp1_safe_receiver);
    return reqChildrenName == null;
  };
  protoOf(DefaultXmlSerializationPolicy).im3 = function (serializerParent, tagParent) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator = tagParent.bm4().w();
      while (tmp0_iterator.f()) {
        var e = tmp0_iterator.e();
        if (e instanceof XmlPolyChildren) {
          tmp$ret$0 = e;
          break $l$block;
        }
      }
      tmp$ret$0 = null;
    }
    var xmlPolyChildren = tmp$ret$0;
    return this.fm2_1 ? true : !(xmlPolyChildren == null);
  };
  protoOf(DefaultXmlSerializationPolicy).mm3 = function (serializerParent, tagParent) {
    return this.nm3(serializerParent, tagParent, true);
  };
  protoOf(DefaultXmlSerializationPolicy).nm3 = function (serializerParent, tagParent, canBeAttribute) {
    var tmp0_safe_receiver = this.pm3(serializerParent, tagParent);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q44();
    var serialDescriptor = tmp1_elvis_lhs == null ? serializerParent.cm4() : tmp1_elvis_lhs;
    var overrideOutputKind = serializerParent.dm4();
    var tmp;
    switch (overrideOutputKind == null ? -1 : overrideOutputKind.za_1) {
      case -1:
        var useAnnotations = tagParent.bm4();
        var tmp$ret$0;
        $l$block: {
          // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
          var tmp0_iterator = useAnnotations.w();
          while (tmp0_iterator.f()) {
            var e = tmp0_iterator.e();
            if (e instanceof XmlValue) {
              tmp$ret$0 = e;
              break $l$block;
            }
          }
          tmp$ret$0 = null;
        }

        var tmp2_safe_receiver = tmp$ret$0;
        var isValue = (tmp2_safe_receiver == null ? null : tmp2_safe_receiver.wlt_1) === true;
        var parentChildDesc = tagParent.cm4();
        while (parentChildDesc.h46()) {
          parentChildDesc = parentChildDesc.k46(0);
        }

        var elementKind = parentChildDesc.i46();
        var tmp_0;
        if (equals(elementKind, CLASS_getInstance())) {
          tmp_0 = OutputKind_Element_getInstance();
        } else if (isValue) {
          tmp_0 = OutputKind_Mixed_getInstance();
        } else if (!canBeAttribute ? equals(tagParent.dm4(), OutputKind_Attribute_getInstance()) : false) {
          tmp_0 = this.om3(serializerParent, tagParent, OutputKind_Attribute_getInstance());
        } else if (!canBeAttribute) {
          tmp_0 = OutputKind_Element_getInstance();
        } else {
          var tmp3_elvis_lhs = tagParent.dm4();
          var tmp4_elvis_lhs = tmp3_elvis_lhs == null ? declOutputKind(serialDescriptor) : tmp3_elvis_lhs;
          tmp_0 = tmp4_elvis_lhs == null ? this.dm3(serialDescriptor.i46()) : tmp4_elvis_lhs;
        }

        tmp = tmp_0;
        break;
      case 3:
        var tmp_1;
        var tmp_2 = serializerParent.q44();
        if (tmp_2 instanceof XmlListDescriptor) {
          var tmp_3;
          if (equals(tagParent.cm4().i46(), CLASS_getInstance())) {
            tmp_3 = OutputKind_Element_getInstance();
          } else {
            tmp_3 = OutputKind_Mixed_getInstance();
          }
          tmp_1 = tmp_3;
        } else {
          var tmp5_elvis_lhs = tagParent.dm4();
          var tmp6_elvis_lhs = tmp5_elvis_lhs == null ? declOutputKind(serialDescriptor) : tmp5_elvis_lhs;
          var outputKind = tmp6_elvis_lhs == null ? this.dm3(serialDescriptor.i46()) : tmp6_elvis_lhs;
          tmp_1 = outputKind.za_1 === 1 ? OutputKind_Text_getInstance() : outputKind;
        }

        tmp = tmp_1;
        break;
      default:
        tmp = overrideOutputKind;
        break;
    }
    return tmp;
  };
  protoOf(DefaultXmlSerializationPolicy).km3 = function (serialName, parentNamespace) {
    var tmp;
    switch (serialName) {
      case 'kotlin.Boolean':
        tmp = new QName('http://www.w3.org/2001/XMLSchema', 'boolean', 'xsd');
        break;
      case 'kotlin.Byte':
        tmp = new QName('http://www.w3.org/2001/XMLSchema', 'byte', 'xsd');
        break;
      case 'kotlin.UByte':
        tmp = new QName('http://www.w3.org/2001/XMLSchema', 'unsignedByte', 'xsd');
        break;
      case 'kotlin.Short':
        tmp = new QName('http://www.w3.org/2001/XMLSchema', 'short', 'xsd');
        break;
      case 'kotlin.UShort':
        tmp = new QName('http://www.w3.org/2001/XMLSchema', 'unsignedShort', 'xsd');
        break;
      case 'kotlin.Int':
        tmp = new QName('http://www.w3.org/2001/XMLSchema', 'int', 'xsd');
        break;
      case 'kotlin.UInt':
        tmp = new QName('http://www.w3.org/2001/XMLSchema', 'unsignedInt', 'xsd');
        break;
      case 'kotlin.Long':
        tmp = new QName('http://www.w3.org/2001/XMLSchema', 'long', 'xsd');
        break;
      case 'kotlin.ULong':
        tmp = new QName('http://www.w3.org/2001/XMLSchema', 'unsignedLong', 'xsd');
        break;
      case 'kotlin.Float':
      case 'kotlin.Double':
        tmp = new QName('http://www.w3.org/2001/XMLSchema', 'double', 'xsd');
        break;
      case 'kotlin.String':
        tmp = new QName('http://www.w3.org/2001/XMLSchema', 'string', 'xsd');
        break;
      default:
        tmp = toQname(substringAfterLast(serialName, _Char___init__impl__6a9atx(46)), parentNamespace);
        break;
    }
    return tmp;
  };
  protoOf(DefaultXmlSerializationPolicy).gm3 = function (serializerParent, tagParent, outputKind, useName) {
    var typeDescriptor = serializerParent.em4();
    var serialKind = typeDescriptor.fm4_1.i46();
    var typeNameInfo = typeDescriptor.gm4_1;
    var parentNamespace = tagParent.xm3();
    var tmp = typeNameInfo.equals(typeDescriptor.gm4_1);
    assert_0(tmp, DefaultXmlSerializationPolicy$effectiveName$lambda);
    var tmp0_safe_receiver = tagParent.q44();
    var parentSerialKind = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cm2();
    var tmp_0;
    if (outputKind.equals(OutputKind_Attribute_getInstance())) {
      var tmp_1;
      if (useName.ym2_1) {
        var tmp1_safe_receiver = useName.xm2_1;
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ll9();
        tmp_1 = QName_init_$Create$(tmp2_elvis_lhs == null ? useName.wm2_1 : tmp2_elvis_lhs);
      } else if (!(useName.xm2_1 == null)) {
        tmp_1 = useName.xm2_1;
      } else {
        tmp_1 = QName_init_$Create$(useName.wm2_1);
      }
      tmp_0 = tmp_1;
    } else {
      if (!(useName.xm2_1 == null)) {
        tmp_0 = useName.xm2_1;
      } else {
        var tmp_2;
        var tmp_3;
        var tmp_4;
        var tmp_5;
        var tmp_6;
        if (serialKind instanceof PrimitiveKind) {
          tmp_6 = true;
        } else {
          tmp_6 = equals(serialKind, MAP_getInstance());
        }
        if (tmp_6) {
          tmp_5 = true;
        } else {
          tmp_5 = equals(serialKind, LIST_getInstance());
        }
        if (tmp_5) {
          tmp_4 = true;
        } else {
          tmp_4 = equals(serialKind, OPEN_getInstance());
        }
        if (tmp_4) {
          tmp_3 = true;
        } else {
          tmp_3 = typeNameInfo.wm2_1 === 'kotlin.Unit';
        }
        if (tmp_3) {
          tmp_2 = true;
        } else {
          tmp_2 = parentSerialKind instanceof PolymorphicKind;
        }
        if (tmp_2) {
          tmp_0 = this.lm3(useName, parentNamespace);
        } else {
          if (!(typeNameInfo.xm2_1 == null)) {
            tmp_0 = typeNameInfo.xm2_1;
          } else {
            tmp_0 = this.tlh(typeNameInfo, parentNamespace);
          }
        }
      }
    }
    return tmp_0;
  };
  protoOf(DefaultXmlSerializationPolicy).ym0 = function (elementDescriptor) {
    var tmp;
    switch (this.gm2_1.za_1) {
      case 2:
        tmp = false;
        break;
      case 0:
        tmp = true;
        break;
      case 1:
        var tmp1_safe_receiver = elementDescriptor instanceof XmlValueDescriptor ? elementDescriptor : null;
        tmp = (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.plm_1) == null;
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  };
  protoOf(DefaultXmlSerializationPolicy).ulp = function (input, inputKind, descriptor, name, candidates) {
    return this.hm2_1.nm2(input, inputKind, descriptor, name, candidates);
  };
  protoOf(DefaultXmlSerializationPolicy).qm3 = function (input, inputKind, name, candidates) {
    throw UnsupportedOperationException_init_$Create$('this function should not be called');
  };
  protoOf(DefaultXmlSerializationPolicy).vlp = function (parentDescriptor, childIndex) {
    if (this.jm2_1) {
      throw new XmlSerialException('Duplicate child (' + parentDescriptor.k46(childIndex) + ' found in ' + parentDescriptor + ' outside of eluded list context');
    }
  };
  protoOf(DefaultXmlSerializationPolicy).pm3 = function (serializerParent, tagParent) {
    switch (serializerParent.cm4().q45()) {
      case 'javax.xml.namespace.QName?':
      case 'javax.xml.namespace.QName':
        return serializerParent.cm4().b46() ? get_nullable(XmlQNameSerializer_getInstance()) : XmlQNameSerializer_getInstance();
      default:
        return null;
    }
  };
  protoOf(DefaultXmlSerializationPolicy).sm3 = function (parentDescriptor) {
    // Inline function 'kotlin.collections.associateBy' call
    var this_0 = until(0, parentDescriptor.g46());
    var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
    // Inline function 'kotlin.collections.associateByTo' call
    var destination = LinkedHashMap_init_$Create$_0(capacity);
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'nl.adaptivity.xmlutil.serialization.DefaultXmlSerializationPolicy.initialChildReorderMap.<anonymous>' call
      var tmp$ret$0 = parentDescriptor.m46(element);
      destination.s(tmp$ret$0, element);
    }
    var nameToIdx = destination;
    var orderConstraints = HashSet_init_$Create$();
    // Inline function 'kotlin.collections.mutableMapOf' call
    var orderNodes = LinkedHashMap_init_$Create$();
    var inductionVariable = 0;
    var last = parentDescriptor.g46();
    if (inductionVariable < last)
      do {
        var elementIdx = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var xmlBefore = null;
        var xmlAfter = null;
        var tmp1_iterator = parentDescriptor.j46(elementIdx).w();
        while (tmp1_iterator.f()) {
          var annotation = tmp1_iterator.e();
          var tmp;
          if (annotation instanceof XmlBefore) {
            // Inline function 'kotlin.collections.isNotEmpty' call
            // Inline function 'kotlin.collections.isEmpty' call
            tmp = !(annotation.im4_1.length === 0);
          } else {
            tmp = false;
          }
          if (tmp) {
            // Inline function 'kotlin.collections.mapTo' call
            var indexedObject = annotation.im4_1;
            var inductionVariable_0 = 0;
            var last_0 = indexedObject.length;
            while (inductionVariable_0 < last_0) {
              var item = indexedObject[inductionVariable_0];
              inductionVariable_0 = inductionVariable_0 + 1 | 0;
              // Inline function 'nl.adaptivity.xmlutil.serialization.DefaultXmlSerializationPolicy.initialChildReorderMap.<anonymous>' call
              var successorIdx = initialChildReorderMap$toChildIndex(item, nameToIdx, parentDescriptor);
              var tmp$ret$6 = new XmlOrderConstraint(elementIdx, successorIdx);
              orderConstraints.i1(tmp$ret$6);
            }
            xmlBefore = annotation.im4_1;
          } else {
            var tmp_0;
            if (annotation instanceof XmlAfter) {
              // Inline function 'kotlin.collections.isNotEmpty' call
              // Inline function 'kotlin.collections.isEmpty' call
              tmp_0 = !(annotation.jm4_1.length === 0);
            } else {
              tmp_0 = false;
            }
            if (tmp_0) {
              // Inline function 'kotlin.collections.mapTo' call
              var indexedObject_0 = annotation.jm4_1;
              var inductionVariable_1 = 0;
              var last_1 = indexedObject_0.length;
              while (inductionVariable_1 < last_1) {
                var item_0 = indexedObject_0[inductionVariable_1];
                inductionVariable_1 = inductionVariable_1 + 1 | 0;
                // Inline function 'nl.adaptivity.xmlutil.serialization.DefaultXmlSerializationPolicy.initialChildReorderMap.<anonymous>' call
                var predecessorIdx = initialChildReorderMap$toChildIndex(item_0, nameToIdx, parentDescriptor);
                var tmp$ret$10 = new XmlOrderConstraint(predecessorIdx, elementIdx);
                orderConstraints.i1(tmp$ret$10);
              }
              xmlAfter = annotation.jm4_1;
            }
          }
          if (!(xmlBefore == null) ? true : !(xmlAfter == null)) {
            // Inline function 'kotlin.collections.getOrPut' call
            var key = parentDescriptor.m46(elementIdx);
            var value = orderNodes.q(key);
            var tmp_1;
            if (value == null) {
              // Inline function 'nl.adaptivity.xmlutil.serialization.DefaultXmlSerializationPolicy.initialChildReorderMap.<anonymous>' call
              var answer = new XmlOrderNode(elementIdx);
              orderNodes.s(key, answer);
              tmp_1 = answer;
            } else {
              tmp_1 = value;
            }
            var node = tmp_1;
            if (!(xmlBefore == null)) {
              var tmp_2 = 0;
              var tmp_3 = xmlBefore.length;
              // Inline function 'kotlin.arrayOfNulls' call
              var tmp_4 = fillArrayVal(Array(tmp_3), null);
              while (tmp_2 < tmp_3) {
                var tmp_5 = tmp_2;
                var name = xmlBefore[tmp_5];
                // Inline function 'kotlin.collections.getOrPut' call
                var value_0 = orderNodes.q(name);
                var tmp_6;
                if (value_0 == null) {
                  // Inline function 'nl.adaptivity.xmlutil.serialization.DefaultXmlSerializationPolicy.initialChildReorderMap.<anonymous>' call
                  var answer_0 = new XmlOrderNode(initialChildReorderMap$toChildIndex(name, nameToIdx, parentDescriptor));
                  orderNodes.s(name, answer_0);
                  tmp_6 = answer_0;
                } else {
                  tmp_6 = value_0;
                }
                tmp_4[tmp_5] = tmp_6;
                tmp_2 = tmp_2 + 1 | 0;
              }
              var befores = tmp_4;
              node.om4(befores.slice());
            }
            if (!(xmlAfter == null)) {
              var tmp_7 = 0;
              var tmp_8 = xmlAfter.length;
              // Inline function 'kotlin.arrayOfNulls' call
              var tmp_9 = fillArrayVal(Array(tmp_8), null);
              while (tmp_7 < tmp_8) {
                var tmp_10 = tmp_7;
                var name_0 = xmlAfter[tmp_10];
                // Inline function 'kotlin.collections.getOrPut' call
                var value_1 = orderNodes.q(name_0);
                var tmp_11;
                if (value_1 == null) {
                  // Inline function 'nl.adaptivity.xmlutil.serialization.DefaultXmlSerializationPolicy.initialChildReorderMap.<anonymous>' call
                  var answer_1 = new XmlOrderNode(initialChildReorderMap$toChildIndex(name_0, nameToIdx, parentDescriptor));
                  orderNodes.s(name_0, answer_1);
                  tmp_11 = answer_1;
                } else {
                  tmp_11 = value_1;
                }
                tmp_9[tmp_10] = tmp_11;
                tmp_7 = tmp_7 + 1 | 0;
              }
              var afters = tmp_9;
              node.pm4(afters.slice());
            }
          }
        }
      }
       while (inductionVariable < last);
    if (orderNodes.c1())
      return null;
    return orderConstraints.c1() ? null : toList(orderConstraints);
  };
  protoOf(DefaultXmlSerializationPolicy).tm3 = function (serializerParent, tagParent) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator = serializerParent.bm4().w();
      while (tmp0_iterator.f()) {
        var e = tmp0_iterator.e();
        if (e instanceof XmlIgnoreWhitespace) {
          tmp$ret$0 = e;
          break $l$block;
        }
      }
      tmp$ret$0 = null;
    }
    var tmp0_safe_receiver = tmp$ret$0;
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.apply' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.DefaultXmlSerializationPolicy.preserveSpace.<anonymous>' call
      return !tmp0_safe_receiver.qm4_1;
    }
    var tmp$ret$2;
    $l$block_0: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator_0 = serializerParent.cm4().f46().w();
      while (tmp0_iterator_0.f()) {
        var e_0 = tmp0_iterator_0.e();
        if (e_0 instanceof XmlIgnoreWhitespace) {
          tmp$ret$2 = e_0;
          break $l$block_0;
        }
      }
      tmp$ret$2 = null;
    }
    var tmp1_safe_receiver = tmp$ret$2;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.qm4_1;
    return !(tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs);
  };
  protoOf(DefaultXmlSerializationPolicy).um3 = function (serializerParent) {
    return DeclaredNameInfo_init_$Create$('key');
  };
  protoOf(DefaultXmlSerializationPolicy).vm3 = function (serializerParent, isListEluded) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator = serializerParent.bm4().w();
      while (tmp0_iterator.f()) {
        var e = tmp0_iterator.e();
        if (e instanceof XmlChildrenName) {
          tmp$ret$0 = e;
          break $l$block;
        }
      }
      tmp$ret$0 = null;
    }
    var childAnnotation = tmp$ret$0;
    var childrenName = childAnnotation == null ? null : toQName_0(childAnnotation);
    return new DeclaredNameInfo('value', childrenName, (childAnnotation == null ? null : childAnnotation.olk_1) === get_UNSET_ANNOTATION_VALUE());
  };
  protoOf(DefaultXmlSerializationPolicy).wm3 = function (serializerParent, isListEluded) {
    if (isListEluded) {
      var tmp0_safe_receiver = serializerParent.rm3().xm2_1;
      if (tmp0_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        return tmp0_safe_receiver;
      }
    }
    return QName_init_$Create$_0(serializerParent.xm3().ll5(), 'entry');
  };
  protoOf(DefaultXmlSerializationPolicy).ym3 = function (mapParent, valueDescriptor) {
    var keyDescriptor = mapParent.cm4().k46(0);
    var keyUseName = this.um3(mapParent);
    var pseudoKeyParent = new InjectedParentTag(0, new XmlTypeDescriptor(keyDescriptor, mapParent.xm3()), keyUseName, mapParent.xm3());
    var keyEffectiveOutputKind = this.nm3(pseudoKeyParent, pseudoKeyParent, true);
    if (!keyEffectiveOutputKind.rlg())
      return false;
    var keyName = this.gm3(pseudoKeyParent, pseudoKeyParent, keyEffectiveOutputKind, keyUseName);
    // Inline function 'kotlin.collections.forEach' call
    // Inline function 'kotlin.collections.map' call
    var this_0 = until(0, valueDescriptor.g46());
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'nl.adaptivity.xmlutil.serialization.DefaultXmlSerializationPolicy.isMapValueCollapsed.<anonymous>' call
      var tmp$ret$0 = valueDescriptor.k46(item);
      destination.i1(tmp$ret$0);
    }
    var tmp0_iterator_0 = destination.w();
    while (tmp0_iterator_0.f()) {
      var element = tmp0_iterator_0.e();
      // Inline function 'nl.adaptivity.xmlutil.serialization.DefaultXmlSerializationPolicy.isMapValueCollapsed.<anonymous>' call
      if (isEquivalent(element.gli(), keyName))
        return false;
    }
    return true;
  };
  protoOf(DefaultXmlSerializationPolicy).zm3 = function (serializerParent) {
    var annotations = plus_1(asSequence_1(serializerParent.bm4()), serializerParent.em4().fm4_1.f46());
    // Inline function 'kotlin.sequences.filterIsInstance' call
    var tmp = filter(annotations, DefaultXmlSerializationPolicy$elementNamespaceDecls$lambda);
    var tmp_0 = isInterface(tmp, Sequence) ? tmp : THROW_CCE();
    return toList_0(flatMap(tmp_0, DefaultXmlSerializationPolicy$elementNamespaceDecls$lambda_0));
  };
  protoOf(DefaultXmlSerializationPolicy).fm3 = function (message) {
    if (this.em2_1)
      throw new XmlSerialException(message);
  };
  function typeQName(_this__u8e3s4, xmlDescriptor) {
    var tmp0_elvis_lhs = xmlDescriptor.rm4().sm4();
    return tmp0_elvis_lhs == null ? _this__u8e3s4.tlh(xmlDescriptor.rm4().gm4_1, xmlDescriptor.ali_1.xm3()) : tmp0_elvis_lhs;
  }
  function XmlSerialName(value, namespace, prefix) {
    value = value === VOID ? 'ZXC\x01VBNBVCXZ' : value;
    namespace = namespace === VOID ? 'ZXC\x01VBNBVCXZ' : namespace;
    prefix = prefix === VOID ? 'ZXC\x01VBNBVCXZ' : prefix;
    this.klk_1 = value;
    this.llk_1 = namespace;
    this.mlk_1 = prefix;
  }
  protoOf(XmlSerialName).equals = function (other) {
    if (!(other instanceof XmlSerialName))
      return false;
    var tmp0_other_with_cast = other instanceof XmlSerialName ? other : THROW_CCE();
    if (!(this.klk_1 === tmp0_other_with_cast.klk_1))
      return false;
    if (!(this.llk_1 === tmp0_other_with_cast.llk_1))
      return false;
    if (!(this.mlk_1 === tmp0_other_with_cast.mlk_1))
      return false;
    return true;
  };
  protoOf(XmlSerialName).hashCode = function () {
    var result = imul(getStringHashCode('value'), 127) ^ getStringHashCode(this.klk_1);
    result = result + (imul(getStringHashCode('namespace'), 127) ^ getStringHashCode(this.llk_1)) | 0;
    result = result + (imul(getStringHashCode('prefix'), 127) ^ getStringHashCode(this.mlk_1)) | 0;
    return result;
  };
  protoOf(XmlSerialName).toString = function () {
    return '@nl.adaptivity.xmlutil.serialization.XmlSerialName(value=' + this.klk_1 + ', namespace=' + this.llk_1 + ', prefix=' + this.mlk_1 + ')';
  };
  function get_UNSET_ANNOTATION_VALUE() {
    return UNSET_ANNOTATION_VALUE;
  }
  var UNSET_ANNOTATION_VALUE;
  function XmlPolyChildren() {
  }
  function XmlElement() {
  }
  function XmlId() {
  }
  function XmlValue(value) {
    value = value === VOID ? true : value;
    this.wlt_1 = value;
  }
  protoOf(XmlValue).equals = function (other) {
    if (!(other instanceof XmlValue))
      return false;
    var tmp0_other_with_cast = other instanceof XmlValue ? other : THROW_CCE();
    if (!(this.wlt_1 === tmp0_other_with_cast.wlt_1))
      return false;
    return true;
  };
  protoOf(XmlValue).hashCode = function () {
    return imul(getStringHashCode('value'), 127) ^ getBooleanHashCode(this.wlt_1);
  };
  protoOf(XmlValue).toString = function () {
    return '@nl.adaptivity.xmlutil.serialization.XmlValue(value=' + this.wlt_1 + ')';
  };
  function XmlChildrenName() {
  }
  function XmlCData() {
  }
  function XmlDefault() {
  }
  function XmlOtherAttributes() {
  }
  function XmlBefore() {
  }
  function XmlAfter() {
  }
  function XmlIgnoreWhitespace() {
  }
  function XmlNamespaceDeclSpec() {
  }
  function get_namespaces(_this__u8e3s4) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = split_0(_this__u8e3s4.tm4_1, charArrayOf([_Char___init__impl__6a9atx(59)]));
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'nl.adaptivity.xmlutil.serialization.<get-namespaces>.<anonymous>' call
      var eq = indexOf(item, _Char___init__impl__6a9atx(61));
      var tmp;
      if (eq === -1) {
        tmp = new NamespaceImpl('', item);
      } else {
        // Inline function 'kotlin.text.substring' call
        // Inline function 'kotlin.js.asDynamic' call
        var tmp_0 = item.substring(0, eq);
        // Inline function 'kotlin.text.substring' call
        var startIndex = eq + 1 | 0;
        // Inline function 'kotlin.js.asDynamic' call
        var tmp$ret$3 = item.substring(startIndex);
        tmp = new NamespaceImpl(tmp_0, tmp$ret$3);
      }
      var tmp$ret$4 = tmp;
      destination.i1(tmp$ret$4);
    }
    return destination;
  }
  function ChildCollector(wantedBaseClass) {
    wantedBaseClass = wantedBaseClass === VOID ? null : wantedBaseClass;
    this.blh_1 = wantedBaseClass;
    var tmp = this;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp.clh_1 = ArrayList_init_$Create$();
  }
  protoOf(ChildCollector).v4o = function (baseClass, defaultDeserializerProvider) {
  };
  protoOf(ChildCollector).u4o = function (baseClass, defaultSerializerProvider) {
  };
  protoOf(ChildCollector).s4o = function (kClass, serializer) {
  };
  protoOf(ChildCollector).q4o = function (kClass, provider) {
  };
  protoOf(ChildCollector).t4o = function (baseClass, actualClass, actualSerializer) {
    if (this.blh_1 == null ? true : equals(this.blh_1, baseClass)) {
      this.clh_1.i1(actualSerializer);
    }
  };
  function DummyDecoder(value) {
    this.um4_1 = value;
  }
  protoOf(DummyDecoder).v47 = function () {
    var tmp = this.um4_1;
    return (!(tmp == null) ? typeof tmp === 'boolean' : false) ? tmp : THROW_CCE();
  };
  protoOf(DummyDecoder).w47 = function () {
    var tmp = this.um4_1;
    return (!(tmp == null) ? typeof tmp === 'number' : false) ? tmp : THROW_CCE();
  };
  protoOf(DummyDecoder).c48 = function () {
    var tmp = this.um4_1;
    return tmp instanceof Char ? tmp.rb_1 : THROW_CCE();
  };
  protoOf(DummyDecoder).b48 = function () {
    var tmp = this.um4_1;
    return (!(tmp == null) ? typeof tmp === 'number' : false) ? tmp : THROW_CCE();
  };
  protoOf(DummyDecoder).a48 = function () {
    var tmp = this.um4_1;
    return (!(tmp == null) ? typeof tmp === 'number' : false) ? tmp : THROW_CCE();
  };
  protoOf(DummyDecoder).y47 = function () {
    var tmp = this.um4_1;
    return (!(tmp == null) ? typeof tmp === 'number' : false) ? tmp : THROW_CCE();
  };
  protoOf(DummyDecoder).z47 = function () {
    var tmp = this.um4_1;
    return tmp instanceof Long ? tmp : THROW_CCE();
  };
  protoOf(DummyDecoder).x47 = function () {
    var tmp = this.um4_1;
    return (!(tmp == null) ? typeof tmp === 'number' : false) ? tmp : THROW_CCE();
  };
  protoOf(DummyDecoder).d48 = function () {
    var tmp = this.um4_1;
    return (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE();
  };
  protoOf(DummyDecoder).e48 = function (enumDescriptor) {
    var tmp = this.um4_1;
    return (tmp instanceof Enum ? tmp : THROW_CCE()).za_1;
  };
  protoOf(DummyDecoder).h48 = function (deserializer) {
    var tmp = this.um4_1;
    return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();
  };
  protoOf(DummyDecoder).f48 = function (inlineDescriptor) {
    return this;
  };
  protoOf(DummyDecoder).t47 = function () {
    return this.um4_1 == null;
  };
  protoOf(DummyDecoder).u47 = function () {
    var tmp = this.um4_1;
    var tmp_0;
    var tmp_1;
    if (tmp == null) {
      tmp_1 = true;
    } else {
      tmp_1 = false;
    }
    if (tmp_1) {
      tmp_0 = tmp;
    } else {
      tmp_0 = THROW_CCE();
    }
    return tmp_0;
  };
  protoOf(DummyDecoder).i48 = function (descriptor) {
    throw UnsupportedOperationException_init_$Create$('Explicit decoding of elements of hardcoded values is not supported');
  };
  function recordNamespace($this, prefix, namespaceUri) {
    // Inline function 'kotlin.collections.contains' call
    // Inline function 'kotlin.collections.containsKey' call
    var this_0 = $this.wm4_1;
    if (!(isInterface(this_0, Map) ? this_0 : THROW_CCE()).r(namespaceUri)) {
      // Inline function 'kotlin.text.isEmpty' call
      if (charSequenceLength(namespaceUri) === 0) {
        var existingDefaultNamespace = $this.vm4_1.q('');
        if (!(existingDefaultNamespace == null)) {
          $this.wm4_1.u2(existingDefaultNamespace);
          $this.xm4_1.i1(existingDefaultNamespace);
        }
        // Inline function 'kotlin.collections.set' call
        $this.wm4_1.s('', '');
        // Inline function 'kotlin.collections.set' call
        $this.vm4_1.s('', '');
      } else {
        // Inline function 'kotlin.collections.contains' call
        // Inline function 'kotlin.collections.containsKey' call
        var this_1 = $this.vm4_1;
        if ((isInterface(this_1, Map) ? this_1 : THROW_CCE()).r(prefix)) {
          $this.xm4_1.i1(namespaceUri);
        } else {
          if ($this.xm4_1.a1(namespaceUri)) {
            $this.xm4_1.j1(namespaceUri);
          }
          // Inline function 'kotlin.collections.set' call
          $this.vm4_1.s(prefix, namespaceUri);
          // Inline function 'kotlin.collections.set' call
          $this.wm4_1.s(namespaceUri, prefix);
        }
      }
    }
  }
  function NamespaceCollectingXmlWriter$namespaceContext$1(this$0) {
    this.am5_1 = this$0;
  }
  protoOf(NamespaceCollectingXmlWriter$namespaceContext$1).gl5 = function (namespaceURI) {
    return this.am5_1.ql7(namespaceURI);
  };
  protoOf(NamespaceCollectingXmlWriter$namespaceContext$1).fl5 = function (prefix) {
    return this.am5_1.pl7(prefix);
  };
  protoOf(NamespaceCollectingXmlWriter$namespaceContext$1).il5 = function (namespaceURI) {
    return listOfNotNull(this.gl5(namespaceURI)).w();
  };
  function NamespaceCollectingXmlWriter(prefixToUriMap, uriToPrefixMap, pendingNamespaces) {
    this.vm4_1 = prefixToUriMap;
    this.wm4_1 = uriToPrefixMap;
    this.xm4_1 = pendingNamespaces;
    this.ym4_1 = 0;
    this.zm4_1 = '';
  }
  protoOf(NamespaceCollectingXmlWriter).pl5 = function () {
    return this.ym4_1;
  };
  protoOf(NamespaceCollectingXmlWriter).rl7 = function (_set____db54di) {
    this.zm4_1 = _set____db54di;
  };
  protoOf(NamespaceCollectingXmlWriter).sl7 = function () {
    return this.zm4_1;
  };
  protoOf(NamespaceCollectingXmlWriter).fl7 = function (namespacePrefix, namespaceUri) {
    recordNamespace(this, namespacePrefix, namespaceUri);
  };
  protoOf(NamespaceCollectingXmlWriter).pl7 = function (prefix) {
    return this.vm4_1.q(prefix);
  };
  protoOf(NamespaceCollectingXmlWriter).ql7 = function (namespaceUri) {
    // Inline function 'kotlin.collections.get' call
    var this_0 = this.wm4_1;
    return (isInterface(this_0, Map) ? this_0 : THROW_CCE()).q(namespaceUri);
  };
  protoOf(NamespaceCollectingXmlWriter).kl7 = function (namespace, name, prefix, value) {
    if (namespace === 'http://www.w3.org/2000/xmlns/') {
      if (prefix === 'xmlns') {
        this.fl7(prefix, value);
      } else {
        if (prefix === '') {
          this.fl7(name, value);
        }
      }
    }
  };
  protoOf(NamespaceCollectingXmlWriter).wl5 = function () {
    return new NamespaceCollectingXmlWriter$namespaceContext$1(this);
  };
  protoOf(NamespaceCollectingXmlWriter).gl7 = function (namespace, localName, prefix) {
    this.ym4_1 = this.ym4_1 + 1 | 0;
  };
  protoOf(NamespaceCollectingXmlWriter).ol7 = function (namespace, localName, prefix) {
    this.ym4_1 = this.ym4_1 - 1 | 0;
  };
  protoOf(NamespaceCollectingXmlWriter).n = function () {
  };
  protoOf(NamespaceCollectingXmlWriter).al7 = function (text) {
  };
  protoOf(NamespaceCollectingXmlWriter).hl7 = function (text) {
  };
  protoOf(NamespaceCollectingXmlWriter).il7 = function (text) {
  };
  protoOf(NamespaceCollectingXmlWriter).jl7 = function (text) {
  };
  protoOf(NamespaceCollectingXmlWriter).bl7 = function (text) {
  };
  protoOf(NamespaceCollectingXmlWriter).sl6 = function (text) {
  };
  protoOf(NamespaceCollectingXmlWriter).dl7 = function (text) {
  };
  protoOf(NamespaceCollectingXmlWriter).ll7 = function (version, encoding, standalone) {
  };
  protoOf(NamespaceCollectingXmlWriter).nl7 = function () {
  };
  function remapPrefix(_this__u8e3s4, $this) {
    var prefixMap = $this.cm5_1;
    return remapPrefix_0(_this__u8e3s4, prefixMap);
  }
  function PrefixWrappingPolicy(basePolicy, prefixMap) {
    this.bm5_1 = basePolicy;
    this.cm5_1 = prefixMap;
  }
  protoOf(PrefixWrappingPolicy).cm3 = function () {
    return this.bm5_1.cm3();
  };
  protoOf(PrefixWrappingPolicy).bm3 = function () {
    return this.bm5_1.bm3();
  };
  protoOf(PrefixWrappingPolicy).tlp = function () {
    return this.bm5_1.tlp();
  };
  protoOf(PrefixWrappingPolicy).mlq = function () {
    return this.bm5_1.mlq();
  };
  protoOf(PrefixWrappingPolicy).am4 = function (serializerParent, tagParent) {
    return this.bm5_1.am4(serializerParent, tagParent);
  };
  protoOf(PrefixWrappingPolicy).mm3 = function (serializerParent, tagParent) {
    return this.bm5_1.mm3(serializerParent, tagParent);
  };
  protoOf(PrefixWrappingPolicy).nm3 = function (serializerParent, tagParent, canBeAttribute) {
    return this.bm5_1.nm3(serializerParent, tagParent, canBeAttribute);
  };
  protoOf(PrefixWrappingPolicy).zm3 = function (serializerParent) {
    return this.bm5_1.zm3(serializerParent);
  };
  protoOf(PrefixWrappingPolicy).gln = function (enumDescriptor, index) {
    return this.bm5_1.gln(enumDescriptor, index);
  };
  protoOf(PrefixWrappingPolicy).om3 = function (serializerParent, tagParent, outputKind) {
    return this.bm5_1.om3(serializerParent, tagParent, outputKind);
  };
  protoOf(PrefixWrappingPolicy).qm3 = function (input, inputKind, name, candidates) {
    this.bm5_1.qm3(input, inputKind, name, candidates);
  };
  protoOf(PrefixWrappingPolicy).ulp = function (input, inputKind, descriptor, name, candidates) {
    return this.bm5_1.ulp(input, inputKind, descriptor, name, candidates);
  };
  protoOf(PrefixWrappingPolicy).fm3 = function (message) {
    this.bm5_1.fm3(message);
  };
  protoOf(PrefixWrappingPolicy).sm3 = function (parentDescriptor) {
    return this.bm5_1.sm3(parentDescriptor);
  };
  protoOf(PrefixWrappingPolicy).em3 = function (message) {
    this.bm5_1.em3(message);
  };
  protoOf(PrefixWrappingPolicy).hm3 = function (serializerParent, tagParent) {
    return this.bm5_1.hm3(serializerParent, tagParent);
  };
  protoOf(PrefixWrappingPolicy).ym3 = function (mapParent, valueDescriptor) {
    return this.bm5_1.ym3(mapParent, valueDescriptor);
  };
  protoOf(PrefixWrappingPolicy).im3 = function (serializerParent, tagParent) {
    return this.bm5_1.im3(serializerParent, tagParent);
  };
  protoOf(PrefixWrappingPolicy).um3 = function (serializerParent) {
    return this.bm5_1.um3(serializerParent);
  };
  protoOf(PrefixWrappingPolicy).vm3 = function (serializerParent, isListEluded) {
    return this.bm5_1.vm3(serializerParent, isListEluded);
  };
  protoOf(PrefixWrappingPolicy).vlp = function (parentDescriptor, childIndex) {
    this.bm5_1.vlp(parentDescriptor, childIndex);
  };
  protoOf(PrefixWrappingPolicy).pm3 = function (serializerParent, tagParent) {
    return this.bm5_1.pm3(serializerParent, tagParent);
  };
  protoOf(PrefixWrappingPolicy).jm3 = function (serializerParent, tagParent) {
    return this.bm5_1.jm3(serializerParent, tagParent);
  };
  protoOf(PrefixWrappingPolicy).tm3 = function (serializerParent, tagParent) {
    return this.bm5_1.tm3(serializerParent, tagParent);
  };
  protoOf(PrefixWrappingPolicy).ym0 = function (elementDescriptor) {
    return this.bm5_1.ym0(elementDescriptor);
  };
  protoOf(PrefixWrappingPolicy).gm3 = function (serializerParent, tagParent, outputKind, useName) {
    return remapPrefix(this.bm5_1.gm3(serializerParent, tagParent, outputKind, useName), this);
  };
  protoOf(PrefixWrappingPolicy).tlh = function (typeNameInfo, parentNamespace) {
    return remapPrefix(this.bm5_1.tlh(typeNameInfo, parentNamespace), this);
  };
  protoOf(PrefixWrappingPolicy).km3 = function (serialName, parentNamespace) {
    return remapPrefix(this.bm5_1.km3(serialName, parentNamespace), this);
  };
  protoOf(PrefixWrappingPolicy).wm3 = function (serializerParent, isListEluded) {
    return remapPrefix(mapEntryName.call(this, serializerParent, isListEluded), this);
  };
  function remapPrefix_0(_this__u8e3s4, prefixMap) {
    // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
    var tmp = _this__u8e3s4.kl9();
    // Inline function 'nl.adaptivity.xmlutil.localPart' call
    var tmp_0 = _this__u8e3s4.ll9();
    // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
    var tmp$ret$2 = _this__u8e3s4.kl9();
    var tmp0_elvis_lhs = prefixMap.q(tmp$ret$2);
    var tmp_1;
    if (tmp0_elvis_lhs == null) {
      // Inline function 'nl.adaptivity.xmlutil.prefix' call
      tmp_1 = _this__u8e3s4.ml9();
    } else {
      tmp_1 = tmp0_elvis_lhs;
    }
    return new QName(tmp, tmp_0, tmp_1);
  }
  function XmlQNameSerializer$descriptor$lambda($this$buildSerialDescriptor) {
    var tmp = $this$buildSerialDescriptor;
    tmp.v44_1 = listOf(new XmlSerialName('QName', 'http://www.w3.org/2001/XMLSchema', 'xsd'));
    return Unit_instance;
  }
  function XmlQNameSerializer() {
    XmlQNameSerializer_instance = this;
    var tmp = this;
    var tmp_0 = STRING_getInstance();
    tmp.cly_1 = buildSerialDescriptor('javax.xml.namespace.QName', tmp_0, [], XmlQNameSerializer$descriptor$lambda);
  }
  protoOf(XmlQNameSerializer).q44 = function () {
    return this.cly_1;
  };
  protoOf(XmlQNameSerializer).s44 = function (decoder) {
    if (!isInterface(decoder, XmlInput))
      throw SerializationException_init_$Create$('QNameXmlSerializer only makes sense in an XML context');
    var namespaceContext = decoder.nlf().wl5().hl5();
    // Inline function 'kotlin.text.trim' call
    var this_0 = decoder.d48();
    var prefixedName = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
    var cIndex = indexOf(prefixedName, _Char___init__impl__6a9atx(58));
    var prefix;
    var namespace;
    var localPart;
    if (cIndex < 0) {
      prefix = '';
      localPart = prefixedName;
      var tmp0_elvis_lhs = namespaceContext.fl5('');
      namespace = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    } else {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      prefix = prefixedName.substring(0, cIndex);
      // Inline function 'kotlin.text.substring' call
      var startIndex = cIndex + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      localPart = prefixedName.substring(startIndex);
      var tmp1_elvis_lhs = namespaceContext.fl5(prefix);
      var tmp;
      if (tmp1_elvis_lhs == null) {
        throw SerializationException_init_$Create$('Missing namespace for prefix ' + prefix + ' in QName value');
      } else {
        tmp = tmp1_elvis_lhs;
      }
      namespace = tmp;
    }
    return new QName(namespace, localPart, prefix);
  };
  protoOf(XmlQNameSerializer).gl9 = function (encoder, value) {
    if (!isInterface(encoder, XmlOutput))
      throw SerializationException_init_$Create$('QNameXmlSerializer only makes sense in an XML context');
    // Inline function 'nl.adaptivity.xmlutil.prefix' call
    var tmp = value.ml9();
    // Inline function 'nl.adaptivity.xmlutil.localPart' call
    var tmp$ret$1 = value.ll9();
    encoder.l49(tmp + ':' + tmp$ret$1);
  };
  protoOf(XmlQNameSerializer).r44 = function (encoder, value) {
    return this.gl9(encoder, value instanceof QName ? value : THROW_CCE());
  };
  var XmlQNameSerializer_instance;
  function XmlQNameSerializer_getInstance() {
    if (XmlQNameSerializer_instance == null)
      new XmlQNameSerializer();
    return XmlQNameSerializer_instance;
  }
  function XmlRootDescriptor_init_$Init$(config, serializersModule, descriptor, $this) {
    XmlRootDescriptor.call($this, config, serializersModule, descriptor, null, false);
    return $this;
  }
  function XmlRootDescriptor_init_$Create$(config, serializersModule, descriptor) {
    return XmlRootDescriptor_init_$Init$(config, serializersModule, descriptor, objectCreate(protoOf(XmlRootDescriptor)));
  }
  function _get_element__z0t21h($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.flj_1;
    element$factory();
    return this_0.t2();
  }
  function XmlRootDescriptor$element$delegate$lambda($config, $serializersModule, this$0) {
    return function () {
      return Companion_instance_3.dm5($config, $serializersModule, this$0.ali_1, VOID, false);
    };
  }
  function XmlRootDescriptor(config, serializersModule, descriptor, tagName, isDefaultNamespace) {
    XmlDescriptor.call(this, config.olh_1, DetachedParent_init_$Create$(descriptor, tagName, true, null, isDefaultNamespace));
    var tmp = this;
    tmp.flj_1 = lazy(XmlRootDescriptor$element$delegate$lambda(config, serializersModule, this));
  }
  protoOf(XmlRootDescriptor).elo = function () {
    return false;
  };
  protoOf(XmlRootDescriptor).xm0 = function () {
    return true;
  };
  protoOf(XmlRootDescriptor).kln = function () {
    return _get_element__z0t21h(this).kln();
  };
  protoOf(XmlRootDescriptor).gli = function () {
    var useNameInfo = this.cli_1;
    return ensureNotNull(useNameInfo.xm2_1);
  };
  protoOf(XmlRootDescriptor).olg = function () {
    return OutputKind_Mixed_getInstance();
  };
  protoOf(XmlRootDescriptor).k46 = function (index) {
    if (!(index === 0))
      throw IndexOutOfBoundsException_init_$Create$('There is exactly one child to a root tag');
    return _get_element__z0t21h(this);
  };
  protoOf(XmlRootDescriptor).g46 = function () {
    return 1;
  };
  protoOf(XmlRootDescriptor).em5 = function (builder, indent, seen) {
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlRootDescriptor.appendTo.<anonymous>' call
    builder.r8('<root>(');
    this.k46(0).em5(builder, indent + 4 | 0, seen);
    builder.r8(')');
  };
  protoOf(XmlRootDescriptor).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!protoOf(XmlDescriptor).equals.call(this, other))
      return false;
    if (!(other instanceof XmlRootDescriptor))
      THROW_CCE();
    return _get_element__z0t21h(this).equals(_get_element__z0t21h(other));
  };
  protoOf(XmlRootDescriptor).hashCode = function () {
    var result = protoOf(XmlDescriptor).hashCode.call(this);
    result = imul(31, result) + _get_element__z0t21h(this).hashCode() | 0;
    return result;
  };
  function Companion_2() {
  }
  protoOf(Companion_2).gm5 = function (config, serializersModule, serializerParent, tagParent, canBeAttribute) {
    var overridenSerializer = config.olh_1.pm3(serializerParent, tagParent);
    var elementSerialDescriptor;
    var effectiveSerializerParent;
    var effectiveTagParent;
    if (overridenSerializer == null) {
      elementSerialDescriptor = serializerParent.cm4();
      effectiveSerializerParent = serializerParent;
      effectiveTagParent = tagParent;
    } else {
      elementSerialDescriptor = overridenSerializer.q44();
      effectiveSerializerParent = serializerParent.hm5(VOID, VOID, overridenSerializer);
      effectiveTagParent = tagParent.hm5(VOID, VOID, overridenSerializer);
    }
    var preserveSpace = config.olh_1.tm3(serializerParent, tagParent);
    var tmp1_subject = elementSerialDescriptor.i46();
    var tmp;
    if (equals(tmp1_subject, ENUM_getInstance())) {
      tmp = true;
    } else {
      tmp = tmp1_subject instanceof PrimitiveKind;
    }
    if (tmp)
      return new XmlPrimitiveDescriptor(config.olh_1, effectiveSerializerParent, effectiveTagParent, canBeAttribute, preserveSpace);
    else {
      if (equals(tmp1_subject, LIST_getInstance()))
        return new XmlListDescriptor(config, serializersModule, effectiveSerializerParent, effectiveTagParent);
      else {
        if (equals(tmp1_subject, MAP_getInstance())) {
          var tmp2_subject = serializerParent.dm4();
          return (tmp2_subject == null ? -1 : tmp2_subject.za_1) === 1 ? new XmlAttributeMapDescriptor(config, serializersModule, effectiveSerializerParent, effectiveTagParent) : new XmlMapDescriptor(config, serializersModule, effectiveSerializerParent, effectiveTagParent);
        } else {
          if (tmp1_subject instanceof PolymorphicKind)
            return new XmlPolymorphicDescriptor(config, serializersModule, effectiveSerializerParent, effectiveTagParent);
        }
      }
    }
    return (config.rlh_1 ? elementSerialDescriptor.h46() : false) ? new XmlInlineDescriptor(config, serializersModule, effectiveSerializerParent, effectiveTagParent, canBeAttribute) : new XmlCompositeDescriptor(config, serializersModule, effectiveSerializerParent, effectiveTagParent, preserveSpace);
  };
  protoOf(Companion_2).dm5 = function (config, serializersModule, serializerParent, tagParent, canBeAttribute, $super) {
    tagParent = tagParent === VOID ? serializerParent : tagParent;
    return $super === VOID ? this.gm5(config, serializersModule, serializerParent, tagParent, canBeAttribute) : $super.gm5.call(this, config, serializersModule, serializerParent, tagParent, canBeAttribute);
  };
  var Companion_instance_3;
  function Companion_getInstance_7() {
    return Companion_instance_3;
  }
  function XmlDescriptor$tagName$delegate$lambda($policy, $serializerParent, this$0) {
    return function () {
      return $policy.gm3($serializerParent, this$0.ali_1, this$0.olg(), this$0.cli_1);
    };
  }
  function XmlDescriptor(policy, serializerParent, tagParent) {
    tagParent = tagParent === VOID ? serializerParent : tagParent;
    this.ali_1 = tagParent;
    this.bli_1 = serializerParent.im5();
    this.cli_1 = serializerParent.rm3();
    this.dli_1 = serializerParent.em4();
    this.eli_1 = policy.zm3(serializerParent);
    var tmp = this;
    tmp.fli_1 = lazy(XmlDescriptor$tagName$delegate$lambda(policy, serializerParent, this));
  }
  protoOf(XmlDescriptor).hli = function () {
    return this.olg().za_1 === 4 ? this.k46(0).hli() : this.olg();
  };
  protoOf(XmlDescriptor).rm4 = function () {
    return this.dli_1;
  };
  protoOf(XmlDescriptor).fln = function () {
    return false;
  };
  protoOf(XmlDescriptor).gli = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.fli_1;
    tagName$factory();
    return this_0.t2();
  };
  protoOf(XmlDescriptor).qlz = function (fallback) {
    var tmp0_elvis_lhs = this.bli_1;
    var tmp = tmp0_elvis_lhs == null ? fallback : tmp0_elvis_lhs;
    return isInterface(tmp, SerializationStrategy) ? tmp : THROW_CCE();
  };
  protoOf(XmlDescriptor).lln = function (fallback) {
    var tmp0_elvis_lhs = this.bli_1;
    var tmp = tmp0_elvis_lhs == null ? fallback : tmp0_elvis_lhs;
    return isInterface(tmp, DeserializationStrategy) ? tmp : THROW_CCE();
  };
  protoOf(XmlDescriptor).qlk = function () {
    return this.rm4().fm4_1;
  };
  protoOf(XmlDescriptor).g46 = function () {
    return this.rm4().fm4_1.g46();
  };
  protoOf(XmlDescriptor).cm2 = function () {
    return this.rm4().fm4_1.i46();
  };
  protoOf(XmlDescriptor).k46 = function (index) {
    throw IndexOutOfBoundsException_init_$Create$('There are no children');
  };
  protoOf(XmlDescriptor).fm5 = function (builder, indent, seen) {
    var tmp;
    if (this instanceof XmlListDescriptor) {
      tmp = true;
    } else {
      tmp = this instanceof XmlPrimitiveDescriptor;
    }
    if (tmp) {
      this.em5(builder, indent, seen);
    } else {
      if (seen.a1(this.qlk().q45())) {
        builder.r8(this.gli().toString()).r8('<...> = ').r8(this.olg().ya_1);
      } else {
        seen.i1(this.qlk().q45());
        this.em5(builder, indent, seen);
      }
    }
    return builder;
  };
  protoOf(XmlDescriptor).toString = function () {
    var tmp = StringBuilder_init_$Create$();
    // Inline function 'kotlin.collections.mutableSetOf' call
    var tmp$ret$0 = LinkedHashSet_init_$Create$();
    return this.fm5(tmp, 0, tmp$ret$0).toString();
  };
  protoOf(XmlDescriptor).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!(other instanceof XmlDescriptor))
      THROW_CCE();
    if (!equals(this.bli_1, other.bli_1))
      return false;
    if (!this.cli_1.equals(other.cli_1))
      return false;
    return this.rm4().equals(other.rm4());
  };
  protoOf(XmlDescriptor).hashCode = function () {
    var result = this.cli_1.hashCode();
    result = imul(31, result) + this.rm4().hashCode() | 0;
    var tmp = imul(31, result);
    var tmp0_safe_receiver = this.bli_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
    result = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
    return result;
  };
  function _get_children__my42wc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vli_1;
    children$factory();
    return this_0.t2();
  }
  function XmlPolymorphicDescriptor$children$delegate$lambda(this$0, $config, $serializersModule) {
    return function () {
      // Inline function 'kotlin.collections.List' call
      // Inline function 'kotlin.collections.MutableList' call
      var size = this$0.g46();
      var list = ArrayList_init_$Create$_0(size);
      // Inline function 'kotlin.repeat' call
      // Inline function 'kotlin.contracts.contract' call
      var inductionVariable = 0;
      if (inductionVariable < size)
        do {
          var index = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'kotlin.collections.MutableList.<anonymous>' call
          // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlPolymorphicDescriptor.children$delegate.<anonymous>.<anonymous>' call
          var canBeAttribute = index === 0;
          var overrideOutputKind = canBeAttribute ? OutputKind_Attribute_getInstance() : OutputKind_Element_getInstance();
          var parent = new ParentInfo(this$0, index, VOID, overrideOutputKind);
          var tmp$ret$0 = Companion_instance_3.dm5($config, $serializersModule, parent, VOID, canBeAttribute);
          list.i1(tmp$ret$0);
        }
         while (inductionVariable < size);
      return list;
    };
  }
  function XmlPolymorphicDescriptor(config, serializersModule, serializerParent, tagParent) {
    XmlValueDescriptor.call(this, config.olh_1, serializerParent, tagParent);
    this.rli_1 = config.olh_1.nm3(serializerParent, tagParent, false);
    var tmp$ret$0;
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator = tagParent.bm4().w();
      while (tmp0_iterator.f()) {
        var e = tmp0_iterator.e();
        if (e instanceof XmlPolyChildren) {
          tmp$ret$0 = e;
          break $l$block;
        }
      }
      tmp$ret$0 = null;
    }
    var xmlPolyChildren = tmp$ret$0;
    var polyAttrName = config.olh_1.jm3(serializerParent, tagParent);
    this.sli_1 = config.olh_1.im3(serializerParent, tagParent) ? TRANSPARENT_getInstance() : polyAttrName == null ? TAG_getInstance() : new ATTR(polyAttrName);
    var tmp = this;
    // Inline function 'kotlin.also' call
    // Inline function 'kotlin.collections.mutableMapOf' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlPolymorphicDescriptor.<anonymous>' call
    var tmp0_subject = this.sli_1;
    var tmp_0;
    if (equals(tmp0_subject, TRANSPARENT_getInstance())) {
      tmp_0 = null;
    } else {
      if (equals(tmp0_subject, TAG_getInstance())) {
        tmp_0 = Companion_instance_3.dm5(config, serializersModule, new ParentInfo(this, 1), VOID, false).gli();
      } else {
        if (tmp0_subject instanceof ATTR) {
          tmp_0 = this.gli();
        } else {
          noWhenBranchMatchedException();
        }
      }
    }
    var qName = tmp_0;
    if (!(xmlPolyChildren == null)) {
      var tmp1_safe_receiver = tagParent.q44();
      var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.qlk();
      var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.q45();
      var tmp_1 = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
      var tmp4_safe_receiver = tagParent.q44();
      var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.gli();
      var baseName = new ActualNameInfo(tmp_1, tmp5_elvis_lhs == null ? QName_init_$Create$_0('', '') : tmp5_elvis_lhs);
      var tmp6_elvis_lhs = get_capturedKClass(this.qlk());
      var baseClass = tmp6_elvis_lhs == null ? PrimitiveClasses_getInstance().w7() : tmp6_elvis_lhs;
      var indexedObject = xmlPolyChildren.jm5_1;
      var inductionVariable = 0;
      var last = indexedObject.length;
      while (inductionVariable < last) {
        var polyChild = indexedObject[inductionVariable];
        inductionVariable = inductionVariable + 1 | 0;
        var childInfo = polyTagName(baseName, polyChild, baseClass, serializersModule);
        var childSerializerParent = DetachedParent_init_$Create$(childInfo.xlg_1, childInfo.wlg_1, false, VOID, false);
        // Inline function 'kotlin.collections.set' call
        var key = childInfo.ylg();
        var value = Companion_instance_3.gm5(config, serializersModule, childSerializerParent, tagParent, false);
        this_0.s(key, value);
      }
    } else if (equals(this.qlk().i46(), SEALED_getInstance())) {
      var d = this.qlk().k46(1);
      var inductionVariable_0 = 0;
      var last_0 = d.g46();
      if (inductionVariable_0 < last_0)
        do {
          var i = inductionVariable_0;
          inductionVariable_0 = inductionVariable_0 + 1 | 0;
          var childDesc = d.k46(i);
          var childSerializerParent_0 = DetachedParent_init_$Create$(childDesc, qName, false, VOID, false);
          // Inline function 'kotlin.collections.set' call
          var key_0 = childDesc.q45();
          var value_0 = Companion_instance_3.gm5(config, serializersModule, childSerializerParent_0, tagParent, false);
          this_0.s(key_0, value_0);
        }
         while (inductionVariable_0 < last_0);
    } else {
      var childDescriptors = getPolymorphicDescriptors(serializersModule, this.qlk());
      var tmp9_iterator = childDescriptors.w();
      while (tmp9_iterator.f()) {
        var childDesc_0 = tmp9_iterator.e();
        var childSerializerParent_1 = DetachedParent_init_$Create$(childDesc_0, qName, false, this.rli_1, false);
        // Inline function 'kotlin.collections.set' call
        var key_1 = childDesc_0.q45();
        var value_1 = Companion_instance_3.gm5(config, serializersModule, childSerializerParent_1, tagParent, false);
        this_0.s(key_1, value_1);
      }
    }
    tmp.tli_1 = this_0;
    var tmp_2 = this;
    var tmp0_safe_receiver = tagParent.q44();
    var tmp1_safe_receiver_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qlk();
    var tmp3_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.q45();
    var tmp_3;
    if (tmp3_elvis_lhs_0 == null) {
      var tmp2_safe_receiver_0 = get_capturedKClass(this.qlk());
      tmp_3 = tmp2_safe_receiver_0 == null ? null : get_serialName(tmp2_safe_receiver_0);
    } else {
      tmp_3 = tmp3_elvis_lhs_0;
    }
    tmp_2.uli_1 = tmp_3;
    var tmp_4 = this;
    tmp_4.vli_1 = lazy(XmlPolymorphicDescriptor$children$delegate$lambda(this, config, serializersModule));
  }
  protoOf(XmlPolymorphicDescriptor).elo = function () {
    return false;
  };
  protoOf(XmlPolymorphicDescriptor).xm0 = function () {
    return false;
  };
  protoOf(XmlPolymorphicDescriptor).kln = function () {
    return false;
  };
  protoOf(XmlPolymorphicDescriptor).olg = function () {
    return this.rli_1;
  };
  protoOf(XmlPolymorphicDescriptor).plp = function () {
    return equals(this.sli_1, TRANSPARENT_getInstance());
  };
  protoOf(XmlPolymorphicDescriptor).k46 = function (index) {
    return _get_children__my42wc(this).v(index);
  };
  protoOf(XmlPolymorphicDescriptor).ely = function (typeName) {
    var tmp0_elvis_lhs = this.tli_1.q(typeName);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw new XmlSerialException('Missing polymorphic information for ' + typeName);
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  };
  protoOf(XmlPolymorphicDescriptor).em5 = function (builder, indent, seen) {
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlPolymorphicDescriptor.appendTo.<anonymous>' call
    builder.r8(this.gli().toString());
    if (this.plp()) {
      builder.r8(' <~(');
      var tmp0_iterator = this.tli_1.p2().w();
      while (tmp0_iterator.f()) {
        var polyVal = tmp0_iterator.e();
        // Inline function 'kotlin.text.appendLine' call
        var this_0 = polyVal.fm5(builder, indent + 4 | 0, seen);
        var value = _Char___init__impl__6a9atx(44);
        // Inline function 'kotlin.text.appendLine' call
        this_0.z5(value).z5(_Char___init__impl__6a9atx(10));
      }
    } else {
      builder.r8(' (');
      builder.r8(' <poly> [');
      var tmp1_iterator = this.tli_1.p2().w();
      while (tmp1_iterator.f()) {
        var polyVal_0 = tmp1_iterator.e();
        // Inline function 'kotlin.text.appendLine' call
        var this_1 = polyVal_0.fm5(builder, indent + 4 | 0, seen);
        var value_0 = _Char___init__impl__6a9atx(44);
        // Inline function 'kotlin.text.appendLine' call
        this_1.z5(value_0).z5(_Char___init__impl__6a9atx(10));
      }
      builder.z5(_Char___init__impl__6a9atx(93));
    }
  };
  protoOf(XmlPolymorphicDescriptor).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!protoOf(XmlValueDescriptor).equals.call(this, other))
      return false;
    if (!(other instanceof XmlPolymorphicDescriptor))
      THROW_CCE();
    if (!this.rli_1.equals(other.rli_1))
      return false;
    if (!equals(this.sli_1, other.sli_1))
      return false;
    if (!equals(this.tli_1, other.tli_1))
      return false;
    if (!(this.uli_1 == other.uli_1))
      return false;
    return true;
  };
  protoOf(XmlPolymorphicDescriptor).hashCode = function () {
    var result = protoOf(XmlValueDescriptor).hashCode.call(this);
    result = imul(31, result) + this.rli_1.hashCode() | 0;
    result = imul(31, result) + hashCode(this.sli_1) | 0;
    result = imul(31, result) + hashCode(this.tli_1) | 0;
    var tmp = imul(31, result);
    var tmp0_safe_receiver = this.uli_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : getStringHashCode(tmp0_safe_receiver);
    result = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
    return result;
  };
  function DetachedParent_init_$Init$(serialDescriptor, useName, isDocumentRoot, outputKind, isDefaultNamespace, $this) {
    outputKind = outputKind === VOID ? null : outputKind;
    // Inline function 'kotlin.run' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.structure.DetachedParent.<init>.<anonymous>' call
    var tmp0_safe_receiver = get_capturedKClass(serialDescriptor);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_serialName(tmp0_safe_receiver);
    var tmp$ret$1 = tmp1_elvis_lhs == null ? serialDescriptor.q45() : tmp1_elvis_lhs;
    DetachedParent.call($this, serialDescriptor, new DeclaredNameInfo(tmp$ret$1, useName, isDefaultNamespace), isDocumentRoot, outputKind);
    return $this;
  }
  function DetachedParent_init_$Create$(serialDescriptor, useName, isDocumentRoot, outputKind, isDefaultNamespace) {
    return DetachedParent_init_$Init$(serialDescriptor, useName, isDocumentRoot, outputKind, isDefaultNamespace, objectCreate(protoOf(DetachedParent)));
  }
  function DetachedParent_init_$Init$_0(serialDescriptor, isDocumentRoot, outputKind, $this) {
    outputKind = outputKind === VOID ? null : outputKind;
    // Inline function 'kotlin.run' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.structure.DetachedParent.<init>.<anonymous>' call
    var tmp0_safe_receiver = get_capturedKClass(serialDescriptor);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_serialName(tmp0_safe_receiver);
    var tmp$ret$1 = tmp1_elvis_lhs == null ? serialDescriptor.q45() : tmp1_elvis_lhs;
    DetachedParent.call($this, serialDescriptor, new DeclaredNameInfo(tmp$ret$1, null, false), isDocumentRoot, outputKind);
    return $this;
  }
  function DetachedParent_init_$Create$_0(serialDescriptor, isDocumentRoot, outputKind) {
    return DetachedParent_init_$Init$_0(serialDescriptor, isDocumentRoot, outputKind, objectCreate(protoOf(DetachedParent)));
  }
  function DetachedParent(serialDescriptor, elementUseNameInfo, isDocumentRoot, outputKind, overriddenSerializer) {
    outputKind = outputKind === VOID ? null : outputKind;
    overriddenSerializer = overriddenSerializer === VOID ? null : overriddenSerializer;
    this.km5_1 = serialDescriptor;
    this.lm5_1 = elementUseNameInfo;
    this.mm5_1 = isDocumentRoot;
    this.nm5_1 = overriddenSerializer;
    this.om5_1 = outputKind;
  }
  protoOf(DetachedParent).rm3 = function () {
    return this.lm5_1;
  };
  protoOf(DetachedParent).im5 = function () {
    return this.nm5_1;
  };
  protoOf(DetachedParent).pm5 = function (useNameInfo, useOutputKind, overriddenSerializer) {
    return new DetachedParent(this.km5_1, useNameInfo, this.mm5_1, useOutputKind, overriddenSerializer);
  };
  protoOf(DetachedParent).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!(other instanceof DetachedParent))
      THROW_CCE();
    if (!equals(this.km5_1, other.km5_1))
      return false;
    if (!this.lm5_1.equals(other.lm5_1))
      return false;
    if (!(this.mm5_1 === other.mm5_1))
      return false;
    if (!equals(this.nm5_1, other.nm5_1))
      return false;
    if (!equals(this.om5_1, other.om5_1))
      return false;
    return true;
  };
  protoOf(DetachedParent).hashCode = function () {
    var result = hashCode(this.km5_1);
    result = imul(31, result) + this.lm5_1.hashCode() | 0;
    result = imul(31, result) + getBooleanHashCode(this.mm5_1) | 0;
    var tmp = imul(31, result);
    var tmp0_safe_receiver = this.nm5_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
    result = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
    var tmp_0 = imul(31, result);
    var tmp2_safe_receiver = this.om5_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hashCode();
    result = tmp_0 + (tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs) | 0;
    return result;
  };
  protoOf(DetachedParent).q44 = function () {
    return null;
  };
  protoOf(DetachedParent).em4 = function () {
    var tmp0_safe_receiver = this.nm5_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q44();
    return new XmlTypeDescriptor(tmp1_elvis_lhs == null ? this.km5_1 : tmp1_elvis_lhs, this.xm3());
  };
  protoOf(DetachedParent).bm4 = function () {
    return emptyList();
  };
  protoOf(DetachedParent).cm4 = function () {
    var tmp0_safe_receiver = this.nm5_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q44();
    return tmp1_elvis_lhs == null ? this.km5_1 : tmp1_elvis_lhs;
  };
  protoOf(DetachedParent).dm4 = function () {
    return this.om5_1;
  };
  protoOf(DetachedParent).xm3 = function () {
    var tmp0_safe_receiver = this.lm5_1.xm2_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toNamespace(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new NamespaceImpl('', '') : tmp1_elvis_lhs;
  };
  function SafeParentInfo() {
  }
  function SafeXmlDescriptor() {
  }
  function _get_childDescriptor__xb3z96($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zls_1;
    childDescriptor$factory();
    return this_0.t2();
  }
  function XmlListDescriptor$childDescriptor$delegate$lambda($tagParent, this$0, $config, $serializersModule) {
    return function () {
      var tmp$ret$0;
      $l$block: {
        // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
        var tmp0_iterator = $tagParent.bm4().w();
        while (tmp0_iterator.f()) {
          var e = tmp0_iterator.e();
          if (e instanceof XmlChildrenName) {
            tmp$ret$0 = e;
            break $l$block;
          }
        }
        tmp$ret$0 = null;
      }
      var childrenNameAnnotation = tmp$ret$0;
      var tmp;
      if (!(childrenNameAnnotation == null)) {
        var tmp_0 = toQName_0(childrenNameAnnotation);
        tmp = new DeclaredNameInfo(childrenNameAnnotation.nlk_1, tmp_0, (childrenNameAnnotation == null ? null : childrenNameAnnotation.olk_1) === get_UNSET_ANNOTATION_VALUE());
      } else if (!this$0.bll()) {
        tmp = null;
      } else {
        tmp = $tagParent.rm3();
      }
      var useNameInfo = tmp;
      return Companion_instance_3.gm5($config, $serializersModule, new ParentInfo(this$0, 0, useNameInfo, this$0.xls_1), $tagParent, false);
    };
  }
  function XmlListDescriptor(config, serializersModule, serializerParent, tagParent) {
    tagParent = tagParent === VOID ? serializerParent : tagParent;
    XmlListLikeDescriptor.call(this, config, serializerParent, tagParent);
    var tmp = this;
    var tmp_0;
    var tmp$ret$0;
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator = tagParent.bm4().w();
      while (tmp0_iterator.f()) {
        var e = tmp0_iterator.e();
        if (e instanceof XmlElement) {
          tmp$ret$0 = e;
          break $l$block;
        }
      }
      tmp$ret$0 = null;
    }
    var tmp0_safe_receiver = tmp$ret$0;
    if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qm5_1) === false) {
      tmp_0 = OutputKind_Attribute_getInstance();
    } else {
      var tmp$ret$1;
      $l$block_0: {
        // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
        var tmp0_iterator_0 = tagParent.bm4().w();
        while (tmp0_iterator_0.f()) {
          var e_0 = tmp0_iterator_0.e();
          if (e_0 instanceof XmlId) {
            tmp$ret$1 = e_0;
            break $l$block_0;
          }
        }
        tmp$ret$1 = null;
      }
      if (!(tmp$ret$1 == null)) {
        tmp_0 = OutputKind_Attribute_getInstance();
      } else {
        if (!this.bll()) {
          tmp_0 = OutputKind_Element_getInstance();
        } else {
          var tmp_1;
          var tmp$ret$2;
          $l$block_1: {
            // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
            var tmp0_iterator_1 = tagParent.bm4().w();
            while (tmp0_iterator_1.f()) {
              var e_1 = tmp0_iterator_1.e();
              if (e_1 instanceof XmlValue) {
                tmp$ret$2 = e_1;
                break $l$block_1;
              }
            }
            tmp$ret$2 = null;
          }
          if (!(tmp$ret$2 == null)) {
            tmp_1 = config.olh_1.im3(DetachedParent_init_$Create$_0(this.qlk().k46(0), false), tagParent);
          } else {
            tmp_1 = false;
          }
          if (tmp_1) {
            tmp_0 = OutputKind_Mixed_getInstance();
          } else {
            tmp_0 = OutputKind_Element_getInstance();
          }
        }
      }
    }
    tmp.xls_1 = tmp_0;
    var tmp_2 = this;
    var tmp_3;
    if (this.xls_1.za_1 === 1) {
      tmp_3 = config.olh_1.am4(new ParentInfo(this, 0, this.cli_1, this.xls_1), tagParent);
    } else {
      // Inline function 'kotlin.emptyArray' call
      tmp_3 = [];
    }
    tmp_2.yls_1 = tmp_3;
    var tmp_4 = this;
    tmp_4.zls_1 = lazy(XmlListDescriptor$childDescriptor$delegate$lambda(tagParent, this, config, serializersModule));
  }
  protoOf(XmlListDescriptor).olg = function () {
    return this.xls_1;
  };
  protoOf(XmlListDescriptor).elo = function () {
    return false;
  };
  protoOf(XmlListDescriptor).k46 = function (index) {
    return _get_childDescriptor__xb3z96(this);
  };
  protoOf(XmlListDescriptor).em5 = function (builder, indent, seen) {
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlListDescriptor.appendTo.<anonymous>' call
    builder.r8(this.gli().toString());
    if (this.bll()) {
      builder.r8(': EludedList<');
      _get_childDescriptor__xb3z96(this).fm5(builder, indent, seen);
      builder.z5(_Char___init__impl__6a9atx(62));
    } else {
      builder.r8(': ExplicitList<');
      _get_childDescriptor__xb3z96(this).fm5(builder, indent, seen);
      builder.z5(_Char___init__impl__6a9atx(62));
    }
  };
  protoOf(XmlListDescriptor).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!protoOf(XmlListLikeDescriptor).equals.call(this, other))
      return false;
    if (!(other instanceof XmlListDescriptor))
      THROW_CCE();
    if (!(this.bll() === other.bll()))
      return false;
    if (!this.xls_1.equals(other.xls_1))
      return false;
    return _get_childDescriptor__xb3z96(this).equals(_get_childDescriptor__xb3z96(other));
  };
  protoOf(XmlListDescriptor).hashCode = function () {
    var result = protoOf(XmlListLikeDescriptor).hashCode.call(this);
    result = imul(31, result) + getBooleanHashCode(this.bll()) | 0;
    result = imul(31, result) + this.xls_1.hashCode() | 0;
    result = imul(31, result) + _get_childDescriptor__xb3z96(this).hashCode() | 0;
    return result;
  };
  function XmlPrimitiveDescriptor(policy, serializerParent, tagParent, canBeAttribute, preserveSpace) {
    XmlValueDescriptor.call(this, policy, serializerParent, tagParent);
    this.am6_1 = preserveSpace;
    var tmp = this;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = serializerParent.bm4();
      var tmp_0;
      if (isInterface(this_0, Collection)) {
        tmp_0 = this_0.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlPrimitiveDescriptor.<anonymous>' call
        if (element instanceof XmlId) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    tmp.bm6_1 = tmp$ret$0;
    this.cm6_1 = policy.nm3(serializerParent, tagParent, canBeAttribute);
  }
  protoOf(XmlPrimitiveDescriptor).kln = function () {
    return this.am6_1;
  };
  protoOf(XmlPrimitiveDescriptor).elo = function () {
    return this.bm6_1;
  };
  protoOf(XmlPrimitiveDescriptor).xm0 = function () {
    return false;
  };
  protoOf(XmlPrimitiveDescriptor).olg = function () {
    return this.cm6_1;
  };
  protoOf(XmlPrimitiveDescriptor).g46 = function () {
    return 0;
  };
  protoOf(XmlPrimitiveDescriptor).em5 = function (builder, indent, seen) {
    builder.r8(this.gli().toString()).z5(_Char___init__impl__6a9atx(58)).r8(this.i46().toString()).r8(' = ').r8(this.cm6_1.toString());
  };
  protoOf(XmlPrimitiveDescriptor).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!protoOf(XmlValueDescriptor).equals.call(this, other))
      return false;
    if (!(other instanceof XmlPrimitiveDescriptor))
      THROW_CCE();
    return this.cm6_1.equals(other.cm6_1);
  };
  protoOf(XmlPrimitiveDescriptor).hashCode = function () {
    var result = protoOf(XmlValueDescriptor).hashCode.call(this);
    result = imul(31, result) + this.cm6_1.hashCode() | 0;
    return result;
  };
  function XmlAttributeMapDescriptor$keyDescriptor$delegate$lambda($config, $serializersModule, this$0, $tagParent) {
    return function () {
      return Companion_instance_3.gm5($config, $serializersModule, new ParentInfo(this$0, 0, VOID, OutputKind_Text_getInstance()), $tagParent, true);
    };
  }
  function XmlAttributeMapDescriptor$valueDescriptor$delegate$lambda($config, $serializersModule, this$0, $tagParent) {
    return function () {
      return Companion_instance_3.gm5($config, $serializersModule, new ParentInfo(this$0, 1, VOID, OutputKind_Text_getInstance()), $tagParent, true);
    };
  }
  function XmlAttributeMapDescriptor(config, serializersModule, serializerParent, tagParent) {
    XmlValueDescriptor.call(this, config.olh_1, serializerParent, tagParent);
    var tmp = this;
    tmp.slr_1 = lazy(XmlAttributeMapDescriptor$keyDescriptor$delegate$lambda(config, serializersModule, this, tagParent));
    var tmp_0 = this;
    tmp_0.tlr_1 = lazy(XmlAttributeMapDescriptor$valueDescriptor$delegate$lambda(config, serializersModule, this, tagParent));
  }
  protoOf(XmlAttributeMapDescriptor).xm0 = function () {
    return false;
  };
  protoOf(XmlAttributeMapDescriptor).elo = function () {
    return false;
  };
  protoOf(XmlAttributeMapDescriptor).kln = function () {
    return true;
  };
  protoOf(XmlAttributeMapDescriptor).olg = function () {
    return OutputKind_Attribute_getInstance();
  };
  protoOf(XmlAttributeMapDescriptor).dm6 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.slr_1;
    keyDescriptor$factory();
    return this_0.t2();
  };
  protoOf(XmlAttributeMapDescriptor).ulr = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.tlr_1;
    valueDescriptor$factory();
    return this_0.t2();
  };
  protoOf(XmlAttributeMapDescriptor).g46 = function () {
    return 2;
  };
  protoOf(XmlAttributeMapDescriptor).k46 = function (index) {
    return (index % 2 | 0) === 0 ? this.dm6() : this.ulr();
  };
  protoOf(XmlAttributeMapDescriptor).em5 = function (builder, indent, seen) {
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlAttributeMapDescriptor.appendTo.<anonymous>' call
    // Inline function 'kotlin.text.appendLine' call
    // Inline function 'kotlin.text.appendLine' call
    builder.r8(this.gli().toString()).r8(' (').z5(_Char___init__impl__6a9atx(10));
    appendIndent(builder, indent);
    // Inline function 'kotlin.text.appendLine' call
    // Inline function 'kotlin.text.appendLine' call
    this.dm6().fm5(builder, indent + 4 | 0, seen).r8(',').z5(_Char___init__impl__6a9atx(10));
    appendIndent(builder, indent);
    this.ulr().fm5(builder, indent + 4 | 0, seen).z5(_Char___init__impl__6a9atx(41));
  };
  function _get_keyDescriptor__hu7alf($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lll_1;
    keyDescriptor$factory_0();
    return this_0.t2();
  }
  function _get_valueDescriptor__8ouq3z($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mll_1;
    valueDescriptor$factory_0();
    return this_0.t2();
  }
  function XmlMapDescriptor$isValueCollapsed$delegate$lambda($config, $serializerParent, this$0) {
    return function () {
      return $config.olh_1.ym3($serializerParent, _get_valueDescriptor__8ouq3z(this$0));
    };
  }
  function XmlMapDescriptor$entryName$delegate$lambda(this$0, $config, $serializerParent) {
    return function () {
      var tmp;
      if (this$0.nll()) {
        tmp = _get_valueDescriptor__8ouq3z(this$0).gli();
      } else {
        tmp = $config.olh_1.wm3($serializerParent, this$0.bll());
      }
      return tmp;
    };
  }
  function XmlMapDescriptor$keyDescriptor$delegate$lambda($config, $serializerParent, this$0, $tagParent, $serializersModule) {
    return function () {
      var keyNameInfo = $config.olh_1.um3($serializerParent);
      var parentInfo = new ParentInfo(this$0, 0, keyNameInfo);
      var keyTagParent = new InjectedParentTag(0, this$0.rm4().v(0), keyNameInfo, $tagParent.xm3());
      return Companion_instance_3.gm5($config, $serializersModule, parentInfo, keyTagParent, true);
    };
  }
  function XmlMapDescriptor$valueDescriptor$delegate$lambda($config, $serializerParent, this$0, $tagParent, $serializersModule) {
    return function () {
      var valueNameInfo = $config.olh_1.vm3($serializerParent, this$0.bll());
      var parentInfo = new ParentInfo(this$0, 1, valueNameInfo, OutputKind_Element_getInstance());
      var valueTagParent = new InjectedParentTag(0, this$0.rm4().v(1), valueNameInfo, $tagParent.xm3());
      return Companion_instance_3.gm5($config, $serializersModule, parentInfo, valueTagParent, true);
    };
  }
  function XmlMapDescriptor(config, serializersModule, serializerParent, tagParent) {
    tagParent = tagParent === VOID ? serializerParent : tagParent;
    XmlListLikeDescriptor.call(this, config, serializerParent, tagParent);
    var tmp = this;
    tmp.jll_1 = lazy(XmlMapDescriptor$isValueCollapsed$delegate$lambda(config, serializerParent, this));
    var tmp_0 = this;
    tmp_0.kll_1 = lazy(XmlMapDescriptor$entryName$delegate$lambda(this, config, serializerParent));
    var tmp_1 = this;
    tmp_1.lll_1 = lazy(XmlMapDescriptor$keyDescriptor$delegate$lambda(config, serializerParent, this, tagParent, serializersModule));
    var tmp_2 = this;
    tmp_2.mll_1 = lazy(XmlMapDescriptor$valueDescriptor$delegate$lambda(config, serializerParent, this, tagParent, serializersModule));
  }
  protoOf(XmlMapDescriptor).olg = function () {
    return OutputKind_Element_getInstance();
  };
  protoOf(XmlMapDescriptor).elo = function () {
    return false;
  };
  protoOf(XmlMapDescriptor).nll = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.jll_1;
    isValueCollapsed$factory();
    return this_0.t2();
  };
  protoOf(XmlMapDescriptor).ulm = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.kll_1;
    entryName$factory();
    return this_0.t2();
  };
  protoOf(XmlMapDescriptor).k46 = function (index) {
    return (index % 2 | 0) === 0 ? _get_keyDescriptor__hu7alf(this) : _get_valueDescriptor__8ouq3z(this);
  };
  protoOf(XmlMapDescriptor).em5 = function (builder, indent, seen) {
    builder.r8(this.gli().toString()).r8(this.bll() ? ': TransparentMap<' : ': ExplicitMap<');
    this.k46(0).em5(builder, indent + 4 | 0, seen);
    builder.r8(', ');
    this.k46(1).em5(builder, indent + 4 | 0, seen);
    builder.z5(_Char___init__impl__6a9atx(62));
  };
  function _get_child__j05w3v($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.om6_1;
    child$factory();
    return this_0.t2();
  }
  function Companion_3() {
    Companion_instance_4 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.qm6_1 = [serializer_1(Companion_getInstance_0()).q44(), serializer_2(Companion_getInstance_1()).q44(), serializer_3(Companion_getInstance_2()).q44(), serializer_4(Companion_getInstance_3()).q44()];
  }
  var Companion_instance_4;
  function Companion_getInstance_8() {
    if (Companion_instance_4 == null)
      new Companion_3();
    return Companion_instance_4;
  }
  function XmlInlineDescriptor$child$delegate$lambda(this$0, $tagParent, $config, $serializersModule, $canBeAttribute) {
    return function () {
      var tmp;
      if (!(this$0.cli_1.xm2_1 == null)) {
        tmp = this$0.cli_1;
      } else if (!(this$0.rm4().gm4_1.xm2_1 == null)) {
        tmp = this$0.rm4().gm4_1;
      } else {
        var serialName = this$0.rm4().fm4_1.m46(0);
        var tmp$ret$0;
        $l$block: {
          // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
          var tmp0_iterator = this$0.rm4().fm4_1.j46(0).w();
          while (tmp0_iterator.f()) {
            var e = tmp0_iterator.e();
            if (e instanceof XmlSerialName) {
              tmp$ret$0 = e;
              break $l$block;
            }
          }
          tmp$ret$0 = null;
        }
        var annotation = tmp$ret$0;
        var qName = annotation == null ? null : toQName(annotation, serialName, $tagParent.xm3());
        var childUseNameInfo = new DeclaredNameInfo(serialName, qName, (annotation == null ? null : annotation.llk_1) === get_UNSET_ANNOTATION_VALUE());
        tmp = !(childUseNameInfo.xm2_1 == null) ? childUseNameInfo : this$0.cli_1;
      }
      var effectiveUseNameInfo = tmp;
      var useParentInfo = new ParentInfo(this$0, 0, effectiveUseNameInfo);
      return Companion_instance_3.gm5($config, $serializersModule, useParentInfo, $tagParent, $canBeAttribute);
    };
  }
  function XmlInlineDescriptor$isUnsigned$delegate$lambda(this$0) {
    return function () {
      return contains(Companion_getInstance_8().qm6_1, this$0.qlk()) ? true : _get_child__j05w3v(this$0).fln();
    };
  }
  function XmlInlineDescriptor(config, serializersModule, serializerParent, tagParent, canBeAttribute) {
    Companion_getInstance_8();
    XmlValueDescriptor.call(this, config.olh_1, serializerParent, tagParent);
    var tmp = this;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = serializerParent.bm4();
      var tmp_0;
      if (isInterface(this_0, Collection)) {
        tmp_0 = this_0.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlInlineDescriptor.isIdAttr.<anonymous>' call
        if (element instanceof XmlId) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    tmp.nm6_1 = tmp$ret$0;
    if (!serializerParent.cm4().h46()) {
      throw AssertionError_init_$Create$('InlineDescriptors are only valid for inline classes');
    }
    var tmp_1 = this;
    tmp_1.om6_1 = lazy(XmlInlineDescriptor$child$delegate$lambda(this, tagParent, config, serializersModule, canBeAttribute));
    var tmp_2 = this;
    tmp_2.pm6_1 = lazy(XmlInlineDescriptor$isUnsigned$delegate$lambda(this));
  }
  protoOf(XmlInlineDescriptor).elo = function () {
    return this.nm6_1;
  };
  protoOf(XmlInlineDescriptor).xm0 = function () {
    return true;
  };
  protoOf(XmlInlineDescriptor).kln = function () {
    return _get_child__j05w3v(this).kln();
  };
  protoOf(XmlInlineDescriptor).olg = function () {
    return _get_child__j05w3v(this).olg();
  };
  protoOf(XmlInlineDescriptor).gli = function () {
    return _get_child__j05w3v(this).gli();
  };
  protoOf(XmlInlineDescriptor).k46 = function (index) {
    if (!(index === 0))
      throw IllegalArgumentException_init_$Create$('Inline classes only have one child');
    return _get_child__j05w3v(this);
  };
  protoOf(XmlInlineDescriptor).fln = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.pm6_1;
    isUnsigned$factory();
    return this_0.t2();
  };
  protoOf(XmlInlineDescriptor).em5 = function (builder, indent, seen) {
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlInlineDescriptor.appendTo.<anonymous>' call
    builder.r8(this.gli().toString());
    builder.r8(': Inline (');
    _get_child__j05w3v(this).fm5(builder, indent + 4 | 0, seen);
    builder.z5(_Char___init__impl__6a9atx(41));
  };
  protoOf(XmlInlineDescriptor).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!protoOf(XmlValueDescriptor).equals.call(this, other))
      return false;
    if (!(other instanceof XmlInlineDescriptor))
      THROW_CCE();
    return this.fln() === other.fln();
  };
  protoOf(XmlInlineDescriptor).hashCode = function () {
    var result = protoOf(XmlValueDescriptor).hashCode.call(this);
    result = imul(31, result) + getBooleanHashCode(this.fln()) | 0;
    return result;
  };
  function _get_children__my42wc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hlq_1;
    children$factory_0();
    return this_0.t2();
  }
  function getElementDescriptors($this, config, serializersModule, initialChildReorderInfo) {
    // Inline function 'kotlin.arrayOfNulls' call
    var size = $this.g46();
    var descriptors = fillArrayVal(Array(size), null);
    var tmp0_iterator = sequenceStarts(initialChildReorderInfo, $this.g46()).w();
    while (tmp0_iterator.f()) {
      var orderedSequence = tmp0_iterator.e();
      var tmp1_iterator = flatten(orderedSequence).w();
      while (tmp1_iterator.f()) {
        var element = tmp1_iterator.e();
        getElementDescriptors$ensureDescriptor(element, descriptors, $this, config, serializersModule);
      }
    }
    return toList_1(requireNoNulls(descriptors));
  }
  function createElementDescriptor($this, config, serializersModule, index, canBeAttribute) {
    return Companion_instance_3.dm5(config, serializersModule, new ParentInfo($this, index), VOID, canBeAttribute);
  }
  function _get_childReorderInfo__htyspq($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ilq_1;
    childReorderInfo$factory();
    return this_0.t2();
  }
  function getElementDescriptors$ensureDescriptor(_this__u8e3s4, descriptors, this$0, $config, $serializersModule) {
    var tmp0_elvis_lhs = descriptors[_this__u8e3s4.km4_1];
    var tmp;
    if (tmp0_elvis_lhs == null) {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlCompositeDescriptor.getElementDescriptors.ensureDescriptor.<anonymous>' call
      var tmp_0;
      if (_this__u8e3s4.lm4_1.c1()) {
        tmp_0 = true;
      } else {
        var tmp$ret$0;
        $l$block_0: {
          // Inline function 'kotlin.collections.all' call
          var this_0 = _this__u8e3s4.lm4_1;
          var tmp_1;
          if (isInterface(this_0, Collection)) {
            tmp_1 = this_0.c1();
          } else {
            tmp_1 = false;
          }
          if (tmp_1) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
          var tmp0_iterator = this_0.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlCompositeDescriptor.getElementDescriptors.ensureDescriptor.<anonymous>.<anonymous>' call
            if (!getElementDescriptors$ensureDescriptor(element, descriptors, this$0, $config, $serializersModule).olg().equals(OutputKind_Attribute_getInstance())) {
              tmp$ret$0 = false;
              break $l$block_0;
            }
          }
          tmp$ret$0 = true;
        }
        tmp_0 = tmp$ret$0;
      }
      var canBeAttribute = tmp_0;
      // Inline function 'kotlin.also' call
      var this_1 = createElementDescriptor(this$0, $config, $serializersModule, _this__u8e3s4.km4_1, canBeAttribute);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlCompositeDescriptor.getElementDescriptors.ensureDescriptor.<anonymous>.<anonymous>' call
      descriptors[_this__u8e3s4.km4_1] = this_1;
      tmp = this_1;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function XmlCompositeDescriptor$children$delegate$lambda(this$0, $config, $serializersModule) {
    return function () {
      var valueChildIndex = getValueChild(this$0);
      var tmp;
      if (!(this$0.glq_1 == null)) {
        tmp = getElementDescriptors(this$0, $config, $serializersModule, this$0.glq_1);
      } else {
        // Inline function 'kotlin.collections.List' call
        // Inline function 'kotlin.collections.MutableList' call
        var size = this$0.g46();
        var list = ArrayList_init_$Create$_0(size);
        // Inline function 'kotlin.repeat' call
        // Inline function 'kotlin.contracts.contract' call
        var inductionVariable = 0;
        if (inductionVariable < size)
          do {
            var index = inductionVariable;
            inductionVariable = inductionVariable + 1 | 0;
            // Inline function 'kotlin.collections.MutableList.<anonymous>' call
            // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlCompositeDescriptor.children$delegate.<anonymous>.<anonymous>' call
            var tmp$ret$0 = createElementDescriptor(this$0, $config, $serializersModule, index, true);
            list.i1(tmp$ret$0);
          }
           while (inductionVariable < size);
        tmp = list;
      }
      var l = tmp;
      var tmp_0;
      if (valueChildIndex >= 0) {
        var valueChild = l.v(valueChildIndex);
        var tmp_1;
        if (!equals(valueChild.cm2(), LIST_getInstance()) ? true : !equals(valueChild.k46(0).qlk(), CompactFragmentSerializer_getInstance().mlf_1)) {
          var tmp$ret$4;
          $l$block: {
            // Inline function 'kotlin.collections.firstOrNull' call
            var tmp0_iterator = get_indices_0(l).w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlCompositeDescriptor.children$delegate.<anonymous>.<anonymous>' call
              if (!(element === valueChildIndex) ? l.v(element).olg().equals(OutputKind_Element_getInstance()) : false) {
                tmp$ret$4 = element;
                break $l$block;
              }
            }
            tmp$ret$4 = null;
          }
          var invalidIdx = tmp$ret$4;
          var tmp_2;
          if (!(invalidIdx == null)) {
            throw new XmlSerialException('Types with an @XmlValue member may not contain other child elements (' + this$0.qlk().k46(invalidIdx));
          }
          tmp_1 = tmp_2;
        }
        tmp_0 = tmp_1;
      }
      return l;
    };
  }
  function XmlCompositeDescriptor$childReorderInfo$delegate$lambda(this$0) {
    return function () {
      var tmp0_safe_receiver = this$0.glq_1;
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlCompositeDescriptor.childReorderInfo$delegate.<anonymous>.<anonymous>' call
        var newList = sequenceStarts(tmp0_safe_receiver, this$0.g46());
        tmp = fullFlatten(newList, this$0.qlk(), _get_children__my42wc_0(this$0));
      }
      return tmp;
    };
  }
  function XmlCompositeDescriptor(config, serializersModule, serializerParent, tagParent, preserveSpace) {
    XmlValueDescriptor.call(this, config.olh_1, serializerParent, tagParent);
    this.flq_1 = preserveSpace;
    var requestedOutputKind = config.olh_1.nm3(serializerParent, tagParent, false);
    if (!requestedOutputKind.equals(OutputKind_Element_getInstance())) {
      config.olh_1.em3('Class SerialKinds/composites can only have Element output kinds, not ' + requestedOutputKind);
    }
    this.glq_1 = config.olh_1.sm3(this.qlk());
    var tmp = this;
    tmp.hlq_1 = lazy(XmlCompositeDescriptor$children$delegate$lambda(this, config, serializersModule));
    var tmp_0 = this;
    tmp_0.ilq_1 = lazy(XmlCompositeDescriptor$childReorderInfo$delegate$lambda(this));
  }
  protoOf(XmlCompositeDescriptor).kln = function () {
    return this.flq_1;
  };
  protoOf(XmlCompositeDescriptor).elo = function () {
    return false;
  };
  protoOf(XmlCompositeDescriptor).xm0 = function () {
    return false;
  };
  protoOf(XmlCompositeDescriptor).olg = function () {
    return OutputKind_Element_getInstance();
  };
  protoOf(XmlCompositeDescriptor).k46 = function (index) {
    return _get_children__my42wc_0(this).v(index);
  };
  protoOf(XmlCompositeDescriptor).wm0 = function () {
    var tmp0_safe_receiver = _get_childReorderInfo__htyspq(this);
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x6_1;
  };
  protoOf(XmlCompositeDescriptor).jlq = function () {
    var tmp0_safe_receiver = _get_childReorderInfo__htyspq(this);
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w6_1;
  };
  protoOf(XmlCompositeDescriptor).em5 = function (builder, indent, seen) {
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlCompositeDescriptor.appendTo.<anonymous>' call
    // Inline function 'kotlin.text.appendLine' call
    // Inline function 'kotlin.text.appendLine' call
    builder.r8(this.gli().toString()).r8(' (').z5(_Char___init__impl__6a9atx(10));
    var first = true;
    var tmp0_iterator = _get_children__my42wc_0(this).w();
    while (tmp0_iterator.f()) {
      var child = tmp0_iterator.e();
      if (first)
        first = false;
      else {
        // Inline function 'kotlin.text.appendLine' call
        var value = _Char___init__impl__6a9atx(44);
        // Inline function 'kotlin.text.appendLine' call
        builder.z5(value).z5(_Char___init__impl__6a9atx(10));
      }
      appendIndent(builder, indent);
      child.fm5(builder, indent + 4 | 0, seen);
    }
    // Inline function 'kotlin.text.appendLine' call
    var tmp$ret$4 = builder.z5(_Char___init__impl__6a9atx(10));
    appendIndent(tmp$ret$4, indent - 4 | 0).z5(_Char___init__impl__6a9atx(41));
  };
  protoOf(XmlCompositeDescriptor).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!protoOf(XmlValueDescriptor).equals.call(this, other))
      return false;
    if (!(other instanceof XmlCompositeDescriptor))
      THROW_CCE();
    if (!equals(this.glq_1, other.glq_1))
      return false;
    return true;
  };
  protoOf(XmlCompositeDescriptor).hashCode = function () {
    var result = protoOf(XmlValueDescriptor).hashCode.call(this);
    var tmp = imul(31, result);
    var tmp0_safe_receiver = this.glq_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
    result = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
    return result;
  };
  function defaultValue($this, serializersModule, config, deserializer) {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    var d = $this.qlm_1;
    var tmp;
    if (!equals(d, UNSET_instance)) {
      return (d == null ? true : !(d == null)) ? d : THROW_CCE();
    }
    var tmp_0;
    if ($this.plm_1 == null) {
      tmp_0 = null;
    } else {
      var defaultDecoder = new XmlDecoder(new XmlDecoderBase(serializersModule, config, CompactFragment_init_$Create$_0($this.plm_1).glf()), $this);
      tmp_0 = deserializer.s44(defaultDecoder);
    }
    var d_0 = tmp_0;
    $this.qlm_1 = d_0;
    return (d_0 == null ? true : !(d_0 == null)) ? d_0 : THROW_CCE();
  }
  function UNSET() {
  }
  var UNSET_instance;
  function UNSET_getInstance() {
    return UNSET_instance;
  }
  function XmlValueDescriptor(policy, serializerParent, tagParent) {
    XmlDescriptor.call(this, policy, serializerParent, tagParent);
    var tmp = this;
    var tmp$ret$0;
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator = serializerParent.bm4().w();
      while (tmp0_iterator.f()) {
        var e = tmp0_iterator.e();
        if (e instanceof XmlCData) {
          tmp$ret$0 = e;
          break $l$block;
        }
      }
      tmp$ret$0 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$0;
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      var tmp$ret$1;
      $l$block_0: {
        // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
        var tmp0_iterator_0 = tagParent.bm4().w();
        while (tmp0_iterator_0.f()) {
          var e_0 = tmp0_iterator_0.e();
          if (e_0 instanceof XmlCData) {
            tmp$ret$1 = e_0;
            break $l$block_0;
          }
        }
        tmp$ret$1 = null;
      }
      tmp_0 = tmp$ret$1;
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    var tmp1_elvis_lhs = tmp_0;
    var tmp_1;
    if (tmp1_elvis_lhs == null) {
      var tmp$ret$2;
      $l$block_1: {
        // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
        var tmp0_iterator_1 = serializerParent.cm4().f46().w();
        while (tmp0_iterator_1.f()) {
          var e_1 = tmp0_iterator_1.e();
          if (e_1 instanceof XmlCData) {
            tmp$ret$2 = e_1;
            break $l$block_1;
          }
        }
        tmp$ret$2 = null;
      }
      tmp_1 = tmp$ret$2;
    } else {
      tmp_1 = tmp1_elvis_lhs;
    }
    var tmp2_safe_receiver = tmp_1;
    tmp.olm_1 = (tmp2_safe_receiver == null ? null : tmp2_safe_receiver.rm6_1) === true;
    var tmp_2 = this;
    var tmp0_elvis_lhs_0 = get_declDefault(tagParent.bm4());
    tmp_2.plm_1 = tmp0_elvis_lhs_0 == null ? get_declDefault_0(serializerParent.cm4()) : tmp0_elvis_lhs_0;
    this.qlm_1 = UNSET_instance;
  }
  protoOf(XmlValueDescriptor).oly = function () {
    return this.olm_1;
  };
  protoOf(XmlValueDescriptor).nlo = function (xmlCodecBase, deserializer) {
    return defaultValue(this, xmlCodecBase.zlg_1, xmlCodecBase.alh_1, deserializer);
  };
  protoOf(XmlValueDescriptor).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!protoOf(XmlDescriptor).equals.call(this, other))
      return false;
    if (!(other instanceof XmlValueDescriptor))
      THROW_CCE();
    if (!(this.olm_1 === other.olm_1))
      return false;
    if (!(this.plm_1 == other.plm_1))
      return false;
    return equals(this.qlm_1, other.qlm_1);
  };
  protoOf(XmlValueDescriptor).hashCode = function () {
    var result = protoOf(XmlDescriptor).hashCode.call(this);
    result = imul(31, result) + getBooleanHashCode(this.olm_1) | 0;
    var tmp = imul(31, result);
    var tmp0_safe_receiver = this.plm_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : getStringHashCode(tmp0_safe_receiver);
    result = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
    var tmp_0 = imul(31, result);
    var tmp2_safe_receiver = this.qlm_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : hashCode(tmp2_safe_receiver);
    result = tmp_0 + (tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs) | 0;
    return result;
  };
  function TRANSPARENT() {
    TRANSPARENT_instance = this;
    PolymorphicMode.call(this);
  }
  var TRANSPARENT_instance;
  function TRANSPARENT_getInstance() {
    if (TRANSPARENT_instance == null)
      new TRANSPARENT();
    return TRANSPARENT_instance;
  }
  function TAG() {
    TAG_instance = this;
    PolymorphicMode.call(this);
  }
  var TAG_instance;
  function TAG_getInstance() {
    if (TAG_instance == null)
      new TAG();
    return TAG_instance;
  }
  function ATTR(name) {
    PolymorphicMode.call(this);
    this.bly_1 = name;
  }
  function PolymorphicMode() {
  }
  function ParentInfo(descriptor, index, useNameInfo, useOutputKind, overriddenSerializer) {
    useNameInfo = useNameInfo === VOID ? null : useNameInfo;
    useOutputKind = useOutputKind === VOID ? null : useOutputKind;
    overriddenSerializer = overriddenSerializer === VOID ? null : overriddenSerializer;
    this.sm6_1 = descriptor;
    this.tm6_1 = index;
    this.um6_1 = overriddenSerializer;
    var tmp = this;
    var tmp_0;
    if (useNameInfo == null) {
      tmp_0 = this.tm6_1 === -1 ? DeclaredNameInfo_init_$Create$(this.sm6_1.qlk().q45()) : getElementNameInfo(this.sm6_1.qlk(), this.tm6_1, toNamespace(this.sm6_1.gli()));
    } else {
      tmp_0 = useNameInfo;
    }
    tmp.vm6_1 = tmp_0;
    var tmp_1 = this;
    var tmp_2;
    if (useOutputKind == null) {
      tmp_2 = this.tm6_1 === -1 ? null : getRequestedOutputKind(this.sm6_1.qlk().j46(this.tm6_1));
    } else {
      tmp_2 = useOutputKind;
    }
    tmp_1.wm6_1 = tmp_2;
  }
  protoOf(ParentInfo).q44 = function () {
    return this.sm6_1;
  };
  protoOf(ParentInfo).im5 = function () {
    return this.um6_1;
  };
  protoOf(ParentInfo).pm5 = function (useNameInfo, useOutputKind, overriddenSerializer) {
    return new ParentInfo(this.sm6_1, this.tm6_1, useNameInfo, useOutputKind, overriddenSerializer);
  };
  protoOf(ParentInfo).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!(other instanceof ParentInfo))
      THROW_CCE();
    if (!this.sm6_1.equals(other.sm6_1))
      return false;
    if (!(this.tm6_1 === other.tm6_1))
      return false;
    if (!equals(this.um6_1, other.um6_1))
      return false;
    if (!this.vm6_1.equals(other.vm6_1))
      return false;
    return equals(this.wm6_1, other.wm6_1);
  };
  protoOf(ParentInfo).hashCode = function () {
    var result = this.sm6_1.hashCode();
    result = imul(31, result) + this.tm6_1 | 0;
    var tmp = imul(31, result);
    var tmp0_safe_receiver = this.um6_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
    result = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
    result = imul(31, result) + this.vm6_1.hashCode() | 0;
    var tmp_0 = imul(31, result);
    var tmp2_safe_receiver = this.wm6_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hashCode();
    result = tmp_0 + (tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs) | 0;
    return result;
  };
  protoOf(ParentInfo).xm3 = function () {
    return toNamespace(this.sm6_1.gli());
  };
  protoOf(ParentInfo).em4 = function () {
    return !(this.um6_1 == null) ? new XmlTypeDescriptor(this.um6_1.q44(), toNamespace(this.sm6_1.gli())) : this.tm6_1 === -1 ? this.sm6_1.rm4() : equals(this.cm4().i46(), CONTEXTUAL_getInstance()) ? this.sm6_1.rm4() : new XmlTypeDescriptor(this.cm4(), this.sm6_1.ali_1.xm3());
  };
  protoOf(ParentInfo).rm3 = function () {
    return this.vm6_1;
  };
  protoOf(ParentInfo).bm4 = function () {
    return this.tm6_1 === -1 ? emptyList() : this.sm6_1.qlk().j46(this.tm6_1);
  };
  protoOf(ParentInfo).cm4 = function () {
    return !(this.um6_1 == null) ? this.um6_1.q44() : equals(this.sm6_1.cm2(), CONTEXTUAL_getInstance()) ? this.sm6_1.qlk() : this.tm6_1 === -1 ? this.sm6_1.qlk() : this.sm6_1.qlk().k46(this.tm6_1);
  };
  protoOf(ParentInfo).dm4 = function () {
    return this.wm6_1;
  };
  function polyTagName(parentName, polyChildSpecification, baseClass, serializersModule) {
    var currentPkg = substringBeforeLast(parentName.zm2_1, _Char___init__impl__6a9atx(46), '');
    var parentTag = parentName.am3_1;
    var eqPos = indexOf(polyChildSpecification, _Char___init__impl__6a9atx(61));
    var pkgPos;
    var typeNameBase;
    var prefix;
    var localPart;
    if (eqPos < 0) {
      typeNameBase = polyChildSpecification;
      pkgPos = lastIndexOf(polyChildSpecification, _Char___init__impl__6a9atx(46));
      // Inline function 'nl.adaptivity.xmlutil.prefix' call
      prefix = parentTag.ml9();
      var tmp;
      if (pkgPos < 0) {
        tmp = polyChildSpecification;
      } else {
        // Inline function 'kotlin.text.substring' call
        var startIndex = pkgPos + 1 | 0;
        // Inline function 'kotlin.js.asDynamic' call
        tmp = polyChildSpecification.substring(startIndex);
      }
      localPart = tmp;
    } else {
      // Inline function 'kotlin.text.trim' call
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      var this_0 = polyChildSpecification.substring(0, eqPos);
      typeNameBase = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
      pkgPos = lastIndexOf(polyChildSpecification, _Char___init__impl__6a9atx(46), eqPos - 1 | 0);
      var prefPos = indexOf(polyChildSpecification, _Char___init__impl__6a9atx(58), eqPos + 1 | 0);
      if (prefPos < 0) {
        // Inline function 'nl.adaptivity.xmlutil.prefix' call
        prefix = parentTag.ml9();
        // Inline function 'kotlin.text.trim' call
        // Inline function 'kotlin.text.substring' call
        var startIndex_0 = eqPos + 1 | 0;
        // Inline function 'kotlin.js.asDynamic' call
        var this_1 = polyChildSpecification.substring(startIndex_0);
        localPart = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
      } else {
        // Inline function 'kotlin.text.trim' call
        // Inline function 'kotlin.text.substring' call
        var startIndex_1 = eqPos + 1 | 0;
        // Inline function 'kotlin.js.asDynamic' call
        var this_2 = polyChildSpecification.substring(startIndex_1, prefPos);
        prefix = toString(trim(isCharSequence(this_2) ? this_2 : THROW_CCE()));
        // Inline function 'kotlin.text.trim' call
        // Inline function 'kotlin.text.substring' call
        var startIndex_2 = prefPos + 1 | 0;
        // Inline function 'kotlin.js.asDynamic' call
        var this_3 = polyChildSpecification.substring(startIndex_2);
        localPart = toString(trim(isCharSequence(this_3) ? this_3 : THROW_CCE()));
      }
    }
    var tmp_0;
    var tmp_1;
    if (!(pkgPos === 0)) {
      tmp_1 = true;
    } else {
      // Inline function 'kotlin.text.isEmpty' call
      tmp_1 = charSequenceLength(currentPkg) === 0;
    }
    if (tmp_1) {
      tmp_0 = typeNameBase;
    } else {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp_0 = currentPkg + '.' + typeNameBase.substring(1);
    }
    var typename = tmp_0;
    var tmp0_safe_receiver = serializersModule.h4a(baseClass, typename);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q44();
    var tmp_2;
    if (tmp1_elvis_lhs == null) {
      throw XmlException_init_$Create$('Missing descriptor for ' + typename + ' in the serial context');
    } else {
      tmp_2 = tmp1_elvis_lhs;
    }
    var descriptor = tmp_2;
    var tmp_3;
    if (eqPos < 0) {
      var tmp_4 = Companion_instance_1;
      // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
      var tmp$ret$19 = parentTag.kl9();
      tmp_3 = tmp_4.dm2(descriptor, new NamespaceImpl(prefix, tmp$ret$19));
    } else {
      // Inline function 'nl.adaptivity.xmlutil.namespaceURI' call
      var tmp$ret$20 = parentTag.kl9();
      tmp_3 = new QName(tmp$ret$20, localPart, prefix);
    }
    var name = tmp_3;
    return new PolyBaseInfo(name, descriptor);
  }
  function XmlListLikeDescriptor(config, serializerParent, tagParent) {
    tagParent = tagParent === VOID ? serializerParent : tagParent;
    XmlDescriptor.call(this, config.olh_1, serializerParent, tagParent);
    var tmp = this;
    var tmp_0;
    var tmp_1;
    if (tagParent instanceof DetachedParent) {
      tmp_1 = tagParent.mm5_1;
    } else {
      tmp_1 = false;
    }
    if (tmp_1) {
      tmp_0 = false;
    } else {
      tmp_0 = config.olh_1.hm3(serializerParent, tagParent);
    }
    tmp.all_1 = tmp_0;
  }
  protoOf(XmlListLikeDescriptor).bll = function () {
    return this.all_1;
  };
  protoOf(XmlListLikeDescriptor).xm0 = function () {
    return false;
  };
  protoOf(XmlListLikeDescriptor).kln = function () {
    return false;
  };
  protoOf(XmlListLikeDescriptor).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!protoOf(XmlDescriptor).equals.call(this, other))
      return false;
    if (!(other instanceof XmlListLikeDescriptor))
      THROW_CCE();
    if (!(this.bll() === other.bll()))
      return false;
    if (!(this.xm0() === other.xm0()))
      return false;
    return this.kln() === other.kln();
  };
  protoOf(XmlListLikeDescriptor).hashCode = function () {
    var result = protoOf(XmlDescriptor).hashCode.call(this);
    result = imul(31, result) + getBooleanHashCode(this.bll()) | 0;
    result = imul(31, result) + getBooleanHashCode(this.xm0()) | 0;
    result = imul(31, result) + getBooleanHashCode(this.kln()) | 0;
    return result;
  };
  function appendIndent(_this__u8e3s4, count) {
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.structure.appendIndent.<anonymous>' call
    var inductionVariable = 0;
    if (inductionVariable < count)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        _this__u8e3s4.z5(_Char___init__impl__6a9atx(32));
      }
       while (inductionVariable < count);
    return _this__u8e3s4;
  }
  function InjectedParentTag(index, elementTypeDescriptor, elementUseNameInfo, namespace, elementUseOutputKind, overriddenSerializer) {
    elementUseOutputKind = elementUseOutputKind === VOID ? null : elementUseOutputKind;
    overriddenSerializer = overriddenSerializer === VOID ? null : overriddenSerializer;
    this.xm6_1 = index;
    this.ym6_1 = elementTypeDescriptor;
    this.zm6_1 = elementUseNameInfo;
    this.am7_1 = namespace;
    this.bm7_1 = elementUseOutputKind;
    this.cm7_1 = overriddenSerializer;
    this.dm7_1 = null;
  }
  protoOf(InjectedParentTag).em4 = function () {
    return this.ym6_1;
  };
  protoOf(InjectedParentTag).rm3 = function () {
    return this.zm6_1;
  };
  protoOf(InjectedParentTag).xm3 = function () {
    return this.am7_1;
  };
  protoOf(InjectedParentTag).dm4 = function () {
    return this.bm7_1;
  };
  protoOf(InjectedParentTag).im5 = function () {
    return this.cm7_1;
  };
  protoOf(InjectedParentTag).q44 = function () {
    return this.dm7_1;
  };
  protoOf(InjectedParentTag).bm4 = function () {
    return emptyList();
  };
  protoOf(InjectedParentTag).cm4 = function () {
    return this.ym6_1.fm4_1;
  };
  protoOf(InjectedParentTag).pm5 = function (useNameInfo, useOutputKind, overriddenSerializer) {
    return new InjectedParentTag(this.xm6_1, this.ym6_1, useNameInfo, this.am7_1, useOutputKind, overriddenSerializer);
  };
  function get_declDefault(_this__u8e3s4) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var e = tmp0_iterator.e();
        if (e instanceof XmlDefault) {
          tmp$ret$0 = e;
          break $l$block;
        }
      }
      tmp$ret$0 = null;
    }
    var tmp0_safe_receiver = tmp$ret$0;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.em7_1;
  }
  function get_declDefault_0(_this__u8e3s4) {
    return get_declDefault(_this__u8e3s4.f46());
  }
  function getElementNameInfo(_this__u8e3s4, index, parentNamespace) {
    var serialName = _this__u8e3s4.m46(index);
    var tmp$ret$0;
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator = _this__u8e3s4.j46(index).w();
      while (tmp0_iterator.f()) {
        var e = tmp0_iterator.e();
        if (e instanceof XmlSerialName) {
          tmp$ret$0 = e;
          break $l$block;
        }
      }
      tmp$ret$0 = null;
    }
    var annotation = tmp$ret$0;
    var qName = annotation == null ? null : toQName(annotation, serialName, parentNamespace);
    return new DeclaredNameInfo(serialName, qName, (annotation == null ? null : annotation.llk_1) === get_UNSET_ANNOTATION_VALUE());
  }
  function getRequestedOutputKind(_this__u8e3s4) {
    var xmlCData = null;
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var annotation = tmp0_iterator.e();
      var tmp1_safe_receiver = annotation instanceof XmlValue ? annotation : null;
      if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.wlt_1) === true)
        return OutputKind_Mixed_getInstance();
      else {
        var tmp;
        if (annotation instanceof XmlId) {
          tmp = true;
        } else {
          tmp = annotation instanceof XmlOtherAttributes;
        }
        if (tmp)
          return OutputKind_Attribute_getInstance();
        else {
          if (annotation instanceof XmlElement)
            return annotation.qm5_1 ? OutputKind_Element_getInstance() : OutputKind_Attribute_getInstance();
          else {
            var tmp_0;
            if (annotation instanceof XmlPolyChildren) {
              tmp_0 = true;
            } else {
              tmp_0 = annotation instanceof XmlChildrenName;
            }
            if (tmp_0)
              return OutputKind_Element_getInstance();
            else {
              if (annotation instanceof XmlCData)
                xmlCData = annotation;
            }
          }
        }
      }
    }
    var tmp2_safe_receiver = xmlCData;
    if ((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.rm6_1) === true)
      return OutputKind_Element_getInstance();
    return null;
  }
  function declOutputKind(_this__u8e3s4) {
    var tmp0_iterator = _this__u8e3s4.f46().w();
    while (tmp0_iterator.f()) {
      var a = tmp0_iterator.e();
      var tmp;
      if (a instanceof XmlValue) {
        tmp = a.wlt_1;
      } else {
        tmp = false;
      }
      if (tmp)
        return OutputKind_Text_getInstance();
      else {
        if (a instanceof XmlId)
          return OutputKind_Attribute_getInstance();
        else {
          if (a instanceof XmlElement)
            return a.qm5_1 ? OutputKind_Element_getInstance() : OutputKind_Attribute_getInstance();
          else {
            var tmp_0;
            if (a instanceof XmlPolyChildren) {
              tmp_0 = true;
            } else {
              tmp_0 = a instanceof XmlChildrenName;
            }
            if (tmp_0)
              return OutputKind_Element_getInstance();
          }
        }
      }
    }
    return null;
  }
  function getNameInfo(_this__u8e3s4, parentNamespace) {
    var tmp;
    if (_this__u8e3s4.b46() ? endsWith(_this__u8e3s4.q45(), _Char___init__impl__6a9atx(63)) : false) {
      tmp = dropLast(_this__u8e3s4.q45(), 1);
    } else {
      var tmp0_safe_receiver = get_capturedKClass(_this__u8e3s4);
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_serialName(tmp0_safe_receiver);
      tmp = tmp1_elvis_lhs == null ? _this__u8e3s4.q45() : tmp1_elvis_lhs;
    }
    var realSerialName = tmp;
    var tmp$ret$0;
    $l$block: {
      // Inline function 'nl.adaptivity.xmlutil.serialization.firstOrNull' call
      var tmp0_iterator = _this__u8e3s4.f46().w();
      while (tmp0_iterator.f()) {
        var e = tmp0_iterator.e();
        if (e instanceof XmlSerialName) {
          tmp$ret$0 = e;
          break $l$block;
        }
      }
      tmp$ret$0 = null;
    }
    var annotation = tmp$ret$0;
    var qName = annotation == null ? null : toQName(annotation, realSerialName, parentNamespace);
    return new DeclaredNameInfo(realSerialName, qName, (annotation == null ? null : annotation.llk_1) === get_UNSET_ANNOTATION_VALUE());
  }
  function element$factory() {
    return getPropertyCallableRef('element', 1, KProperty1, function (receiver) {
      return _get_element__z0t21h(receiver);
    }, null);
  }
  function tagName$factory() {
    return getPropertyCallableRef('tagName', 1, KProperty1, function (receiver) {
      return receiver.gli();
    }, null);
  }
  function children$factory() {
    return getPropertyCallableRef('children', 1, KProperty1, function (receiver) {
      return _get_children__my42wc(receiver);
    }, null);
  }
  function childDescriptor$factory() {
    return getPropertyCallableRef('childDescriptor', 1, KProperty1, function (receiver) {
      return _get_childDescriptor__xb3z96(receiver);
    }, null);
  }
  function keyDescriptor$factory() {
    return getPropertyCallableRef('keyDescriptor', 1, KProperty1, function (receiver) {
      return receiver.dm6();
    }, null);
  }
  function valueDescriptor$factory() {
    return getPropertyCallableRef('valueDescriptor', 1, KProperty1, function (receiver) {
      return receiver.ulr();
    }, null);
  }
  function isValueCollapsed$factory() {
    return getPropertyCallableRef('isValueCollapsed', 1, KProperty1, function (receiver) {
      return receiver.nll();
    }, null);
  }
  function entryName$factory() {
    return getPropertyCallableRef('entryName', 1, KProperty1, function (receiver) {
      return receiver.ulm();
    }, null);
  }
  function keyDescriptor$factory_0() {
    return getPropertyCallableRef('keyDescriptor', 1, KProperty1, function (receiver) {
      return _get_keyDescriptor__hu7alf(receiver);
    }, null);
  }
  function valueDescriptor$factory_0() {
    return getPropertyCallableRef('valueDescriptor', 1, KProperty1, function (receiver) {
      return _get_valueDescriptor__8ouq3z(receiver);
    }, null);
  }
  function child$factory() {
    return getPropertyCallableRef('child', 1, KProperty1, function (receiver) {
      return _get_child__j05w3v(receiver);
    }, null);
  }
  function isUnsigned$factory() {
    return getPropertyCallableRef('isUnsigned', 1, KProperty1, function (receiver) {
      return receiver.fln();
    }, null);
  }
  function children$factory_0() {
    return getPropertyCallableRef('children', 1, KProperty1, function (receiver) {
      return _get_children__my42wc_0(receiver);
    }, null);
  }
  function childReorderInfo$factory() {
    return getPropertyCallableRef('childReorderInfo', 1, KProperty1, function (receiver) {
      return _get_childReorderInfo__htyspq(receiver);
    }, null);
  }
  function Companion_4() {
    this.fm7_1 = -2;
  }
  var Companion_instance_5;
  function Companion_getInstance_9() {
    return Companion_instance_5;
  }
  function XmlOrderConstraint(before, after) {
    this.klq_1 = before;
    this.llq_1 = after;
  }
  protoOf(XmlOrderConstraint).y6 = function () {
    return this.klq_1;
  };
  protoOf(XmlOrderConstraint).z6 = function () {
    return this.llq_1;
  };
  protoOf(XmlOrderConstraint).toString = function () {
    return 'XmlOrderConstraint(before=' + this.klq_1 + ', after=' + this.llq_1 + ')';
  };
  protoOf(XmlOrderConstraint).hashCode = function () {
    var result = this.klq_1;
    result = imul(result, 31) + this.llq_1 | 0;
    return result;
  };
  protoOf(XmlOrderConstraint).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XmlOrderConstraint))
      return false;
    var tmp0_other_with_cast = other instanceof XmlOrderConstraint ? other : THROW_CCE();
    if (!(this.klq_1 === tmp0_other_with_cast.klq_1))
      return false;
    if (!(this.llq_1 === tmp0_other_with_cast.llq_1))
      return false;
    return true;
  };
  var OrderWildcard_BEFORE_instance;
  var OrderWildcard_NONE_instance;
  var OrderWildcard_AFTER_instance;
  var OrderWildcard_entriesInitialized;
  function OrderWildcard_initEntries() {
    if (OrderWildcard_entriesInitialized)
      return Unit_instance;
    OrderWildcard_entriesInitialized = true;
    OrderWildcard_BEFORE_instance = new OrderWildcard('BEFORE', 0);
    OrderWildcard_NONE_instance = new OrderWildcard('NONE', 1);
    OrderWildcard_AFTER_instance = new OrderWildcard('AFTER', 2);
  }
  function OrderWildcard(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function XmlOrderNode$toString$lambda(it) {
    return it.km4_1.toString();
  }
  function XmlOrderNode$toString$lambda_0(it) {
    return it.km4_1.toString();
  }
  function OrderWildcard_BEFORE_getInstance() {
    OrderWildcard_initEntries();
    return OrderWildcard_BEFORE_instance;
  }
  function OrderWildcard_NONE_getInstance() {
    OrderWildcard_initEntries();
    return OrderWildcard_NONE_instance;
  }
  function OrderWildcard_AFTER_getInstance() {
    OrderWildcard_initEntries();
    return OrderWildcard_AFTER_instance;
  }
  function XmlOrderNode(elementIdx) {
    this.km4_1 = elementIdx;
    var tmp = this;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp.lm4_1 = ArrayList_init_$Create$();
    var tmp_0 = this;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp_0.mm4_1 = ArrayList_init_$Create$();
    this.nm4_1 = OrderWildcard_NONE_getInstance();
  }
  protoOf(XmlOrderNode).om4 = function (nodes) {
    var inductionVariable = 0;
    var last = nodes.length;
    while (inductionVariable < last) {
      var node = nodes[inductionVariable];
      inductionVariable = inductionVariable + 1 | 0;
      if (!this.mm4_1.a1(node)) {
        this.mm4_1.i1(node);
        node.pm4([this]);
      }
    }
  };
  protoOf(XmlOrderNode).pm4 = function (nodes) {
    var inductionVariable = 0;
    var last = nodes.length;
    while (inductionVariable < last) {
      var node = nodes[inductionVariable];
      inductionVariable = inductionVariable + 1 | 0;
      if (!this.lm4_1.a1(node)) {
        this.lm4_1.i1(node);
        node.om4([this]);
      }
    }
  };
  protoOf(XmlOrderNode).toString = function () {
    var tmp = joinToString(this.lm4_1, VOID, VOID, VOID, VOID, VOID, XmlOrderNode$toString$lambda);
    return '(' + this.km4_1 + ', p=[' + tmp + '], s=[' + joinToString(this.mm4_1, VOID, VOID, VOID, VOID, VOID, XmlOrderNode$toString$lambda_0) + '])';
  };
  protoOf(XmlOrderNode).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!(other instanceof XmlOrderNode))
      THROW_CCE();
    if (!(this.km4_1 === other.km4_1))
      return false;
    if (!equals(this.lm4_1, other.lm4_1))
      return false;
    if (!equals(this.mm4_1, other.mm4_1))
      return false;
    return this.nm4_1.equals(other.nm4_1);
  };
  protoOf(XmlOrderNode).hashCode = function () {
    var result = this.km4_1;
    result = imul(31, result) + hashCode(this.lm4_1) | 0;
    result = imul(31, result) + hashCode(this.mm4_1) | 0;
    result = imul(31, result) + this.nm4_1.hashCode() | 0;
    return result;
  };
  function sequenceStarts(_this__u8e3s4, childCount) {
    var beforeAny = booleanArray(childCount);
    var hasWildCard = false;
    var afterAny = booleanArray(childCount);
    var tmp = 0;
    // Inline function 'kotlin.arrayOfNulls' call
    var tmp_0 = fillArrayVal(Array(childCount), null);
    while (tmp < childCount) {
      var tmp_1 = tmp;
      tmp_0[tmp_1] = new XmlOrderNode(tmp_1);
      tmp = tmp + 1 | 0;
    }
    var nodes = tmp_0;
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'nl.adaptivity.xmlutil.serialization.structure.sequenceStarts.<anonymous>' call
      if (element.llq_1 === -2) {
        hasWildCard = true;
        beforeAny[element.klq_1] = true;
      } else {
        if (element.klq_1 === -2) {
          hasWildCard = true;
          afterAny[element.llq_1] = true;
        } else {
          // Inline function 'nl.adaptivity.xmlutil.serialization.structure.XmlOrderConstraint.map' call
          // Inline function 'nl.adaptivity.xmlutil.serialization.structure.sequenceStarts.<anonymous>.<anonymous>' call
          var tmp_2 = nodes[element.klq_1];
          // Inline function 'nl.adaptivity.xmlutil.serialization.structure.sequenceStarts.<anonymous>.<anonymous>' call
          var tmp$ret$3 = nodes[element.llq_1];
          var tmp0_container = new Pair(tmp_2, tmp$ret$3);
          var before = tmp0_container.y6();
          var after = tmp0_container.z6();
          before.om4([after]);
          after.pm4([before]);
        }
      }
    }
    if (hasWildCard) {
      var inductionVariable = 0;
      var last = beforeAny.length - 1 | 0;
      if (inductionVariable <= last)
        do {
          var idx = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          if (beforeAny[idx]) {
            nodes[idx].nm4_1 = OrderWildcard_BEFORE_getInstance();
          } else if (afterAny[idx]) {
            nodes[idx].nm4_1 = OrderWildcard_AFTER_getInstance();
          }
        }
         while (inductionVariable <= last);
      // Inline function 'kotlin.run' call
      // Inline function 'kotlin.contracts.contract' call
      var beforesToCheck = ArrayDeque_init_$Create$();
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var this_0 = get_indices(beforeAny);
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator_0 = this_0.w();
      while (tmp0_iterator_0.f()) {
        var element_0 = tmp0_iterator_0.e();
        // Inline function 'nl.adaptivity.xmlutil.serialization.structure.sequenceStarts.<anonymous>.<anonymous>' call
        if (beforeAny[element_0]) {
          destination.i1(element_0);
        }
      }
      beforesToCheck.m1(destination);
      $l$loop: while (true) {
        // Inline function 'kotlin.collections.isNotEmpty' call
        if (!!beforesToCheck.c1()) {
          break $l$loop;
        }
        var idx_0 = beforesToCheck.kf();
        // Inline function 'kotlin.sequences.forEach' call
        var tmp_3 = asSequence_1(nodes[idx_0].lm4_1);
        var tmp0_iterator_1 = filter(tmp_3, sequenceStarts$lambda(beforeAny)).w();
        while (tmp0_iterator_1.f()) {
          var element_1 = tmp0_iterator_1.e();
          // Inline function 'nl.adaptivity.xmlutil.serialization.structure.sequenceStarts.<anonymous>.<anonymous>' call
          element_1.nm4_1 = OrderWildcard_BEFORE_getInstance();
          beforesToCheck.i1(element_1.km4_1);
        }
      }
      // Inline function 'kotlin.run' call
      // Inline function 'kotlin.contracts.contract' call
      var aftersToCheck = ArrayDeque_init_$Create$();
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var this_1 = get_indices(afterAny);
      var destination_0 = ArrayList_init_$Create$();
      var tmp0_iterator_2 = this_1.w();
      while (tmp0_iterator_2.f()) {
        var element_2 = tmp0_iterator_2.e();
        // Inline function 'nl.adaptivity.xmlutil.serialization.structure.sequenceStarts.<anonymous>.<anonymous>' call
        if (afterAny[element_2]) {
          destination_0.i1(element_2);
        }
      }
      aftersToCheck.m1(destination_0);
      $l$loop_0: while (true) {
        // Inline function 'kotlin.collections.isNotEmpty' call
        if (!!aftersToCheck.c1()) {
          break $l$loop_0;
        }
        var idx_1 = aftersToCheck.kf();
        // Inline function 'kotlin.sequences.forEach' call
        var tmp_4 = asSequence_1(nodes[idx_1].mm4_1);
        var tmp0_iterator_3 = filter(tmp_4, sequenceStarts$lambda_0(afterAny)).w();
        while (tmp0_iterator_3.f()) {
          var element_3 = tmp0_iterator_3.e();
          // Inline function 'nl.adaptivity.xmlutil.serialization.structure.sequenceStarts.<anonymous>.<anonymous>' call
          element_3.nm4_1 = OrderWildcard_AFTER_getInstance();
          aftersToCheck.i1(element_3.km4_1);
        }
      }
    }
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination_1 = ArrayList_init_$Create$();
    var inductionVariable_0 = 0;
    var last_0 = nodes.length;
    while (inductionVariable_0 < last_0) {
      var element_4 = nodes[inductionVariable_0];
      inductionVariable_0 = inductionVariable_0 + 1 | 0;
      // Inline function 'nl.adaptivity.xmlutil.serialization.structure.sequenceStarts.<anonymous>' call
      if (element_4.lm4_1.c1()) {
        destination_1.i1(element_4);
      }
    }
    return destination_1;
  }
  function flatten(_this__u8e3s4) {
    var seen = booleanArray(flatten$lastIndex(_this__u8e3s4) + 1 | 0);
    // Inline function 'kotlin.also' call
    // Inline function 'kotlin.collections.mutableListOf' call
    var this_0 = ArrayList_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'nl.adaptivity.xmlutil.serialization.structure.flatten.<anonymous>' call
    this_0.i1(_this__u8e3s4);
    flatten$flattenSuccessorsTo(_this__u8e3s4, seen, this_0);
    return this_0;
  }
  function fullFlatten(_this__u8e3s4, serialDescriptor, children) {
    // Inline function 'kotlin.arrayOfNulls' call
    var size = serialDescriptor.g46();
    var originalOrderNodes = fillArrayVal(Array(size), null);
    // Inline function 'kotlin.collections.mutableListOf' call
    var allNodes = ArrayList_init_$Create$();
    var tmp = asSequence_1(_this__u8e3s4);
    var tmp0_iterator = filter(tmp, fullFlatten$lambda).w();
    while (tmp0_iterator.f()) {
      var node = tmp0_iterator.e();
      fullFlatten$addTransitive(originalOrderNodes, node);
      allNodes.i1(node);
    }
    var inductionVariable = 0;
    var last = originalOrderNodes.length - 1 | 0;
    if (inductionVariable <= last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (originalOrderNodes[i] == null) {
          var node_0 = new XmlOrderNode(i);
          originalOrderNodes[i] = node_0;
          allNodes.i1(node_0);
        }
      }
       while (inductionVariable <= last);
    // Inline function 'kotlin.collections.partition' call
    var first = ArrayList_init_$Create$();
    var second = ArrayList_init_$Create$();
    var tmp0_iterator_0 = allNodes.w();
    while (tmp0_iterator_0.f()) {
      var element = tmp0_iterator_0.e();
      // Inline function 'nl.adaptivity.xmlutil.serialization.structure.fullFlatten.<anonymous>' call
      if (children.v(element.km4_1).olg().equals(OutputKind_Attribute_getInstance())) {
        first.i1(element);
      } else {
        second.i1(element);
      }
    }
    var tmp2_container = new Pair(first, second);
    var attributes = tmp2_container.y6();
    var members = tmp2_container.z6();
    var tmp_0 = 0;
    var tmp_1 = serialDescriptor.g46();
    var tmp_2 = new Int32Array(tmp_1);
    while (tmp_0 < tmp_1) {
      tmp_2[tmp_0] = -1;
      tmp_0 = tmp_0 + 1 | 0;
    }
    var finalToDeclMap = tmp_2;
    var tmp_3 = 0;
    var tmp_4 = serialDescriptor.g46();
    var tmp_5 = new Int32Array(tmp_4);
    while (tmp_3 < tmp_4) {
      tmp_5[tmp_3] = -1;
      tmp_3 = tmp_3 + 1 | 0;
    }
    var declToOrderMap = tmp_5;
    var nextElemIdx = 0;
    // Inline function 'kotlin.collections.mutableListOf' call
    var constraints = ArrayList_init_$Create$();
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var indexedObject = [attributes, members];
    var inductionVariable_0 = 0;
    var last_0 = indexedObject.length;
    while (inductionVariable_0 < last_0) {
      var attrOrMembers = indexedObject[inductionVariable_0];
      inductionVariable_0 = inductionVariable_0 + 1 | 0;
      // Inline function 'kotlin.collections.mutableListOf' call
      var before = ArrayList_init_$Create$();
      // Inline function 'kotlin.collections.mutableListOf' call
      var general = ArrayList_init_$Create$();
      // Inline function 'kotlin.collections.mutableListOf' call
      var after = ArrayList_init_$Create$();
      var tmp4_iterator = attrOrMembers.w();
      while (tmp4_iterator.f()) {
        var node_1 = tmp4_iterator.e();
        switch (node_1.nm4_1.za_1) {
          case 0:
            before.i1(node_1);
            break;
          case 1:
            general.i1(node_1);
            break;
          case 2:
            after.i1(node_1);
            break;
        }
      }
      var tmp6_iterator = before.w();
      while (tmp6_iterator.f()) {
        var node_2 = tmp6_iterator.e();
        constraints.i1(new XmlOrderConstraint(node_2.km4_1, -2));
      }
      var tmp7_iterator = after.w();
      while (tmp7_iterator.f()) {
        var node_3 = tmp7_iterator.e();
        constraints.i1(new XmlOrderConstraint(-2, node_3.km4_1));
      }
      // Inline function 'kotlin.arrayOf' call
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      var indexedObject_0 = [before, general, after];
      var inductionVariable_1 = 0;
      var last_1 = indexedObject_0.length;
      while (inductionVariable_1 < last_1) {
        var base = indexedObject_0[inductionVariable_1];
        inductionVariable_1 = inductionVariable_1 + 1 | 0;
        var queue = toMutableList(base);
        $l$loop: while (true) {
          // Inline function 'kotlin.collections.isNotEmpty' call
          if (!!queue.c1()) {
            break $l$loop;
          }
          var tmp$ret$17;
          $l$block_0: {
            // Inline function 'nl.adaptivity.xmlutil.serialization.structure.indexOfMinBy' call
            if (queue.c1()) {
              tmp$ret$17 = -1;
              break $l$block_0;
            }
            if (queue.u() === 1) {
              tmp$ret$17 = 0;
              break $l$block_0;
            }
            var idx = 1;
            var minIdx = 0;
            // Inline function 'nl.adaptivity.xmlutil.serialization.structure.fullFlatten.<anonymous>' call
            var node_4 = queue.v(0);
            var tmp_6;
            var tmp$ret$18;
            $l$block_2: {
              // Inline function 'kotlin.collections.any' call
              var this_0 = node_4.lm4_1;
              var tmp_7;
              if (isInterface(this_0, Collection)) {
                tmp_7 = this_0.c1();
              } else {
                tmp_7 = false;
              }
              if (tmp_7) {
                tmp$ret$18 = false;
                break $l$block_2;
              }
              var tmp0_iterator_1 = this_0.w();
              while (tmp0_iterator_1.f()) {
                var element_0 = tmp0_iterator_1.e();
                // Inline function 'nl.adaptivity.xmlutil.serialization.structure.fullFlatten.<anonymous>.<anonymous>' call
                if (declToOrderMap[element_0.km4_1] < 0) {
                  tmp$ret$18 = true;
                  break $l$block_2;
                }
              }
              tmp$ret$18 = false;
            }
            if (tmp$ret$18) {
              tmp_6 = serialDescriptor.g46();
            } else {
              tmp_6 = node_4.km4_1;
            }
            var minValue = tmp_6;
            do {
              // Inline function 'nl.adaptivity.xmlutil.serialization.structure.fullFlatten.<anonymous>' call
              var node_5 = queue.v(idx);
              var tmp_8;
              var tmp$ret$21;
              $l$block_4: {
                // Inline function 'kotlin.collections.any' call
                var this_1 = node_5.lm4_1;
                var tmp_9;
                if (isInterface(this_1, Collection)) {
                  tmp_9 = this_1.c1();
                } else {
                  tmp_9 = false;
                }
                if (tmp_9) {
                  tmp$ret$21 = false;
                  break $l$block_4;
                }
                var tmp0_iterator_2 = this_1.w();
                while (tmp0_iterator_2.f()) {
                  var element_1 = tmp0_iterator_2.e();
                  // Inline function 'nl.adaptivity.xmlutil.serialization.structure.fullFlatten.<anonymous>.<anonymous>' call
                  if (declToOrderMap[element_1.km4_1] < 0) {
                    tmp$ret$21 = true;
                    break $l$block_4;
                  }
                }
                tmp$ret$21 = false;
              }
              if (tmp$ret$21) {
                tmp_8 = serialDescriptor.g46();
              } else {
                tmp_8 = node_5.km4_1;
              }
              var v = tmp_8;
              if (compareTo(minValue, v) > 0) {
                minIdx = idx;
                minValue = v;
              }
              idx = idx + 1 | 0;
            }
             while (idx < queue.u());
            tmp$ret$17 = minIdx;
          }
          var nextIdx = tmp$ret$17;
          var next = queue.s1(nextIdx);
          finalToDeclMap[nextElemIdx] = next.km4_1;
          declToOrderMap[next.km4_1] = nextElemIdx;
          nextElemIdx = nextElemIdx + 1 | 0;
          var tmp10_iterator = next.mm4_1.w();
          while (tmp10_iterator.f()) {
            var successor = tmp10_iterator.e();
            if (base.a1(successor)) {
              constraints.i1(new XmlOrderConstraint(next.km4_1, successor.km4_1));
            }
            if (!queue.a1(successor)) {
              queue.i1(successor);
            }
          }
        }
      }
    }
    return to(constraints, declToOrderMap);
  }
  function flatten$lastIndex(_this__u8e3s4) {
    var lastIndex = _this__u8e3s4.km4_1;
    var tmp0_iterator = _this__u8e3s4.mm4_1.w();
    while (tmp0_iterator.f()) {
      var successor = tmp0_iterator.e();
      var c = flatten$lastIndex(successor);
      if (c > lastIndex)
        lastIndex = c;
    }
    return lastIndex;
  }
  function flatten$flattenSuccessorsTo(_this__u8e3s4, seen, receiver) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = _this__u8e3s4.mm4_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'nl.adaptivity.xmlutil.serialization.structure.flatten.flattenSuccessorsTo.<anonymous>' call
      if (!seen[element.km4_1]) {
        destination.i1(element);
      }
    }
    var unseenSuccessors = destination;
    var tmp0_iterator_0 = unseenSuccessors.w();
    while (tmp0_iterator_0.f()) {
      var successor = tmp0_iterator_0.e();
      receiver.i1(successor);
      seen[successor.km4_1] = true;
    }
    var tmp1_iterator = unseenSuccessors.w();
    while (tmp1_iterator.f()) {
      var successor_0 = tmp1_iterator.e();
      flatten$flattenSuccessorsTo(successor_0, seen, receiver);
    }
  }
  function fullFlatten$addTransitive(originalOrderNodes, node) {
    if (originalOrderNodes[node.km4_1] == null) {
      originalOrderNodes[node.km4_1] = node;
      var tmp0_iterator = node.mm4_1.w();
      while (tmp0_iterator.f()) {
        var next = tmp0_iterator.e();
        fullFlatten$addTransitive(originalOrderNodes, next);
      }
    }
  }
  function sequenceStarts$lambda($beforeAny) {
    return function (it) {
      return !$beforeAny[it.km4_1];
    };
  }
  function sequenceStarts$lambda_0($afterAny) {
    return function (it) {
      return !$afterAny[it.km4_1];
    };
  }
  function fullFlatten$lambda(it) {
    return it.lm4_1.c1();
  }
  function _get_children__my42wc_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hm4_1;
    children$factory_1();
    return this_0.t2();
  }
  function XmlTypeDescriptor$children$delegate$lambda(this$0, $parentNamespace) {
    return function () {
      var tmp = 0;
      var tmp_0 = this$0.fm4_1.g46();
      // Inline function 'kotlin.arrayOfNulls' call
      var tmp_1 = fillArrayVal(Array(tmp_0), null);
      while (tmp < tmp_0) {
        var tmp_2 = tmp;
        var tmp_3 = this$0.fm4_1.k46(tmp_2);
        var tmp0_safe_receiver = this$0.sm4();
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toNamespace(tmp0_safe_receiver);
        tmp_1[tmp_2] = new XmlTypeDescriptor(tmp_3, tmp1_elvis_lhs == null ? $parentNamespace : tmp1_elvis_lhs);
        tmp = tmp + 1 | 0;
      }
      return tmp_1;
    };
  }
  function XmlTypeDescriptor(serialDescriptor, parentNamespace) {
    this.fm4_1 = serialDescriptor;
    this.gm4_1 = getNameInfo(this.fm4_1, parentNamespace);
    var tmp = this;
    tmp.hm4_1 = lazy(XmlTypeDescriptor$children$delegate$lambda(this, parentNamespace));
  }
  protoOf(XmlTypeDescriptor).sm4 = function () {
    return this.gm4_1.xm2_1;
  };
  protoOf(XmlTypeDescriptor).v = function (index) {
    return _get_children__my42wc_1(this)[index];
  };
  protoOf(XmlTypeDescriptor).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!(other instanceof XmlTypeDescriptor))
      THROW_CCE();
    if (!equals(this.fm4_1, other.fm4_1))
      return false;
    return this.gm4_1.equals(other.gm4_1);
  };
  protoOf(XmlTypeDescriptor).hashCode = function () {
    var result = hashCode(this.fm4_1);
    result = imul(31, result) + this.gm4_1.hashCode() | 0;
    return result;
  };
  function children$factory_1() {
    return getPropertyCallableRef('children', 1, KProperty1, function (receiver) {
      return _get_children__my42wc_1(receiver);
    }, null);
  }
  function getPlatformDefaultModule() {
    return get_EmptySerializersModuleLegacyJs();
  }
  function get_serialName(_this__u8e3s4) {
    var tmp0_safe_receiver = serializerOrNull(_this__u8e3s4);
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.run' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'nl.adaptivity.xmlutil.serialization.impl.<get-serialName>.<anonymous>' call
      tmp = tmp0_safe_receiver.q44().q45();
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? replace(get_name(_this__u8e3s4), _Char___init__impl__6a9atx(36), _Char___init__impl__6a9atx(46)) : tmp1_elvis_lhs;
  }
  //region block: post-declaration
  protoOf(DocumentCompositeDecoder).v48 = decodeSerializableElement$default;
  protoOf(DecodeCommons).wlh = delegateFormat;
  protoOf(DecodeCommons).h48 = decodeSerializableValue;
  protoOf(NullDecoder).v48 = decodeSerializableElement$default;
  protoOf(NullDecoder).x48 = decodeSequentially;
  protoOf(TagDecoderBase).v48 = decodeSerializableElement$default;
  protoOf(TagDecoderBase).x48 = decodeSequentially;
  protoOf(TagDecoderBase).z48 = decodeCollectionSize;
  protoOf(TagDecoderBase).wlh = delegateFormat;
  protoOf(AttributeMapDecoder).h48 = decodeSerializableValue;
  protoOf(XmlEncoder).d4a = beginCollection;
  protoOf(PrimitiveEncoder).c4a = encodeNotNullMark;
  protoOf(PrimitiveEncoder).d4a = beginCollection;
  protoOf(PrimitiveEncoder).xlh = ensureNamespace;
  protoOf(DefaultXmlSerializationPolicy).bm3 = get_defaultPrimitiveOutputKind;
  protoOf(DefaultXmlSerializationPolicy).cm3 = get_defaultObjectOutputKind;
  protoOf(DefaultXmlSerializationPolicy).dm3 = defaultOutputKind;
  protoOf(DefaultXmlSerializationPolicy).em3 = invalidOutputKind;
  protoOf(DefaultXmlSerializationPolicy).tlh = serialTypeNameToQName;
  protoOf(DefaultXmlSerializationPolicy).lm3 = serialUseNameToQName;
  protoOf(DefaultXmlSerializationPolicy).om3 = handleAttributeOrderConflict;
  protoOf(DefaultXmlSerializationPolicy).gln = enumEncoding;
  protoOf(DefaultXmlSerializationPolicy).am4 = attributeListDelimiters;
  protoOf(NamespaceCollectingXmlWriter$namespaceContext$1).kl5 = getPrefixes;
  protoOf(NamespaceCollectingXmlWriter).ml7 = startDocument$default;
  protoOf(NamespaceCollectingXmlWriter).tl7 = namespaceAttr;
  protoOf(NamespaceCollectingXmlWriter).cl7 = processingInstruction;
  protoOf(XmlDescriptor).b46 = get_isNullable;
  protoOf(XmlDescriptor).i46 = get_kind;
  protoOf(XmlDescriptor).oly = get_isCData;
  protoOf(XmlDescriptor).n46 = isElementOptional;
  protoOf(DetachedParent).hm5 = copy$default;
  protoOf(ParentInfo).hm5 = copy$default;
  protoOf(InjectedParentTag).hm5 = copy$default;
  //endregion
  //region block: init
  Companion_instance_1 = new Companion_0();
  UNSET_ANNOTATION_VALUE = 'ZXC\x01VBNBVCXZ';
  Companion_instance_3 = new Companion_2();
  UNSET_instance = new UNSET();
  Companion_instance_5 = new Companion_4();
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = XML_init_$Create$;
  _.$_$.b = Companion_getInstance_6;
  _.$_$.c = XmlInput;
  _.$_$.d = XML;
  _.$_$.e = XmlSerialName;
  _.$_$.f = XmlValue;
  //endregion
  return _;
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./xmlutil-core.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js')));

//# sourceMappingURL=xmlutil-serialization.js.map
