package kotlin.reflect.w.internal.y0.m;

import io.netty.handler.codec.dns.DefaultDnsRecordDecoder;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;

/* JADX INFO: loaded from: classes2.dex */
public class e implements kotlin.reflect.w.internal.y0.m.m {
    public static final String a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final kotlin.reflect.w.internal.y0.m.m f8800b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final kotlin.reflect.w.internal.y0.m.k f8801c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final f f8802d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final String f8803e;

    public static class a extends e {
        public a(String str, f fVar, kotlin.reflect.w.internal.y0.m.k kVar) {
            super(str, fVar, kVar);
        }

        @Override // kotlin.reflect.w.internal.y0.m.e
        public <K, V> o<V> k(String str, K k2) {
            return new o<>(null, true);
        }
    }

    /* JADX INFO: Add missing generic type declarations: [T] */
    public class b<T> extends j<T> {

        /* JADX INFO: renamed from: o, reason: collision with root package name */
        public final /* synthetic */ Object f8804o;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public b(e eVar, e eVar2, Function0 function0, Object obj) {
            super(eVar2, function0);
            this.f8804o = obj;
        }

        @Override // r.i0.w.b.y0.m.e.h
        public o<T> c(boolean z2) {
            return new o<>(this.f8804o, false);
        }
    }

    /* JADX INFO: Add missing generic type declarations: [T] */
    public class c<T> extends k<T> {

        /* JADX INFO: renamed from: p, reason: collision with root package name */
        public final /* synthetic */ Function1 f8805p;

        /* JADX INFO: renamed from: q, reason: collision with root package name */
        public final /* synthetic */ Function1 f8806q;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public c(e eVar, e eVar2, Function0 function0, Function1 function1, Function1 function12) {
            super(eVar2, function0);
            this.f8805p = function1;
            this.f8806q = function12;
        }

        public static /* synthetic */ void a(int i2) {
            String str = i2 != 2 ? "@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 != 2 ? 2 : 3];
            if (i2 != 2) {
                objArr[0] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$5";
            } else {
                objArr[0] = "value";
            }
            if (i2 != 2) {
                objArr[1] = "recursionDetected";
            } else {
                objArr[1] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$5";
            }
            if (i2 == 2) {
                objArr[2] = "doPostCompute";
            }
            String str2 = String.format(str, objArr);
            if (i2 == 2) {
                throw new IllegalArgumentException(str2);
            }
        }

        @Override // r.i0.w.b.y0.m.e.h
        public o<T> c(boolean z2) {
            Function1 function1 = this.f8805p;
            if (function1 != null) {
                return new o<>(function1.invoke(Boolean.valueOf(z2)), false);
            }
            o<T> oVarC = super.c(z2);
            if (oVarC != null) {
                return oVarC;
            }
            a(0);
            throw null;
        }
    }

    public static class d<K, V> extends C0173e<K, V> implements kotlin.reflect.w.internal.y0.m.a<K, V> {
        public d(e eVar, ConcurrentMap concurrentMap, a aVar) {
            super(eVar, concurrentMap, null);
        }

        public static /* synthetic */ void a(int i2) {
            String str = i2 != 3 ? "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 != 3 ? 3 : 2];
            if (i2 == 1) {
                objArr[0] = "map";
            } else if (i2 == 2) {
                objArr[0] = "computation";
            } else if (i2 != 3) {
                objArr[0] = "storageManager";
            } else {
                objArr[0] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$CacheWithNotNullValuesBasedOnMemoizedFunction";
            }
            if (i2 != 3) {
                objArr[1] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$CacheWithNotNullValuesBasedOnMemoizedFunction";
            } else {
                objArr[1] = "computeIfAbsent";
            }
            if (i2 == 2) {
                objArr[2] = "computeIfAbsent";
            } else if (i2 != 3) {
                objArr[2] = "<init>";
            }
            String str2 = String.format(str, objArr);
            if (i2 == 3) {
                throw new IllegalStateException(str2);
            }
        }

        public V c(K k2, Function0<? extends V> function0) {
            V vInvoke = invoke(new g(k2, function0));
            if (vInvoke != null) {
                return vInvoke;
            }
            a(3);
            throw null;
        }
    }

