package g.h.a;

import a0.b.a.a.a.d;
import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.ParcelUuid;
import android.os.SystemProperties;
import android.text.TextUtils;
import android.util.Log;
import com.cvte.vman.instance.InvokeCmd;
import io.netty.handler.codec.compression.Bzip2Constants;
import io.netty.handler.codec.dns.DefaultDnsRecordDecoder;
import io.netty.handler.codec.dns.DnsRecord;
import io.netty.handler.codec.memcache.binary.BinaryMemcacheOpcodes;
import io.netty.handler.codec.rtsp.RtspHeaders;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.Proxy;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.Callable;
import kotlin.Lazy;
import kotlin.LazyThreadSafetyMode;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
import kotlin.Result;
import kotlin.SafePublicationLazyImpl;
import kotlin.SynchronizedLazyImpl;
import kotlin.Unit;
import kotlin.UnsafeLazyImpl;
import kotlin.collections.ArrayAsCollection;
import kotlin.collections.CollectionSystemProperties;
import kotlin.collections.EmptyList;
import kotlin.collections.EmptyMap;
import kotlin.collections.EmptySet;
import kotlin.collections.IndexedValue;
import kotlin.collections.IndexingIterable;
import kotlin.collections.builders.ListBuilder;
import kotlin.collections.l;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.EmptyCoroutineContext;
import kotlin.coroutines.j.internal.BaseContinuationImpl;
import kotlin.coroutines.j.internal.ContinuationImpl;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.ArrayIterator;
import kotlin.jvm.internal.ClassBasedDeclarationContainer;
import kotlin.jvm.internal.o;
import kotlin.reflect.KCallable;
import kotlin.reflect.KClass;
import kotlin.reflect.KClassifier;
import kotlin.reflect.KFunction;
import kotlin.reflect.KMutableProperty;
import kotlin.reflect.KProperty;
import kotlin.reflect.KType;
import kotlin.reflect.KTypeParameter;
import kotlin.reflect.w.internal.KCallableImpl;
import kotlin.reflect.w.internal.KPropertyImpl;
import kotlin.reflect.w.internal.KTypeImpl;
import kotlin.reflect.w.internal.KotlinReflectionInternalError;
import kotlin.reflect.w.internal.calls.Caller;
import kotlin.reflect.w.internal.n0;
import kotlin.reflect.w.internal.o0;
import kotlin.reflect.w.internal.u0;
import kotlin.reflect.w.internal.v0;
import kotlin.reflect.w.internal.y0.c.i;
import kotlin.reflect.w.internal.y0.c.n.c;
import kotlin.reflect.w.internal.y0.d.b;
import kotlin.reflect.w.internal.y0.d.b1;
import kotlin.reflect.w.internal.y0.d.c1;
import kotlin.reflect.w.internal.y0.d.d1;
import kotlin.reflect.w.internal.y0.d.e0;
import kotlin.reflect.w.internal.y0.d.g0;
import kotlin.reflect.w.internal.y0.d.h1;
import kotlin.reflect.w.internal.y0.d.i0;
import kotlin.reflect.w.internal.y0.d.i1;
import kotlin.reflect.w.internal.y0.d.j1;
import kotlin.reflect.w.internal.y0.d.k;
import kotlin.reflect.w.internal.y0.d.k0;
import kotlin.reflect.w.internal.y0.d.k1;
import kotlin.reflect.w.internal.y0.d.l1.h;
import kotlin.reflect.w.internal.y0.d.n1.j0;
import kotlin.reflect.w.internal.y0.d.p0;
import kotlin.reflect.w.internal.y0.d.q;
import kotlin.reflect.w.internal.y0.d.r;
import kotlin.reflect.w.internal.y0.d.s0;
import kotlin.reflect.w.internal.y0.d.v;
import kotlin.reflect.w.internal.y0.d.w;
import kotlin.reflect.w.internal.y0.d.w0;
import kotlin.reflect.w.internal.y0.e.a.c;
import kotlin.reflect.w.internal.y0.f.a.a0;
import kotlin.reflect.w.internal.y0.f.a.l0;
import kotlin.reflect.w.internal.y0.f.a.m0;
import kotlin.reflect.w.internal.y0.f.a.p0.l.p;
import kotlin.reflect.w.internal.y0.f.a.r0.t;
import kotlin.reflect.w.internal.y0.f.a.r0.y;
import kotlin.reflect.w.internal.y0.f.a.u;
import kotlin.reflect.w.internal.y0.f.b.m;
import kotlin.reflect.w.internal.y0.g.a0.a;
import kotlin.reflect.w.internal.y0.g.a0.b.d;
import kotlin.reflect.w.internal.y0.g.n;
import kotlin.reflect.w.internal.y0.g.x;
import kotlin.reflect.w.internal.y0.i.h;
import kotlin.reflect.w.internal.y0.k.c0.i;
import kotlin.reflect.w.internal.y0.k.j;
import kotlin.reflect.w.internal.y0.l.b.c0;
import kotlin.reflect.w.internal.y0.l.b.d0;
import kotlin.reflect.w.internal.y0.n.b0;
import kotlin.reflect.w.internal.y0.n.b2.s;
import kotlin.reflect.w.internal.y0.n.e1;
import kotlin.reflect.w.internal.y0.n.f1;
import kotlin.reflect.w.internal.y0.n.g1;
import kotlin.reflect.w.internal.y0.n.h0;
import kotlin.reflect.w.internal.y0.n.l1;
import kotlin.reflect.w.internal.y0.n.n1;
import kotlin.reflect.w.internal.y0.n.o1;
import kotlin.reflect.w.internal.y0.n.r0;
import kotlin.reflect.w.internal.y0.n.r1;
import kotlin.reflect.w.internal.y0.n.s1;
import kotlin.reflect.w.internal.y0.n.t1;
import kotlin.reflect.w.internal.y0.n.u1;
import kotlin.reflect.w.internal.y0.n.v1;
import kotlin.reflect.w.internal.y0.n.w1;
import kotlin.reflect.w.internal.y0.n.x1;
import kotlin.reflect.w.internal.y0.n.z1.c;
import kotlin.reflect.w.internal.y0.n.z1.d;
import kotlin.reflect.w.internal.y0.p.i;
import kotlin.sequences.EmptySequence;
import kotlin.sequences.Sequence;
import kotlin.sequences.TakeWhileSequence;

/* JADX INFO: loaded from: classes.dex */
public final class i {
    public static Context a = null;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static boolean f5270b = false;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static String f5271c = "Realtek";

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static boolean f5272d = false;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static int f5273e = 1;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static int f5274f;

    public static o.a.d A(Callable<o.a.d> callable) {
        try {
            o.a.d dVarCall = callable.call();
            Objects.requireNonNull(dVarCall, "Scheduler Callable result can't be null");
            return dVarCall;
        } catch (Throwable th) {
            throw o.a.h.h.a.a(th);
        }
    }

    public static final r A0(c0 c0Var, x xVar) {
        r rVar;
        String str;
        o.f(c0Var, "<this>");
        int i2 = xVar == null ? -1 : d0.f8594b[xVar.ordinal()];
        if (i2 == 1) {
            rVar = q.f6982d;
            str = "INTERNAL";
        } else if (i2 == 3) {
            rVar = q.f6980b;
            str = "PRIVATE_TO_THIS";
        } else if (i2 == 4) {
            rVar = q.f6981c;
            str = "PROTECTED";
        } else if (i2 == 5) {
            rVar = q.f6983e;
            str = "PUBLIC";
        } else if (i2 != 6) {
            rVar = q.a;
            str = "PRIVATE";
        } else {
            rVar = q.f6984f;
            str = "LOCAL";
        }
        o.e(rVar, str);
        return rVar;
    }

    public static final <T extends kotlin.reflect.w.internal.y0.d.b> T A1(T t2) {
        o.f(t2, "<this>");
        T t3 = (T) z1(t2);
        if (t3 != null) {
            return t3;
        }
        kotlin.reflect.w.internal.y0.f.a.h hVar = kotlin.reflect.w.internal.y0.f.a.h.f7087m;
        kotlin.reflect.w.internal.y0.h.e name = t2.getName();
        o.e(name, "name");
        if (hVar.b(name)) {
            return (T) kotlin.reflect.w.internal.y0.k.z.a.b(t2, false, l0.f7106f, 1);
        }
        return null;
    }

    public static String A2(Object[] objArr, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i2, CharSequence charSequence4, Function1 function1, int i3) throws IOException {
        if ((i3 & 1) != 0) {
            charSequence = ", ";
        }
        CharSequence charSequence5 = charSequence;
        CharSequence charSequence6 = (i3 & 2) != 0 ? "" : charSequence2;
        CharSequence charSequence7 = (i3 & 4) != 0 ? "" : charSequence3;
        if ((i3 & 8) != 0) {
            i2 = -1;
        }
        int i4 = i2;
        CharSequence charSequence8 = (i3 & 16) != 0 ? "..." : null;
        Function1 function12 = (i3 & 32) != 0 ? null : function1;
        o.f(objArr, "<this>");
        o.f(charSequence5, "separator");
        o.f(charSequence6, "prefix");
        o.f(charSequence7, "postfix");
        o.f(charSequence8, "truncated");
        StringBuilder sb = new StringBuilder();
        y2(objArr, sb, charSequence5, charSequence6, charSequence7, i4, charSequence8, function12);
        String string = sb.toString();
        o.e(string, "joinTo(StringBuilder(), …ed, transform).toString()");
        return string;
    }

    public static final h0 A3(b1 b1Var) {
        ArrayList arrayList;
        o.f(b1Var, "<this>");
        k kVarB = b1Var.b();
        o.e(kVarB, "this.containingDeclaration");
        if (kVarB instanceof kotlin.reflect.w.internal.y0.d.i) {
            List<b1> parameters = ((kotlin.reflect.w.internal.y0.d.i) kVarB).k().getParameters();
            o.e(parameters, "descriptor.typeConstructor.parameters");
            arrayList = new ArrayList(H(parameters, 10));
            Iterator<T> it = parameters.iterator();
            while (it.hasNext()) {
                e1 e1VarK = ((b1) it.next()).k();
                o.e(e1VarK, "it.typeConstructor");
                arrayList.add(e1VarK);
            }
        } else {
            if (!(kVarB instanceof w)) {
                throw new IllegalArgumentException("Unsupported descriptor type to build star projection type based on type parameters of it");
            }
            List<b1> typeParameters = ((w) kVarB).getTypeParameters();
            o.e(typeParameters, "descriptor.typeParameters");
            arrayList = new ArrayList(H(typeParameters, 10));
            Iterator<T> it2 = typeParameters.iterator();
            while (it2.hasNext()) {
                e1 e1VarK2 = ((b1) it2.next()).k();
                o.e(e1VarK2, "it.typeConstructor");
                arrayList.add(e1VarK2);
            }
        }
        List<h0> upperBounds = b1Var.getUpperBounds();
        o.e(upperBounds, "upperBounds");
        return x(arrayList, upperBounds, kotlin.reflect.w.internal.y0.k.z.a.e(b1Var));
    }

    public static <M extends Member> void B(Caller<? extends M> caller, Object[] objArr) {
        o.f(objArr, "args");
        if (Y0(caller) == objArr.length) {
            return;
        }
        StringBuilder sbF = g.a.a.a.a.F("Callable expects ");
        sbF.append(Y0(caller));
        sbF.append(" arguments, but ");
        throw new IllegalArgumentException(g.a.a.a.a.y(sbF, objArr.length, " were provided."));
    }

    public static boolean B0(BluetoothProfile bluetoothProfile, BluetoothDevice bluetoothDevice) {
        String strU;
        if (bluetoothProfile != null) {
            try {
                U3(String.format("disconnect : %s : %s", bluetoothProfile.getClass().getName(), S0(bluetoothDevice.getAddress(), true)));
                Method method = bluetoothProfile.getClass().getMethod("disconnect", BluetoothDevice.class);
                method.setAccessible(true);
                return ((Boolean) method.invoke(bluetoothProfile, bluetoothDevice)).booleanValue();
            } catch (IllegalAccessException e2) {
                e = e2;
                StringBuilder sbK = g.a.a.a.a.K("Could not execute method 'disconnect' in profile ", "", ", ignoring request.");
                sbK.append(e.toString());
                strU = sbK.toString();
                D0(strU);
                return false;
            } catch (NoSuchMethodException unused) {
                strU = g.a.a.a.a.u("No disconnect method in the ", "", " class, ignoring request.");
                D0(strU);
                return false;
            } catch (InvocationTargetException e3) {
                e = e3;
                StringBuilder sbK2 = g.a.a.a.a.K("Could not execute method 'disconnect' in profile ", "", ", ignoring request.");
                sbK2.append(e.toString());
                strU = sbK2.toString();
                D0(strU);
                return false;
            }
        }
        return false;
    }

    public static final p B1(kotlin.reflect.w.internal.y0.d.e eVar) {
        kotlin.reflect.w.internal.y0.d.e eVar2;
        o.f(eVar, "<this>");
        int i2 = kotlin.reflect.w.internal.y0.k.z.a.a;
        o.f(eVar, "<this>");
        Iterator<h0> it = eVar.s().L0().b().iterator();
        while (true) {
            if (!it.hasNext()) {
                eVar2 = null;
                break;
            }
            h0 next = it.next();
            if (!kotlin.reflect.w.internal.y0.c.f.z(next)) {
                kotlin.reflect.w.internal.y0.d.h hVarC = next.L0().c();
                if (kotlin.reflect.w.internal.y0.k.h.o(hVarC)) {
                    o.d(hVarC, "null cannot be cast to non-null type org.jetbrains.kotlin.descriptors.ClassDescriptor");
                    eVar2 = (kotlin.reflect.w.internal.y0.d.e) hVarC;
                    break;
                }
            }
        }
        if (eVar2 == null) {
            return null;
        }
        kotlin.reflect.w.internal.y0.k.c0.i iVarR = eVar2.R();
        p pVar = iVarR instanceof p ? (p) iVarR : null;
        return pVar == null ? B1(eVar2) : pVar;
    }

    public static final <T> T B2(T[] tArr) {
        o.f(tArr, "<this>");
        if (tArr.length == 0) {
            throw new NoSuchElementException("Array is empty.");
        }
        return tArr[u1(tArr)];
    }

    public static boolean B3(Context context, String str, String str2) {
        String str3;
        ComponentName componentName = new ComponentName(str, str2);
        Intent intent = new Intent("android.intent.action.MAIN");
        intent.addCategory("android.intent.category.LAUNCHER");
        intent.setComponent(componentName);
        intent.setFlags(270532608);
        try {
            context.startActivity(intent);
            return true;
        } catch (ActivityNotFoundException e2) {
            e = e2;
            str3 = "catch a ActivityNotFoundException when start " + str + " activity: " + str2;
            Log.d("ActivityUtils", str3, e);
            return false;
        } catch (SecurityException e3) {
            e = e3;
            str3 = "catch a SecurityException when startActivitySafely";
            Log.d("ActivityUtils", str3, e);
            return false;
        }
    }

    public static kotlin.reflect.w.internal.y0.f.a.p0.g C(kotlin.reflect.w.internal.y0.f.a.p0.g gVar, kotlin.reflect.w.internal.y0.d.g gVar2, y yVar, int i2, int i3) {
        if ((i3 & 2) != 0) {
            yVar = null;
        }
        if ((i3 & 4) != 0) {
            i2 = 0;
        }
        o.f(gVar, "<this>");
        o.f(gVar2, "containingDeclaration");
        return new kotlin.reflect.w.internal.y0.f.a.p0.g(gVar.a, yVar != null ? new kotlin.reflect.w.internal.y0.f.a.p0.h(gVar, gVar2, yVar, i2) : gVar.f7194b, C2(LazyThreadSafetyMode.NONE, new kotlin.reflect.w.internal.y0.f.a.p0.a(gVar, gVar2)));
    }

    public static boolean C0(BluetoothClass bluetoothClass, int i2) {
        int deviceClass;
        int deviceClass2;
        int deviceClass3;
        if (i2 == 1) {
            return bluetoothClass.hasService(262144) || (deviceClass3 = bluetoothClass.getDeviceClass()) == 1044 || deviceClass3 == 1048 || deviceClass3 == 1056 || deviceClass3 == 1064;
        }
        if (i2 == 6) {
            return bluetoothClass.hasService(524288) || (deviceClass2 = bluetoothClass.getDeviceClass()) == 1060 || deviceClass2 == 1064 || deviceClass2 == 1068;
        }
        if (i2 == 0) {
            return bluetoothClass.hasService(262144) || (deviceClass = bluetoothClass.getDeviceClass()) == 1028 || deviceClass == 1032 || deviceClass == 1056;
        }
        if (i2 == 2) {
            if (bluetoothClass.hasService(1048576)) {
                return true;
            }
            switch (bluetoothClass.getDeviceClass()) {
                case 256:
                case 260:
                case 264:
                case 268:
                case 272:
                case 276:
                case 280:
                case 512:
                case InvokeCmd.CMD_XBUG_VMAN_FUNTION_CHECK_TIMEOUT_BASE_SET /* 516 */:
                case 520:
                case 524:
                case 528:
                case 532:
                    return true;
                default:
                    return false;
            }
        }
        if (i2 == 3) {
            return (bluetoothClass.getDeviceClass() & 1280) == 1280;
        }
        if (i2 == 4 || i2 == 5) {
            return bluetoothClass.hasService(131072) || (bluetoothClass.getDeviceClass() & 768) == 768;
        }
        return false;
    }

    public static final int C1(int i2, int i3, int i4) {
        if (i4 > 0) {
            return i2 >= i3 ? i3 : i3 - N2(N2(i3, i4) - N2(i2, i4), i4);
        }
        if (i4 >= 0) {
            throw new IllegalArgumentException("Step is zero.");
        }
        if (i2 <= i3) {
            return i3;
        }
        int i5 = -i4;
        return i3 + N2(N2(i2, i5) - N2(i3, i5), i5);
    }

    public static final <T> Lazy<T> C2(LazyThreadSafetyMode lazyThreadSafetyMode, Function0<? extends T> function0) {
        o.f(lazyThreadSafetyMode, RtspHeaders.Values.MODE);
        o.f(function0, "initializer");
        int iOrdinal = lazyThreadSafetyMode.ordinal();
        if (iOrdinal == 0) {
            return new SynchronizedLazyImpl(function0, null, 2);
        }
        if (iOrdinal == 1) {
            return new SafePublicationLazyImpl(function0);
        }
        if (iOrdinal == 2) {
            return new UnsafeLazyImpl(function0);
        }
        throw new NoWhenBranchMatchedException();
    }

    public static r1 C3(List<b1> list, o1 o1Var, k kVar, List<b1> list2) {
        if (o1Var == null) {
            e(1);
            throw null;
        }
        if (kVar == null) {
            e(2);
            throw null;
        }
        if (list2 == null) {
            e(3);
            throw null;
        }
        r1 r1VarD3 = D3(list, o1Var, kVar, list2, null);
        if (r1VarD3 != null) {
            return r1VarD3;
        }
        throw new AssertionError("Substitution failed");
    }

    public static final kotlin.reflect.w.internal.y0.f.a.p0.g D(kotlin.reflect.w.internal.y0.f.a.p0.g gVar, k kVar, y yVar, int i2) {
        o.f(gVar, "<this>");
        o.f(kVar, "containingDeclaration");
        o.f(yVar, "typeParameterOwner");
        return new kotlin.reflect.w.internal.y0.f.a.p0.g(gVar.a, new kotlin.reflect.w.internal.y0.f.a.p0.h(gVar, kVar, yVar, i2), gVar.f7195c);
    }

    public static void D0(String str) {
        j(f5272d, 5, f5271c, str);
    }

    public static final kotlin.reflect.w.internal.y0.f.b.q D1(n nVar, kotlin.reflect.w.internal.y0.g.z.c cVar, kotlin.reflect.w.internal.y0.g.z.e eVar, boolean z2, boolean z3, boolean z4) {
        o.f(nVar, "proto");
        o.f(cVar, "nameResolver");
        o.f(eVar, "typeTable");
        h.f<n, a.d> fVar = kotlin.reflect.w.internal.y0.g.a0.a.f7556d;
        o.e(fVar, "propertySignature");
        a.d dVar = (a.d) h1(nVar, fVar);
        if (dVar == null) {
            return null;
        }
        if (z2) {
            d.a aVarB = kotlin.reflect.w.internal.y0.g.a0.b.h.a.b(nVar, cVar, eVar, z4);
            if (aVarB == null) {
                return null;
            }
            return kotlin.reflect.w.internal.y0.f.b.q.b(aVarB);
        }
        if (z3) {
            if ((dVar.f7592o & 2) == 2) {
                a.c cVar2 = dVar.f7594q;
                o.e(cVar2, "signature.syntheticMethod");
                o.f(cVar, "nameResolver");
                o.f(cVar2, "signature");
                String strB = cVar.b(cVar2.f7582p);
                String strB2 = cVar.b(cVar2.f7583q);
                o.f(strB, "name");
                o.f(strB2, "desc");
                return new kotlin.reflect.w.internal.y0.f.b.q(g.a.a.a.a.t(strB, strB2), null);
            }
        }
        return null;
    }

    public static final <T> Lazy<T> D2(Function0<? extends T> function0) {
        o.f(function0, "initializer");
        return new SynchronizedLazyImpl(function0, null, 2);
    }

