CrackMe.apk
Download file
package kotlin.reflect.jvm.internal.impl.serialization.deserialization;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import kotlin.Pair;
import kotlin.collections.CollectionsKt;
import kotlin.collections.MapsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassConstructorDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ConstructorDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility;
import kotlin.reflect.jvm.internal.impl.descriptors.Modality;
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyGetterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertySetterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ReceiverParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeAliasDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.FieldDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyGetterDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertySetterDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf;
import kotlin.reflect.jvm.internal.impl.metadata.deserialization.BinaryVersion;
import kotlin.reflect.jvm.internal.impl.metadata.deserialization.Flags;
import kotlin.reflect.jvm.internal.impl.metadata.deserialization.NameResolver;
import kotlin.reflect.jvm.internal.impl.metadata.deserialization.ProtoTypeTableUtilKt;
import kotlin.reflect.jvm.internal.impl.metadata.deserialization.TypeTable;
import kotlin.reflect.jvm.internal.impl.metadata.deserialization.VersionRequirementTable;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.protobuf.MessageLite;
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorFactory;
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.ProtoContainer;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedAnnotations;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedClassConstructorDescriptor;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedClassDescriptor;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedPropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedSimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedTypeAliasDescriptor;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.NonEmptyDeserializedAnnotations;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* compiled from: MemberDeserializer.kt */
public final class MemberDeserializer {
private final AnnotationDeserializer annotationDeserializer;
/* access modifiers changed from: private */
public final DeserializationContext c;
private final int loadOldFlags(int i) {
return (i & 63) + ((i >> 8) << 6);
}
public MemberDeserializer(DeserializationContext deserializationContext) {
Intrinsics.checkNotNullParameter(deserializationContext, "c");
this.c = deserializationContext;
this.annotationDeserializer = new AnnotationDeserializer(deserializationContext.getComponents().getModuleDescriptor(), deserializationContext.getComponents().getNotFoundClasses());
}
public final PropertyDescriptor loadProperty(ProtoBuf.Property property) {
MessageLite messageLite;
Annotations annotations;
ReceiverParameterDescriptor receiverParameterDescriptor;
PropertyGetterDescriptorImpl propertyGetterDescriptorImpl;
PropertyGetterDescriptorImpl propertyGetterDescriptorImpl2;
ProtoBuf.Property property2 = property;
Intrinsics.checkNotNullParameter(property2, "proto");
int flags = property.hasFlags() ? property.getFlags() : loadOldFlags(property.getOldFlags());
DeclarationDescriptor containingDeclaration = this.c.getContainingDeclaration();
MessageLite messageLite2 = property2;
Annotations annotations2 = getAnnotations(messageLite2, flags, AnnotatedCallableKind.PROPERTY);
Modality modality = ProtoEnumFlags.INSTANCE.modality(Flags.MODALITY.get(flags));
DescriptorVisibility descriptorVisibility = ProtoEnumFlagsUtilsKt.descriptorVisibility(ProtoEnumFlags.INSTANCE, Flags.VISIBILITY.get(flags));
Boolean bool = Flags.IS_VAR.get(flags);
Intrinsics.checkNotNullExpressionValue(bool, "IS_VAR.get(flags)");
boolean booleanValue = bool.booleanValue();
Name name = NameResolverUtilKt.getName(this.c.getNameResolver(), property.getName());
CallableMemberDescriptor.Kind memberKind = ProtoEnumFlagsUtilsKt.memberKind(ProtoEnumFlags.INSTANCE, Flags.MEMBER_KIND.get(flags));
Boolean bool2 = Flags.IS_LATEINIT.get(flags);
Intrinsics.checkNotNullExpressionValue(bool2, "IS_LATEINIT.get(flags)");
boolean booleanValue2 = bool2.booleanValue();
Boolean bool3 = Flags.IS_CONST.get(flags);
Intrinsics.checkNotNullExpressionValue(bool3, "IS_CONST.get(flags)");
boolean booleanValue3 = bool3.booleanValue();
Boolean bool4 = Flags.IS_EXTERNAL_PROPERTY.get(flags);
MessageLite messageLite3 = messageLite2;
Intrinsics.checkNotNullExpressionValue(bool4, "IS_EXTERNAL_PROPERTY.get(flags)");
boolean booleanValue4 = bool4.booleanValue();
Boolean bool5 = Flags.IS_DELEGATED.get(flags);
Intrinsics.checkNotNullExpressionValue(bool5, "IS_DELEGATED.get(flags)");
boolean booleanValue5 = bool5.booleanValue();
DeserializedPropertyDescriptor deserializedPropertyDescriptor = r1;
Boolean bool6 = Flags.IS_EXPECT_PROPERTY.get(flags);
Intrinsics.checkNotNullExpressionValue(bool6, "IS_EXPECT_PROPERTY.get(flags)");
ProtoBuf.Property property3 = property2;
MessageLite messageLite4 = messageLite3;
DeserializedPropertyDescriptor deserializedPropertyDescriptor2 = new DeserializedPropertyDescriptor(containingDeclaration, (PropertyDescriptor) null, annotations2, modality, descriptorVisibility, booleanValue, name, memberKind, booleanValue2, booleanValue3, booleanValue4, booleanValue5, bool6.booleanValue(), property, this.c.getNameResolver(), this.c.getTypeTable(), this.c.getVersionRequirementTable(), this.c.getContainerSource());
DeserializationContext deserializationContext = this.c;
DeserializedPropertyDescriptor deserializedPropertyDescriptor3 = deserializedPropertyDescriptor;
List<ProtoBuf.TypeParameter> typeParameterList = property.getTypeParameterList();
Intrinsics.checkNotNullExpressionValue(typeParameterList, "proto.typeParameterList");
DeserializationContext childContext$default = DeserializationContext.childContext$default(deserializationContext, deserializedPropertyDescriptor3, typeParameterList, (NameResolver) null, (TypeTable) null, (VersionRequirementTable) null, (BinaryVersion) null, 60, (Object) null);
int i = flags;
Boolean bool7 = Flags.HAS_GETTER.get(i);
Intrinsics.checkNotNullExpressionValue(bool7, "HAS_GETTER.get(flags)");
boolean booleanValue6 = bool7.booleanValue();
if (!booleanValue6 || !ProtoTypeTableUtilKt.hasReceiver(property)) {
messageLite = messageLite4;
annotations = Annotations.Companion.getEMPTY();
} else {
messageLite = messageLite4;
annotations = getReceiverParameterAnnotations(messageLite, AnnotatedCallableKind.PROPERTY_GETTER);
}
ProtoBuf.Property property4 = property;
KotlinType type = childContext$default.getTypeDeserializer().type(ProtoTypeTableUtilKt.returnType(property4, this.c.getTypeTable()));
List<TypeParameterDescriptor> ownTypeParameters = childContext$default.getTypeDeserializer().getOwnTypeParameters();
ReceiverParameterDescriptor dispatchReceiverParameter = getDispatchReceiverParameter();
ProtoBuf.Type receiverType = ProtoTypeTableUtilKt.receiverType(property4, this.c.getTypeTable());
PropertySetterDescriptorImpl propertySetterDescriptorImpl = null;
if (receiverType == null) {
receiverParameterDescriptor = null;
} else {
receiverParameterDescriptor = DescriptorFactory.createExtensionReceiverParameterForCallable(deserializedPropertyDescriptor3, childContext$default.getTypeDeserializer().type(receiverType), annotations);
}
deserializedPropertyDescriptor3.setType(type, ownTypeParameters, dispatchReceiverParameter, receiverParameterDescriptor);
Boolean bool8 = Flags.HAS_ANNOTATIONS.get(i);
Intrinsics.checkNotNullExpressionValue(bool8, "HAS_ANNOTATIONS.get(flags)");
int accessorFlags = Flags.getAccessorFlags(bool8.booleanValue(), Flags.VISIBILITY.get(i), Flags.MODALITY.get(i), false, false, false);
if (booleanValue6) {
int getterFlags = property.hasGetterFlags() ? property.getGetterFlags() : accessorFlags;
Boolean bool9 = Flags.IS_NOT_DEFAULT.get(getterFlags);
Intrinsics.checkNotNullExpressionValue(bool9, "IS_NOT_DEFAULT.get(getterFlags)");
boolean booleanValue7 = bool9.booleanValue();
Boolean bool10 = Flags.IS_EXTERNAL_ACCESSOR.get(getterFlags);
Intrinsics.checkNotNullExpressionValue(bool10, "IS_EXTERNAL_ACCESSOR.get(getterFlags)");
boolean booleanValue8 = bool10.booleanValue();
Boolean bool11 = Flags.IS_INLINE_ACCESSOR.get(getterFlags);
Intrinsics.checkNotNullExpressionValue(bool11, "IS_INLINE_ACCESSOR.get(getterFlags)");
boolean booleanValue9 = bool11.booleanValue();
Annotations annotations3 = getAnnotations(messageLite, getterFlags, AnnotatedCallableKind.PROPERTY_GETTER);
if (booleanValue7) {
propertyGetterDescriptorImpl2 = new PropertyGetterDescriptorImpl(deserializedPropertyDescriptor3, annotations3, ProtoEnumFlags.INSTANCE.modality(Flags.MODALITY.get(getterFlags)), ProtoEnumFlagsUtilsKt.descriptorVisibility(ProtoEnumFlags.INSTANCE, Flags.VISIBILITY.get(getterFlags)), !booleanValue7, booleanValue8, booleanValue9, deserializedPropertyDescriptor3.getKind(), (PropertyGetterDescriptor) null, SourceElement.NO_SOURCE);
} else {
propertyGetterDescriptorImpl2 = DescriptorFactory.createDefaultGetter(deserializedPropertyDescriptor3, annotations3);
Intrinsics.checkNotNullExpressionValue(propertyGetterDescriptorImpl2, "{\n Descri…nnotations)\n }");
}
propertyGetterDescriptorImpl2.initialize(deserializedPropertyDescriptor3.getReturnType());
propertyGetterDescriptorImpl = propertyGetterDescriptorImpl2;
} else {
PropertyGetterDescriptorImpl propertyGetterDescriptorImpl3 = null;
propertyGetterDescriptorImpl = null;
}
Boolean bool12 = Flags.HAS_SETTER.get(i);
Intrinsics.checkNotNullExpressionValue(bool12, "HAS_SETTER.get(flags)");
if (bool12.booleanValue()) {
if (property.hasSetterFlags()) {
accessorFlags = property.getSetterFlags();
}
Boolean bool13 = Flags.IS_NOT_DEFAULT.get(accessorFlags);
Intrinsics.checkNotNullExpressionValue(bool13, "IS_NOT_DEFAULT.get(setterFlags)");
boolean booleanValue10 = bool13.booleanValue();
Boolean bool14 = Flags.IS_EXTERNAL_ACCESSOR.get(accessorFlags);
Intrinsics.checkNotNullExpressionValue(bool14, "IS_EXTERNAL_ACCESSOR.get(setterFlags)");
boolean booleanValue11 = bool14.booleanValue();
Boolean bool15 = Flags.IS_INLINE_ACCESSOR.get(accessorFlags);
Intrinsics.checkNotNullExpressionValue(bool15, "IS_INLINE_ACCESSOR.get(setterFlags)");
boolean booleanValue12 = bool15.booleanValue();
Annotations annotations4 = getAnnotations(messageLite, accessorFlags, AnnotatedCallableKind.PROPERTY_SETTER);
if (booleanValue10) {
PropertySetterDescriptorImpl propertySetterDescriptorImpl2 = new PropertySetterDescriptorImpl(deserializedPropertyDescriptor3, annotations4, ProtoEnumFlags.INSTANCE.modality(Flags.MODALITY.get(accessorFlags)), ProtoEnumFlagsUtilsKt.descriptorVisibility(ProtoEnumFlags.INSTANCE, Flags.VISIBILITY.get(accessorFlags)), !booleanValue10, booleanValue11, booleanValue12, deserializedPropertyDescriptor3.getKind(), (PropertySetterDescriptor) null, SourceElement.NO_SOURCE);
PropertySetterDescriptorImpl propertySetterDescriptorImpl3 = propertySetterDescriptorImpl2;
propertySetterDescriptorImpl3.initialize((ValueParameterDescriptor) CollectionsKt.single(DeserializationContext.childContext$default(childContext$default, propertySetterDescriptorImpl2, CollectionsKt.emptyList(), (NameResolver) null, (TypeTable) null, (VersionRequirementTable) null, (BinaryVersion) null, 60, (Object) null).getMemberDeserializer().valueParameters(CollectionsKt.listOf(property.getSetterValueParameter()), messageLite, AnnotatedCallableKind.PROPERTY_SETTER)));
propertySetterDescriptorImpl = propertySetterDescriptorImpl3;
} else {
propertySetterDescriptorImpl = DescriptorFactory.createDefaultSetter(deserializedPropertyDescriptor3, annotations4, Annotations.Companion.getEMPTY());
Intrinsics.checkNotNullExpressionValue(propertySetterDescriptorImpl, "{\n Descri… )\n }");
}
} else {
PropertySetterDescriptorImpl propertySetterDescriptorImpl4 = null;
}
Boolean bool16 = Flags.HAS_CONSTANT.get(i);
Intrinsics.checkNotNullExpressionValue(bool16, "HAS_CONSTANT.get(flags)");
if (bool16.booleanValue()) {
deserializedPropertyDescriptor3.setCompileTimeInitializer(this.c.getStorageManager().createNullableLazyValue(new MemberDeserializer$loadProperty$3(this, property4, deserializedPropertyDescriptor3)));
}
PropertyDescriptor propertyDescriptor = deserializedPropertyDescriptor3;
deserializedPropertyDescriptor3.initialize(propertyGetterDescriptorImpl, propertySetterDescriptorImpl, new FieldDescriptorImpl(getPropertyFieldAnnotations(property4, false), propertyDescriptor), new FieldDescriptorImpl(getPropertyFieldAnnotations(property4, true), propertyDescriptor));
return propertyDescriptor;
}
private final void initializeWithCoroutinesExperimentalityStatus(DeserializedSimpleFunctionDescriptor deserializedSimpleFunctionDescriptor, ReceiverParameterDescriptor receiverParameterDescriptor, ReceiverParameterDescriptor receiverParameterDescriptor2, List<? extends TypeParameterDescriptor> list, List<? extends ValueParameterDescriptor> list2, KotlinType kotlinType, Modality modality, DescriptorVisibility descriptorVisibility, Map<? extends CallableDescriptor.UserDataKey<?>, ?> map) {
deserializedSimpleFunctionDescriptor.initialize(receiverParameterDescriptor, receiverParameterDescriptor2, list, list2, kotlinType, modality, descriptorVisibility, map);
}
public final SimpleFunctionDescriptor loadFunction(ProtoBuf.Function function) {
Annotations annotations;
VersionRequirementTable versionRequirementTable;
ReceiverParameterDescriptor receiverParameterDescriptor;
ProtoBuf.Function function2 = function;
Intrinsics.checkNotNullParameter(function2, "proto");
int flags = function.hasFlags() ? function.getFlags() : loadOldFlags(function.getOldFlags());
MessageLite messageLite = function2;
Annotations annotations2 = getAnnotations(messageLite, flags, AnnotatedCallableKind.FUNCTION);
if (ProtoTypeTableUtilKt.hasReceiver(function)) {
annotations = getReceiverParameterAnnotations(messageLite, AnnotatedCallableKind.FUNCTION);
} else {
annotations = Annotations.Companion.getEMPTY();
}
if (Intrinsics.areEqual((Object) DescriptorUtilsKt.getFqNameSafe(this.c.getContainingDeclaration()).child(NameResolverUtilKt.getName(this.c.getNameResolver(), function.getName())), (Object) SuspendFunctionTypeUtilKt.KOTLIN_SUSPEND_BUILT_IN_FUNCTION_FQ_NAME)) {
versionRequirementTable = VersionRequirementTable.Companion.getEMPTY();
} else {
versionRequirementTable = this.c.getVersionRequirementTable();
}
DeserializedSimpleFunctionDescriptor deserializedSimpleFunctionDescriptor = new DeserializedSimpleFunctionDescriptor(this.c.getContainingDeclaration(), (SimpleFunctionDescriptor) null, annotations2, NameResolverUtilKt.getName(this.c.getNameResolver(), function.getName()), ProtoEnumFlagsUtilsKt.memberKind(ProtoEnumFlags.INSTANCE, Flags.MEMBER_KIND.get(flags)), function, this.c.getNameResolver(), this.c.getTypeTable(), versionRequirementTable, this.c.getContainerSource(), (SourceElement) null, 1024, (DefaultConstructorMarker) null);
DeserializationContext deserializationContext = this.c;
List<ProtoBuf.TypeParameter> typeParameterList = function.getTypeParameterList();
Intrinsics.checkNotNullExpressionValue(typeParameterList, "proto.typeParameterList");
DeserializationContext childContext$default = DeserializationContext.childContext$default(deserializationContext, deserializedSimpleFunctionDescriptor, typeParameterList, (NameResolver) null, (TypeTable) null, (VersionRequirementTable) null, (BinaryVersion) null, 60, (Object) null);
ProtoBuf.Type receiverType = ProtoTypeTableUtilKt.receiverType(function2, this.c.getTypeTable());
if (receiverType == null) {
receiverParameterDescriptor = null;
} else {
receiverParameterDescriptor = DescriptorFactory.createExtensionReceiverParameterForCallable(deserializedSimpleFunctionDescriptor, childContext$default.getTypeDeserializer().type(receiverType), annotations);
}
ReceiverParameterDescriptor receiverParameterDescriptor2 = receiverParameterDescriptor;
ReceiverParameterDescriptor dispatchReceiverParameter = getDispatchReceiverParameter();
List<TypeParameterDescriptor> ownTypeParameters = childContext$default.getTypeDeserializer().getOwnTypeParameters();
MemberDeserializer memberDeserializer = childContext$default.getMemberDeserializer();
List<ProtoBuf.ValueParameter> valueParameterList = function.getValueParameterList();
Intrinsics.checkNotNullExpressionValue(valueParameterList, "proto.valueParameterList");
List<ValueParameterDescriptor> valueParameters = memberDeserializer.valueParameters(valueParameterList, messageLite, AnnotatedCallableKind.FUNCTION);
KotlinType type = childContext$default.getTypeDeserializer().type(ProtoTypeTableUtilKt.returnType(function2, this.c.getTypeTable()));
DeserializedSimpleFunctionDescriptor deserializedSimpleFunctionDescriptor2 = deserializedSimpleFunctionDescriptor;
Modality modality = ProtoEnumFlags.INSTANCE.modality(Flags.MODALITY.get(flags));
int i = flags;
initializeWithCoroutinesExperimentalityStatus(deserializedSimpleFunctionDescriptor, receiverParameterDescriptor2, dispatchReceiverParameter, ownTypeParameters, valueParameters, type, modality, ProtoEnumFlagsUtilsKt.descriptorVisibility(ProtoEnumFlags.INSTANCE, Flags.VISIBILITY.get(flags)), MapsKt.emptyMap());
Boolean bool = Flags.IS_OPERATOR.get(i);
Intrinsics.checkNotNullExpressionValue(bool, "IS_OPERATOR.get(flags)");
deserializedSimpleFunctionDescriptor2.setOperator(bool.booleanValue());
Boolean bool2 = Flags.IS_INFIX.get(i);
Intrinsics.checkNotNullExpressionValue(bool2, "IS_INFIX.get(flags)");
deserializedSimpleFunctionDescriptor2.setInfix(bool2.booleanValue());
Boolean bool3 = Flags.IS_EXTERNAL_FUNCTION.get(i);
Intrinsics.checkNotNullExpressionValue(bool3, "IS_EXTERNAL_FUNCTION.get(flags)");
deserializedSimpleFunctionDescriptor2.setExternal(bool3.booleanValue());
Boolean bool4 = Flags.IS_INLINE.get(i);
Intrinsics.checkNotNullExpressionValue(bool4, "IS_INLINE.get(flags)");
deserializedSimpleFunctionDescriptor2.setInline(bool4.booleanValue());
Boolean bool5 = Flags.IS_TAILREC.get(i);
Intrinsics.checkNotNullExpressionValue(bool5, "IS_TAILREC.get(flags)");
deserializedSimpleFunctionDescriptor2.setTailrec(bool5.booleanValue());
Boolean bool6 = Flags.IS_SUSPEND.get(i);
Intrinsics.checkNotNullExpressionValue(bool6, "IS_SUSPEND.get(flags)");
deserializedSimpleFunctionDescriptor2.setSuspend(bool6.booleanValue());
Boolean bool7 = Flags.IS_EXPECT_FUNCTION.get(i);
Intrinsics.checkNotNullExpressionValue(bool7, "IS_EXPECT_FUNCTION.get(flags)");
deserializedSimpleFunctionDescriptor2.setExpect(bool7.booleanValue());
deserializedSimpleFunctionDescriptor2.setHasStableParameterNames(!Flags.IS_FUNCTION_WITH_NON_STABLE_PARAMETER_NAMES.get(i).booleanValue());
Pair<CallableDescriptor.UserDataKey<?>, Object> deserializeContractFromFunction = this.c.getComponents().getContractDeserializer().deserializeContractFromFunction(function2, deserializedSimpleFunctionDescriptor2, this.c.getTypeTable(), childContext$default.getTypeDeserializer());
if (deserializeContractFromFunction != null) {
deserializedSimpleFunctionDescriptor2.putInUserDataMap(deserializeContractFromFunction.getFirst(), deserializeContractFromFunction.getSecond());
}
return deserializedSimpleFunctionDescriptor2;
}
public final TypeAliasDescriptor loadTypeAlias(ProtoBuf.TypeAlias typeAlias) {
ProtoBuf.TypeAlias typeAlias2 = typeAlias;
Intrinsics.checkNotNullParameter(typeAlias2, "proto");
Annotations.Companion companion = Annotations.Companion;
List<ProtoBuf.Annotation> annotationList = typeAlias.getAnnotationList();
Intrinsics.checkNotNullExpressionValue(annotationList, "proto.annotationList");
Iterable<ProtoBuf.Annotation> iterable = annotationList;
Collection arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(iterable, 10));
for (ProtoBuf.Annotation annotation : iterable) {
AnnotationDeserializer annotationDeserializer2 = this.annotationDeserializer;
Intrinsics.checkNotNullExpressionValue(annotation, "it");
arrayList.add(annotationDeserializer2.deserializeAnnotation(annotation, this.c.getNameResolver()));
}
DeserializedTypeAliasDescriptor deserializedTypeAliasDescriptor = new DeserializedTypeAliasDescriptor(this.c.getStorageManager(), this.c.getContainingDeclaration(), companion.create((List) arrayList), NameResolverUtilKt.getName(this.c.getNameResolver(), typeAlias.getName()), ProtoEnumFlagsUtilsKt.descriptorVisibility(ProtoEnumFlags.INSTANCE, Flags.VISIBILITY.get(typeAlias.getFlags())), typeAlias, this.c.getNameResolver(), this.c.getTypeTable(), this.c.getVersionRequirementTable(), this.c.getContainerSource());
List<ProtoBuf.TypeParameter> typeParameterList = typeAlias.getTypeParameterList();
Intrinsics.checkNotNullExpressionValue(typeParameterList, "proto.typeParameterList");
DeserializationContext childContext$default = DeserializationContext.childContext$default(this.c, deserializedTypeAliasDescriptor, typeParameterList, (NameResolver) null, (TypeTable) null, (VersionRequirementTable) null, (BinaryVersion) null, 60, (Object) null);
deserializedTypeAliasDescriptor.initialize(childContext$default.getTypeDeserializer().getOwnTypeParameters(), childContext$default.getTypeDeserializer().simpleType(ProtoTypeTableUtilKt.underlyingType(typeAlias2, this.c.getTypeTable()), false), childContext$default.getTypeDeserializer().simpleType(ProtoTypeTableUtilKt.expandedType(typeAlias2, this.c.getTypeTable()), false));
return deserializedTypeAliasDescriptor;
}
private final ReceiverParameterDescriptor getDispatchReceiverParameter() {
DeclarationDescriptor containingDeclaration = this.c.getContainingDeclaration();
ClassDescriptor classDescriptor = containingDeclaration instanceof ClassDescriptor ? (ClassDescriptor) containingDeclaration : null;
if (classDescriptor == null) {
return null;
}
return classDescriptor.getThisAsReceiverParameter();
}
public final ClassConstructorDescriptor loadConstructor(ProtoBuf.Constructor constructor, boolean z) {
ProtoBuf.Constructor constructor2 = constructor;
Intrinsics.checkNotNullParameter(constructor2, "proto");
ClassDescriptor classDescriptor = (ClassDescriptor) this.c.getContainingDeclaration();
MessageLite messageLite = constructor2;
DeserializedClassConstructorDescriptor deserializedClassConstructorDescriptor = r1;
DeserializedClassConstructorDescriptor deserializedClassConstructorDescriptor2 = new DeserializedClassConstructorDescriptor(classDescriptor, (ConstructorDescriptor) null, getAnnotations(messageLite, constructor.getFlags(), AnnotatedCallableKind.FUNCTION), z, CallableMemberDescriptor.Kind.DECLARATION, constructor, this.c.getNameResolver(), this.c.getTypeTable(), this.c.getVersionRequirementTable(), this.c.getContainerSource(), (SourceElement) null, 1024, (DefaultConstructorMarker) null);
MemberDeserializer memberDeserializer = DeserializationContext.childContext$default(this.c, deserializedClassConstructorDescriptor, CollectionsKt.emptyList(), (NameResolver) null, (TypeTable) null, (VersionRequirementTable) null, (BinaryVersion) null, 60, (Object) null).getMemberDeserializer();
List<ProtoBuf.ValueParameter> valueParameterList = constructor.getValueParameterList();
Intrinsics.checkNotNullExpressionValue(valueParameterList, "proto.valueParameterList");
deserializedClassConstructorDescriptor.initialize(memberDeserializer.valueParameters(valueParameterList, messageLite, AnnotatedCallableKind.FUNCTION), ProtoEnumFlagsUtilsKt.descriptorVisibility(ProtoEnumFlags.INSTANCE, Flags.VISIBILITY.get(constructor.getFlags())));
deserializedClassConstructorDescriptor.setReturnType(classDescriptor.getDefaultType());
deserializedClassConstructorDescriptor.setHasStableParameterNames(!Flags.IS_CONSTRUCTOR_WITH_NON_STABLE_PARAMETER_NAMES.get(constructor.getFlags()).booleanValue());
return deserializedClassConstructorDescriptor;
}
private final Annotations getAnnotations(MessageLite messageLite, int i, AnnotatedCallableKind annotatedCallableKind) {
if (!Flags.HAS_ANNOTATIONS.get(i).booleanValue()) {
return Annotations.Companion.getEMPTY();
}
return new NonEmptyDeserializedAnnotations(this.c.getStorageManager(), new MemberDeserializer$getAnnotations$1(this, messageLite, annotatedCallableKind));
}
private final Annotations getPropertyFieldAnnotations(ProtoBuf.Property property, boolean z) {
if (!Flags.HAS_ANNOTATIONS.get(property.getFlags()).booleanValue()) {
return Annotations.Companion.getEMPTY();
}
return new NonEmptyDeserializedAnnotations(this.c.getStorageManager(), new MemberDeserializer$getPropertyFieldAnnotations$1(this, z, property));
}
private final Annotations getReceiverParameterAnnotations(MessageLite messageLite, AnnotatedCallableKind annotatedCallableKind) {
return new DeserializedAnnotations(this.c.getStorageManager(), new MemberDeserializer$getReceiverParameterAnnotations$1(this, messageLite, annotatedCallableKind));
}
/* JADX WARNING: Removed duplicated region for block: B:17:0x00ea */
/* JADX WARNING: Removed duplicated region for block: B:18:0x00ec */
/* Code decompiled incorrectly, please refer to instructions dump. */
private final java.util.List<kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor> valueParameters(java.util.List<kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf.ValueParameter> r26, kotlin.reflect.jvm.internal.impl.protobuf.MessageLite r27, kotlin.reflect.jvm.internal.impl.serialization.deserialization.AnnotatedCallableKind r28) {
/*
r25 = this;
r7 = r25
kotlin.reflect.jvm.internal.impl.serialization.deserialization.DeserializationContext r0 = r7.c
kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor r0 = r0.getContainingDeclaration()
r20 = r0
kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor r20 = (kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor) r20
kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor r0 = r20.getContainingDeclaration()
java.lang.String r1 = "callableDescriptor.containingDeclaration"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r0, r1)
kotlin.reflect.jvm.internal.impl.serialization.deserialization.ProtoContainer r21 = r7.asProtoContainer(r0)
r0 = r26
java.lang.Iterable r0 = (java.lang.Iterable) r0
java.util.ArrayList r1 = new java.util.ArrayList
r2 = 10
int r2 = kotlin.collections.CollectionsKt.collectionSizeOrDefault(r0, r2)
r1.<init>(r2)
r15 = r1
java.util.Collection r15 = (java.util.Collection) r15
java.util.Iterator r22 = r0.iterator()
r23 = 0
r11 = 0
L_0x0032:
boolean r0 = r22.hasNext()
if (r0 == 0) goto L_0x0113
java.lang.Object r0 = r22.next()
int r24 = r11 + 1
if (r11 >= 0) goto L_0x0043
kotlin.collections.CollectionsKt.throwIndexOverflow()
L_0x0043:
r8 = r0
kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf$ValueParameter r8 = (kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf.ValueParameter) r8
boolean r0 = r8.hasFlags()
if (r0 == 0) goto L_0x0052
int r0 = r8.getFlags()
r9 = r0
goto L_0x0053
L_0x0052:
r9 = 0
L_0x0053:
if (r21 == 0) goto L_0x0087
kotlin.reflect.jvm.internal.impl.metadata.deserialization.Flags$BooleanFlagField r0 = kotlin.reflect.jvm.internal.impl.metadata.deserialization.Flags.HAS_ANNOTATIONS
java.lang.Boolean r0 = r0.get((int) r9)
java.lang.String r1 = "HAS_ANNOTATIONS.get(flags)"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r0, r1)
boolean r0 = r0.booleanValue()
if (r0 == 0) goto L_0x0087
kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.NonEmptyDeserializedAnnotations r10 = new kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.NonEmptyDeserializedAnnotations
kotlin.reflect.jvm.internal.impl.serialization.deserialization.DeserializationContext r0 = r7.c
kotlin.reflect.jvm.internal.impl.storage.StorageManager r12 = r0.getStorageManager()
kotlin.reflect.jvm.internal.impl.serialization.deserialization.MemberDeserializer$valueParameters$1$annotations$1 r13 = new kotlin.reflect.jvm.internal.impl.serialization.deserialization.MemberDeserializer$valueParameters$1$annotations$1
r0 = r13
r1 = r25
r2 = r21
r3 = r27
r4 = r28
r5 = r11
r6 = r8
r0.<init>(r1, r2, r3, r4, r5, r6)
kotlin.jvm.functions.Function0 r13 = (kotlin.jvm.functions.Function0) r13
r10.<init>(r12, r13)
kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations r10 = (kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations) r10
r12 = r10
goto L_0x008e
L_0x0087:
kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations$Companion r0 = kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations.Companion
kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations r0 = r0.getEMPTY()
r12 = r0
L_0x008e:
r10 = 0
kotlin.reflect.jvm.internal.impl.serialization.deserialization.DeserializationContext r0 = r7.c
kotlin.reflect.jvm.internal.impl.metadata.deserialization.NameResolver r0 = r0.getNameResolver()
int r1 = r8.getName()
kotlin.reflect.jvm.internal.impl.name.Name r13 = kotlin.reflect.jvm.internal.impl.serialization.deserialization.NameResolverUtilKt.getName(r0, r1)
kotlin.reflect.jvm.internal.impl.serialization.deserialization.DeserializationContext r0 = r7.c
kotlin.reflect.jvm.internal.impl.serialization.deserialization.TypeDeserializer r0 = r0.getTypeDeserializer()
kotlin.reflect.jvm.internal.impl.serialization.deserialization.DeserializationContext r1 = r7.c
kotlin.reflect.jvm.internal.impl.metadata.deserialization.TypeTable r1 = r1.getTypeTable()
kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf$Type r1 = kotlin.reflect.jvm.internal.impl.metadata.deserialization.ProtoTypeTableUtilKt.type((kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf.ValueParameter) r8, (kotlin.reflect.jvm.internal.impl.metadata.deserialization.TypeTable) r1)
kotlin.reflect.jvm.internal.impl.types.KotlinType r14 = r0.type(r1)
kotlin.reflect.jvm.internal.impl.metadata.deserialization.Flags$BooleanFlagField r0 = kotlin.reflect.jvm.internal.impl.metadata.deserialization.Flags.DECLARES_DEFAULT_VALUE
java.lang.Boolean r0 = r0.get((int) r9)
java.lang.String r1 = "DECLARES_DEFAULT_VALUE.get(flags)"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r0, r1)
boolean r0 = r0.booleanValue()
kotlin.reflect.jvm.internal.impl.metadata.deserialization.Flags$BooleanFlagField r1 = kotlin.reflect.jvm.internal.impl.metadata.deserialization.Flags.IS_CROSSINLINE
java.lang.Boolean r1 = r1.get((int) r9)
java.lang.String r2 = "IS_CROSSINLINE.get(flags)"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r1, r2)
boolean r16 = r1.booleanValue()
kotlin.reflect.jvm.internal.impl.metadata.deserialization.Flags$BooleanFlagField r1 = kotlin.reflect.jvm.internal.impl.metadata.deserialization.Flags.IS_NOINLINE
java.lang.Boolean r1 = r1.get((int) r9)
java.lang.String r2 = "IS_NOINLINE.get(flags)"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r1, r2)
boolean r17 = r1.booleanValue()
kotlin.reflect.jvm.internal.impl.serialization.deserialization.DeserializationContext r1 = r7.c
kotlin.reflect.jvm.internal.impl.metadata.deserialization.TypeTable r1 = r1.getTypeTable()
kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf$Type r1 = kotlin.reflect.jvm.internal.impl.metadata.deserialization.ProtoTypeTableUtilKt.varargElementType(r8, r1)
if (r1 != 0) goto L_0x00ec
r1 = 0
goto L_0x00f6
L_0x00ec:
kotlin.reflect.jvm.internal.impl.serialization.deserialization.DeserializationContext r2 = r7.c
kotlin.reflect.jvm.internal.impl.serialization.deserialization.TypeDeserializer r2 = r2.getTypeDeserializer()
kotlin.reflect.jvm.internal.impl.types.KotlinType r1 = r2.type(r1)
L_0x00f6:
r18 = r1
kotlin.reflect.jvm.internal.impl.descriptors.SourceElement r1 = kotlin.reflect.jvm.internal.impl.descriptors.SourceElement.NO_SOURCE
java.lang.String r2 = "NO_SOURCE"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r1, r2)
kotlin.reflect.jvm.internal.impl.descriptors.impl.ValueParameterDescriptorImpl r2 = new kotlin.reflect.jvm.internal.impl.descriptors.impl.ValueParameterDescriptorImpl
r8 = r2
r9 = r20
r3 = r15
r15 = r0
r19 = r1
r8.<init>(r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19)
r3.add(r2)
r15 = r3
r11 = r24
goto L_0x0032
L_0x0113:
r3 = r15
r15 = r3
java.util.List r15 = (java.util.List) r15
java.lang.Iterable r15 = (java.lang.Iterable) r15
java.util.List r0 = kotlin.collections.CollectionsKt.toList(r15)
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.serialization.deserialization.MemberDeserializer.valueParameters(java.util.List, kotlin.reflect.jvm.internal.impl.protobuf.MessageLite, kotlin.reflect.jvm.internal.impl.serialization.deserialization.AnnotatedCallableKind):java.util.List");
}
/* access modifiers changed from: private */
public final ProtoContainer asProtoContainer(DeclarationDescriptor declarationDescriptor) {
if (declarationDescriptor instanceof PackageFragmentDescriptor) {
return new ProtoContainer.Package(((PackageFragmentDescriptor) declarationDescriptor).getFqName(), this.c.getNameResolver(), this.c.getTypeTable(), this.c.getContainerSource());
}
if (declarationDescriptor instanceof DeserializedClassDescriptor) {
return ((DeserializedClassDescriptor) declarationDescriptor).getThisAsProtoContainer$deserialization();
}
return null;
}
}
Download file