package i2;

import j2.b1;
import j2.g0;
import j2.m;
import j2.x0;
import l1.i;

/* loaded from: classes.dex */
public interface h extends k, j2.j {
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r2v10, types: [l1.i$c] */
    /* JADX WARN: Type inference failed for: r2v11, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r2v12 */
    /* JADX WARN: Type inference failed for: r2v13 */
    /* JADX WARN: Type inference failed for: r2v14 */
    /* JADX WARN: Type inference failed for: r2v15 */
    /* JADX WARN: Type inference failed for: r2v16 */
    /* JADX WARN: Type inference failed for: r2v17 */
    /* JADX WARN: Type inference failed for: r2v6 */
    /* JADX WARN: Type inference failed for: r2v7, types: [l1.i$c] */
    /* JADX WARN: Type inference failed for: r2v9 */
    /* JADX WARN: Type inference failed for: r4v0 */
    /* JADX WARN: Type inference failed for: r4v1 */
    /* JADX WARN: Type inference failed for: r4v10 */
    /* JADX WARN: Type inference failed for: r4v11 */
    /* JADX WARN: Type inference failed for: r4v2 */
    /* JADX WARN: Type inference failed for: r4v3, types: [a1.b] */
    /* JADX WARN: Type inference failed for: r4v4 */
    /* JADX WARN: Type inference failed for: r4v5 */
    /* JADX WARN: Type inference failed for: r4v6, types: [a1.b] */
    /* JADX WARN: Type inference failed for: r4v8 */
    /* JADX WARN: Type inference failed for: r4v9 */
    @Override // i2.k
    default Object C(c cVar) {
        x0 k02;
        if (!P0().O1()) {
            g2.a.a("ModifierLocal accessed from an unattached node");
        }
        int a10 = b1.a(32);
        if (!P0().O1()) {
            throw new IllegalStateException("visitAncestors called on an unattached node".toString());
        }
        i.c L1 = P0().L1();
        g0 m10 = j2.k.m(this);
        while (m10 != null) {
            if ((m10.k0().k().E1() & a10) != 0) {
                while (L1 != null) {
                    if ((L1.J1() & a10) != 0) {
                        m mVar = L1;
                        ?? r42 = 0;
                        while (mVar != 0) {
                            if (mVar instanceof h) {
                                h hVar = (h) mVar;
                                if (hVar.D0().a(cVar)) {
                                    return hVar.D0().b(cVar);
                                }
                            } else {
                                if (((mVar.J1() & a10) != 0) && (mVar instanceof m)) {
                                    i.c i22 = mVar.i2();
                                    int i10 = 0;
                                    mVar = mVar;
                                    r42 = r42;
                                    while (i22 != null) {
                                        if ((i22.J1() & a10) != 0) {
                                            i10++;
                                            r42 = r42;
                                            if (i10 == 1) {
                                                mVar = i22;
                                            } else {
                                                if (r42 == 0) {
                                                    r42 = new a1.b(new i.c[16], 0);
                                                }
                                                if (mVar != 0) {
                                                    r42.c(mVar);
                                                    mVar = 0;
                                                }
                                                r42.c(i22);
                                            }
                                        }
                                        i22 = i22.F1();
                                        mVar = mVar;
                                        r42 = r42;
                                    }
                                    if (i10 == 1) {
                                    }
                                }
                            }
                            mVar = j2.k.g(r42);
                        }
                    }
                    L1 = L1.L1();
                }
            }
            m10 = m10.o0();
            L1 = (m10 == null || (k02 = m10.k0()) == null) ? null : k02.o();
        }
        return cVar.a().invoke();
    }

    default g D0() {
        return b.f22292a;
    }
}