    /* JADX WARN: Removed duplicated region for block: B:22:0x00c1  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static kotlin.reflect.w.internal.y0.n.r1 D3(java.util.List<kotlin.reflect.w.internal.y0.d.b1> r17, kotlin.reflect.w.internal.y0.n.o1 r18, kotlin.reflect.w.internal.y0.d.k r19, java.util.List<kotlin.reflect.w.internal.y0.d.b1> r20, boolean[] r21) {
        /*
            Method dump skipped, instruction units count: 241
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.h.a.i.D3(java.util.List, r.i0.w.b.y0.n.o1, r.i0.w.b.y0.d.k, java.util.List, boolean[]):r.i0.w.b.y0.n.r1");
    }

    public static final void E(Closeable closeable, Throwable th) throws IOException {
        if (closeable != null) {
            if (th == null) {
                closeable.close();
                return;
            }
            try {
                closeable.close();
            } catch (Throwable th2) {
                p(th, th2);
            }
        }
    }

    public static void E0(boolean z2, String str) {
        j(z2, 5, f5271c, str);
    }

    public static /* synthetic */ kotlin.reflect.w.internal.y0.f.b.q E1(n nVar, kotlin.reflect.w.internal.y0.g.z.c cVar, kotlin.reflect.w.internal.y0.g.z.e eVar, boolean z2, boolean z3, boolean z4, int i2) {
        boolean z5 = (i2 & 8) != 0 ? false : z2;
        boolean z6 = (i2 & 16) != 0 ? false : z3;
        if ((i2 & 32) != 0) {
            z4 = true;
        }
        return D1(nVar, cVar, eVar, z5, z6, z4);
    }

    public static <T> o0<T> E2(Function0<T> function0) {
        return new o0<>(function0);
    }

