package q4;

import androidx.lifecycle.u;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import rm.e;
import rm.x;
import rm.y;
import y0.h2;

/* loaded from: classes.dex */
public abstract class b {

    /* renamed from: a, reason: collision with root package name */
    private static final h2 f33450a;

    /* loaded from: classes.dex */
    static final class a extends v implements dn.a {

        /* renamed from: p, reason: collision with root package name */
        public static final a f33451p = new a();

        a() {
            super(0);
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final u invoke() {
            throw new IllegalStateException("CompositionLocal LocalLifecycleOwner not present".toString());
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:17:0x0056  */
    /* JADX WARN: Removed duplicated region for block: B:20:0x005b  */
    static {
        Object a10;
        h2 h2Var;
        Method method;
        boolean z10;
        h2 h2Var2;
        try {
            x.a aVar = x.f34910p;
            ClassLoader classLoader = u.class.getClassLoader();
            t.d(classLoader);
            method = classLoader.loadClass("androidx.compose.ui.platform.AndroidCompositionLocals_androidKt").getMethod("getLocalLifecycleOwner", new Class[0]);
            Annotation[] annotations = method.getAnnotations();
            int length = annotations.length;
            int i10 = 0;
            while (true) {
                if (i10 >= length) {
                    z10 = true;
                    break;
                } else {
                    if (annotations[i10] instanceof e) {
                        z10 = false;
                        break;
                    }
                    i10++;
                }
            }
        } catch (Throwable th2) {
            x.a aVar2 = x.f34910p;
            a10 = x.a(y.a(th2));
        }
        if (z10) {
            Object invoke = method.invoke(null, new Object[0]);
            if (invoke instanceof h2) {
                h2Var2 = (h2) invoke;
                a10 = x.a(h2Var2);
                h2Var = (h2) (x.d(a10) ? null : a10);
                if (h2Var == null) {
                    h2Var = y0.x.f(a.f33451p);
                }
                f33450a = h2Var;
            }
        }
        h2Var2 = null;
        a10 = x.a(h2Var2);
        h2Var = (h2) (x.d(a10) ? null : a10);
        if (h2Var == null) {
        }
        f33450a = h2Var;
    }

    public static final h2 a() {
        return f33450a;
    }
}