    /* JADX INFO: renamed from: r.i0.w.b.y0.m.e$e, reason: collision with other inner class name */
    public static class C0173e<K, V> extends l<g<K, V>, V> implements kotlin.reflect.w.internal.y0.m.b<K, V> {
        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C0173e(e eVar, ConcurrentMap concurrentMap, a aVar) {
            super(eVar, concurrentMap, new kotlin.reflect.w.internal.y0.m.f());
            if (eVar == null) {
                a(0);
                throw null;
            }
            if (concurrentMap != null) {
            } else {
                a(1);
                throw null;
            }
        }

        public static /* synthetic */ void a(int i2) {
            Object[] objArr = new Object[3];
            if (i2 == 1) {
                objArr[0] = "map";
            } else if (i2 != 2) {
                objArr[0] = "storageManager";
            } else {
                objArr[0] = "computation";
            }
            objArr[1] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$CacheWithNullableValuesBasedOnMemoizedFunction";
            if (i2 != 2) {
                objArr[2] = "<init>";
            } else {
                objArr[2] = "computeIfAbsent";
            }
            throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
        }
    }

    public interface f {
        public static final f a = new a();

        public static class a implements f {
            public RuntimeException a(Throwable th) throws Throwable {
                kotlin.jvm.internal.o.f(th, "e");
                throw th;
            }
        }
    }

    public static class g<K, V> {
        public final K a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final Function0<? extends V> f8807b;

        public g(K k2, Function0<? extends V> function0) {
            this.a = k2;
            this.f8807b = function0;
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            return obj != null && g.class == obj.getClass() && this.a.equals(((g) obj).a);
        }

        public int hashCode() {
            return this.a.hashCode();
        }
    }

    public static class h<T> implements kotlin.reflect.w.internal.y0.m.j<T> {

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public final e f8808f;

        /* JADX INFO: renamed from: m, reason: collision with root package name */
        public final Function0<? extends T> f8809m;

        /* JADX INFO: renamed from: n, reason: collision with root package name */
        public volatile Object f8810n;

        public h(e eVar, Function0<? extends T> function0) {
            if (eVar == null) {
                a(0);
                throw null;
            }
            if (function0 == null) {
                a(1);
                throw null;
            }
            this.f8810n = n.NOT_COMPUTED;
            this.f8808f = eVar;
            this.f8809m = function0;
        }

        public static /* synthetic */ void a(int i2) {
            String str = (i2 == 2 || i2 == 3) ? "@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 == 2 || i2 == 3) ? 2 : 3];
            if (i2 == 1) {
                objArr[0] = "computable";
            } else if (i2 == 2 || i2 == 3) {
                objArr[0] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$LockBasedLazyValue";
            } else {
                objArr[0] = "storageManager";
            }
            if (i2 == 2) {
                objArr[1] = "recursionDetected";
            } else if (i2 != 3) {
                objArr[1] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$LockBasedLazyValue";
            } else {
                objArr[1] = "renderDebugInformation";
            }
            if (i2 != 2 && i2 != 3) {
                objArr[2] = "<init>";
            }
            String str2 = String.format(str, objArr);
            if (i2 != 2 && i2 != 3) {
                throw new IllegalArgumentException(str2);
            }
            throw new IllegalStateException(str2);
        }

        public void b(T t2) {
        }

        public o<T> c(boolean z2) {
            o<T> oVarK = this.f8808f.k("in a lazy value", null);
            if (oVarK != null) {
                return oVarK;
            }
            a(2);
            throw null;
        }