    /* JADX WARN: Removed duplicated region for block: B:12:0x0047  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final kotlin.reflect.w.internal.y0.h.c E3(kotlin.reflect.w.internal.y0.h.c r5, kotlin.reflect.w.internal.y0.h.c r6) {
        /*
            java.lang.String r0 = "<this>"
            kotlin.jvm.internal.o.f(r5, r0)
            java.lang.String r1 = "prefix"
            kotlin.jvm.internal.o.f(r6, r1)
            kotlin.jvm.internal.o.f(r5, r0)
            java.lang.String r0 = "packageName"
            kotlin.jvm.internal.o.f(r6, r0)
            boolean r0 = kotlin.jvm.internal.o.a(r5, r6)
            r1 = 1
            if (r0 == 0) goto L1a
            goto L47
        L1a:
            boolean r0 = r6.d()
            if (r0 == 0) goto L21
            goto L47
        L21:
            java.lang.String r0 = r5.b()
            java.lang.String r2 = "this.asString()"
            kotlin.jvm.internal.o.e(r0, r2)
            java.lang.String r2 = r6.b()
            java.lang.String r3 = "packageName.asString()"
            kotlin.jvm.internal.o.e(r2, r3)
            r3 = 0
            r4 = 2
            boolean r4 = kotlin.text.j.M(r0, r2, r3, r4)
            if (r4 == 0) goto L48
            int r2 = r2.length()
            char r0 = r0.charAt(r2)
            r2 = 46
            if (r0 != r2) goto L48
        L47:
            r3 = r1
        L48:
            if (r3 == 0) goto L80
            boolean r0 = r6.d()
            if (r0 == 0) goto L51
            goto L80
        L51:
            boolean r0 = kotlin.jvm.internal.o.a(r5, r6)
            if (r0 == 0) goto L5f
            r.i0.w.b.y0.h.c r5 = kotlin.reflect.w.internal.y0.h.c.a
            java.lang.String r6 = "ROOT"
            kotlin.jvm.internal.o.e(r5, r6)
            goto L80
        L5f:
            r.i0.w.b.y0.h.c r0 = new r.i0.w.b.y0.h.c
            java.lang.String r5 = r5.b()
            java.lang.String r2 = "asString()"
            kotlin.jvm.internal.o.e(r5, r2)
            java.lang.String r6 = r6.b()
            int r6 = r6.length()
            int r6 = r6 + r1
            java.lang.String r5 = r5.substring(r6)
            java.lang.String r6 = "this as java.lang.String).substring(startIndex)"
            kotlin.jvm.internal.o.e(r5, r6)
            r0.<init>(r5)
            r5 = r0
        L80:
            return r5
        */
        throw new UnsupportedOperationException("Method not decompiled: g.h.a.i.E3(r.i0.w.b.y0.h.c, r.i0.w.b.y0.h.c):r.i0.w.b.y0.h.c");
    }

    public static final Object F(Object obj, kotlin.reflect.w.internal.y0.d.b bVar) {
        h0 h0VarG1;
        Class<?> clsL3;
        o.f(bVar, "descriptor");
        return (((bVar instanceof p0) && j.d((i1) bVar)) || (h0VarG1 = g1(bVar)) == null || (clsL3 = L3(h0VarG1)) == null) ? obj : M1(clsL3, bVar).invoke(obj, new Object[0]);
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static final kotlin.reflect.w.internal.y0.h.e F0(h0 h0Var) {
        String str;
        o.f(h0Var, "<this>");
        kotlin.reflect.w.internal.y0.d.l1.c cVarG = h0Var.getAnnotations().g(i.a.f6532s);
        if (cVarG == null) {
            return null;
        }
        Object objA0 = kotlin.collections.j.a0(cVarG.a().values());
        kotlin.reflect.w.internal.y0.k.x.w wVar = objA0 instanceof kotlin.reflect.w.internal.y0.k.x.w ? (kotlin.reflect.w.internal.y0.k.x.w) objA0 : null;
        if (wVar != null && (str = (String) wVar.a) != null) {
            if (!kotlin.reflect.w.internal.y0.h.e.j(str)) {
                str = null;
            }
            if (str != null) {
                return kotlin.reflect.w.internal.y0.h.e.i(str);
            }
        }
        return null;
    }

    public static final h0 F1(h0 h0Var) {
        o.f(h0Var, "<this>");
        i2(h0Var);
        if (h0Var.getAnnotations().g(i.a.f6530q) != null) {
            return h0Var.J0().get(X(h0Var)).getType();
        }
        return null;
    }

    public static <T> n0<T> F2(T t2, Function0<T> function0) {
        if (function0 != null) {
            return new n0<>(t2, function0);
        }
        a(1);
        throw null;
    }

    public static void F3(Throwable th) {
        if (th instanceof VirtualMachineError) {
            throw ((VirtualMachineError) th);
        }
        if (th instanceof ThreadDeath) {
            throw ((ThreadDeath) th);
        }
        if (th instanceof LinkageError) {
            throw ((LinkageError) th);
        }
    }

    public static final void G(i0 i0Var, kotlin.reflect.w.internal.y0.h.c cVar, Collection<kotlin.reflect.w.internal.y0.d.h0> collection) {
        o.f(i0Var, "<this>");
        o.f(cVar, "fqName");
        o.f(collection, "packageFragments");
        if (i0Var instanceof k0) {
            ((k0) i0Var).b(cVar, collection);
        } else {
            collection.addAll(i0Var.a(cVar));
        }
    }

    public static kotlin.reflect.w.internal.y0.d.l1.c G0(kotlin.reflect.w.internal.y0.d.l1.h hVar, kotlin.reflect.w.internal.y0.h.c cVar) {
        kotlin.reflect.w.internal.y0.d.l1.c next;
        o.f(cVar, "fqName");
        Iterator<kotlin.reflect.w.internal.y0.d.l1.c> it = hVar.iterator();
        while (true) {
            if (!it.hasNext()) {
                next = null;
                break;
            }
            next = it.next();
            if (o.a(next.d(), cVar)) {
                break;
            }
        }
        return next;
    }

    public static final h0 G1(h0 h0Var) {
        o.f(h0Var, "<this>");
        i2(h0Var);
        h0 type = ((l1) kotlin.collections.j.E(h0Var.J0())).getType();
        o.e(type, "arguments.last().type");
        return type;
    }

    public static <T> n0<T> G2(Function0<T> function0) {
        return F2(null, function0);
    }

    public static final void G3(Object obj) throws Throwable {
        if (obj instanceof Result.a) {
            throw ((Result.a) obj).f9180f;
        }
    }

    public static final <T> int H(Iterable<? extends T> iterable, int i2) {
        o.f(iterable, "<this>");
        return iterable instanceof Collection ? ((Collection) iterable).size() : i2;
    }

    public static kotlin.reflect.w.internal.y0.d.p1.b.e H0(kotlin.reflect.w.internal.y0.d.p1.b.h hVar, kotlin.reflect.w.internal.y0.h.c cVar) {
        Annotation[] declaredAnnotations;
        o.f(cVar, "fqName");
        AnnotatedElement element = hVar.getElement();
        if (element == null || (declaredAnnotations = element.getDeclaredAnnotations()) == null) {
            return null;
        }
        return I0(declaredAnnotations, cVar);
    }

    public static String H1(Throwable th) {
        for (Throwable cause = th; cause != null; cause = cause.getCause()) {
            if (cause instanceof UnknownHostException) {
                return "";
            }
        }
        StringWriter stringWriter = new StringWriter();
        PrintWriter printWriter = new PrintWriter(stringWriter);
        th.printStackTrace(printWriter);
        printWriter.flush();
        return stringWriter.toString();
    }

    public static final <T> List<T> H2(T t2) {
        List<T> listSingletonList = Collections.singletonList(t2);
        o.e(listSingletonList, "singletonList(element)");
        return listSingletonList;
    }

    public static kotlin.reflect.w.internal.y0.f.a.p0.m.a H3(t1 t1Var, boolean z2, boolean z3, b1 b1Var, int i2) {
        boolean z4 = (i2 & 1) != 0 ? false : z2;
        boolean z5 = (i2 & 2) != 0 ? false : z3;
        if ((i2 & 4) != 0) {
            b1Var = null;
        }
        o.f(t1Var, "<this>");
        return new kotlin.reflect.w.internal.y0.f.a.p0.m.a(t1Var, null, z5, z4, b1Var != null ? r3(b1Var) : null, null, 34);
    }

    public static final <T extends Comparable<?>> int I(T t2, T t3) {
        if (t2 == t3) {
            return 0;
        }
        if (t2 == null) {
            return -1;
        }
        if (t3 == null) {
            return 1;
        }
        return t2.compareTo(t3);
    }

    public static final kotlin.reflect.w.internal.y0.d.p1.b.e I0(Annotation[] annotationArr, kotlin.reflect.w.internal.y0.h.c cVar) {
        Annotation annotation;
        o.f(annotationArr, "<this>");
        o.f(cVar, "fqName");
        int length = annotationArr.length;
        int i2 = 0;
        while (true) {
            if (i2 >= length) {
                annotation = null;
                break;
            }
            annotation = annotationArr[i2];
            if (o.a(kotlin.reflect.w.internal.y0.d.p1.b.d.a(l1(U0(annotation))).b(), cVar)) {
                break;
            }
            i2++;
        }
        if (annotation != null) {
            return new kotlin.reflect.w.internal.y0.d.p1.b.e(annotation);
        }
        return null;
    }

    public static String I1(String str) {
        if (TextUtils.isEmpty(str) || str.endsWith(DefaultDnsRecordDecoder.ROOT)) {
            return null;
        }
        int iLastIndexOf = str.lastIndexOf(DefaultDnsRecordDecoder.ROOT);
        return iLastIndexOf != -1 ? str.substring(iLastIndexOf + 1).toLowerCase(Locale.US) : "";
    }

    public static final kotlin.reflect.w.internal.y0.n.o0 I2(h0 h0Var) {
        o.f(h0Var, "<this>");
        w1 w1VarO0 = h0Var.O0();
        if (w1VarO0 instanceof b0) {
            return ((b0) w1VarO0).f8878m;
        }
        if (w1VarO0 instanceof kotlin.reflect.w.internal.y0.n.o0) {
            return (kotlin.reflect.w.internal.y0.n.o0) w1VarO0;
        }
        throw new NoWhenBranchMatchedException();
    }

    public static final <T, C extends Collection<? super T>> C I3(T[] tArr, C c2) {
        o.f(tArr, "<this>");
        o.f(c2, RtspHeaders.Values.DESTINATION);
        for (T t2 : tArr) {
            c2.add(t2);
        }
        return c2;
    }

    public static final kotlin.reflect.w.internal.y0.d.l1.h J(kotlin.reflect.w.internal.y0.d.l1.h hVar, kotlin.reflect.w.internal.y0.d.l1.h hVar2) {
        o.f(hVar, "first");
        o.f(hVar2, "second");
        return hVar.isEmpty() ? hVar2 : hVar2.isEmpty() ? hVar : new kotlin.reflect.w.internal.y0.d.l1.k(hVar, hVar2);
    }

    public static final kotlin.reflect.w.internal.y0.d.e J0(e0 e0Var, kotlin.reflect.w.internal.y0.h.b bVar) {
        o.f(e0Var, "<this>");
        o.f(bVar, "classId");
        kotlin.reflect.w.internal.y0.d.h hVarK0 = K0(e0Var, bVar);
        if (hVarK0 instanceof kotlin.reflect.w.internal.y0.d.e) {
            return (kotlin.reflect.w.internal.y0.d.e) hVarK0;
        }
        return null;
    }

    public static String J1() {
        return t2() ? "com.seewo.easimark.MarkActivity" : SystemProperties.get("sys.current.visible.activity", (String) null);
    }

    public static final int J2(int i2) {
        if (i2 < 0) {
            return i2;
        }
        if (i2 < 3) {
            return i2 + 1;
        }
        if (i2 < 1073741824) {
            return (int) ((i2 / 0.75f) + 1.0f);
        }
        return Integer.MAX_VALUE;
    }

    public static final r J3(k1 k1Var) {
        o.f(k1Var, "<this>");
        r rVarH = u.f7437d.get(k1Var);
        if (rVarH == null) {
            rVarH = q.h(k1Var);
        }
        o.e(rVarH, "toDescriptorVisibility(this)");
        return rVarH;
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x003a  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final kotlin.reflect.w.internal.calls.CallerImpl<java.lang.reflect.Field> K(kotlin.reflect.w.internal.KPropertyImpl.a<?, ?> r4, boolean r5, java.lang.reflect.Field r6) {
        /*
            Method dump skipped, instruction units count: 212
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.h.a.i.K(r.i0.w.b.f0$a, boolean, java.lang.reflect.Field):r.i0.w.b.x0.h");
    }

    /* JADX WARN: Removed duplicated region for block: B:41:0x00f3  */
    /* JADX WARN: Removed duplicated region for block: B:56:0x0152  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final kotlin.reflect.w.internal.y0.d.h K0(kotlin.reflect.w.internal.y0.d.e0 r11, kotlin.reflect.w.internal.y0.h.b r12) {
        /*
            Method dump skipped, instruction units count: 340
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.h.a.i.K0(r.i0.w.b.y0.d.e0, r.i0.w.b.y0.h.b):r.i0.w.b.y0.d.h");
    }

    public static String K1(Context context) {
        String strJ1 = J1();
        if (strJ1 != null && !strJ1.isEmpty()) {
            return strJ1;
        }
        List<ActivityManager.RunningTaskInfo> runningTasks = ((ActivityManager) context.getSystemService("activity")).getRunningTasks(1);
        if (runningTasks == null || runningTasks.isEmpty()) {
            return null;
        }
        return runningTasks.get(0).topActivity.getClassName();
    }

    public static final <K, V> Map<K, V> K2(Pair<? extends K, ? extends V> pair) {
        o.f(pair, "pair");
        Map<K, V> mapSingletonMap = Collections.singletonMap(pair.f5909f, pair.f5910m);
        o.e(mapSingletonMap, "singletonMap(pair.first, pair.second)");
        return mapSingletonMap;
    }

    public static final Class<?> K3(k kVar) {
        if (!(kVar instanceof kotlin.reflect.w.internal.y0.d.e) || !j.b(kVar)) {
            return null;
        }
        kotlin.reflect.w.internal.y0.d.e eVar = (kotlin.reflect.w.internal.y0.d.e) kVar;
        Class<?> clsJ = v0.j(eVar);
        if (clsJ != null) {
            return clsJ;
        }
        StringBuilder sbF = g.a.a.a.a.F("Class object for the class ");
        sbF.append(eVar.getName());
        sbF.append(" cannot be found (classId=");
        sbF.append(kotlin.reflect.w.internal.y0.k.z.a.f((kotlin.reflect.w.internal.y0.d.h) kVar));
        sbF.append(')');
        throw new KotlinReflectionInternalError(sbF.toString());
    }

    public static final boolean L(KPropertyImpl.a<?, ?> aVar) {
        return !u1.g(aVar.s().o().getType());
    }

    public static final kotlin.reflect.w.internal.y0.f.b.n L0(m mVar, kotlin.reflect.w.internal.y0.h.b bVar) {
        o.f(mVar, "<this>");
        o.f(bVar, "classId");
        m.a aVarC = mVar.c(bVar);
        if (aVarC != null) {
            return aVarC.a();
        }
        return null;
    }

    public static final kotlin.reflect.w.internal.y0.d.h L1(k kVar) {
        o.f(kVar, "<this>");
        k kVarB = kVar.b();
        if (kVarB == null || (kVar instanceof kotlin.reflect.w.internal.y0.d.h0)) {
            return null;
        }
        o.f(kVarB, "<this>");
        if (!(kVarB.b() instanceof kotlin.reflect.w.internal.y0.d.h0)) {
            return L1(kVarB);
        }
        if (kVarB instanceof kotlin.reflect.w.internal.y0.d.h) {
            return (kotlin.reflect.w.internal.y0.d.h) kVarB;
        }
        return null;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:25:0x010c  */
    /* JADX WARN: Removed duplicated region for block: B:57:0x0186  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final java.lang.Object L2(kotlin.reflect.w.internal.y0.n.h0 r19, kotlin.reflect.w.internal.y0.f.b.k r20, kotlin.reflect.w.internal.y0.f.b.x r21, kotlin.reflect.w.internal.y0.f.b.v r22, kotlin.jvm.functions.Function3 r23) {
        /*
            Method dump skipped, instruction units count: 846
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.h.a.i.L2(r.i0.w.b.y0.n.h0, r.i0.w.b.y0.f.b.k, r.i0.w.b.y0.f.b.x, r.i0.w.b.y0.f.b.v, r.e0.b.n):java.lang.Object");
    }

    public static final Class<?> L3(h0 h0Var) {
        o.f(h0Var, "<this>");
        Class<?> clsK3 = K3(h0Var.L0().c());
        if (clsK3 == null) {
            return null;
        }
        if (!u1.g(h0Var)) {
            return clsK3;
        }
        h0 h0VarE = j.e(h0Var);
        if (h0VarE == null || u1.g(h0VarE) || kotlin.reflect.w.internal.y0.c.f.L(h0VarE)) {
            return null;
        }
        return clsK3;
    }

    public static final List<b1> M(kotlin.reflect.w.internal.y0.d.i iVar) {
        List<b1> parameters;
        k next;
        e1 e1VarK;
        o.f(iVar, "<this>");
        List<b1> listU = iVar.u();
        o.e(listU, "declaredTypeParameters");
        if (!iVar.M() && !(iVar.b() instanceof kotlin.reflect.w.internal.y0.d.a)) {
            return listU;
        }
        Sequence<k> sequenceL = kotlin.reflect.w.internal.y0.k.z.a.l(iVar);
        c1 c1Var = c1.f6665f;
        o.f(sequenceL, "<this>");
        o.f(c1Var, "predicate");
        List listJ = kotlin.sequences.q.j(kotlin.sequences.q.f(kotlin.sequences.q.d(new TakeWhileSequence(sequenceL, c1Var), d1.f6666f), kotlin.reflect.w.internal.y0.d.e1.f6667f));
        Iterator<k> it = kotlin.reflect.w.internal.y0.k.z.a.l(iVar).iterator();
        while (true) {
            parameters = null;
            if (!it.hasNext()) {
                next = null;
                break;
            }
            next = it.next();
            if (next instanceof kotlin.reflect.w.internal.y0.d.e) {
                break;
            }
        }
        kotlin.reflect.w.internal.y0.d.e eVar = (kotlin.reflect.w.internal.y0.d.e) next;
        if (eVar != null && (e1VarK = eVar.k()) != null) {
            parameters = e1VarK.getParameters();
        }
        if (parameters == null) {
            parameters = EmptyList.f9307f;
        }
        if (listJ.isEmpty() && parameters.isEmpty()) {
            List<b1> listU2 = iVar.u();
            o.e(listU2, "declaredTypeParameters");
            return listU2;
        }
        List<b1> listP = kotlin.collections.j.P(listJ, parameters);
        ArrayList arrayList = new ArrayList(H(listP, 10));
        for (b1 b1Var : listP) {
            o.e(b1Var, "it");
            arrayList.add(new kotlin.reflect.w.internal.y0.d.c(b1Var, iVar, listU.size()));
        }
        return kotlin.collections.j.P(listU, arrayList);
    }

    public static final kotlin.reflect.w.internal.y0.d.e M0(e0 e0Var, kotlin.reflect.w.internal.y0.h.b bVar, g0 g0Var) {
        o.f(e0Var, "<this>");
        o.f(bVar, "classId");
        o.f(g0Var, "notFoundClasses");
        kotlin.reflect.w.internal.y0.d.e eVarJ0 = J0(e0Var, bVar);
        return eVarJ0 != null ? eVarJ0 : g0Var.a(bVar, kotlin.sequences.q.j(kotlin.sequences.q.g(kotlin.reflect.w.internal.y0.n.c2.c.O(bVar, kotlin.reflect.w.internal.y0.d.u.f7003f), v.f7005f)));
    }

    public static final Method M1(Class<?> cls, kotlin.reflect.w.internal.y0.d.b bVar) {
        o.f(cls, "<this>");
        o.f(bVar, "descriptor");
        try {
            Method declaredMethod = cls.getDeclaredMethod("unbox-impl", new Class[0]);
            o.e(declaredMethod, "{\n        getDeclaredMet…LINE_CLASS_MEMBERS)\n    }");
            return declaredMethod;
        } catch (NoSuchMethodException unused) {
            throw new KotlinReflectionInternalError("No unbox method found in inline class: " + cls + " (calling " + bVar + ')');
        }
    }

    public static final b.a M2(c0 c0Var, kotlin.reflect.w.internal.y0.g.j jVar) {
        b.a aVar = b.a.DECLARATION;
        o.f(c0Var, "<this>");
        int i2 = jVar == null ? -1 : d0.a[jVar.ordinal()];
        return i2 != 1 ? i2 != 2 ? i2 != 3 ? i2 != 4 ? aVar : b.a.SYNTHESIZED : b.a.DELEGATION : b.a.FAKE_OVERRIDE : aVar;
    }

    public static final <T> List<T> M3(T[] tArr) {
        o.f(tArr, "<this>");
        int length = tArr.length;
        if (length == 0) {
            return EmptyList.f9307f;
        }
        if (length == 1) {
            return H2(tArr[0]);
        }
        o.f(tArr, "<this>");
        o.f(tArr, "<this>");
        return new ArrayList(new ArrayAsCollection(tArr, false));
    }

    public static final kotlin.reflect.w.internal.y0.n.b2.i N(s1 s1Var, kotlin.reflect.w.internal.y0.n.b2.i iVar, HashSet<kotlin.reflect.w.internal.y0.n.b2.n> hashSet) {
        kotlin.reflect.w.internal.y0.n.b2.i iVarN;
        kotlin.reflect.w.internal.y0.n.b2.i iVarR0;
        kotlin.reflect.w.internal.y0.n.b2.n nVarT = s1Var.t(iVar);
        if (!hashSet.add(nVarT)) {
            return null;
        }
        kotlin.reflect.w.internal.y0.n.b2.o oVarB = s1Var.B(nVarT);
        if (oVarB != null) {
            kotlin.reflect.w.internal.y0.n.b2.i iVarJ = s1Var.j(oVarB);
            iVarN = N(s1Var, iVarJ, hashSet);
            if (iVarN == null) {
                return null;
            }
            boolean z2 = s1Var.U(s1Var.t(iVarJ)) || ((iVarJ instanceof kotlin.reflect.w.internal.y0.n.b2.k) && s1Var.t0((kotlin.reflect.w.internal.y0.n.b2.k) iVarJ));
            if ((iVarN instanceof kotlin.reflect.w.internal.y0.n.b2.k) && s1Var.t0((kotlin.reflect.w.internal.y0.n.b2.k) iVarN) && s1Var.g0(iVar) && z2) {
                iVarR0 = s1Var.r0(iVarJ);
            } else if (!s1Var.g0(iVarN) && s1Var.f0(iVar)) {
                iVarR0 = s1Var.r0(iVarN);
            }
            return iVarR0;
        }
        if (!s1Var.U(nVarT)) {
            return iVar;
        }
        kotlin.reflect.w.internal.y0.n.b2.i iVarV = s1Var.V(iVar);
        if (iVarV == null || (iVarN = N(s1Var, iVarV, hashSet)) == null) {
            return null;
        }
        if (s1Var.g0(iVar)) {
            return s1Var.g0(iVarN) ? iVar : ((iVarN instanceof kotlin.reflect.w.internal.y0.n.b2.k) && s1Var.t0((kotlin.reflect.w.internal.y0.n.b2.k) iVarN)) ? iVar : s1Var.r0(iVarN);
        }
        return iVarN;
    }

    public static /* synthetic */ t N0(kotlin.reflect.w.internal.y0.f.a.r rVar, kotlin.reflect.w.internal.y0.h.c cVar, boolean z2, int i2, Object obj) {
        if ((i2 & 2) != 0) {
            z2 = true;
        }
        return rVar.c(cVar, z2);
    }

    public static ParcelUuid N1(ParcelUuid[] parcelUuidArr, UUID uuid, boolean z2) {
        ParcelUuid parcelUuid;
        if (uuid != null && parcelUuidArr != null && parcelUuidArr.length > 0) {
            for (ParcelUuid parcelUuid2 : parcelUuidArr) {
                if (parcelUuid2 != null) {
                    if (uuid.equals(parcelUuid2.getUuid())) {
                        return parcelUuid2;
                    }
                    if (g.i.a.b.e.i.a.b(parcelUuid2)) {
                        continue;
                    } else {
                        UUID uuid2 = parcelUuid2.getUuid();
                        if (!(uuid2.getLeastSignificantBits() == g.i.a.b.e.i.a.f5434b.getUuid().getLeastSignificantBits() && !g.i.a.b.e.i.a.b(parcelUuid2) && (uuid2.getMostSignificantBits() & 4294967295L) == 4096) && z2) {
                            ByteBuffer byteBufferAllocate = ByteBuffer.allocate(16);
                            byteBufferAllocate.order(ByteOrder.BIG_ENDIAN);
                            UUID uuid3 = parcelUuid2.getUuid();
                            long mostSignificantBits = uuid3.getMostSignificantBits();
                            long leastSignificantBits = uuid3.getLeastSignificantBits();
                            byteBufferAllocate.putLong(mostSignificantBits);
                            byteBufferAllocate.putLong(8, leastSignificantBits);
                            byte[] bArrArray = byteBufferAllocate.array();
                            int length = bArrArray.length;
                            byte[] bArr = new byte[length];
                            int i2 = 0;
                            for (int length2 = bArrArray.length - 1; length2 >= 0; length2--) {
                                bArr[i2] = bArrArray[length2];
                                i2++;
                            }
                            if (length < 16) {
                                parcelUuid = null;
                            } else {
                                ByteBuffer byteBufferWrap = ByteBuffer.wrap(bArr);
                                byteBufferWrap.order(ByteOrder.BIG_ENDIAN);
                                parcelUuid = new ParcelUuid(new UUID(byteBufferWrap.getLong(0), byteBufferWrap.getLong(8)));
                            }
                            if (parcelUuid != null && uuid.equals(parcelUuid.getUuid())) {
                                StringBuilder sbF = g.a.a.a.a.F("match reverse uuid:");
                                sbF.append(parcelUuid.toString());
                                U3(sbF.toString());
                                return parcelUuid;
                            }
                        }
                    }
                }
            }
        }
        return null;
    }

    public static final int N2(int i2, int i3) {
        int i4 = i2 % i3;
        return i4 >= 0 ? i4 : i4 + i3;
    }

    public static final <T> Set<T> N3(T[] tArr) {
        o.f(tArr, "<this>");
        int length = tArr.length;
        if (length == 0) {
            return EmptySet.f9309f;
        }
        if (length == 1) {
            return r3(tArr[0]);
        }
        LinkedHashSet linkedHashSet = new LinkedHashSet(J2(tArr.length));
        I3(tArr, linkedHashSet);
        return linkedHashSet;
    }

    public static final String O(kotlin.reflect.w.internal.y0.d.e eVar, kotlin.reflect.w.internal.y0.f.b.v<?> vVar) {
        o.f(eVar, "klass");
        o.f(vVar, "typeMappingConfiguration");
        String strB = vVar.b(eVar);
        if (strB != null) {
            return strB;
        }
        k kVarB = eVar.b();
        o.e(kVarB, "klass.containingDeclaration");
        kotlin.reflect.w.internal.y0.h.e name = eVar.getName();
        kotlin.reflect.w.internal.y0.h.g gVar = kotlin.reflect.w.internal.y0.h.g.a;
        if (name == null || name.f8196m) {
            name = kotlin.reflect.w.internal.y0.h.g.f8199d;
        }
        String strG = name.g();
        o.e(strG, "safeIdentifier(klass.name).identifier");
        if (kVarB instanceof kotlin.reflect.w.internal.y0.d.h0) {
            kotlin.reflect.w.internal.y0.h.c cVarD = ((kotlin.reflect.w.internal.y0.d.h0) kVarB).d();
            if (cVarD.d()) {
                return strG;
            }
            StringBuilder sb = new StringBuilder();
            String strB2 = cVarD.b();
            o.e(strB2, "fqName.asString()");
            sb.append(kotlin.text.j.B(strB2, '.', '/', false, 4));
            sb.append('/');
            sb.append(strG);
            return sb.toString();
        }
        kotlin.reflect.w.internal.y0.d.e eVar2 = kVarB instanceof kotlin.reflect.w.internal.y0.d.e ? (kotlin.reflect.w.internal.y0.d.e) kVarB : null;
        if (eVar2 != null) {
            String strD = vVar.d(eVar2);
            if (strD == null) {
                strD = O(eVar2, vVar);
            }
            return g.a.a.a.a.k(strD, '$', strG);
        }
        throw new IllegalArgumentException("Unexpected container: " + kVarB + " for " + eVar);
    }

    public static final <T> T O0(T[] tArr) {
        o.f(tArr, "<this>");
        if (tArr.length == 0) {
            throw new NoSuchElementException("Array is empty.");
        }
        return tArr[0];
    }

    public static final Object O1(kotlin.reflect.w.internal.y0.m.i iVar, KProperty kProperty) {
        o.f(iVar, "<this>");
        o.f(kProperty, "p");
        return iVar.invoke();
    }

    public static final long O2(long j2, long j3) {
        long j4 = j2 % j3;
        return j4 >= 0 ? j4 : j4 + j3;
    }

    public static final <K, V> Map<K, V> O3(Map<? extends K, ? extends V> map) {
        o.f(map, "<this>");
        Map.Entry<? extends K, ? extends V> next = map.entrySet().iterator().next();
        Map<K, V> mapSingletonMap = Collections.singletonMap(next.getKey(), next.getValue());
        o.e(mapSingletonMap, "with(entries.iterator().…ingletonMap(key, value) }");
        return mapSingletonMap;
    }

    public static final a0 P(kotlin.reflect.w.internal.y0.f.a.p0.g gVar, kotlin.reflect.w.internal.y0.d.l1.h hVar) {
        o.f(gVar, "<this>");
        o.f(hVar, "additionalAnnotations");
        return gVar.a.f7178q.b((a0) gVar.f7196d.getValue(), hVar);
    }

    public static final <T> T P0(T[] tArr) {
        o.f(tArr, "<this>");
        if (tArr.length == 0) {
            return null;
        }
        return tArr[0];
    }

    public static final List<l1> P1(h0 h0Var) {
        o.f(h0Var, "<this>");
        i2(h0Var);
        return h0Var.J0().subList(X(h0Var) + (h2(h0Var) ? 1 : 0), r0.size() - 1);
    }

    public static void P2(Throwable th) {
        if (th == null) {
            th = new NullPointerException("onError called with null. Null values are generally not allowed in 2.x operators and sources.");
        } else {
            boolean z2 = true;
            if (!(th instanceof o.a.f.b) && !(th instanceof IllegalStateException) && !(th instanceof NullPointerException) && !(th instanceof IllegalArgumentException) && !(th instanceof o.a.f.a)) {
                z2 = false;
            }
            if (!z2) {
                th = new o.a.f.d(th);
            }
        }
        th.printStackTrace();
        Thread threadCurrentThread = Thread.currentThread();
        threadCurrentThread.getUncaughtExceptionHandler().uncaughtException(threadCurrentThread, th);
    }

    public static final Class<?> P3(ClassLoader classLoader, String str) {
        o.f(classLoader, "<this>");
        o.f(str, "fqName");
        try {
            return Class.forName(str, false, classLoader);
        } catch (ClassNotFoundException unused) {
            return null;
        }
    }

    public static boolean Q(BluetoothProfile bluetoothProfile, String str, BluetoothDevice bluetoothDevice) {
        StringBuilder sbK;
        String string;
        String strU;
        if (bluetoothProfile != null && bluetoothDevice != null) {
            try {
                U3("connectProfile :" + S0(bluetoothDevice.getAddress(), true));
                Class<? extends U> clsAsSubclass = bluetoothProfile.getClass().asSubclass(Class.forName(str));
                if (clsAsSubclass != 0) {
                    Method method = clsAsSubclass.getMethod("connect", BluetoothDevice.class);
                    method.setAccessible(true);
                    return ((Boolean) method.invoke(bluetoothProfile, bluetoothDevice)).booleanValue();
                }
                W3("no class found: " + str);
                return false;
            } catch (ClassNotFoundException e2) {
                sbK = g.a.a.a.a.K("Could not find clas: ", str, ", ignoring request.");
                string = e2.toString();
                sbK.append(string);
                strU = sbK.toString();
                W3(strU);
                return false;
            } catch (IllegalAccessException e3) {
                sbK = g.a.a.a.a.K("Could not execute method 'connect' in profile ", str, ", ignoring request.");
                string = e3.toString();
                sbK.append(string);
                strU = sbK.toString();
                W3(strU);
                return false;
            } catch (NoSuchMethodException unused) {
                strU = g.a.a.a.a.u("No connect method in the ", str, " class, ignoring request.");
                W3(strU);
                return false;
            } catch (InvocationTargetException e4) {
                sbK = g.a.a.a.a.K("Could not execute method 'connect' in profile ", str, ", ignoring request.");
                string = e4.toString();
                sbK.append(string);
                strU = sbK.toString();
                W3(strU);
                return false;
            }
        }
        return false;
    }

    public static final Set<kotlin.reflect.w.internal.y0.h.e> Q0(Iterable<? extends kotlin.reflect.w.internal.y0.k.c0.i> iterable) {
        o.f(iterable, "<this>");
        HashSet hashSet = new HashSet();
        Iterator<? extends kotlin.reflect.w.internal.y0.k.c0.i> it = iterable.iterator();
        while (it.hasNext()) {
            Set<kotlin.reflect.w.internal.y0.h.e> setE = it.next().e();
            if (setE == null) {
                return null;
            }
            kotlin.collections.j.b(hashSet, setE);
        }
        return hashSet;
    }

    public static k1 Q1(kotlin.reflect.w.internal.y0.d.p1.b.c0 c0Var) {
        int iZ = c0Var.z();
        return Modifier.isPublic(iZ) ? j1.h.f6695c : Modifier.isPrivate(iZ) ? j1.e.f6692c : Modifier.isProtected(iZ) ? Modifier.isStatic(iZ) ? kotlin.reflect.w.internal.y0.d.o1.c.f6939c : kotlin.reflect.w.internal.y0.d.o1.b.f6938c : kotlin.reflect.w.internal.y0.d.o1.a.f6937c;
    }

    public static final kotlin.reflect.w.internal.y0.g.q Q2(kotlin.reflect.w.internal.y0.g.q qVar, kotlin.reflect.w.internal.y0.g.z.e eVar) {
        o.f(qVar, "<this>");
        o.f(eVar, "typeTable");
        if (qVar.v()) {
            return qVar.f7978z;
        }
        if ((qVar.f7968p & 512) == 512) {
            return eVar.a(qVar.A);
        }
        return null;
    }

    public static final kotlin.reflect.w.internal.y0.g.q Q3(kotlin.reflect.w.internal.y0.g.u uVar, kotlin.reflect.w.internal.y0.g.z.e eVar) {
        o.f(uVar, "<this>");
        o.f(eVar, "typeTable");
        if (uVar.s()) {
            kotlin.reflect.w.internal.y0.g.q qVar = uVar.f8076s;
            o.e(qVar, "type");
            return qVar;
        }
        if ((uVar.f8073p & 8) == 8) {
            return eVar.a(uVar.f8077t);
        }
        throw new IllegalStateException("No type in ProtoBuf.ValueParameter".toString());
    }

    public static final boolean R(byte[] bArr, byte b2) {
        o.f(bArr, "<this>");
        o.f(bArr, "<this>");
        int length = bArr.length;
        int i2 = 0;
        while (true) {
            if (i2 >= length) {
                i2 = -1;
                break;
            }
            if (b2 == bArr[i2]) {
                break;
            }
            i2++;
        }
        return i2 >= 0;
    }

    public static final <T> List<T> R0(Iterable<? extends Iterable<? extends T>> iterable) {
        o.f(iterable, "<this>");
        ArrayList arrayList = new ArrayList();
        Iterator<? extends Iterable<? extends T>> it = iterable.iterator();
        while (it.hasNext()) {
            kotlin.collections.j.b(arrayList, it.next());
        }
        return arrayList;
    }

    public static boolean R1(kotlin.reflect.w.internal.y0.d.l1.h hVar, kotlin.reflect.w.internal.y0.h.c cVar) {
        o.f(cVar, "fqName");
        return hVar.g(cVar) != null;
    }

    public static final List<kotlin.reflect.w.internal.y0.d.h0> R2(i0 i0Var, kotlin.reflect.w.internal.y0.h.c cVar) {
        o.f(i0Var, "<this>");
        o.f(cVar, "fqName");
        ArrayList arrayList = new ArrayList();
        G(i0Var, cVar, arrayList);
        return arrayList;
    }

    public static final int R3(int i2, int i3) {
        return o.h(i2 ^ Integer.MIN_VALUE, i3 ^ Integer.MIN_VALUE);
    }

    public static final boolean S(char[] cArr, char c2) {
        o.f(cArr, "<this>");
        o.f(cArr, "<this>");
        int length = cArr.length;
        int i2 = 0;
        while (true) {
            if (i2 >= length) {
                i2 = -1;
                break;
            }
            if (c2 == cArr[i2]) {
                break;
            }
            i2++;
        }
        return i2 >= 0;
    }

    public static String S0(String str, boolean z2) {
        if (!z2) {
            return str;
        }
        if (str == null || str.length() != 17) {
            return "";
        }
        byte[] bArr = {(byte) (Character.digit(str.charAt(16), 16) + (Character.digit(str.charAt(15), 16) * 16)), (byte) (Character.digit(str.charAt(13), 16) + (Character.digit(str.charAt(12), 16) * 16)), (byte) (Character.digit(str.charAt(10), 16) + (Character.digit(str.charAt(9), 16) * 16)), (byte) (Character.digit(str.charAt(7), 16) + (Character.digit(str.charAt(6), 16) * 16)), (byte) (Character.digit(str.charAt(4), 16) + (Character.digit(str.charAt(3), 16) * 16)), (byte) (Character.digit(str.charAt(1), 16) + (Character.digit(str.charAt(0), 16) * 16))};
        return String.format("**:**:**:%02X:%02X:%02X", Byte.valueOf(bArr[2]), Byte.valueOf(bArr[1]), Byte.valueOf(bArr[0]));
    }

    /* JADX WARN: Code restructure failed: missing block: B:61:0x0153, code lost:
    
        if (r2 == null) goto L63;
     */
    /* JADX WARN: Code restructure failed: missing block: B:62:0x0155, code lost:
    
        r0 = true;
     */
    /* JADX WARN: Code restructure failed: missing block: B:63:0x0156, code lost:
    
        if (r0 == false) goto L79;
     */
    /* JADX WARN: Code restructure failed: missing block: B:65:0x015d, code lost:
    
        return !kotlin.reflect.w.internal.y0.c.f.B(r12);
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final boolean S1(kotlin.reflect.w.internal.y0.d.e r12, kotlin.reflect.w.internal.y0.d.a r13) {
        /*
            Method dump skipped, instruction units count: 355
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.h.a.i.S1(r.i0.w.b.y0.d.e, r.i0.w.b.y0.d.a):boolean");
    }

    public static String S2(int i2) {
        if (i2 == 257) {
            return "0x0101-TOO MANY OPEN CONNECTIONS";
        }
        switch (i2) {
            case 0:
                return "0x0000-SUCCESS";
            case 1:
                return "0x0001-GATT_INVALID_HANDLE";
            case 2:
                return "0x0002-GATT_READ_NOT_PERMIT";
            case 3:
                return "0x0003-GATT_WRITE_NOT_PERMIT";
            case 4:
                return "0x0004-GATT_INVALID_PDU";
            case 5:
                return "0x0005-GATT_INSUF_AUTHENTICATION";
            case 6:
                return "0x0006-GATT_REQ_NOT_SUPPORTED";
            case 7:
                return "0x0007-GATT_INVALID_OFFSET";
            case 8:
                return "0x0008-GATT_INSUF_AUTHORIZATION";
            case 9:
                return "0x0009-GATT_PREPARE_Q_FULL";
            case 10:
                return "0x000a-GATT_NOT_FOUND";
            case 11:
                return "0x000b-GATT_NOT_LONG";
            case 12:
                return "0x000c-GATT_INSUF_KEY_SIZE";
            case 13:
                return "0x000d-GATT_INVALID_ATTR_LEN";
            case 14:
                return "0x000e-GATT_ERR_UNLIKELY";
            case 15:
                return "0x000f-GATT_INSUF_ENCRYPTION";
            case 16:
                return "0x0010-GATT_UNSUPPORT_GRP_TYPE";
            case 17:
                return "0x0011-GATT_INSUF_RESOURCE";
            default:
                switch (i2) {
                    case 128:
                        return "0x0080-GATT_NO_RESOURCES";
                    case InvokeCmd.CMD_SYSTEMCTRL_GET_HDMI_CLOCK_WAKEUP_STATE /* 129 */:
                        return "0x0081-GATT_INTERNAL_ERROR";
                    case InvokeCmd.CMD_SYSTEMCTRL_SET_SARPOWERMODE /* 130 */:
                        return "0x0082-GATT_WRONG_STATE";
                    case InvokeCmd.CMD_SYSTEMCTRL_GET_SARPOWERMODE /* 131 */:
                        return "0x0083-GATT_DB_FULL";
                    case InvokeCmd.CMD_SYSTEMCTRL_GET_USB_CONNECT_STATE /* 132 */:
                        return "0x0084-GATT_BUSY";
                    case 133:
                        return "0x0085-GATT_ERROR";
                    case 134:
                        return "0x0086-GATT_CMD_STARTED";
                    case 135:
                        return "0x0087-GATT_ILLEGAL_PARAMETER";
                    case 136:
                        return "0x0088-GATT_PENDING";
                    case 137:
                        return "0x0089-GATT_AUTH_FAIL";
                    case 138:
                        return "0x008a-GATT_MORE";
                    case 139:
                        return "0x008b-GATT_INVALID_CFG";
                    case 140:
                        return "0x008c-GATT_SERVICE_STARTED";
                    case 141:
                        return "0x008d-GATT_ENCRYPED_NO_MITM";
                    case 142:
                        return "0x008e-GATT_NOT_ENCRYPTED";
                    case 143:
                        return "0x008f-GATT_CONGESTED";
                    default:
                        switch (i2) {
                            case 253:
                                return "0x00FD-GATT_CCC_CFG_ERR";
                            case DnsRecord.CLASS_NONE /* 254 */:
                                return "0x00FE-GATT_PRC_IN_PROGRESS";
                            case DnsRecord.CLASS_ANY /* 255 */:
                                return "0x00FF-GATT_OUT_OF_RANGE";
                            default:
                                return g.a.a.a.a.n("UNKNOWN (", i2, ")");
                        }
                }
        }
    }

    public static final int S3(long j2, long j3) {
        long j4 = j2 ^ Long.MIN_VALUE;
        long j5 = j3 ^ Long.MIN_VALUE;
        if (j4 < j5) {
            return -1;
        }
        return j4 == j5 ? 0 : 1;
    }

    public static final boolean T(int[] iArr, int i2) {
        o.f(iArr, "<this>");
        return Z1(iArr, i2) >= 0;
    }

    public static String T0(byte[] bArr) {
        if (bArr == null || bArr.length < 6) {
            return null;
        }
        return String.format("%02X:%02X:%02X:%02X:%02X:%02X", Byte.valueOf(bArr[0]), Byte.valueOf(bArr[1]), Byte.valueOf(bArr[2]), Byte.valueOf(bArr[3]), Byte.valueOf(bArr[4]), Byte.valueOf(bArr[5]));
    }

    public static final boolean T1(kotlin.reflect.w.internal.y0.g.i iVar) {
        o.f(iVar, "<this>");
        return iVar.s() || iVar.t();
    }

    public static String T2(int i2) {
        switch (i2) {
            case 257:
                return "PROGRESS_ORIGIN";
            case Bzip2Constants.HUFFMAN_MAX_ALPHABET_SIZE /* 258 */:
                return "PROGRESS_IMAGE_ACTIVE_SUCCESS";
            case 259:
                return "PROGRESS_ABORTED";
            case 260:
                return "PROGRESS_PROCESSING_ERROR";
            case 261:
                return "PROGRESS_COMPLETED";
            default:
                switch (i2) {
                    case InvokeCmd.CMD_XBUG_SET_VMAN_SERVICE_LOG_LEVEL /* 513 */:
                        return "PROGRESS_INITIALIZE";
                    case InvokeCmd.CMD_XBUG_GET_VMAN_SERVICE_LOG_LEVEL /* 514 */:
                        return "PROGRESS_STARTED";
                    case InvokeCmd.CMD_XBUG_SET_XBUG_DUMP_CVTE_LOG /* 515 */:
                        return "PROGRESS_SCAN_REMOTE";
                    case InvokeCmd.CMD_XBUG_VMAN_FUNTION_CHECK_TIMEOUT_BASE_SET /* 516 */:
                        return "PROGRESS_CONNECT_REMOTE";
                    case InvokeCmd.CMD_XBUG_VMAN_FUNTION_CHECK_TIMEOUT_BASE_GET /* 517 */:
                        return "PROGRESS_PREPARE_OTA_ENVIRONMENT";
                    case InvokeCmd.CMD_XBUG_GET_VMAN_FUNTION_TIME_OUT_LIST /* 518 */:
                        return "PROGRESS_REMOTE_ENTER_OTA";
                    case InvokeCmd.CMD_XBUG_GET_LOG_NODE_INFO /* 519 */:
                        return "PROGRESS_SCAN_OTA_REMOTE";
                    case 520:
                        return "PROGRESS_CONNECT_OTA_REMOTE";
                    case 521:
                        return "PROGRESS_START_DFU_PROCESS";
                    case 522:
                        return "PROGRESS_HAND_OVER_PROCESSING";
                    case 523:
                        return "PROGRESS_PENDING_ACTIVE_IMAGE";
                    case 524:
                        return "PROGRESS_ACTIVE_IMAGE_AND_RESET";
                    case 525:
                        return "PROGRESS_ABORT_PROCESSING";
                    case 526:
                        return "PROGRESS_DOWNLOAD_FIRMWARE";
                    default:
                        return String.format("Unknown: 0x%04X", Integer.valueOf(i2));
                }
        }
    }

    public static final kotlin.reflect.w.internal.y0.n.o0 T3(h0 h0Var) {
        o.f(h0Var, "<this>");
        w1 w1VarO0 = h0Var.O0();
        if (w1VarO0 instanceof b0) {
            return ((b0) w1VarO0).f8879n;
        }
        if (w1VarO0 instanceof kotlin.reflect.w.internal.y0.n.o0) {
            return (kotlin.reflect.w.internal.y0.n.o0) w1VarO0;
        }
        throw new NoWhenBranchMatchedException();
    }

    public static final boolean U(long[] jArr, long j2) {
        o.f(jArr, "<this>");
        o.f(jArr, "<this>");
        int length = jArr.length;
        int i2 = 0;
        while (true) {
            if (i2 >= length) {
                i2 = -1;
                break;
            }
            if (j2 == jArr[i2]) {
                break;
            }
            i2++;
        }
        return i2 >= 0;
    }

    public static final <T extends Annotation> KClass<? extends T> U0(T t2) {
        o.f(t2, "<this>");
        Class<? extends Annotation> clsAnnotationType = t2.annotationType();
        o.e(clsAnnotationType, "this as java.lang.annota…otation).annotationType()");
        KClass<? extends T> kClassT1 = t1(clsAnnotationType);
        o.d(kClassT1, "null cannot be cast to non-null type kotlin.reflect.KClass<out T of kotlin.jvm.JvmClassMappingKt.<get-annotationClass>>");
        return kClassT1;
    }

    public static final boolean U1(n nVar) {
        o.f(nVar, "<this>");
        return nVar.s() || nVar.t();
    }

    public static String U2(int i2) {
        if (i2 == 16) {
            return "HEADSET_CLIENT";
        }
        if (i2 == 17) {
            return "PBAP_CLIENT";
        }
        switch (i2) {
            case 1:
                return "HEADSET";
            case 2:
                return "A2DP";
            case 3:
                return "HEALTH";
            case 4:
                return "HID_HOST";
            case 5:
                return "PAN";
            case 6:
                return "PBAP";
            case 7:
                return "GATT";
            case 8:
                return "GATT_SERVER";
            case 9:
                return "MAP";
            case 10:
                return "SAP";
            case 11:
                return "A2DP_SINK";
            case 12:
                return "AVRCP_CONTROLLER";
            default:
                return "Unknown";
        }
    }

    public static void U3(String str) {
        j(f5272d, 1, f5271c, str);
    }

    public static final <T> boolean V(T[] tArr, T t2) {
        o.f(tArr, "<this>");
        return a2(tArr, t2) >= 0;
    }

    public static h1 V0(kotlin.reflect.w.internal.y0.h.e eVar, kotlin.reflect.w.internal.y0.d.e eVar2) {
        if (eVar == null) {
            c(19);
            throw null;
        }
        if (eVar2 == null) {
            c(20);
            throw null;
        }
        Collection<kotlin.reflect.w.internal.y0.d.d> collectionM = eVar2.m();
        if (collectionM.size() != 1) {
            return null;
        }
        for (h1 h1Var : collectionM.iterator().next().h()) {
            if (h1Var.getName().equals(eVar)) {
                return h1Var;
            }
        }
        return null;
    }

    public static void V1(String str) {
        j(f5272d, 3, f5271c, str);
    }

    public static int V2(byte[] bArr, int i2, int i3) {
        while (i2 < i3 && bArr[i2] >= 0) {
            i2++;
        }
        if (i2 >= i3) {
            return 0;
        }
        while (i2 < i3) {
            int i4 = i2 + 1;
            byte b2 = bArr[i2];
            if (b2 < 0) {
                if (b2 < -32) {
                    if (i4 >= i3) {
                        return b2;
                    }
                    if (b2 >= -62) {
                        i2 = i4 + 1;
                        if (bArr[i4] > -65) {
                        }
                    }
                    return -1;
                }
                if (b2 < -16) {
                    if (i4 >= i3 - 1) {
                        return Y1(bArr, i4, i3);
                    }
                    int i5 = i4 + 1;
                    byte b3 = bArr[i4];
                    if (b3 <= -65 && ((b2 != -32 || b3 >= -96) && (b2 != -19 || b3 < -96))) {
                        i2 = i5 + 1;
                        if (bArr[i5] > -65) {
                        }
                    }
                    return -1;
                }
                if (i4 >= i3 - 2) {
                    return Y1(bArr, i4, i3);
                }
                int i6 = i4 + 1;
                byte b4 = bArr[i4];
                if (b4 <= -65) {
                    if ((((b4 + 112) + (b2 << BinaryMemcacheOpcodes.TOUCH)) >> 30) == 0) {
                        int i7 = i6 + 1;
                        if (bArr[i6] <= -65) {
                            i4 = i7 + 1;
                            if (bArr[i7] > -65) {
                            }
                        }
                    }
                }
                return -1;
            }
            i2 = i4;
        }
        return 0;
    }

    public static void V3(boolean z2, String str) {
        j(z2, 1, f5271c, str);
    }

    public static final boolean W(short[] sArr, short s2) {
        o.f(sArr, "<this>");
        o.f(sArr, "<this>");
        int length = sArr.length;
        int i2 = 0;
        while (true) {
            if (i2 >= length) {
                i2 = -1;
                break;
            }
            if (s2 == sArr[i2]) {
                break;
            }
            i2++;
        }
        return i2 >= 0;
    }

    public static List<kotlin.reflect.w.internal.y0.d.p1.b.e> W0(kotlin.reflect.w.internal.y0.d.p1.b.h hVar) {
        Annotation[] declaredAnnotations;
        AnnotatedElement element = hVar.getElement();
        return (element == null || (declaredAnnotations = element.getDeclaredAnnotations()) == null) ? EmptyList.f9307f : X0(declaredAnnotations);
    }

    public static int W1(int i2, int i3) {
        if (i2 > -12 || i3 > -65) {
            return -1;
        }
        return i2 ^ (i3 << 8);
    }

    public static void W2(int i2, String str, String str2) {
        switch (i2) {
            case 1:
                Log.v(str, str2);
                break;
            case 2:
                Log.d(str, str2);
                break;
            case 3:
                Log.i(str, str2);
                break;
            case 4:
                Log.w(str, str2);
                break;
            case 5:
                Log.e(str, str2);
                break;
            case 6:
                Log.wtf(str, str2);
                break;
        }
    }

    public static void W3(String str) {
        j(f5272d, 4, f5271c, str);
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static final int X(h0 h0Var) {
        o.f(h0Var, "<this>");
        kotlin.reflect.w.internal.y0.d.l1.c cVarG = h0Var.getAnnotations().g(i.a.f6531r);
        if (cVarG == null) {
            return 0;
        }
        kotlin.reflect.w.internal.y0.k.x.g gVar = (kotlin.reflect.w.internal.y0.k.x.g) kotlin.collections.j.z(cVarG.a(), kotlin.reflect.w.internal.y0.c.i.f6498c);
        o.d(gVar, "null cannot be cast to non-null type org.jetbrains.kotlin.resolve.constants.IntValue");
        return ((Number) ((kotlin.reflect.w.internal.y0.k.x.n) gVar).a).intValue();
    }

    public static final List<kotlin.reflect.w.internal.y0.d.p1.b.e> X0(Annotation[] annotationArr) {
        o.f(annotationArr, "<this>");
        ArrayList arrayList = new ArrayList(annotationArr.length);
        for (Annotation annotation : annotationArr) {
            arrayList.add(new kotlin.reflect.w.internal.y0.d.p1.b.e(annotation));
        }
        return arrayList;
    }

    public static int X1(int i2, int i3, int i4) {
        if (i2 > -12 || i3 > -65 || i4 > -65) {
            return -1;
        }
        return (i2 ^ (i3 << 8)) ^ (i4 << 16);
    }

    public static final kotlin.reflect.w.internal.y0.h.e X2(kotlin.reflect.w.internal.y0.h.e eVar, boolean z2) {
        o.f(eVar, "methodName");
        return Y2(eVar, "set", false, z2 ? "is" : null, 4);
    }

    public static void X3(boolean z2, String str) {
        j(z2, 4, f5271c, str);
    }

    public static final <T> Collection<T> Y(Iterable<? extends T> iterable, Iterable<? extends T> iterable2) {
        o.f(iterable, "<this>");
        o.f(iterable2, "source");
        if (!(iterable instanceof Set)) {
            if (iterable instanceof Collection) {
                if (((Collection) iterable2).size() >= 2) {
                    Collection<T> collection = (Collection) iterable;
                    if (!(CollectionSystemProperties.a && collection.size() > 2 && (collection instanceof ArrayList))) {
                        return collection;
                    }
                }
            } else if (!CollectionSystemProperties.a) {
                return kotlin.collections.j.i0(iterable);
            }
            return kotlin.collections.j.h0(iterable);
        }
        return (Collection) iterable;
    }

    public static final int Y0(Caller<?> caller) {
        o.f(caller, "<this>");
        return caller.a().size();
    }

    public static int Y1(byte[] bArr, int i2, int i3) {
        byte b2 = bArr[i2 - 1];
        int i4 = i3 - i2;
        if (i4 == 0) {
            if (b2 > -12) {
                return -1;
            }
            return b2;
        }
        if (i4 == 1) {
            return W1(b2, bArr[i2]);
        }
        if (i4 == 2) {
            return X1(b2, bArr[i2], bArr[i2 + 1]);
        }
        throw new AssertionError();
    }

    /* JADX WARN: Code restructure failed: missing block: B:67:0x0125, code lost:
    
        if (kotlin.reflect.w.internal.y0.h.e.j(r5) == false) goto L68;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static kotlin.reflect.w.internal.y0.h.e Y2(kotlin.reflect.w.internal.y0.h.e r5, java.lang.String r6, boolean r7, java.lang.String r8, int r9) {
        /*
            Method dump skipped, instruction units count: 302
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.h.a.i.Y2(r.i0.w.b.y0.h.e, java.lang.String, boolean, java.lang.String, int):r.i0.w.b.y0.h.e");
    }

    public static final <T> Iterable<IndexedValue<T>> Y3(T[] tArr) {
        o.f(tArr, "<this>");
        return new IndexingIterable(new kotlin.collections.m(tArr));
    }

    public static final s Z(x1 x1Var) {
        o.f(x1Var, "<this>");
        int iOrdinal = x1Var.ordinal();
        if (iOrdinal == 0) {
            return s.INV;
        }
        if (iOrdinal == 1) {
            return s.IN;
        }
        if (iOrdinal == 2) {
            return s.OUT;
        }
        throw new NoWhenBranchMatchedException();
    }

    public static int Z0() {
        int i2 = f5274f;
        if (i2 != 0) {
            return i2;
        }
        String str = SystemProperties.get("ro.cvte.ic", "");
        int i3 = str.equals("MSD638") ? 3 : str.equals("MSD608") ? 1 : str.equals("MSD6369") ? 2 : str.equals("MTK5508") ? 5 : str.equals("3288") ? 6 : str.equals("510") ? 7 : str.equals("3399") ? 11 : str.equals("620") ? 8 : str.equals("551") ? 9 : str.equals("811") ? 10 : str.equals("MSD8386") ? 4 : 12;
        f5274f = i3;
        return i3;
    }

    public static final int Z1(int[] iArr, int i2) {
        o.f(iArr, "<this>");
        int length = iArr.length;
        for (int i3 = 0; i3 < length; i3++) {
            if (i2 == iArr[i3]) {
                return i3;
            }
        }
        return -1;
    }

    public static final byte[] Z2(InputStream inputStream) throws IOException {
        o.f(inputStream, "<this>");
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(Math.max(8192, inputStream.available()));
        c0(inputStream, byteArrayOutputStream, 8192);
        byte[] byteArray = byteArrayOutputStream.toByteArray();
        o.e(byteArray, "buffer.toByteArray()");
        return byteArray;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static final w1 Z3(w1 w1Var, h0 h0Var) {
        o.f(w1Var, "<this>");
        if (w1Var instanceof v1) {
            return Z3(((v1) w1Var).D0(), h0Var);
        }
        if (h0Var == null || o.a(h0Var, w1Var)) {
            return w1Var;
        }
        if (w1Var instanceof kotlin.reflect.w.internal.y0.n.o0) {
            return new r0((kotlin.reflect.w.internal.y0.n.o0) w1Var, h0Var);
        }
        if (w1Var instanceof b0) {
            return new kotlin.reflect.w.internal.y0.n.d0((b0) w1Var, h0Var);
        }
        throw new NoWhenBranchMatchedException();
    }

    public static /* synthetic */ void a(int i2) {
        Object[] objArr = new Object[3];
        objArr[0] = "initializer";
        objArr[1] = "kotlin/reflect/jvm/internal/ReflectProperties";
        if (i2 == 1 || i2 == 2) {
            objArr[2] = "lazySoft";
        } else {
            objArr[2] = "lazy";
        }
        throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
    }

    public static final void a0(int i2, int i3) {
        if (i2 > i3) {
            throw new IndexOutOfBoundsException(g.a.a.a.a.p("toIndex (", i2, ") is greater than size (", i3, ")."));
        }
    }

    public static final Object a1(KPropertyImpl.a<?, ?> aVar) {
        o.f(aVar, "<this>");
        KPropertyImpl<?> kPropertyImplS = aVar.s();
        return F(kPropertyImplS.f6284t, kPropertyImplS.o());
    }

    public static final <T> int a2(T[] tArr, T t2) {
        o.f(tArr, "<this>");
        int i2 = 0;
        if (t2 == null) {
            int length = tArr.length;
            while (i2 < length) {
                if (tArr[i2] == null) {
                    return i2;
                }
                i2++;
            }
            return -1;
        }
        int length2 = tArr.length;
        while (i2 < length2) {
            if (o.a(t2, tArr[i2])) {
                return i2;
            }
            i2++;
        }
        return -1;
    }

    public static final kotlin.reflect.w.internal.y0.g.q a3(kotlin.reflect.w.internal.y0.g.i iVar, kotlin.reflect.w.internal.y0.g.z.e eVar) {
        o.f(iVar, "<this>");
        o.f(eVar, "typeTable");
        if (iVar.s()) {
            return iVar.f7845w;
        }
        if (iVar.t()) {
            return eVar.a(iVar.f7846x);
        }
        return null;
    }

    public static o1 a4(o1 o1Var, boolean z2, int i2) {
        if ((i2 & 1) != 0) {
            z2 = true;
        }
        o.f(o1Var, "<this>");
        if (!(o1Var instanceof kotlin.reflect.w.internal.y0.n.e0)) {
            return new kotlin.reflect.w.internal.y0.k.w.a.e(o1Var, z2);
        }
        kotlin.reflect.w.internal.y0.n.e0 e0Var = (kotlin.reflect.w.internal.y0.n.e0) o1Var;
        b1[] b1VarArr = e0Var.f8911b;
        List listB4 = b4(e0Var.f8912c, b1VarArr);
        ArrayList arrayList = new ArrayList(H(listB4, 10));
        for (Pair pair : (ArrayList) listB4) {
            arrayList.add(g0((l1) pair.f5909f, (b1) pair.f5910m));
        }
        Object[] array = arrayList.toArray(new l1[0]);
        o.d(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
        return new kotlin.reflect.w.internal.y0.n.e0(b1VarArr, (l1[]) array, z2);
    }

    public static /* synthetic */ void b(int i2) {
        Object[] objArr = new Object[3];
        if (i2 == 1 || i2 == 2) {
            objArr[0] = "companionObject";
        } else if (i2 != 3) {
            objArr[0] = "propertyDescriptor";
        } else {
            objArr[0] = "memberDescriptor";
        }
        objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/DescriptorsJvmAbiUtil";
        if (i2 == 1) {
            objArr[2] = "isClassCompanionObjectWithBackingFieldsInOuter";
        } else if (i2 == 2) {
            objArr[2] = "isMappedIntrinsicCompanionObject";
        } else if (i2 != 3) {
            objArr[2] = "isPropertyWithBackingFieldInOuterClass";
        } else {
            objArr[2] = "hasJvmFieldAnnotation";
        }
        throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
    }

    public static final <T> T[] b0(T[] tArr, int i2) {
        o.f(tArr, "<this>");
        T[] tArr2 = (T[]) Arrays.copyOf(tArr, i2);
        o.e(tArr2, "copyOf(this, newSize)");
        o.d(tArr2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.builders.ListBuilderKt.copyOfUninitializedElements>");
        return tArr2;
    }

    public static final kotlin.reflect.w.internal.y0.h.b b1(kotlin.reflect.w.internal.y0.g.z.c cVar, int i2) {
        o.f(cVar, "<this>");
        kotlin.reflect.w.internal.y0.h.b bVarF = kotlin.reflect.w.internal.y0.h.b.f(cVar.a(i2), cVar.c(i2));
        o.e(bVarF, "fromString(getQualifiedC… isLocalClassName(index))");
        return bVarF;
    }

    public static final w1 b2(w1 w1Var, h0 h0Var) {
        o.f(w1Var, "<this>");
        o.f(h0Var, "origin");
        return Z3(w1Var, f1(h0Var));
    }

    public static final void b3(kotlin.reflect.w.internal.y0.e.a.c cVar, kotlin.reflect.w.internal.y0.e.a.b bVar, kotlin.reflect.w.internal.y0.d.e eVar, kotlin.reflect.w.internal.y0.h.e eVar2) {
        kotlin.reflect.w.internal.y0.e.a.a aVarB;
        o.f(cVar, "<this>");
        o.f(bVar, "from");
        o.f(eVar, "scopeOwner");
        o.f(eVar2, "name");
        if (cVar == c.a.a || (aVarB = bVar.b()) == null) {
            return;
        }
        kotlin.reflect.w.internal.y0.e.a.e eVarB = cVar.a() ? aVarB.b() : kotlin.reflect.w.internal.y0.e.a.e.f7023m;
        String strA = aVarB.a();
        String strB = kotlin.reflect.w.internal.y0.k.h.g(eVar).b();
        o.e(strB, "getFqName(scopeOwner).asString()");
        kotlin.reflect.w.internal.y0.e.a.f fVar = kotlin.reflect.w.internal.y0.e.a.f.CLASSIFIER;
        String strE = eVar2.e();
        o.e(strE, "name.asString()");
        cVar.b(strA, eVarB, strB, fVar, strE);
    }

    public static final <T, R> List<Pair<T, R>> b4(T[] tArr, R[] rArr) {
        o.f(tArr, "<this>");
        o.f(rArr, "other");
        int iMin = Math.min(tArr.length, rArr.length);
        ArrayList arrayList = new ArrayList(iMin);
        for (int i2 = 0; i2 < iMin; i2++) {
            arrayList.add(new Pair(tArr[i2], rArr[i2]));
        }
        return arrayList;
    }

    public static /* synthetic */ void c(int i2) {
        String str = i2 != 18 ? "Argument for @NotNull parameter '%s' of %s.%s must not be null" : "@NotNull method %s.%s must not return null";
        Object[] objArr = new Object[i2 != 18 ? 3 : 2];
        switch (i2) {
            case 1:
            case 7:
            case 13:
                objArr[0] = "membersFromSupertypes";
                break;
            case 2:
            case 8:
            case 14:
                objArr[0] = "membersFromCurrent";
                break;
            case 3:
            case 9:
            case 15:
                objArr[0] = "classDescriptor";
                break;
            case 4:
            case 10:
            case 16:
                objArr[0] = "errorReporter";
                break;
            case 5:
            case 11:
            case 17:
                objArr[0] = "overridingUtil";
                break;
            case 6:
            case 12:
            case 19:
            default:
                objArr[0] = "name";
                break;
            case 18:
                objArr[0] = "kotlin/reflect/jvm/internal/impl/load/java/components/DescriptorResolverUtils";
                break;
            case 20:
                objArr[0] = "annotationClass";
                break;
        }
        if (i2 != 18) {
            objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/components/DescriptorResolverUtils";
        } else {
            objArr[1] = "resolveOverrides";
        }
        switch (i2) {
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
            case 11:
                objArr[2] = "resolveOverridesForStaticMembers";
                break;
            case 12:
            case 13:
            case 14:
            case 15:
            case 16:
            case 17:
                objArr[2] = "resolveOverrides";
                break;
            case 18:
                break;
            case 19:
            case 20:
                objArr[2] = "getAnnotationParameterByName";
                break;
            default:
                objArr[2] = "resolveOverridesForNonStaticMembers";
                break;
        }
        String str2 = String.format(str, objArr);
        if (i2 == 18) {
            throw new IllegalStateException(str2);
        }
    }

    public static final long c0(InputStream inputStream, OutputStream outputStream, int i2) throws IOException {
        o.f(inputStream, "<this>");
        o.f(outputStream, "out");
        byte[] bArr = new byte[i2];
        int i3 = inputStream.read(bArr);
        long j2 = 0;
        while (i3 >= 0) {
            outputStream.write(bArr, 0, i3);
            j2 += (long) i3;
            i3 = inputStream.read(bArr);
        }
        return j2;
    }

    @TargetApi(19)
    public static int c1(BluetoothProfile bluetoothProfile, String str, BluetoothDevice bluetoothDevice) {
        String string;
        StringBuilder sbF;
        String string2;
        if (bluetoothDevice == null) {
            return 0;
        }
        try {
            Method method = bluetoothProfile.getClass().asSubclass(Class.forName(str)).getMethod("getConnectionState", BluetoothDevice.class);
            method.setAccessible(true);
            return ((Integer) method.invoke(bluetoothProfile, bluetoothDevice)).intValue();
        } catch (ClassNotFoundException e2) {
            sbF = g.a.a.a.a.K("Could not find clas: ", str, ", ignoring request.");
            string2 = e2.toString();
            sbF.append(string2);
            string = sbF.toString();
            W3(string);
            return 0;
        } catch (IllegalAccessException e3) {
            e = e3;
            sbF = g.a.a.a.a.F("Could not execute method 'connect' in profile CLASS_NAME, ignoring request.");
            string2 = e.toString();
            sbF.append(string2);
            string = sbF.toString();
            W3(string);
            return 0;
        } catch (NoSuchMethodException unused) {
            string = "No connect method in the CLASS_NAME class, ignoring request.";
            W3(string);
            return 0;
        } catch (InvocationTargetException e4) {
            e = e4;
            sbF = g.a.a.a.a.F("Could not execute method 'connect' in profile CLASS_NAME, ignoring request.");
            string2 = e.toString();
            sbF.append(string2);
            string = sbF.toString();
            W3(string);
            return 0;
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static final <T> Continuation<T> c2(Continuation<? super T> continuation) {
        Continuation<T> continuation2;
        o.f(continuation, "<this>");
        ContinuationImpl continuationImpl = continuation instanceof ContinuationImpl ? (ContinuationImpl) continuation : null;
        return (continuationImpl == null || (continuation2 = (Continuation<T>) continuationImpl.intercepted()) == null) ? continuation : continuation2;
    }

    public static final void c3(kotlin.reflect.w.internal.y0.e.a.c cVar, kotlin.reflect.w.internal.y0.e.a.b bVar, kotlin.reflect.w.internal.y0.d.h0 h0Var, kotlin.reflect.w.internal.y0.h.e eVar) {
        kotlin.reflect.w.internal.y0.e.a.a aVarB;
        o.f(cVar, "<this>");
        o.f(bVar, "from");
        o.f(h0Var, "scopeOwner");
        o.f(eVar, "name");
        String strB = h0Var.d().b();
        o.e(strB, "scopeOwner.fqName.asString()");
        String strE = eVar.e();
        o.e(strE, "name.asString()");
        o.f(cVar, "<this>");
        o.f(bVar, "from");
        o.f(strB, "packageFqName");
        o.f(strE, "name");
        if (cVar == c.a.a || (aVarB = bVar.b()) == null) {
            return;
        }
        cVar.b(aVarB.a(), cVar.a() ? aVarB.b() : kotlin.reflect.w.internal.y0.e.a.e.f7023m, strB, kotlin.reflect.w.internal.y0.e.a.f.PACKAGE, strE);
    }

    public static /* synthetic */ void d(int i2) {
        String str = (i2 == 12 || i2 == 23 || i2 == 25) ? "@NotNull method %s.%s must not return null" : "Argument for @NotNull parameter '%s' of %s.%s must not be null";
        Object[] objArr = new Object[(i2 == 12 || i2 == 23 || i2 == 25) ? 2 : 3];
        switch (i2) {
            case 1:
            case 4:
            case 8:
            case 14:
            case 16:
            case 18:
            case 30:
            case 32:
            case 34:
                objArr[0] = "annotations";
                break;
            case 2:
            case 5:
            case 9:
                objArr[0] = "parameterAnnotations";
                break;
            case 3:
            case 7:
            case 13:
            case 15:
            case 17:
            default:
                objArr[0] = "propertyDescriptor";
                break;
            case 6:
            case 11:
            case 19:
                objArr[0] = "sourceElement";
                break;
            case 10:
                objArr[0] = "visibility";
                break;
            case 12:
            case 23:
            case 25:
                objArr[0] = "kotlin/reflect/jvm/internal/impl/resolve/DescriptorFactory";
                break;
            case 20:
                objArr[0] = "containingClass";
                break;
            case 21:
                objArr[0] = "source";
                break;
            case 22:
            case 24:
                objArr[0] = "enumClass";
                break;
            case 26:
            case 27:
            case 28:
                objArr[0] = "descriptor";
                break;
            case 29:
            case 31:
            case 33:
                objArr[0] = "owner";
                break;
        }
        if (i2 == 12) {
            objArr[1] = "createSetter";
        } else if (i2 == 23) {
            objArr[1] = "createEnumValuesMethod";
        } else if (i2 != 25) {
            objArr[1] = "kotlin/reflect/jvm/internal/impl/resolve/DescriptorFactory";
        } else {
            objArr[1] = "createEnumValueOfMethod";
        }
        switch (i2) {
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
            case 11:
                objArr[2] = "createSetter";
                break;
            case 12:
            case 23:
            case 25:
                break;
            case 13:
            case 14:
                objArr[2] = "createDefaultGetter";
                break;
            case 15:
            case 16:
            case 17:
            case 18:
            case 19:
                objArr[2] = "createGetter";
                break;
            case 20:
            case 21:
                objArr[2] = "createPrimaryConstructorForObject";
                break;
            case 22:
                objArr[2] = "createEnumValuesMethod";
                break;
            case 24:
                objArr[2] = "createEnumValueOfMethod";
                break;
            case 26:
                objArr[2] = "isEnumValuesMethod";
                break;
            case 27:
                objArr[2] = "isEnumValueOfMethod";
                break;
            case 28:
                objArr[2] = "isEnumSpecialMethod";
                break;
            case 29:
            case 30:
                objArr[2] = "createExtensionReceiverParameterForCallable";
                break;
            case 31:
            case 32:
                objArr[2] = "createContextReceiverParameterForCallable";
                break;
            case 33:
            case 34:
                objArr[2] = "createContextReceiverParameterForClass";
                break;
            default:
                objArr[2] = "createDefaultSetter";
                break;
        }
        String str2 = String.format(str, objArr);
        if (i2 != 12 && i2 != 23 && i2 != 25) {
            throw new IllegalArgumentException(str2);
        }
        throw new IllegalStateException(str2);
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static final List<h1> d0(Collection<? extends h0> collection, Collection<? extends h1> collection2, kotlin.reflect.w.internal.y0.d.a aVar) {
        o.f(collection, "newValueParameterTypes");
        o.f(collection2, "oldValueParameters");
        o.f(aVar, "newOwner");
        collection.size();
        collection2.size();
        List listQ0 = kotlin.collections.j.q0(collection, collection2);
        ArrayList arrayList = new ArrayList(H(listQ0, 10));
        for (Pair pair : (ArrayList) listQ0) {
            h0 h0Var = (h0) pair.f5909f;
            h1 h1Var = (h1) pair.f5910m;
            int i2 = h1Var.i();
            kotlin.reflect.w.internal.y0.d.l1.h annotations = h1Var.getAnnotations();
            kotlin.reflect.w.internal.y0.h.e name = h1Var.getName();
            o.e(name, "oldParameter.name");
            boolean zT0 = h1Var.t0();
            boolean zA0 = h1Var.a0();
            boolean zX = h1Var.X();
            h0 h0VarG = h1Var.k0() != null ? kotlin.reflect.w.internal.y0.k.z.a.k(aVar).o().g(h0Var) : null;
            w0 w0VarJ = h1Var.j();
            o.e(w0VarJ, "oldParameter.source");
            arrayList.add(new kotlin.reflect.w.internal.y0.d.n1.o0(aVar, null, i2, annotations, name, h0Var, zT0, zA0, zX, h0VarG, w0VarJ));
        }
        return arrayList;
    }

    public static final List<h0> d1(h0 h0Var) {
        o.f(h0Var, "<this>");
        i2(h0Var);
        int iX = X(h0Var);
        if (iX == 0) {
            return EmptyList.f9307f;
        }
        List<l1> listSubList = h0Var.J0().subList(0, iX);
        ArrayList arrayList = new ArrayList(H(listSubList, 10));
        Iterator<T> it = listSubList.iterator();
        while (it.hasNext()) {
            h0 type = ((l1) it.next()).getType();
            o.e(type, "it.type");
            arrayList.add(type);
        }
        return arrayList;
    }

    public static final w1 d2(List<? extends w1> list) {
        kotlin.reflect.w.internal.y0.n.o0 o0Var;
        o.f(list, "types");
        int size = list.size();
        if (size == 0) {
            throw new IllegalStateException("Expected some types".toString());
        }
        if (size == 1) {
            return (w1) kotlin.collections.j.Z(list);
        }
        ArrayList arrayList = new ArrayList(H(list, 10));
        boolean z2 = false;
        boolean z3 = false;
        for (w1 w1Var : list) {
            z2 = z2 || o2(w1Var);
            if (w1Var instanceof kotlin.reflect.w.internal.y0.n.o0) {
                o0Var = (kotlin.reflect.w.internal.y0.n.o0) w1Var;
            } else {
                if (!(w1Var instanceof b0)) {
                    throw new NoWhenBranchMatchedException();
                }
                if (k2(w1Var)) {
                    return w1Var;
                }
                o0Var = ((b0) w1Var).f8878m;
                z3 = true;
            }
            arrayList.add(o0Var);
        }
        if (z2) {
            return kotlin.reflect.w.internal.y0.n.a2.j.c(kotlin.reflect.w.internal.y0.n.a2.i.INTERSECTION_OF_ERROR_TYPES, list.toString());
        }
        if (!z3) {
            return kotlin.reflect.w.internal.y0.n.z1.r.a.b(arrayList);
        }
        ArrayList arrayList2 = new ArrayList(H(list, 10));
        Iterator<T> it = list.iterator();
        while (it.hasNext()) {
            arrayList2.add(T3((w1) it.next()));
        }
        kotlin.reflect.w.internal.y0.n.z1.r rVar = kotlin.reflect.w.internal.y0.n.z1.r.a;
        return kotlin.reflect.w.internal.y0.n.i0.c(rVar.b(arrayList), rVar.b(arrayList2));
    }

    /* JADX WARN: Removed duplicated region for block: B:18:0x003a  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final java.lang.String d3(kotlin.reflect.w.internal.y0.h.e r7) {
        /*
            java.lang.String r0 = "<this>"
            kotlin.jvm.internal.o.f(r7, r0)
            java.lang.String r0 = r7.e()
            java.lang.String r1 = "asString()"
            kotlin.jvm.internal.o.e(r0, r1)
            java.util.Set<java.lang.String> r2 = kotlin.reflect.w.internal.y0.j.m.a
            boolean r2 = r2.contains(r0)
            r3 = 0
            r4 = 1
            if (r2 != 0) goto L3a
            r2 = r3
        L19:
            int r5 = r0.length()
            if (r2 >= r5) goto L37
            char r5 = r0.charAt(r2)
            boolean r6 = java.lang.Character.isLetterOrDigit(r5)
            if (r6 != 0) goto L2f
            r6 = 95
            if (r5 == r6) goto L2f
            r5 = r4
            goto L30
        L2f:
            r5 = r3
        L30:
            if (r5 == 0) goto L34
            r0 = r4
            goto L38
        L34:
            int r2 = r2 + 1
            goto L19
        L37:
            r0 = r3
        L38:
            if (r0 == 0) goto L3b
        L3a:
            r3 = r4
        L3b:
            if (r3 == 0) goto L65
            java.lang.StringBuilder r0 = new java.lang.StringBuilder
            r0.<init>()
            java.lang.String r7 = r7.e()
            kotlin.jvm.internal.o.e(r7, r1)
            java.lang.StringBuilder r1 = new java.lang.StringBuilder
            r1.<init>()
            r2 = 96
            r1.append(r2)
            r1.append(r7)
            java.lang.String r7 = r1.toString()
            r0.append(r7)
            r0.append(r2)
            java.lang.String r7 = r0.toString()
            goto L6c
        L65:
            java.lang.String r7 = r7.e()
            kotlin.jvm.internal.o.e(r7, r1)
        L6c:
            return r7
        */
        throw new UnsupportedOperationException("Method not decompiled: g.h.a.i.d3(r.i0.w.b.y0.h.e):java.lang.String");
    }

    public static /* synthetic */ void e(int i2) {
        String str = i2 != 4 ? "Argument for @NotNull parameter '%s' of %s.%s must not be null" : "@NotNull method %s.%s must not return null";
        Object[] objArr = new Object[i2 != 4 ? 3 : 2];
        switch (i2) {
            case 1:
            case 6:
                objArr[0] = "originalSubstitution";
                break;
            case 2:
            case 7:
                objArr[0] = "newContainingDeclaration";
                break;
            case 3:
            case 8:
                objArr[0] = "result";
                break;
            case 4:
                objArr[0] = "kotlin/reflect/jvm/internal/impl/types/DescriptorSubstitutor";
                break;
            case 5:
            default:
                objArr[0] = "typeParameters";
                break;
        }
        if (i2 != 4) {
            objArr[1] = "kotlin/reflect/jvm/internal/impl/types/DescriptorSubstitutor";
        } else {
            objArr[1] = "substituteTypeParameters";
        }
        if (i2 != 4) {
            objArr[2] = "substituteTypeParameters";
        }
        String str2 = String.format(str, objArr);
        if (i2 == 4) {
            throw new IllegalStateException(str2);
        }
    }

    public static final kotlin.reflect.w.internal.y0.f.a.p0.g e0(kotlin.reflect.w.internal.y0.f.a.p0.g gVar, kotlin.reflect.w.internal.y0.d.l1.h hVar) {
        o.f(gVar, "<this>");
        o.f(hVar, "additionalAnnotations");
        return hVar.isEmpty() ? gVar : new kotlin.reflect.w.internal.y0.f.a.p0.g(gVar.a, gVar.f7194b, C2(LazyThreadSafetyMode.NONE, new kotlin.reflect.w.internal.y0.f.a.p0.b(gVar, hVar)));
    }

    public static Collection e1(kotlin.reflect.w.internal.y0.k.c0.k kVar, kotlin.reflect.w.internal.y0.k.c0.d dVar, Function1 function1, int i2, Object obj) {
        Function1<kotlin.reflect.w.internal.y0.h.e, Boolean> function12;
        if ((i2 & 1) != 0) {
            dVar = kotlin.reflect.w.internal.y0.k.c0.d.f8463m;
        }
        if ((i2 & 2) != 0) {
            Objects.requireNonNull(kotlin.reflect.w.internal.y0.k.c0.i.a);
            function12 = i.a.f8481b;
        } else {
            function12 = null;
        }
        return kVar.g(dVar, function12);
    }

    public static final boolean e2(KCallable<?> kCallable) {
        o.f(kCallable, "<this>");
        if (kCallable instanceof KMutableProperty) {
            KProperty kProperty = (KProperty) kCallable;
            Field fieldM1 = m1(kProperty);
            if (fieldM1 != null ? fieldM1.isAccessible() : true) {
                o.f(kProperty, "<this>");
                Method methodN1 = n1(kProperty.t());
                if (methodN1 != null ? methodN1.isAccessible() : true) {
                    KMutableProperty kMutableProperty = (KMutableProperty) kCallable;
                    o.f(kMutableProperty, "<this>");
                    Method methodN12 = n1(kMutableProperty.g());
                    if (methodN12 != null ? methodN12.isAccessible() : true) {
                        return true;
                    }
                }
            }
        } else {
            KProperty kProperty2 = (KProperty) kCallable;
            Field fieldM12 = m1(kProperty2);
            if (fieldM12 != null ? fieldM12.isAccessible() : true) {
                o.f(kProperty2, "<this>");
                Method methodN13 = n1(kProperty2.t());
                if (methodN13 != null ? methodN13.isAccessible() : true) {
                    return true;
                }
            }
        }
        return false;
    }

    public static final String e3(List<kotlin.reflect.w.internal.y0.h.e> list) {
        o.f(list, "pathSegments");
        StringBuilder sb = new StringBuilder();
        for (kotlin.reflect.w.internal.y0.h.e eVar : list) {
            if (sb.length() > 0) {
                sb.append(DefaultDnsRecordDecoder.ROOT);
            }
            sb.append(d3(eVar));
        }
        String string = sb.toString();
        o.e(string, "StringBuilder().apply(builderAction).toString()");
        return string;
    }

    public static int f(int i2) {
        switch (i2) {
            case 10128:
                return 0;
            case 10129:
                return 1;
            case 10130:
                return 2;
            case 10131:
                return 3;
            case 10132:
                return 4;
            case 10133:
                return 5;
            case 10134:
                return 6;
            case 10135:
                return 7;
            case 10136:
                return 8;
            default:
                return DnsRecord.CLASS_NONE;
        }
    }

    public static final <T> T f0(Class<T> cls, Map<String, ? extends Object> map, List<Method> list) {
        o.f(cls, "annotationClass");
        o.f(map, "values");
        o.f(list, "methods");
        Lazy lazyD2 = D2(new kotlin.reflect.w.internal.calls.b(map));
        T t2 = (T) Proxy.newProxyInstance(cls.getClassLoader(), new Class[]{cls}, new kotlin.reflect.w.internal.calls.c(cls, map, D2(new kotlin.reflect.w.internal.calls.e(cls, map)), lazyD2, list));
        o.d(t2, "null cannot be cast to non-null type T of kotlin.reflect.jvm.internal.calls.AnnotationConstructorCallerKt.createAnnotationInstance");
        return t2;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static final h0 f1(h0 h0Var) {
        o.f(h0Var, "<this>");
        if (h0Var instanceof v1) {
            return ((v1) h0Var).F();
        }
        return null;
    }

    public static boolean f2(Context context, String str) {
        String strK1 = K1(context);
        if (strK1 == null || strK1.isEmpty()) {
            return false;
        }
        return strK1.equals(str);
    }

    /* JADX WARN: Removed duplicated region for block: B:12:0x002f  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final boolean f3(kotlin.reflect.w.internal.y0.n.h0 r4) {
        /*
            java.lang.String r0 = "<this>"
            kotlin.jvm.internal.o.f(r4, r0)
            r.i0.w.b.y0.n.e1 r1 = r4.L0()
            r.i0.w.b.y0.d.h r1 = r1.c()
            r2 = 0
            r3 = 1
            if (r1 == 0) goto L2f
            kotlin.jvm.internal.o.f(r1, r0)
            boolean r0 = kotlin.reflect.w.internal.y0.k.j.b(r1)
            if (r0 == 0) goto L2a
            r.i0.w.b.y0.d.e r1 = (kotlin.reflect.w.internal.y0.d.e) r1
            r.i0.w.b.y0.h.c r0 = kotlin.reflect.w.internal.y0.k.z.a.g(r1)
            r.i0.w.b.y0.h.c r1 = kotlin.reflect.w.internal.y0.c.i.f6501f
            boolean r0 = kotlin.jvm.internal.o.a(r0, r1)
            if (r0 != 0) goto L2a
            r0 = r3
            goto L2b
        L2a:
            r0 = r2
        L2b:
            if (r0 != r3) goto L2f
            r0 = r3
            goto L30
        L2f:
            r0 = r2
        L30:
            if (r0 != 0) goto L38
            boolean r4 = v2(r4)
            if (r4 == 0) goto L39
        L38:
            r2 = r3
        L39:
            return r2
        */
        throw new UnsupportedOperationException("Method not decompiled: g.h.a.i.f3(r.i0.w.b.y0.n.h0):boolean");
    }

    public static int g(int i2, int i3) {
        if (i2 > i3) {
            return 1;
        }
        return i2 == i3 ? 0 : -1;
    }

    public static final l1 g0(l1 l1Var, b1 b1Var) {
        if (b1Var == null || l1Var.b() == x1.INVARIANT) {
            return l1Var;
        }
        if (b1Var.n() != l1Var.b()) {
            o.f(l1Var, "typeProjection");
            kotlin.reflect.w.internal.y0.k.w.a.c cVar = new kotlin.reflect.w.internal.y0.k.w.a.c(l1Var);
            Objects.requireNonNull(kotlin.reflect.w.internal.y0.n.c1.f8889m);
            return new n1(new kotlin.reflect.w.internal.y0.k.w.a.a(l1Var, cVar, false, kotlin.reflect.w.internal.y0.n.c1.f8890n));
        }
        if (!l1Var.c()) {
            return new n1(l1Var.getType());
        }
        kotlin.reflect.w.internal.y0.m.m mVar = kotlin.reflect.w.internal.y0.m.e.f8800b;
        o.e(mVar, "NO_LOCKS");
        return new n1(new kotlin.reflect.w.internal.y0.n.k0(mVar, new kotlin.reflect.w.internal.y0.k.w.a.d(l1Var)));
    }

    public static final h0 g1(kotlin.reflect.w.internal.y0.d.b bVar) {
        s0 s0VarL0 = bVar.l0();
        s0 s0VarE0 = bVar.e0();
        if (s0VarL0 != null) {
            return s0VarL0.getType();
        }
        if (s0VarE0 == null) {
            return null;
        }
        if (bVar instanceof kotlin.reflect.w.internal.y0.d.j) {
            return s0VarE0.getType();
        }
        k kVarB = bVar.b();
        kotlin.reflect.w.internal.y0.d.e eVar = kVarB instanceof kotlin.reflect.w.internal.y0.d.e ? (kotlin.reflect.w.internal.y0.d.e) kVarB : null;
        if (eVar != null) {
            return eVar.s();
        }
        return null;
    }

    @Deprecated
    public static boolean g2(Context context, String str) {
        if (!"".equals(str)) {
            try {
                return context.getPackageManager().getApplicationEnabledSetting(str) != 2;
            } catch (Exception e2) {
                Log.i("ActivityUtils", str + "doesn't have label", e2);
            }
        }
        return false;
    }

    public static final <E> void g3(E[] eArr, int i2) {
        o.f(eArr, "<this>");
        eArr[i2] = null;
    }

    public static int h(int i2, int i3, int i4) {
        if (i3 <= 0) {
            return i2;
        }
        if (i4 == 1) {
            return (i2 >> 24) & DnsRecord.CLASS_ANY;
        }
        if (i4 == 515) {
            return (i2 & DnsRecord.CLASS_ANY) | ((i2 >> 8) & DnsRecord.CLASS_ANY);
        }
        if (i4 == 2) {
            return i2 & DnsRecord.CLASS_ANY;
        }
        if (i4 == 3) {
            return (i2 >> 27) & 31;
        }
        if (i4 == 5) {
            return (i2 >> 21) & 2047;
        }
        if (i4 == 4 || i4 == 7 || i4 != 514) {
            return i2;
        }
        return (i2 & DnsRecord.CLASS_ANY) | ((i2 >> 8) & DnsRecord.CLASS_ANY);
    }

    public static final kotlin.reflect.w.internal.y0.n.d1 h0(boolean z2, boolean z3, kotlin.reflect.w.internal.y0.n.z1.a aVar, kotlin.reflect.w.internal.y0.n.z1.c cVar, kotlin.reflect.w.internal.y0.n.z1.d dVar) {
        o.f(aVar, "typeSystemContext");
        o.f(cVar, "kotlinTypePreparator");
        o.f(dVar, "kotlinTypeRefiner");
        return new kotlin.reflect.w.internal.y0.n.d1(z2, z3, true, aVar, cVar, dVar);
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static final <M extends h.d<M>, T> T h1(h.d<M> dVar, h.f<M, T> fVar) {
        o.f(dVar, "<this>");
        o.f(fVar, "extension");
        if (dVar.n(fVar)) {
            return (T) dVar.m(fVar);
        }
        return null;
    }

    public static final boolean h2(h0 h0Var) {
        o.f(h0Var, "<this>");
        if (i2(h0Var)) {
            if (h0Var.getAnnotations().g(i.a.f6530q) != null) {
                return true;
            }
        }
        return false;
    }

    public static final <E> void h3(E[] eArr, int i2, int i3) {
        o.f(eArr, "<this>");
        while (i2 < i3) {
            g3(eArr, i2);
            i2++;
        }
    }

    public static void i(int i2, String str, String str2) {
        int iMax = Math.max(i2, f5273e);
        if ((iMax & 6) == 6) {
            Log.wtf(str, str2);
            return;
        }
        if ((iMax & 5) == 5) {
            Log.e(str, str2);
            return;
        }
        if ((iMax & 4) == 4) {
            Log.w(str, str2);
            return;
        }
        if ((iMax & 3) == 3) {
            Log.i(str, str2);
        } else if ((iMax & 2) == 2) {
            Log.d(str, str2);
        } else if ((iMax & 1) == 1) {
            Log.v(str, str2);
        }
    }

    public static /* synthetic */ kotlin.reflect.w.internal.y0.n.d1 i0(boolean z2, boolean z3, kotlin.reflect.w.internal.y0.n.z1.a aVar, kotlin.reflect.w.internal.y0.n.z1.c cVar, kotlin.reflect.w.internal.y0.n.z1.d dVar, int i2) {
        if ((i2 & 2) != 0) {
            z3 = true;
        }
        if ((i2 & 4) != 0) {
            aVar = kotlin.reflect.w.internal.y0.n.z1.n.a;
        }
        if ((i2 & 8) != 0) {
            cVar = c.a.a;
        }
        if ((i2 & 16) != 0) {
            dVar = d.a.a;
        }
        return h0(z2, z3, aVar, cVar, dVar);
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static final <M extends h.d<M>, T> T i1(h.d<M> dVar, h.f<M, List<T>> fVar, int i2) {
        o.f(dVar, "<this>");
        o.f(fVar, "extension");
        dVar.r(fVar);
        kotlin.reflect.w.internal.y0.i.g<h.e> gVar = dVar.f8262f;
        h.e eVar = fVar.f8273d;
        Objects.requireNonNull(gVar);
        if (!eVar.f8269o) {
            throw new IllegalArgumentException("getRepeatedField() can only be called on repeated fields.");
        }
        Object objF = gVar.f(eVar);
        if (i2 >= (objF == null ? 0 : ((List) objF).size())) {
            return null;
        }
        dVar.r(fVar);
        kotlin.reflect.w.internal.y0.i.g<h.e> gVar2 = dVar.f8262f;
        h.e eVar2 = fVar.f8273d;
        Objects.requireNonNull(gVar2);
        if (!eVar2.f8269o) {
            throw new IllegalArgumentException("getRepeatedField() can only be called on repeated fields.");
        }
        Object objF2 = gVar2.f(eVar2);
        if (objF2 != null) {
            return (T) fVar.a(((List) objF2).get(i2));
        }
        throw new IndexOutOfBoundsException();
    }

    public static final boolean i2(h0 h0Var) {
        o.f(h0Var, "<this>");
        kotlin.reflect.w.internal.y0.d.h hVarC = h0Var.L0().c();
        if (hVarC != null) {
            o.f(hVarC, "<this>");
            kotlin.reflect.w.internal.y0.c.n.c cVarK1 = k1(hVarC);
            if (cVarK1 == kotlin.reflect.w.internal.y0.c.n.c.f6572m || cVarK1 == kotlin.reflect.w.internal.y0.c.n.c.f6573n) {
                return true;
            }
        }
        return false;
    }

    public static final kotlin.reflect.w.internal.y0.d.l1.h i3(kotlin.reflect.w.internal.y0.f.a.p0.g gVar, kotlin.reflect.w.internal.y0.f.a.r0.d dVar) {
        o.f(gVar, "<this>");
        o.f(dVar, "annotationsOwner");
        return new kotlin.reflect.w.internal.y0.f.a.p0.e(gVar, dVar, false);
    }

    public static void j(boolean z2, int i2, String str, Object obj) {
        String[] strArr;
        if (z2) {
            Object[] objArr = {obj};
            StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
            if (stackTrace == null || stackTrace.length < 6) {
                strArr = null;
            } else {
                String className = stackTrace[5].getClassName();
                String[] strArrSplit = className.split("\\.");
                if (strArrSplit.length > 0) {
                    className = g.a.a.a.a.A(new StringBuilder(), strArrSplit[strArrSplit.length - 1], ".java");
                }
                if (className.contains("$")) {
                    className = g.a.a.a.a.A(new StringBuilder(), className.split("\\$")[0], ".java");
                }
                String methodName = stackTrace[5].getMethodName();
                int lineNumber = stackTrace[5].getLineNumber();
                if (lineNumber < 0) {
                    lineNumber = 0;
                }
                String str2 = methodName.substring(0, 1).toUpperCase() + methodName.substring(1);
                String str3 = str == null ? className : str;
                if (TextUtils.isEmpty(str3)) {
                    str3 = f5271c;
                }
                strArr = new String[]{str3, objArr[0].toString(), String.format(Locale.US, "[ (%s:%d)#%s ]", className, Integer.valueOf(lineNumber), str2)};
            }
            if (strArr == null || strArr.length < 3) {
                i(i2, str, (String) obj);
                return;
            }
            String str4 = strArr[0];
            String str5 = strArr[1];
            i(i2, str4, strArr[2] + str5);
        }
    }

    public static s0 j0(kotlin.reflect.w.internal.y0.d.a aVar, h0 h0Var, kotlin.reflect.w.internal.y0.d.l1.h hVar) {
        if (aVar == null) {
            d(31);
            throw null;
        }
        if (hVar == null) {
            d(32);
            throw null;
        }
        if (h0Var == null) {
            return null;
        }
        return new kotlin.reflect.w.internal.y0.d.n1.i0(aVar, new kotlin.reflect.w.internal.y0.k.c0.o.c(aVar, h0Var, null), hVar);
    }

    public static kotlin.reflect.w.internal.y0.h.c j1(kotlin.reflect.w.internal.y0.d.l1.c cVar) {
        kotlin.reflect.w.internal.y0.d.e eVarD = kotlin.reflect.w.internal.y0.k.z.a.d(cVar);
        if (eVarD == null) {
            return null;
        }
        if (kotlin.reflect.w.internal.y0.n.a2.j.f(eVarD)) {
            eVarD = null;
        }
        if (eVarD != null) {
            return kotlin.reflect.w.internal.y0.k.z.a.c(eVarD);
        }
        return null;
    }

    public static final boolean j2(h0 h0Var) {
        o.f(h0Var, "<this>");
        return h0Var.L0() instanceof kotlin.reflect.w.internal.y0.k.w.a.b;
    }

    public static final kotlin.reflect.w.internal.y0.d.e j3(e0 e0Var, kotlin.reflect.w.internal.y0.h.c cVar, kotlin.reflect.w.internal.y0.e.a.b bVar) {
        kotlin.reflect.w.internal.y0.d.h hVarF;
        kotlin.reflect.w.internal.y0.k.c0.i iVarW0;
        o.f(e0Var, "<this>");
        o.f(cVar, "fqName");
        o.f(bVar, "lookupLocation");
        if (cVar.d()) {
            return null;
        }
        kotlin.reflect.w.internal.y0.h.c cVarE = cVar.e();
        o.e(cVarE, "fqName.parent()");
        kotlin.reflect.w.internal.y0.k.c0.i iVarQ = e0Var.N(cVarE).q();
        kotlin.reflect.w.internal.y0.h.e eVarG = cVar.g();
        o.e(eVarG, "fqName.shortName()");
        kotlin.reflect.w.internal.y0.d.h hVarF2 = iVarQ.f(eVarG, bVar);
        kotlin.reflect.w.internal.y0.d.e eVar = hVarF2 instanceof kotlin.reflect.w.internal.y0.d.e ? (kotlin.reflect.w.internal.y0.d.e) hVarF2 : null;
        if (eVar != null) {
            return eVar;
        }
        kotlin.reflect.w.internal.y0.h.c cVarE2 = cVar.e();
        o.e(cVarE2, "fqName.parent()");
        kotlin.reflect.w.internal.y0.d.e eVarJ3 = j3(e0Var, cVarE2, bVar);
        if (eVarJ3 == null || (iVarW0 = eVarJ3.w0()) == null) {
            hVarF = null;
        } else {
            kotlin.reflect.w.internal.y0.h.e eVarG2 = cVar.g();
            o.e(eVarG2, "fqName.shortName()");
            hVarF = iVarW0.f(eVarG2, bVar);
        }
        if (hVarF instanceof kotlin.reflect.w.internal.y0.d.e) {
            return (kotlin.reflect.w.internal.y0.d.e) hVarF;
        }
        return null;
    }

    public static boolean k(int i2) {
        return i2 == 5 || i2 == 21 || i2 == 4 || i2 == 20 || i2 == 2 || i2 == 18 || i2 == 7 || i2 == 23 || i2 == 6 || i2 == 22;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static final <R, T> Continuation<Unit> k0(Function2<? super R, ? super Continuation<? super T>, ? extends Object> function2, R r2, Continuation<? super T> continuation) {
        o.f(function2, "<this>");
        o.f(continuation, "completion");
        o.f(continuation, "completion");
        if (function2 instanceof BaseContinuationImpl) {
            return ((BaseContinuationImpl) function2).create(r2, continuation);
        }
        CoroutineContext context = continuation.getF9433r();
        return context == EmptyCoroutineContext.f6139f ? new kotlin.coroutines.intrinsics.b(continuation, function2, r2) : new kotlin.coroutines.intrinsics.c(continuation, context, function2, r2);
    }

    public static final kotlin.reflect.w.internal.y0.c.n.c k1(k kVar) {
        o.f(kVar, "<this>");
        if (!(kVar instanceof kotlin.reflect.w.internal.y0.d.e) || !kotlin.reflect.w.internal.y0.c.f.P(kVar)) {
            return null;
        }
        kotlin.reflect.w.internal.y0.h.d dVarH = kotlin.reflect.w.internal.y0.k.z.a.h(kVar);
        if (!dVarH.f() || dVarH.e()) {
            return null;
        }
        c.a aVar = kotlin.reflect.w.internal.y0.c.n.c.f6571f;
        String strE = dVarH.h().e();
        o.e(strE, "shortName().asString()");
        kotlin.reflect.w.internal.y0.h.c cVarE = dVarH.i().e();
        o.e(cVarE, "toSafe().parent()");
        Objects.requireNonNull(aVar);
        o.f(strE, "className");
        o.f(cVarE, "packageFqName");
        c.a.C0110a c0110aA = aVar.a(strE, cVarE);
        if (c0110aA != null) {
            return c0110aA.a;
        }
        return null;
    }

    public static final boolean k2(h0 h0Var) {
        o.f(h0Var, "<this>");
        return h0Var.O0() instanceof kotlin.reflect.w.internal.y0.n.y;
    }

    public static <D extends kotlin.reflect.w.internal.y0.d.b> Collection<D> k3(kotlin.reflect.w.internal.y0.h.e eVar, Collection<D> collection, Collection<D> collection2, kotlin.reflect.w.internal.y0.d.e eVar2, kotlin.reflect.w.internal.y0.l.b.r rVar, kotlin.reflect.w.internal.y0.k.n nVar, boolean z2) {
        if (eVar == null) {
            c(12);
            throw null;
        }
        if (collection == null) {
            c(13);
            throw null;
        }
        if (collection2 == null) {
            c(14);
            throw null;
        }
        if (eVar2 == null) {
            c(15);
            throw null;
        }
        if (rVar == null) {
            c(16);
            throw null;
        }
        if (nVar == null) {
            c(17);
            throw null;
        }
        LinkedHashSet linkedHashSet = new LinkedHashSet();
        nVar.h(eVar, collection, collection2, eVar2, new kotlin.reflect.w.internal.y0.f.a.n0.a(rVar, linkedHashSet, z2));
        return linkedHashSet;
    }

    public static final kotlin.reflect.w.internal.y0.h.c l(kotlin.reflect.w.internal.y0.h.c cVar, String str) {
        kotlin.reflect.w.internal.y0.h.c cVarC = cVar.c(kotlin.reflect.w.internal.y0.h.e.i(str));
        o.e(cVarC, "child(Name.identifier(name))");
        return cVarC;
    }

    public static kotlin.reflect.w.internal.y0.d.n1.g0 l0(p0 p0Var, kotlin.reflect.w.internal.y0.d.l1.h hVar) {
        if (hVar != null) {
            return s0(p0Var, hVar, true, false, false, p0Var.j());
        }
        d(14);
        throw null;
    }

    public static final <T> Class<T> l1(KClass<T> kClass) {
        o.f(kClass, "<this>");
        Class<T> cls = (Class<T>) ((ClassBasedDeclarationContainer) kClass).j();
        o.d(cls, "null cannot be cast to non-null type java.lang.Class<T of kotlin.jvm.JvmClassMappingKt.<get-java>>");
        return cls;
    }

    public static boolean l2(Context context) {
        return f2(context, "com.seewo.easinote.PlainActivity") || f2(context, "com.seewo.easinote.PlainWhiteboardActivity") || f2(context, "com.seewo.easinote.PlainPairModeActivity") || (g.j.a.c.a.b() & 1) == 1;
    }

    public static <D extends kotlin.reflect.w.internal.y0.d.b> Collection<D> l3(kotlin.reflect.w.internal.y0.h.e eVar, Collection<D> collection, Collection<D> collection2, kotlin.reflect.w.internal.y0.d.e eVar2, kotlin.reflect.w.internal.y0.l.b.r rVar, kotlin.reflect.w.internal.y0.k.n nVar) {
        if (eVar == null) {
            c(0);
            throw null;
        }
        if (collection == null) {
            c(1);
            throw null;
        }
        if (collection2 == null) {
            c(2);
            throw null;
        }
        if (eVar2 == null) {
            c(3);
            throw null;
        }
        if (rVar == null) {
            c(4);
            throw null;
        }
        if (nVar != null) {
            return k3(eVar, collection, collection2, eVar2, rVar, nVar, false);
        }
        c(5);
        throw null;
    }

    public static final kotlin.reflect.w.internal.y0.h.c m(kotlin.reflect.w.internal.y0.h.d dVar, String str) {
        kotlin.reflect.w.internal.y0.h.c cVarI = dVar.c(kotlin.reflect.w.internal.y0.h.e.i(str)).i();
        o.e(cVarI, "child(Name.identifier(name)).toSafe()");
        return cVarI;
    }

    public static kotlin.reflect.w.internal.y0.d.n1.h0 m0(p0 p0Var, kotlin.reflect.w.internal.y0.d.l1.h hVar, kotlin.reflect.w.internal.y0.d.l1.h hVar2) {
        if (hVar == null) {
            d(1);
            throw null;
        }
        if (hVar2 == null) {
            d(2);
            throw null;
        }
        w0 w0VarJ = p0Var.j();
        if (w0VarJ != null) {
            return v0(p0Var, hVar, hVar2, true, false, false, p0Var.getVisibility(), w0VarJ);
        }
        d(6);
        throw null;
    }

    public static final Field m1(KProperty<?> kProperty) {
        o.f(kProperty, "<this>");
        KPropertyImpl<?> kPropertyImplC = v0.c(kProperty);
        if (kPropertyImplC != null) {
            return kPropertyImplC.u();
        }
        return null;
    }

    public static final boolean m2(i0 i0Var, kotlin.reflect.w.internal.y0.h.c cVar) {
        o.f(i0Var, "<this>");
        o.f(cVar, "fqName");
        return i0Var instanceof k0 ? ((k0) i0Var).c(cVar) : ((ArrayList) R2(i0Var, cVar)).isEmpty();
    }

    public static <D extends kotlin.reflect.w.internal.y0.d.b> Collection<D> m3(kotlin.reflect.w.internal.y0.h.e eVar, Collection<D> collection, Collection<D> collection2, kotlin.reflect.w.internal.y0.d.e eVar2, kotlin.reflect.w.internal.y0.l.b.r rVar, kotlin.reflect.w.internal.y0.k.n nVar) {
        if (collection == null) {
            c(7);
            throw null;
        }
        if (eVar2 == null) {
            c(9);
            throw null;
        }
        if (rVar == null) {
            c(10);
            throw null;
        }
        if (nVar != null) {
            return k3(eVar, collection, collection2, eVar2, rVar, nVar, true);
        }
        c(11);
        throw null;
    }

    /* JADX WARN: Removed duplicated region for block: B:15:0x003f  */
    /* JADX WARN: Removed duplicated region for block: B:17:0x0042  */
    /* JADX WARN: Removed duplicated region for block: B:19:0x005e  */
    /* JADX WARN: Removed duplicated region for block: B:36:0x00f5  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final kotlin.reflect.w.internal.calls.Caller n(kotlin.reflect.w.internal.KPropertyImpl.a r5, boolean r6) {
        /*
            Method dump skipped, instruction units count: 534
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.h.a.i.n(r.i0.w.b.f0$a, boolean):r.i0.w.b.x0.g");
    }

    public static kotlin.reflect.w.internal.y0.d.v0 n0(kotlin.reflect.w.internal.y0.d.e eVar) {
        if (eVar == null) {
            d(24);
            throw null;
        }
        h.a aVar = kotlin.reflect.w.internal.y0.d.l1.h.f6717j;
        Objects.requireNonNull(aVar);
        kotlin.reflect.w.internal.y0.d.l1.h hVar = h.a.f6718b;
        j0 j0VarT0 = j0.T0(eVar, hVar, kotlin.reflect.w.internal.y0.c.i.f6497b, b.a.SYNTHESIZED, eVar.j());
        Objects.requireNonNull(aVar);
        j0 j0VarV0 = j0VarT0.M0(null, null, Collections.emptyList(), Collections.emptyList(), Collections.singletonList(new kotlin.reflect.w.internal.y0.d.n1.o0(j0VarT0, null, 0, hVar, kotlin.reflect.w.internal.y0.h.e.i("value"), kotlin.reflect.w.internal.y0.k.z.a.e(eVar).w(), false, false, false, null, eVar.j())), eVar.s(), kotlin.reflect.w.internal.y0.d.c0.FINAL, q.f6983e);
        if (j0VarV0 != null) {
            return j0VarV0;
        }
        d(25);
        throw null;
    }

    public static final Method n1(KFunction<?> kFunction) {
        Caller<?> callerL;
        o.f(kFunction, "<this>");
        KCallableImpl<?> kCallableImplA = v0.a(kFunction);
        Member memberB = (kCallableImplA == null || (callerL = kCallableImplA.l()) == null) ? null : callerL.b();
        if (memberB instanceof Method) {
            return (Method) memberB;
        }
        return null;
    }

    public static boolean n2(w wVar) {
        return wVar.getKind() == b.a.SYNTHESIZED && kotlin.reflect.w.internal.y0.k.h.q(wVar.b());
    }

    public static final kotlin.reflect.w.internal.y0.g.q n3(kotlin.reflect.w.internal.y0.g.i iVar, kotlin.reflect.w.internal.y0.g.z.e eVar) {
        o.f(iVar, "<this>");
        o.f(eVar, "typeTable");
        if (iVar.u()) {
            kotlin.reflect.w.internal.y0.g.q qVar = iVar.f7842t;
            o.e(qVar, "returnType");
            return qVar;
        }
        if ((iVar.f7838p & 16) == 16) {
            return eVar.a(iVar.f7843u);
        }
        throw new IllegalStateException("No returnType in ProtoBuf.Function".toString());
    }

    public static final String o(Method method) {
        StringBuilder sb = new StringBuilder();
        sb.append(method.getName());
        Class<?>[] parameterTypes = method.getParameterTypes();
        o.e(parameterTypes, "parameterTypes");
        sb.append(A2(parameterTypes, "", "(", ")", 0, null, u0.f6397f, 24));
        Class<?> returnType = method.getReturnType();
        o.e(returnType, "returnType");
        sb.append(kotlin.reflect.w.internal.y0.d.p1.b.d.b(returnType));
        return sb.toString();
    }

    public static kotlin.reflect.w.internal.y0.d.v0 o0(kotlin.reflect.w.internal.y0.d.e eVar) {
        if (eVar == null) {
            d(22);
            throw null;
        }
        Objects.requireNonNull(kotlin.reflect.w.internal.y0.d.l1.h.f6717j);
        j0 j0VarV0 = j0.T0(eVar, h.a.f6718b, kotlin.reflect.w.internal.y0.c.i.a, b.a.SYNTHESIZED, eVar.j()).M0(null, null, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), kotlin.reflect.w.internal.y0.k.z.a.e(eVar).h(x1.INVARIANT, eVar.s()), kotlin.reflect.w.internal.y0.d.c0.FINAL, q.f6983e);
        if (j0VarV0 != null) {
            return j0VarV0;
        }
        d(23);
        throw null;
    }

    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    public static final <T> Class<T> o1(KClass<T> kClass) {
        o.f(kClass, "<this>");
        Class<T> cls = (Class<T>) ((ClassBasedDeclarationContainer) kClass).j();
        if (!cls.isPrimitive()) {
            o.d(cls, "null cannot be cast to non-null type java.lang.Class<T of kotlin.jvm.JvmClassMappingKt.<get-javaObjectType>>");
            return cls;
        }
        String name = cls.getName();
        switch (name.hashCode()) {
            case -1325958191:
                if (name.equals("double")) {
                    cls = (Class<T>) Double.class;
                }
                break;
            case 104431:
                if (name.equals("int")) {
                    cls = (Class<T>) Integer.class;
                }
                break;
            case 3039496:
                if (name.equals("byte")) {
                    cls = (Class<T>) Byte.class;
                }
                break;
            case 3052374:
                if (name.equals("char")) {
                    cls = (Class<T>) Character.class;
                }
                break;
            case 3327612:
                if (name.equals("long")) {
                    cls = (Class<T>) Long.class;
                }
                break;
            case 3625364:
                if (name.equals("void")) {
                    cls = (Class<T>) Void.class;
                }
                break;
            case 64711720:
                if (name.equals("boolean")) {
                    cls = (Class<T>) Boolean.class;
                }
                break;
            case 97526364:
                if (name.equals("float")) {
                    cls = (Class<T>) Float.class;
                }
                break;
            case 109413500:
                if (name.equals("short")) {
                    cls = (Class<T>) Short.class;
                }
                break;
        }
        o.d(cls, "null cannot be cast to non-null type java.lang.Class<T of kotlin.jvm.JvmClassMappingKt.<get-javaObjectType>>");
        return cls;
    }

    public static final boolean o2(h0 h0Var) {
        o.f(h0Var, "<this>");
        w1 w1VarO0 = h0Var.O0();
        return (w1VarO0 instanceof kotlin.reflect.w.internal.y0.n.a2.g) || ((w1VarO0 instanceof b0) && (((b0) w1VarO0).S0() instanceof kotlin.reflect.w.internal.y0.n.a2.g));
    }

    public static final kotlin.reflect.w.internal.y0.g.q o3(n nVar, kotlin.reflect.w.internal.y0.g.z.e eVar) {
        o.f(nVar, "<this>");
        o.f(eVar, "typeTable");
        if (nVar.u()) {
            kotlin.reflect.w.internal.y0.g.q qVar = nVar.f7912t;
            o.e(qVar, "returnType");
            return qVar;
        }
        if ((nVar.f7908p & 16) == 16) {
            return eVar.a(nVar.f7913u);
        }
        throw new IllegalStateException("No returnType in ProtoBuf.Property".toString());
    }

    public static final void p(Throwable th, Throwable th2) {
        o.f(th, "<this>");
        o.f(th2, "exception");
        if (th != th2) {
            kotlin.internal.b.a.a(th, th2);
        }
    }

    public static s0 p0(kotlin.reflect.w.internal.y0.d.a aVar, h0 h0Var, kotlin.reflect.w.internal.y0.d.l1.h hVar) {
        if (hVar == null) {
            d(30);
            throw null;
        }
        if (h0Var == null) {
            return null;
        }
        return new kotlin.reflect.w.internal.y0.d.n1.i0(aVar, new kotlin.reflect.w.internal.y0.k.c0.o.d(aVar, h0Var, null), hVar);
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    public static final <T> Class<T> p1(KClass<T> kClass) {
        o.f(kClass, "<this>");
        Class<T> cls = (Class<T>) ((ClassBasedDeclarationContainer) kClass).j();
        if (cls.isPrimitive()) {
            o.d(cls, "null cannot be cast to non-null type java.lang.Class<T of kotlin.jvm.JvmClassMappingKt.<get-javaPrimitiveType>>");
            return cls;
        }
        String name = cls.getName();
        switch (name.hashCode()) {
            case -2056817302:
                if (name.equals("java.lang.Integer")) {
                    return Integer.TYPE;
                }
                return null;
            case -527879800:
                if (name.equals("java.lang.Float")) {
                    return Float.TYPE;
                }
                return null;
            case -515992664:
                if (name.equals("java.lang.Short")) {
                    return Short.TYPE;
                }
                return null;
            case 155276373:
                if (name.equals("java.lang.Character")) {
                    return Character.TYPE;
                }
                return null;
            case 344809556:
                if (name.equals("java.lang.Boolean")) {
                    return Boolean.TYPE;
                }
                return null;
            case 398507100:
                if (name.equals("java.lang.Byte")) {
                    return Byte.TYPE;
                }
                return null;
            case 398795216:
                if (name.equals("java.lang.Long")) {
                    return Long.TYPE;
                }
                return null;
            case 399092968:
                if (name.equals("java.lang.Void")) {
                    return Void.TYPE;
                }
                return null;
            case 761287205:
                if (name.equals("java.lang.Double")) {
                    return Double.TYPE;
                }
                return null;
            default:
                return null;
        }
    }

    public static final boolean p2(kotlin.reflect.w.internal.y0.d.e eVar) {
        o.f(eVar, "<this>");
        return eVar.l() == kotlin.reflect.w.internal.y0.d.c0.FINAL && eVar.getKind() != kotlin.reflect.w.internal.y0.d.f.ENUM_CLASS;
    }

    public static final <T> T p3(Set<? extends T> set, T t2, T t3, T t4, boolean z2) {
        if (!z2) {
            if (t4 != null) {
                set = kotlin.collections.j.o0(kotlin.collections.j.T(set, t4));
            }
            return (T) kotlin.collections.j.a0(set);
        }
        T t5 = set.contains(t2) ? t2 : set.contains(t3) ? t3 : null;
        if (o.a(t5, t2) && o.a(t4, t3)) {
            return null;
        }
        return t4 == null ? t5 : t4;
    }

    public static final <E> E[] q(int i2) {
        if (i2 >= 0) {
            return (E[]) new Object[i2];
        }
        throw new IllegalArgumentException("capacity must be non-negative.".toString());
    }

    public static final Object q0(Throwable th) {
        o.f(th, "exception");
        return new Result.a(th);
    }

    public static final KClass<?> q1(KClassifier kClassifier) {
        Object obj;
        o.f(kClassifier, "<this>");
        if (kClassifier instanceof KClass) {
            return (KClass) kClassifier;
        }
        if (!(kClassifier instanceof KTypeParameter)) {
            throw new KotlinReflectionInternalError("Cannot calculate JVM erasure for type: " + kClassifier);
        }
        List<KType> upperBounds = ((KTypeParameter) kClassifier).getUpperBounds();
        Iterator<T> it = upperBounds.iterator();
        while (true) {
            obj = null;
            if (!it.hasNext()) {
                break;
            }
            Object next = it.next();
            KType kType = (KType) next;
            o.d(kType, "null cannot be cast to non-null type kotlin.reflect.jvm.internal.KTypeImpl");
            kotlin.reflect.w.internal.y0.d.h hVarC = ((KTypeImpl) kType).f6307m.L0().c();
            kotlin.reflect.w.internal.y0.d.e eVar = hVarC instanceof kotlin.reflect.w.internal.y0.d.e ? (kotlin.reflect.w.internal.y0.d.e) hVarC : null;
            if ((eVar == null || eVar.getKind() == kotlin.reflect.w.internal.y0.d.f.INTERFACE || eVar.getKind() == kotlin.reflect.w.internal.y0.d.f.ANNOTATION_CLASS) ? false : true) {
                obj = next;
                break;
            }
        }
        KType kType2 = (KType) obj;
        if (kType2 == null) {
            kType2 = (KType) kotlin.collections.j.w(upperBounds);
        }
        return kType2 != null ? r1(kType2) : kotlin.jvm.internal.e0.a(Object.class);
    }

    public static final boolean q2(h0 h0Var) {
        o.f(h0Var, "<this>");
        return h0Var.O0() instanceof b0;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static final <H> Collection<H> q3(Collection<? extends H> collection, Function1<? super H, ? extends kotlin.reflect.w.internal.y0.d.a> function1) {
        Object obj;
        o.f(collection, "<this>");
        o.f(function1, "descriptorByHandle");
        if (collection.size() <= 1) {
            return collection;
        }
        LinkedList linkedList = new LinkedList(collection);
        kotlin.reflect.w.internal.y0.p.i iVarA = i.b.a();
        while (!linkedList.isEmpty()) {
            Object objU = kotlin.collections.j.u(linkedList);
            kotlin.reflect.w.internal.y0.p.i iVarA2 = i.b.a();
            Collection collectionG = kotlin.reflect.w.internal.y0.k.n.g(objU, linkedList, function1, new kotlin.reflect.w.internal.y0.k.s(iVarA2));
            o.e(collectionG, "conflictedHandles = Smar…nflictedHandles.add(it) }");
            ArrayList<d.c> arrayList = (ArrayList) collectionG;
            if (arrayList.size() == 1 && iVarA2.isEmpty()) {
                obj = (Object) kotlin.collections.j.Y(collectionG);
                o.e(obj, "overridableGroup.single()");
            } else {
                obj = (Object) kotlin.reflect.w.internal.y0.k.n.s(collectionG, function1);
                o.e(obj, "selectMostSpecificMember…roup, descriptorByHandle)");
                kotlin.reflect.w.internal.y0.d.a aVarInvoke = function1.invoke(obj);
                for (d.c cVar : arrayList) {
                    o.e(cVar, "it");
                    if (!kotlin.reflect.w.internal.y0.k.n.k(aVarInvoke, function1.invoke(cVar))) {
                        iVarA2.add(cVar);
                    }
                }
                if (!iVarA2.isEmpty()) {
                    iVarA.addAll(iVarA2);
                }
            }
            iVarA.add(obj);
        }
        return iVarA;
    }

    public static final b0 r(h0 h0Var) {
        o.f(h0Var, "<this>");
        w1 w1VarO0 = h0Var.O0();
        o.d(w1VarO0, "null cannot be cast to non-null type org.jetbrains.kotlin.types.FlexibleType");
        return (b0) w1VarO0;
    }

    public static final kotlin.reflect.w.internal.y0.n.o0 r0(kotlin.reflect.w.internal.y0.c.f fVar, kotlin.reflect.w.internal.y0.d.l1.h hVar, h0 h0Var, List<? extends h0> list, List<? extends h0> list2, List<kotlin.reflect.w.internal.y0.h.e> list3, h0 h0Var2, boolean z2) {
        kotlin.reflect.w.internal.y0.d.e eVarK;
        kotlin.reflect.w.internal.y0.h.e eVar;
        kotlin.reflect.w.internal.y0.d.l1.h hVarA = hVar;
        o.f(fVar, "builtIns");
        o.f(hVarA, "annotations");
        o.f(list, "contextReceiverTypes");
        o.f(list2, "parameterTypes");
        o.f(h0Var2, "returnType");
        o.f(list, "contextReceiverTypes");
        o.f(list2, "parameterTypes");
        o.f(h0Var2, "returnType");
        o.f(fVar, "builtIns");
        ArrayList arrayList = new ArrayList(list.size() + list2.size() + (h0Var != null ? 1 : 0) + 1);
        ArrayList arrayList2 = new ArrayList(H(list, 10));
        Iterator<T> it = list.iterator();
        while (it.hasNext()) {
            arrayList2.add(kotlin.reflect.w.internal.y0.n.c2.c.j((h0) it.next()));
        }
        arrayList.addAll(arrayList2);
        kotlin.reflect.w.internal.y0.n.c2.c.g(arrayList, h0Var != null ? kotlin.reflect.w.internal.y0.n.c2.c.j(h0Var) : null);
        int i2 = 0;
        for (Object obj : list2) {
            int i3 = i2 + 1;
            if (i2 < 0) {
                kotlin.collections.j.e0();
                throw null;
            }
            h0 h0VarV0 = (h0) obj;
            if (list3 == null || (eVar = list3.get(i2)) == null || eVar.f8196m) {
                eVar = null;
            }
            if (eVar != null) {
                kotlin.reflect.w.internal.y0.h.c cVar = i.a.f6532s;
                kotlin.reflect.w.internal.y0.h.e eVarI = kotlin.reflect.w.internal.y0.h.e.i("name");
                String strE = eVar.e();
                o.e(strE, "name.asString()");
                h0VarV0 = kotlin.reflect.w.internal.y0.n.c2.c.v0(h0VarV0, kotlin.reflect.w.internal.y0.d.l1.h.f6717j.a(kotlin.collections.j.O(h0VarV0.getAnnotations(), new kotlin.reflect.w.internal.y0.d.l1.j(fVar, cVar, K2(new Pair(eVarI, new kotlin.reflect.w.internal.y0.k.x.w(strE)))))));
            }
            arrayList.add(kotlin.reflect.w.internal.y0.n.c2.c.j(h0VarV0));
            i2 = i3;
        }
        arrayList.add(kotlin.reflect.w.internal.y0.n.c2.c.j(h0Var2));
        int size = list.size() + list2.size() + (h0Var == null ? 0 : 1);
        o.f(fVar, "builtIns");
        if (z2) {
            eVarK = fVar.x(size);
        } else {
            kotlin.reflect.w.internal.y0.h.e eVar2 = kotlin.reflect.w.internal.y0.c.i.a;
            eVarK = fVar.k("Function" + size);
        }
        o.e(eVarK, "if (isSuspendFunction) b…tFunction(parameterCount)");
        if (h0Var != null) {
            o.f(hVarA, "<this>");
            o.f(fVar, "builtIns");
            kotlin.reflect.w.internal.y0.h.c cVar2 = i.a.f6530q;
            if (!hVarA.m(cVar2)) {
                h.a aVar = kotlin.reflect.w.internal.y0.d.l1.h.f6717j;
                kotlin.collections.j.o();
                hVarA = aVar.a(kotlin.collections.j.O(hVarA, new kotlin.reflect.w.internal.y0.d.l1.j(fVar, cVar2, EmptyMap.f9308f)));
            }
        }
        if (!list.isEmpty()) {
            int size2 = list.size();
            o.f(hVarA, "<this>");
            o.f(fVar, "builtIns");
            kotlin.reflect.w.internal.y0.h.c cVar3 = i.a.f6531r;
            if (!hVarA.m(cVar3)) {
                hVarA = kotlin.reflect.w.internal.y0.d.l1.h.f6717j.a(kotlin.collections.j.O(hVarA, new kotlin.reflect.w.internal.y0.d.l1.j(fVar, cVar3, K2(new Pair(kotlin.reflect.w.internal.y0.c.i.f6498c, new kotlin.reflect.w.internal.y0.k.x.n(size2))))));
            }
        }
        return kotlin.reflect.w.internal.y0.n.i0.e(kotlin.reflect.w.internal.y0.n.s0.j(hVarA), eVarK, arrayList);
    }

    public static final KClass<?> r1(KType kType) {
        KClass<?> kClassQ1;
        o.f(kType, "<this>");
        KClassifier kClassifierE = kType.getF6174f();
        if (kClassifierE != null && (kClassQ1 = q1(kClassifierE)) != null) {
            return kClassQ1;
        }
        throw new KotlinReflectionInternalError("Cannot calculate JVM erasure for type: " + kType);
    }

    public static final boolean r2(p0 p0Var) {
        o.f(p0Var, "<this>");
        return p0Var.f() == null;
    }

    public static final <T> Set<T> r3(T t2) {
        Set<T> setSingleton = Collections.singleton(t2);
        o.e(setSingleton, "singleton(element)");
        return setSingleton;
    }

    public static final <T> Iterable<T> s(T[] tArr) {
        o.f(tArr, "<this>");
        return tArr.length == 0 ? EmptyList.f9307f : new kotlin.collections.k(tArr);
    }

    public static kotlin.reflect.w.internal.y0.d.n1.g0 s0(p0 p0Var, kotlin.reflect.w.internal.y0.d.l1.h hVar, boolean z2, boolean z3, boolean z4, w0 w0Var) {
        if (hVar == null) {
            d(18);
            throw null;
        }
        if (w0Var != null) {
            return new kotlin.reflect.w.internal.y0.d.n1.g0(p0Var, hVar, p0Var.l(), p0Var.getVisibility(), z2, z3, z4, b.a.DECLARATION, null, w0Var);
        }
        d(19);
        throw null;
    }

    public static final String s1(kotlin.reflect.w.internal.y0.d.b bVar) {
        o.f(bVar, "callableMemberDescriptor");
        kotlin.reflect.w.internal.y0.d.b bVarZ1 = kotlin.reflect.w.internal.y0.c.f.B(bVar) ? z1(bVar) : null;
        if (bVarZ1 == null) {
            return null;
        }
        kotlin.reflect.w.internal.y0.d.b bVarM = kotlin.reflect.w.internal.y0.k.z.a.m(bVarZ1);
        if (bVarM instanceof p0) {
            o.f(bVarM, "<this>");
            kotlin.reflect.w.internal.y0.c.f.B(bVarM);
            kotlin.reflect.w.internal.y0.d.b bVarB = kotlin.reflect.w.internal.y0.k.z.a.b(kotlin.reflect.w.internal.y0.k.z.a.m(bVarM), false, kotlin.reflect.w.internal.y0.f.a.k.f7104f, 1);
            if (bVarB == null) {
                return null;
            }
            kotlin.reflect.w.internal.y0.f.a.j jVar = kotlin.reflect.w.internal.y0.f.a.j.a;
            kotlin.reflect.w.internal.y0.h.e eVar = kotlin.reflect.w.internal.y0.f.a.j.f7099b.get(kotlin.reflect.w.internal.y0.k.z.a.g(bVarB));
            if (eVar != null) {
                return eVar.e();
            }
            return null;
        }
        if (!(bVarM instanceof kotlin.reflect.w.internal.y0.d.v0)) {
            return null;
        }
        kotlin.reflect.w.internal.y0.f.a.g gVar = kotlin.reflect.w.internal.y0.f.a.g.f7085m;
        kotlin.reflect.w.internal.y0.d.v0 v0Var = (kotlin.reflect.w.internal.y0.d.v0) bVarM;
        o.f(v0Var, "functionDescriptor");
        Map<String, kotlin.reflect.w.internal.y0.h.e> map = m0.f7116j;
        String strC = kotlin.reflect.w.internal.y0.f.b.r.c(v0Var);
        kotlin.reflect.w.internal.y0.h.e eVar2 = strC == null ? null : map.get(strC);
        if (eVar2 != null) {
            return eVar2.e();
        }
        return null;
    }

    public static final boolean s2(kotlin.reflect.w.internal.y0.c.c cVar, kotlin.reflect.w.internal.y0.d.e eVar) {
        o.f(cVar, "<this>");
        o.f(eVar, "classDescriptor");
        if (kotlin.reflect.w.internal.y0.k.h.p(eVar)) {
            Set<kotlin.reflect.w.internal.y0.h.b> set = kotlin.reflect.w.internal.y0.c.c.f6464b;
            kotlin.reflect.w.internal.y0.h.b bVarF = kotlin.reflect.w.internal.y0.k.z.a.f(eVar);
            if (kotlin.collections.j.f(set, bVarF != null ? bVarF.g() : null)) {
                return true;
            }
        }
        return false;
    }

    public static final boolean s3(kotlin.reflect.w.internal.y0.f.a.s0.u uVar) {
        o.f(uVar, "<this>");
        return uVar != kotlin.reflect.w.internal.y0.f.a.s0.u.INFLEXIBLE;
    }

    public static final <T> Sequence<T> t(T[] tArr) {
        o.f(tArr, "<this>");
        return tArr.length == 0 ? EmptySequence.a : new l(tArr);
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:14:0x0045  */
    /* JADX WARN: Removed duplicated region for block: B:31:0x006c  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final <M extends java.lang.reflect.Member> kotlin.reflect.w.internal.calls.Caller<M> t0(kotlin.reflect.w.internal.calls.Caller<? extends M> r5, kotlin.reflect.w.internal.y0.d.b r6, boolean r7) {
        /*
            java.lang.String r0 = "<this>"
            kotlin.jvm.internal.o.f(r5, r0)
            java.lang.String r0 = "descriptor"
            kotlin.jvm.internal.o.f(r6, r0)
            boolean r0 = kotlin.reflect.w.internal.y0.k.j.a(r6)
            r1 = 1
            r2 = 0
            if (r0 != 0) goto L6d
            java.util.List r0 = r6.h()
            java.lang.String r3 = "descriptor.valueParameters"
            kotlin.jvm.internal.o.e(r0, r3)
            boolean r3 = r0.isEmpty()
            if (r3 == 0) goto L23
        L21:
            r0 = r2
            goto L43
        L23:
            java.util.Iterator r0 = r0.iterator()
        L27:
            boolean r3 = r0.hasNext()
            if (r3 == 0) goto L21
            java.lang.Object r3 = r0.next()
            r.i0.w.b.y0.d.h1 r3 = (kotlin.reflect.w.internal.y0.d.h1) r3
            r.i0.w.b.y0.n.h0 r3 = r3.getType()
            java.lang.String r4 = "it.type"
            kotlin.jvm.internal.o.e(r3, r4)
            boolean r3 = kotlin.reflect.w.internal.y0.k.j.c(r3)
            if (r3 == 0) goto L27
            r0 = r1
        L43:
            if (r0 != 0) goto L6d
            r.i0.w.b.y0.n.h0 r0 = r6.getReturnType()
            if (r0 == 0) goto L53
            boolean r0 = kotlin.reflect.w.internal.y0.k.j.c(r0)
            if (r0 != r1) goto L53
            r0 = r1
            goto L54
        L53:
            r0 = r2
        L54:
            if (r0 != 0) goto L6d
            boolean r0 = r5 instanceof kotlin.reflect.w.internal.calls.BoundCaller
            if (r0 != 0) goto L6c
            r.i0.w.b.y0.n.h0 r0 = g1(r6)
            if (r0 == 0) goto L68
            boolean r0 = kotlin.reflect.w.internal.y0.k.j.c(r0)
            if (r0 != r1) goto L68
            r0 = r1
            goto L69
        L68:
            r0 = r2
        L69:
            if (r0 == 0) goto L6c
            goto L6d
        L6c:
            r1 = r2
        L6d:
            if (r1 == 0) goto L75
            r.i0.w.b.x0.i r0 = new r.i0.w.b.x0.i
            r0.<init>(r6, r5, r7)
            r5 = r0
        L75:
            return r5
        */
        throw new UnsupportedOperationException("Method not decompiled: g.h.a.i.t0(r.i0.w.b.x0.g, r.i0.w.b.y0.d.b, boolean):r.i0.w.b.x0.g");
    }

    public static final <T> KClass<T> t1(Class<T> cls) {
        o.f(cls, "<this>");
        return kotlin.jvm.internal.e0.a(cls);
    }

    public static boolean t2() {
        return (g.j.a.c.a.b() & 2) == 2;
    }

    public static final String t3(kotlin.reflect.w.internal.y0.f.b.u uVar, kotlin.reflect.w.internal.y0.d.e eVar, String str) {
        String strO;
        o.f(uVar, "<this>");
        o.f(eVar, "classDescriptor");
        o.f(str, "jvmDescriptor");
        o.f(eVar, "<this>");
        kotlin.reflect.w.internal.y0.c.o.c cVar = kotlin.reflect.w.internal.y0.c.o.c.a;
        kotlin.reflect.w.internal.y0.h.d dVarJ = kotlin.reflect.w.internal.y0.k.z.a.g(eVar).j();
        o.e(dVarJ, "fqNameSafe.toUnsafe()");
        kotlin.reflect.w.internal.y0.h.b bVarG = cVar.g(dVarJ);
        if (bVarG != null) {
            strO = kotlin.reflect.w.internal.y0.k.a0.c.b(bVarG).e();
            o.e(strO, "byClassId(it).internalName");
        } else {
            strO = O(eVar, kotlin.reflect.w.internal.y0.f.b.w.a);
        }
        return uVar.h(strO, str);
    }

    public static boolean u(int i2) {
        return i2 == 8 || i2 == 24 || i2 == 9 || i2 == 25 || i2 == 10 || i2 == 26;
    }

    public static final g1 u0(kotlin.reflect.w.internal.y0.d.e eVar, kotlin.reflect.w.internal.y0.d.e eVar2) {
        o.f(eVar, "from");
        o.f(eVar2, "to");
        eVar.u().size();
        eVar2.u().size();
        List<b1> listU = eVar.u();
        o.e(listU, "from.declaredTypeParameters");
        ArrayList arrayList = new ArrayList(H(listU, 10));
        Iterator<T> it = listU.iterator();
        while (it.hasNext()) {
            arrayList.add(((b1) it.next()).k());
        }
        List<b1> listU2 = eVar2.u();
        o.e(listU2, "to.declaredTypeParameters");
        ArrayList arrayList2 = new ArrayList(H(listU2, 10));
        Iterator<T> it2 = listU2.iterator();
        while (it2.hasNext()) {
            kotlin.reflect.w.internal.y0.n.o0 o0VarS = ((b1) it2.next()).s();
            o.e(o0VarS, "it.defaultType");
            arrayList2.add(kotlin.reflect.w.internal.y0.n.c2.c.j(o0VarS));
        }
        Map mapJ0 = kotlin.collections.j.j0(kotlin.collections.j.q0(arrayList, arrayList2));
        o.f(mapJ0, "map");
        return new f1(mapJ0, false);
    }

    public static final <T> int u1(T[] tArr) {
        o.f(tArr, "<this>");
        return tArr.length - 1;
    }

    public static final boolean u2(h0 h0Var) {
        o.f(h0Var, "<this>");
        kotlin.reflect.w.internal.y0.d.h hVarC = h0Var.L0().c();
        return (hVarC != null ? k1(hVarC) : null) == kotlin.reflect.w.internal.y0.c.n.c.f6573n;
    }

    public static final char u3(char[] cArr) {
        o.f(cArr, "<this>");
        int length = cArr.length;
        if (length == 0) {
            throw new NoSuchElementException("Array is empty.");
        }
        if (length == 1) {
            return cArr[0];
        }
        throw new IllegalArgumentException("Array has more than one element.");
    }

    public static final <E> List<E> v(List<E> list) {
        o.f(list, "builder");
        ListBuilder listBuilder = (ListBuilder) list;
        if (listBuilder.f9269p != null) {
            throw new IllegalStateException();
        }
        listBuilder.f();
        listBuilder.f9268o = true;
        return listBuilder;
    }

    public static kotlin.reflect.w.internal.y0.d.n1.h0 v0(p0 p0Var, kotlin.reflect.w.internal.y0.d.l1.h hVar, kotlin.reflect.w.internal.y0.d.l1.h hVar2, boolean z2, boolean z3, boolean z4, r rVar, w0 w0Var) {
        if (hVar == null) {
            d(8);
            throw null;
        }
        if (hVar2 == null) {
            d(9);
            throw null;
        }
        if (rVar == null) {
            d(10);
            throw null;
        }
        if (w0Var == null) {
            d(11);
            throw null;
        }
        kotlin.reflect.w.internal.y0.d.n1.h0 h0Var = new kotlin.reflect.w.internal.y0.d.n1.h0(p0Var, hVar, p0Var.l(), rVar, z2, z3, z4, b.a.DECLARATION, null, w0Var);
        h0Var.M0(kotlin.reflect.w.internal.y0.d.n1.h0.K0(h0Var, p0Var.getType(), hVar2));
        return h0Var;
    }

    public static final kotlin.reflect.w.internal.y0.h.e v1(kotlin.reflect.w.internal.y0.g.z.c cVar, int i2) {
        o.f(cVar, "<this>");
        kotlin.reflect.w.internal.y0.h.e eVarH = kotlin.reflect.w.internal.y0.h.e.h(cVar.b(i2));
        o.e(eVarH, "guessByFirstCharacter(getString(index))");
        return eVarH;
    }

    public static final boolean v2(h0 h0Var) {
        kotlin.reflect.w.internal.y0.d.h hVarC = h0Var.L0().c();
        b1 b1Var = hVarC instanceof b1 ? (b1) hVarC : null;
        if (b1Var == null) {
            return false;
        }
        return f3(kotlin.reflect.w.internal.y0.n.c2.c.R(b1Var));
    }

    public static final <T> T v3(T[] tArr) {
        o.f(tArr, "<this>");
        int length = tArr.length;
        if (length == 0) {
            throw new NoSuchElementException("Array is empty.");
        }
        if (length == 1) {
            return tArr[0];
        }
        throw new IllegalArgumentException("Array has more than one element.");
    }

    public static final kotlin.reflect.w.internal.y0.d.n0 w(h0 h0Var, kotlin.reflect.w.internal.y0.d.i iVar, int i2) {
        if (iVar == null || kotlin.reflect.w.internal.y0.n.a2.j.f(iVar)) {
            return null;
        }
        int size = iVar.u().size() + i2;
        if (iVar.M()) {
            List<l1> listSubList = h0Var.J0().subList(i2, size);
            k kVarB = iVar.b();
            return new kotlin.reflect.w.internal.y0.d.n0(iVar, listSubList, w(h0Var, kVarB instanceof kotlin.reflect.w.internal.y0.d.i ? (kotlin.reflect.w.internal.y0.d.i) kVarB : null, size));
        }
        if (size != h0Var.J0().size()) {
            kotlin.reflect.w.internal.y0.k.h.t(iVar);
        }
        return new kotlin.reflect.w.internal.y0.d.n0(iVar, h0Var.J0().subList(i2, h0Var.J0().size()), null);
    }

    public static void w0(String str) {
        j(f5272d, 2, f5271c, str);
    }

    public static final Byte w1(byte[] bArr, int i2) {
        o.f(bArr, "<this>");
        if (i2 >= 0) {
            o.f(bArr, "<this>");
            if (i2 <= bArr.length - 1) {
                return Byte.valueOf(bArr[i2]);
            }
        }
        return null;
    }

    public static boolean w2(byte[] bArr, int i2, int i3) {
        return V2(bArr, i2, i3) == 0;
    }

    public static final <T extends Comparable<? super T>> void w3(List<T> list) {
        o.f(list, "<this>");
        if (list.size() > 1) {
            Collections.sort(list);
        }
    }

    public static final h0 x(List<? extends e1> list, List<? extends h0> list2, kotlin.reflect.w.internal.y0.c.f fVar) {
        h0 h0VarK = r1.e(new kotlin.reflect.w.internal.y0.n.v0(list)).k((h0) kotlin.collections.j.u(list2), x1.OUT_VARIANCE);
        if (h0VarK == null) {
            h0VarK = fVar.n();
        }
        o.e(h0VarK, "typeParameters: List<Typ… ?: builtIns.defaultBound");
        return h0VarK;
    }

    public static void x0(boolean z2, String str) {
        j(z2, 2, f5271c, str);
    }

    public static final Integer x1(int[] iArr, int i2) {
        o.f(iArr, "<this>");
        if (i2 >= 0) {
            o.f(iArr, "<this>");
            if (i2 <= iArr.length - 1) {
                return Integer.valueOf(iArr[i2]);
            }
        }
        return null;
    }

    public static final <T> Iterator<T> x2(T[] tArr) {
        o.f(tArr, "array");
        return new ArrayIterator(tArr);
    }

    public static final <T> void x3(List<T> list, Comparator<? super T> comparator) {
        o.f(list, "<this>");
        o.f(comparator, "comparator");
        if (list.size() > 1) {
            Collections.sort(list, comparator);
        }
    }

    public static String y(byte[] bArr) {
        StringBuilder sb = new StringBuilder("");
        if (bArr != null) {
            for (byte b2 : bArr) {
                String hexString = Integer.toHexString(b2 & 255);
                if (hexString.length() == 1) {
                    hexString = g.a.a.a.a.t("0", hexString);
                }
                sb.append(hexString);
            }
        }
        return sb.toString().toUpperCase().trim();
    }

    public static final String y0(e1 e1Var) {
        StringBuilder sb = new StringBuilder();
        z0("type: " + e1Var, sb);
        z0("hashCode: " + e1Var.hashCode(), sb);
        z0("javaClass: " + e1Var.getClass().getCanonicalName(), sb);
        for (k kVarC = e1Var.c(); kVarC != null; kVarC = kVarC.b()) {
            StringBuilder sbF = g.a.a.a.a.F("fqName: ");
            sbF.append(kotlin.reflect.w.internal.y0.j.c.a.p(kVarC));
            z0(sbF.toString(), sb);
            z0("javaClass: " + kVarC.getClass().getCanonicalName(), sb);
        }
        String string = sb.toString();
        o.e(string, "StringBuilder().apply(builderAction).toString()");
        return string;
    }

    public static final <T> T y1(T[] tArr, int i2) {
        o.f(tArr, "<this>");
        if (i2 < 0 || i2 > u1(tArr)) {
            return null;
        }
        return tArr[i2];
    }

    public static final <T, A extends Appendable> A y2(T[] tArr, A a2, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i2, CharSequence charSequence4, Function1<? super T, ? extends CharSequence> function1) throws IOException {
        o.f(tArr, "<this>");
        o.f(a2, "buffer");
        o.f(charSequence, "separator");
        o.f(charSequence2, "prefix");
        o.f(charSequence3, "postfix");
        o.f(charSequence4, "truncated");
        a2.append(charSequence2);
        int i3 = 0;
        for (T t2 : tArr) {
            i3++;
            if (i3 > 1) {
                a2.append(charSequence);
            }
            if (i2 >= 0 && i3 > i2) {
                break;
            }
            kotlin.reflect.w.internal.y0.n.c2.c.h(a2, t2, function1);
        }
        if (i2 >= 0 && i3 > i2) {
            a2.append(charSequence4);
        }
        a2.append(charSequence3);
        return a2;
    }

    public static final <T> List<T> y3(T[] tArr, Comparator<? super T> comparator) {
        o.f(tArr, "<this>");
        o.f(comparator, "comparator");
        o.f(tArr, "<this>");
        o.f(comparator, "comparator");
        if (!(tArr.length == 0)) {
            tArr = (T[]) Arrays.copyOf(tArr, tArr.length);
            o.e(tArr, "copyOf(this, size)");
            o.f(tArr, "<this>");
            o.f(comparator, "comparator");
            if (tArr.length > 1) {
                Arrays.sort(tArr, comparator);
            }
        }
        return kotlin.collections.j.d(tArr);
    }

    public static String z(byte[] bArr) {
        StringBuilder sb = new StringBuilder("");
        if (bArr != null) {
            for (byte b2 : bArr) {
                String hexString = Integer.toHexString(b2 & 255);
                if (hexString.length() == 1) {
                    hexString = g.a.a.a.a.t("0", hexString);
                }
                sb.append(hexString);
                sb.append(" ");
            }
        }
        return sb.toString().toUpperCase().trim();
    }

    public static final StringBuilder z0(String str, StringBuilder sb) {
        o.f(str, "<this>");
        sb.append(str);
        o.e(sb, "append(value)");
        sb.append('\n');
        o.e(sb, "append('\\n')");
        return sb;
    }

    public static final <T extends kotlin.reflect.w.internal.y0.d.b> T z1(T t2) {
        Function1 function1;
        o.f(t2, "<this>");
        m0.a aVar = m0.a;
        if (!m0.f7117k.contains(t2.getName())) {
            kotlin.reflect.w.internal.y0.f.a.j jVar = kotlin.reflect.w.internal.y0.f.a.j.a;
            if (!kotlin.reflect.w.internal.y0.f.a.j.f7102e.contains(kotlin.reflect.w.internal.y0.k.z.a.m(t2).getName())) {
                return null;
            }
        }
        if (t2 instanceof p0 ? true : t2 instanceof kotlin.reflect.w.internal.y0.d.o0) {
            function1 = kotlin.reflect.w.internal.y0.f.a.j0.f7103f;
        } else {
            if (!(t2 instanceof kotlin.reflect.w.internal.y0.d.v0)) {
                return null;
            }
            function1 = kotlin.reflect.w.internal.y0.f.a.k0.f7105f;
        }
        return (T) kotlin.reflect.w.internal.y0.k.z.a.b(t2, false, function1, 1);
    }

    public static String z2(byte[] bArr, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i2, CharSequence charSequence4, Function1 function1, int i3) {
        if ((i3 & 1) != 0) {
            charSequence = ", ";
        }
        CharSequence charSequence5 = (i3 & 2) != 0 ? "" : null;
        String str = (i3 & 4) == 0 ? null : "";
        if ((i3 & 8) != 0) {
            i2 = -1;
        }
        String str2 = (i3 & 16) != 0 ? "..." : null;
        if ((i3 & 32) != 0) {
            function1 = null;
        }
        o.f(bArr, "<this>");
        o.f(charSequence, "separator");
        o.f(charSequence5, "prefix");
        o.f(str, "postfix");
        o.f(str2, "truncated");
        StringBuilder sb = new StringBuilder();
        o.f(bArr, "<this>");
        o.f(sb, "buffer");
        o.f(charSequence, "separator");
        o.f(charSequence5, "prefix");
        o.f(str, "postfix");
        o.f(str2, "truncated");
        sb.append(charSequence5);
        int i4 = 0;
        for (byte b2 : bArr) {
            i4++;
            if (i4 > 1) {
                sb.append(charSequence);
            }
            if (i2 >= 0 && i4 > i2) {
                break;
            }
            sb.append(function1 != null ? (CharSequence) function1.invoke(Byte.valueOf(b2)) : String.valueOf((int) b2));
        }
        if (i2 >= 0 && i4 > i2) {
            sb.append((CharSequence) str2);
        }
        sb.append((CharSequence) str);
        String string = sb.toString();
        o.e(string, "joinTo(StringBuilder(), …ed, transform).toString()");
        return string;
    }

    public static final String z3(Throwable th) {
        o.f(th, "<this>");
        StringWriter stringWriter = new StringWriter();
        PrintWriter printWriter = new PrintWriter(stringWriter);
        th.printStackTrace(printWriter);
        printWriter.flush();
        String string = stringWriter.toString();
        o.e(string, "sw.toString()");
        return string;
    }
}