        /* JADX WARN: Removed duplicated region for block: B:16:0x0036  */
        /* JADX WARN: Removed duplicated region for block: B:20:0x0044 A[Catch: all -> 0x007d, TRY_LEAVE, TryCatch #1 {all -> 0x007d, blocks: (B:7:0x0015, B:9:0x001b, B:13:0x0028, B:15:0x0033, B:17:0x0038, B:19:0x0041, B:20:0x0044, B:25:0x005a, B:27:0x0060, B:29:0x0065, B:30:0x006c, B:31:0x0075, B:32:0x0076, B:33:0x007c, B:21:0x0046), top: B:39:0x0015, inners: #0 }] */
        @Override // kotlin.jvm.functions.Function0
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct add '--show-bad-code' argument
        */
        public T invoke() throws java.lang.Throwable {
            /*
                r5 = this;
                r.i0.w.b.y0.m.e$n r0 = r.i0.w.b.y0.m.e.n.RECURSION_WAS_DETECTED
                r.i0.w.b.y0.m.e$n r1 = r.i0.w.b.y0.m.e.n.COMPUTING
                java.lang.Object r2 = r5.f8810n
                boolean r3 = r2 instanceof r.i0.w.b.y0.m.e.n
                if (r3 != 0) goto Le
                kotlin.reflect.w.internal.y0.p.j.b(r2)
                return r2
            Le:
                r.i0.w.b.y0.m.e r2 = r5.f8808f
                r.i0.w.b.y0.m.k r2 = r2.f8801c
                r2.b()
                java.lang.Object r2 = r5.f8810n     // Catch: java.lang.Throwable -> L7d
                boolean r3 = r2 instanceof r.i0.w.b.y0.m.e.n     // Catch: java.lang.Throwable -> L7d
                if (r3 != 0) goto L26
                kotlin.reflect.w.internal.y0.p.j.b(r2)     // Catch: java.lang.Throwable -> L7d
                r.i0.w.b.y0.m.e r0 = r5.f8808f
                r.i0.w.b.y0.m.k r0 = r0.f8801c
                r0.a()
                return r2
            L26:
                if (r2 != r1) goto L36
                r5.f8810n = r0     // Catch: java.lang.Throwable -> L7d
                r3 = 1
                r.i0.w.b.y0.m.e$o r3 = r5.c(r3)     // Catch: java.lang.Throwable -> L7d
                boolean r4 = r3.f8819b     // Catch: java.lang.Throwable -> L7d
                if (r4 != 0) goto L36
                T r0 = r3.a     // Catch: java.lang.Throwable -> L7d
                goto L51
            L36:
                if (r2 != r0) goto L44
                r0 = 0
                r.i0.w.b.y0.m.e$o r0 = r5.c(r0)     // Catch: java.lang.Throwable -> L7d
                boolean r2 = r0.f8819b     // Catch: java.lang.Throwable -> L7d
                if (r2 != 0) goto L44
                T r0 = r0.a     // Catch: java.lang.Throwable -> L7d
                goto L51
            L44:
                r5.f8810n = r1     // Catch: java.lang.Throwable -> L7d
                kotlin.jvm.functions.Function0<? extends T> r0 = r5.f8809m     // Catch: java.lang.Throwable -> L59
                java.lang.Object r0 = r0.invoke()     // Catch: java.lang.Throwable -> L59
                r5.b(r0)     // Catch: java.lang.Throwable -> L59
                r5.f8810n = r0     // Catch: java.lang.Throwable -> L59
            L51:
                r.i0.w.b.y0.m.e r1 = r5.f8808f
                r.i0.w.b.y0.m.k r1 = r1.f8801c
                r1.a()
                return r0
            L59:
                r0 = move-exception
                boolean r2 = kotlin.reflect.w.internal.y0.n.c2.c.c0(r0)     // Catch: java.lang.Throwable -> L7d
                if (r2 != 0) goto L76
                java.lang.Object r2 = r5.f8810n     // Catch: java.lang.Throwable -> L7d
                r3 = 0
                if (r2 != r1) goto L6c
                r.i0.w.b.y0.p.j$b r1 = new r.i0.w.b.y0.p.j$b     // Catch: java.lang.Throwable -> L7d
                r1.<init>(r0, r3)     // Catch: java.lang.Throwable -> L7d
                r5.f8810n = r1     // Catch: java.lang.Throwable -> L7d
            L6c:
                r.i0.w.b.y0.m.e r1 = r5.f8808f     // Catch: java.lang.Throwable -> L7d
                r.i0.w.b.y0.m.e$f r1 = r1.f8802d     // Catch: java.lang.Throwable -> L7d
                r.i0.w.b.y0.m.e$f$a r1 = (r.i0.w.b.y0.m.e.f.a) r1     // Catch: java.lang.Throwable -> L7d
                r1.a(r0)     // Catch: java.lang.Throwable -> L7d
                throw r3     // Catch: java.lang.Throwable -> L7d
            L76:
                r.i0.w.b.y0.m.e$n r1 = r.i0.w.b.y0.m.e.n.NOT_COMPUTED     // Catch: java.lang.Throwable -> L7d
                r5.f8810n = r1     // Catch: java.lang.Throwable -> L7d
                java.lang.RuntimeException r0 = (java.lang.RuntimeException) r0     // Catch: java.lang.Throwable -> L7d
                throw r0     // Catch: java.lang.Throwable -> L7d
            L7d:
                r0 = move-exception
                r.i0.w.b.y0.m.e r1 = r5.f8808f
                r.i0.w.b.y0.m.k r1 = r1.f8801c
                r1.a()
                throw r0
            */
            throw new UnsupportedOperationException("Method not decompiled: r.i0.w.b.y0.m.e.h.invoke():java.lang.Object");
        }
    }

    public static abstract class i<T> extends h<T> {

        /* JADX INFO: renamed from: o, reason: collision with root package name */
        public volatile kotlin.reflect.w.internal.y0.m.l<T> f8811o;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public i(e eVar, Function0<? extends T> function0) {
            super(eVar, function0);
            if (eVar == null) {
                a(0);
                throw null;
            }
            if (function0 == null) {
                a(1);
                throw null;
            }
            this.f8811o = null;
        }

        public static /* synthetic */ void a(int i2) {
            Object[] objArr = new Object[3];
            if (i2 != 1) {
                objArr[0] = "storageManager";
            } else {
                objArr[0] = "computable";
            }
            objArr[1] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$LockBasedLazyValueWithPostCompute";
            objArr[2] = "<init>";
            throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
        }

        @Override // r.i0.w.b.y0.m.e.h
        public final void b(T t2) {
            this.f8811o = new kotlin.reflect.w.internal.y0.m.l<>(t2);
            try {
                c cVar = (c) this;
                if (t2 != null) {
                    cVar.f8806q.invoke(t2);
                } else {
                    c.a(2);
                    throw null;
                }
            } finally {
                this.f8811o = null;
            }
        }

        @Override // r.i0.w.b.y0.m.e.h, kotlin.jvm.functions.Function0
        public T invoke() {
            kotlin.reflect.w.internal.y0.m.l<T> lVar = this.f8811o;
            if (lVar != null) {
                if (lVar.f8820b == Thread.currentThread()) {
                    if (lVar.f8820b == Thread.currentThread()) {
                        return lVar.a;
                    }
                    throw new IllegalStateException("No value in this thread (hasValue should be checked before)");
                }
            }
            return (T) super.invoke();
        }
    }

    public static class j<T> extends h<T> implements kotlin.reflect.w.internal.y0.m.i<T> {
        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public j(e eVar, Function0<? extends T> function0) {
            super(eVar, function0);
            if (eVar == null) {
                a(0);
                throw null;
            }
            if (function0 != null) {
            } else {
                a(1);
                throw null;
            }
        }

        public static /* synthetic */ void a(int i2) {
            String str = i2 != 2 ? "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 != 2 ? 3 : 2];
            if (i2 == 1) {
                objArr[0] = "computable";
            } else if (i2 != 2) {
                objArr[0] = "storageManager";
            } else {
                objArr[0] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$LockBasedNotNullLazyValue";
            }
            if (i2 != 2) {
                objArr[1] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$LockBasedNotNullLazyValue";
            } else {
                objArr[1] = "invoke";
            }
            if (i2 != 2) {
                objArr[2] = "<init>";
            }
            String str2 = String.format(str, objArr);
            if (i2 == 2) {
                throw new IllegalStateException(str2);
            }
        }

        @Override // r.i0.w.b.y0.m.e.h, kotlin.jvm.functions.Function0
        public T invoke() {
            T t2 = (T) super.invoke();
            if (t2 != null) {
                return t2;
            }
            a(2);
            throw null;
        }
    }

    public static abstract class k<T> extends i<T> implements kotlin.reflect.w.internal.y0.m.i<T> {
        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public k(e eVar, Function0<? extends T> function0) {
            super(eVar, function0);
            if (eVar == null) {
                a(0);
                throw null;
            }
            if (function0 != null) {
            } else {
                a(1);
                throw null;
            }
        }

        public static /* synthetic */ void a(int i2) {
            String str = i2 != 2 ? "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 != 2 ? 3 : 2];
            if (i2 == 1) {
                objArr[0] = "computable";
            } else if (i2 != 2) {
                objArr[0] = "storageManager";
            } else {
                objArr[0] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$LockBasedNotNullLazyValueWithPostCompute";
            }
            if (i2 != 2) {
                objArr[1] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$LockBasedNotNullLazyValueWithPostCompute";
            } else {
                objArr[1] = "invoke";
            }
            if (i2 != 2) {
                objArr[2] = "<init>";
            }
            String str2 = String.format(str, objArr);
            if (i2 == 2) {
                throw new IllegalStateException(str2);
            }
        }

        @Override // r.i0.w.b.y0.m.e.i, r.i0.w.b.y0.m.e.h, kotlin.jvm.functions.Function0
        public T invoke() {
            T t2 = (T) super.invoke();
            if (t2 != null) {
                return t2;
            }
            a(2);
            throw null;
        }
    }

    public static class l<K, V> implements kotlin.reflect.w.internal.y0.m.h<K, V> {

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public final e f8812f;

        /* JADX INFO: renamed from: m, reason: collision with root package name */
        public final ConcurrentMap<K, Object> f8813m;

        /* JADX INFO: renamed from: n, reason: collision with root package name */
        public final Function1<? super K, ? extends V> f8814n;

        public l(e eVar, ConcurrentMap<K, Object> concurrentMap, Function1<? super K, ? extends V> function1) {
            if (eVar == null) {
                a(0);
                throw null;
            }
            if (concurrentMap == null) {
                a(1);
                throw null;
            }
            if (function1 == null) {
                a(2);
                throw null;
            }
            this.f8812f = eVar;
            this.f8813m = concurrentMap;
            this.f8814n = function1;
        }

        public static /* synthetic */ void a(int i2) {
            String str = (i2 == 3 || i2 == 4) ? "@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 == 3 || i2 == 4) ? 2 : 3];
            if (i2 == 1) {
                objArr[0] = "map";
            } else if (i2 == 2) {
                objArr[0] = "compute";
            } else if (i2 == 3 || i2 == 4) {
                objArr[0] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$MapBasedMemoizedFunction";
            } else {
                objArr[0] = "storageManager";
            }
            if (i2 == 3) {
                objArr[1] = "recursionDetected";
            } else if (i2 != 4) {
                objArr[1] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$MapBasedMemoizedFunction";
            } else {
                objArr[1] = "raceCondition";
            }
            if (i2 != 3 && i2 != 4) {
                objArr[2] = "<init>";
            }
            String str2 = String.format(str, objArr);
            if (i2 != 3 && i2 != 4) {
                throw new IllegalArgumentException(str2);
            }
            throw new IllegalStateException(str2);
        }

        public final AssertionError b(K k2, Object obj) {
            AssertionError assertionError = new AssertionError("Race condition detected on input " + k2 + ". Old value is " + obj + " under " + this.f8812f);
            e.l(assertionError);
            return assertionError;
        }

        /* JADX WARN: Removed duplicated region for block: B:20:0x003d A[Catch: all -> 0x00bf, TryCatch #2 {all -> 0x00bf, blocks: (B:8:0x001a, B:11:0x0026, B:13:0x002e, B:15:0x0032, B:17:0x0037, B:18:0x003a, B:20:0x003d, B:22:0x0045, B:24:0x0049, B:25:0x004c, B:26:0x004f, B:28:0x0052, B:45:0x0089, B:48:0x0091, B:50:0x009e, B:51:0x00a2, B:52:0x00a3, B:53:0x00ac, B:54:0x00ad, B:55:0x00b6, B:56:0x00b7, B:57:0x00be), top: B:65:0x001a }] */
        /* JADX WARN: Removed duplicated region for block: B:27:0x0050  */
        @Override // kotlin.jvm.functions.Function1
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct add '--show-bad-code' argument
        */
        public V invoke(K r8) {
            /*
                r7 = this;
                r.i0.w.b.y0.m.e$n r0 = r.i0.w.b.y0.m.e.n.RECURSION_WAS_DETECTED
                r.i0.w.b.y0.m.e$n r1 = r.i0.w.b.y0.m.e.n.COMPUTING
                java.util.concurrent.ConcurrentMap<K, java.lang.Object> r2 = r7.f8813m
                java.lang.Object r2 = r2.get(r8)
                if (r2 == 0) goto L13
                if (r2 == r1) goto L13
                java.lang.Object r8 = kotlin.reflect.w.internal.y0.p.j.a(r2)
                return r8
            L13:
                r.i0.w.b.y0.m.e r2 = r7.f8812f
                r.i0.w.b.y0.m.k r2 = r2.f8801c
                r2.b()
                java.util.concurrent.ConcurrentMap<K, java.lang.Object> r2 = r7.f8813m     // Catch: java.lang.Throwable -> Lbf
                java.lang.Object r2 = r2.get(r8)     // Catch: java.lang.Throwable -> Lbf
                r3 = 3
                java.lang.String r4 = ""
                r5 = 0
                if (r2 != r1) goto L3b
                r.i0.w.b.y0.m.e r2 = r7.f8812f     // Catch: java.lang.Throwable -> Lbf
                r.i0.w.b.y0.m.e$o r2 = r2.k(r4, r8)     // Catch: java.lang.Throwable -> Lbf
                if (r2 == 0) goto L37
                boolean r6 = r2.f8819b     // Catch: java.lang.Throwable -> Lbf
                if (r6 != 0) goto L35
                T r8 = r2.a     // Catch: java.lang.Throwable -> Lbf
                goto L56
            L35:
                r2 = r0
                goto L3b
            L37:
                a(r3)     // Catch: java.lang.Throwable -> Lbf
                throw r5     // Catch: java.lang.Throwable -> Lbf
            L3b:
                if (r2 != r0) goto L50
                r.i0.w.b.y0.m.e r0 = r7.f8812f     // Catch: java.lang.Throwable -> Lbf
                r.i0.w.b.y0.m.e$o r0 = r0.k(r4, r8)     // Catch: java.lang.Throwable -> Lbf
                if (r0 == 0) goto L4c
                boolean r3 = r0.f8819b     // Catch: java.lang.Throwable -> Lbf
                if (r3 != 0) goto L50
                T r8 = r0.a     // Catch: java.lang.Throwable -> Lbf
                goto L56
            L4c:
                a(r3)     // Catch: java.lang.Throwable -> Lbf
                throw r5     // Catch: java.lang.Throwable -> Lbf
            L50:
                if (r2 == 0) goto L5e
                java.lang.Object r8 = kotlin.reflect.w.internal.y0.p.j.a(r2)     // Catch: java.lang.Throwable -> Lbf
            L56:
                r.i0.w.b.y0.m.e r0 = r7.f8812f
                r.i0.w.b.y0.m.k r0 = r0.f8801c
                r0.a()
                return r8
            L5e:
                java.util.concurrent.ConcurrentMap<K, java.lang.Object> r0 = r7.f8813m     // Catch: java.lang.Throwable -> L86
                r0.put(r8, r1)     // Catch: java.lang.Throwable -> L86
                kotlin.jvm.functions.Function1<? super K, ? extends V> r0 = r7.f8814n     // Catch: java.lang.Throwable -> L86
                java.lang.Object r0 = r0.invoke(r8)     // Catch: java.lang.Throwable -> L86
                java.util.concurrent.ConcurrentMap<K, java.lang.Object> r2 = r7.f8813m     // Catch: java.lang.Throwable -> L86
                if (r0 != 0) goto L70
                java.lang.Object r3 = kotlin.reflect.w.internal.y0.p.j.a     // Catch: java.lang.Throwable -> L86
                goto L71
            L70:
                r3 = r0
            L71:
                java.lang.Object r2 = r2.put(r8, r3)     // Catch: java.lang.Throwable -> L86
                if (r2 != r1) goto L7f
                r.i0.w.b.y0.m.e r8 = r7.f8812f
                r.i0.w.b.y0.m.k r8 = r8.f8801c
                r8.a()
                return r0
            L7f:
                java.lang.AssertionError r0 = r7.b(r8, r2)     // Catch: java.lang.Throwable -> L86
                throw r0     // Catch: java.lang.Throwable -> L84
            L84:
                r2 = move-exception
                goto L89
            L86:
                r0 = move-exception
                r2 = r0
                r0 = r5
            L89:
                boolean r3 = kotlin.reflect.w.internal.y0.n.c2.c.c0(r2)     // Catch: java.lang.Throwable -> Lbf
                if (r3 != 0) goto Lb7
                if (r2 == r0) goto Lad
                java.util.concurrent.ConcurrentMap<K, java.lang.Object> r0 = r7.f8813m     // Catch: java.lang.Throwable -> Lbf
                r.i0.w.b.y0.p.j$b r3 = new r.i0.w.b.y0.p.j$b     // Catch: java.lang.Throwable -> Lbf
                r3.<init>(r2, r5)     // Catch: java.lang.Throwable -> Lbf
                java.lang.Object r0 = r0.put(r8, r3)     // Catch: java.lang.Throwable -> Lbf
                if (r0 == r1) goto La3
                java.lang.AssertionError r8 = r7.b(r8, r0)     // Catch: java.lang.Throwable -> Lbf
                throw r8     // Catch: java.lang.Throwable -> Lbf
            La3:
                r.i0.w.b.y0.m.e r8 = r7.f8812f     // Catch: java.lang.Throwable -> Lbf
                r.i0.w.b.y0.m.e$f r8 = r8.f8802d     // Catch: java.lang.Throwable -> Lbf
                r.i0.w.b.y0.m.e$f$a r8 = (r.i0.w.b.y0.m.e.f.a) r8     // Catch: java.lang.Throwable -> Lbf
                r8.a(r2)     // Catch: java.lang.Throwable -> Lbf
                throw r5     // Catch: java.lang.Throwable -> Lbf
            Lad:
                r.i0.w.b.y0.m.e r8 = r7.f8812f     // Catch: java.lang.Throwable -> Lbf
                r.i0.w.b.y0.m.e$f r8 = r8.f8802d     // Catch: java.lang.Throwable -> Lbf
                r.i0.w.b.y0.m.e$f$a r8 = (r.i0.w.b.y0.m.e.f.a) r8     // Catch: java.lang.Throwable -> Lbf
                r8.a(r2)     // Catch: java.lang.Throwable -> Lbf
                throw r5     // Catch: java.lang.Throwable -> Lbf
            Lb7:
                java.util.concurrent.ConcurrentMap<K, java.lang.Object> r0 = r7.f8813m     // Catch: java.lang.Throwable -> Lbf
                r0.remove(r8)     // Catch: java.lang.Throwable -> Lbf
                java.lang.RuntimeException r2 = (java.lang.RuntimeException) r2     // Catch: java.lang.Throwable -> Lbf
                throw r2     // Catch: java.lang.Throwable -> Lbf
            Lbf:
                r8 = move-exception
                r.i0.w.b.y0.m.e r0 = r7.f8812f
                r.i0.w.b.y0.m.k r0 = r0.f8801c
                r0.a()
                throw r8
            */
            throw new UnsupportedOperationException("Method not decompiled: r.i0.w.b.y0.m.e.l.invoke(java.lang.Object):java.lang.Object");
        }
    }

    public static class m<K, V> extends l<K, V> implements kotlin.reflect.w.internal.y0.m.g<K, V> {
        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public m(e eVar, ConcurrentMap<K, Object> concurrentMap, Function1<? super K, ? extends V> function1) {
            super(eVar, concurrentMap, function1);
            if (concurrentMap == null) {
                a(1);
                throw null;
            }
            if (function1 != null) {
            } else {
                a(2);
                throw null;
            }
        }

        public static /* synthetic */ void a(int i2) {
            String str = i2 != 3 ? "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 != 3 ? 3 : 2];
            if (i2 == 1) {
                objArr[0] = "map";
            } else if (i2 == 2) {
                objArr[0] = "compute";
            } else if (i2 != 3) {
                objArr[0] = "storageManager";
            } else {
                objArr[0] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull";
            }
            if (i2 != 3) {
                objArr[1] = "kotlin/reflect/jvm/internal/impl/storage/LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull";
            } else {
                objArr[1] = "invoke";
            }
            if (i2 != 3) {
                objArr[2] = "<init>";
            }
            String str2 = String.format(str, objArr);
            if (i2 == 3) {
                throw new IllegalStateException(str2);
            }
        }

        @Override // r.i0.w.b.y0.m.e.l, kotlin.jvm.functions.Function1
        public V invoke(K k2) {
            V v2 = (V) super.invoke(k2);
            if (v2 != null) {
                return v2;
            }
            a(3);
            throw null;
        }
    }

    public enum n {
        NOT_COMPUTED,
        COMPUTING,
        RECURSION_WAS_DETECTED
    }

    public static class o<T> {
        public final T a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final boolean f8819b;

        public o(T t2, boolean z2) {
            this.a = t2;
            this.f8819b = z2;
        }

        public String toString() {
            return this.f8819b ? "FALL_THROUGH" : String.valueOf(this.a);
        }
    }

    static {
        String canonicalName = e.class.getCanonicalName();
        String strSubstring = "";
        kotlin.jvm.internal.o.f(canonicalName, "<this>");
        kotlin.jvm.internal.o.f(DefaultDnsRecordDecoder.ROOT, "delimiter");
        kotlin.jvm.internal.o.f("", "missingDelimiterValue");
        int iR = kotlin.text.j.r(canonicalName, DefaultDnsRecordDecoder.ROOT, 0, false, 6);
        if (iR != -1) {
            strSubstring = canonicalName.substring(0, iR);
            kotlin.jvm.internal.o.e(strSubstring, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        a = strSubstring;
        f8800b = new a("NO_LOCKS", f.a, kotlin.reflect.w.internal.y0.m.d.f8799b);
    }

    /* JADX WARN: Illegal instructions before constructor call */
    public e(String str) {
        f fVar = f.a;
        int i2 = kotlin.reflect.w.internal.y0.m.k.a;
        this(str, fVar, new kotlin.reflect.w.internal.y0.m.c(null, 1));
    }

    public e(String str, f fVar, kotlin.reflect.w.internal.y0.m.k kVar) {
        if (str == null) {
            i(4);
            throw null;
        }
        if (fVar == null) {
            i(5);
            throw null;
        }
        if (kVar == null) {
            i(6);
            throw null;
        }
        this.f8801c = kVar;
        this.f8802d = fVar;
        this.f8803e = str;
    }

    /* JADX WARN: Removed duplicated region for block: B:34:0x0065  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static /* synthetic */ void i(int r13) {
        /*
            Method dump skipped, instruction units count: 354
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.w.internal.y0.m.e.i(int):void");
    }

    public static <K> ConcurrentMap<K, Object> j() {
        return new ConcurrentHashMap(3, 1.0f, 2);
    }

    public static <T extends Throwable> T l(T t2) {
        if (t2 == null) {
            i(36);
            throw null;
        }
        StackTraceElement[] stackTrace = t2.getStackTrace();
        int length = stackTrace.length;
        int i2 = -1;
        int i3 = 0;
        while (true) {
            if (i3 >= length) {
                break;
            }
            if (!stackTrace[i3].getClassName().startsWith(a)) {
                i2 = i3;
                break;
            }
            i3++;
        }
        List listSubList = Arrays.asList(stackTrace).subList(i2, length);
        t2.setStackTrace((StackTraceElement[]) listSubList.toArray(new StackTraceElement[listSubList.size()]));
        return t2;
    }

    @Override // kotlin.reflect.w.internal.y0.m.m
    public <K, V> kotlin.reflect.w.internal.y0.m.b<K, V> a() {
        return new C0173e(this, j(), null);
    }

    @Override // kotlin.reflect.w.internal.y0.m.m
    public <K, V> kotlin.reflect.w.internal.y0.m.a<K, V> b() {
        return new d(this, j(), null);
    }

    @Override // kotlin.reflect.w.internal.y0.m.m
    public <T> kotlin.reflect.w.internal.y0.m.i<T> c(Function0<? extends T> function0, T t2) {
        return new b(this, this, function0, t2);
    }

    @Override // kotlin.reflect.w.internal.y0.m.m
    public <T> kotlin.reflect.w.internal.y0.m.i<T> d(Function0<? extends T> function0) {
        if (function0 != null) {
            return new j(this, function0);
        }
        i(23);
        throw null;
    }

    @Override // kotlin.reflect.w.internal.y0.m.m
    public <T> kotlin.reflect.w.internal.y0.m.j<T> e(Function0<? extends T> function0) {
        return new h(this, function0);
    }

    @Override // kotlin.reflect.w.internal.y0.m.m
    public <T> kotlin.reflect.w.internal.y0.m.i<T> f(Function0<? extends T> function0, Function1<? super Boolean, ? extends T> function1, Function1<? super T, Unit> function12) {
        return new c(this, this, function0, function1, function12);
    }

    @Override // kotlin.reflect.w.internal.y0.m.m
    public <K, V> kotlin.reflect.w.internal.y0.m.g<K, V> g(Function1<? super K, ? extends V> function1) {
        return new m(this, j(), function1);
    }

    @Override // kotlin.reflect.w.internal.y0.m.m
    public <K, V> kotlin.reflect.w.internal.y0.m.h<K, V> h(Function1<? super K, ? extends V> function1) {
        return new l(this, j(), function1);
    }

    public <K, V> o<V> k(String str, K k2) {
        String str2;
        StringBuilder sbJ = g.a.a.a.a.J("Recursion detected ", str);
        if (k2 == null) {
            str2 = "";
        } else {
            str2 = "on input: " + k2;
        }
        sbJ.append(str2);
        sbJ.append(" under ");
        sbJ.append(this);
        AssertionError assertionError = new AssertionError(sbJ.toString());
        l(assertionError);
        throw assertionError;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append("@");
        sb.append(Integer.toHexString(hashCode()));
        sb.append(" (");
        return g.a.a.a.a.A(sb, this.f8803e, ")");
    }
}
