package J0;

import C0.C0104e;
import F1.C0173b;
import I0.AbstractC0300j0;
import I0.AbstractC0301k;
import I0.AbstractC0303l;
import I0.C0290e0;
import I0.InterfaceC0299j;
import Q0.C0586a;
import T0.C0596g;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.content.res.Resources;
import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Region;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcelable;
import android.os.SystemClock;
import android.os.Trace;
import android.util.Log;
import android.view.View;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
import androidx.compose.runtime.collection.MutableVector;
import androidx.media3.extractor.AacUtil;
import com.debridstream.tv.R;
import i0.AbstractC2254r;
import j1.AbstractC2319a;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import m3.AbstractC2467b;
import n.AbstractC2583j;
import n.AbstractC2586m;
import n.AbstractC2587n;
import n.AbstractC2588o;
import n.AbstractC2589p;
import n.C2566A;
import n.C2567B;
import n.C2579f;
import n.C2597y;
import n.C2598z;
import n2.AbstractC2612c;
import o.AbstractC2628a;
import o0.C2631b;
import o0.C2632c;
import o0.C2633d;
import p0.C2693K;
import p0.C2694L;
import p0.C2702h;
import w4.C3137A;
import w4.InterfaceC3143e;
import x4.AbstractC3250p;
import x4.AbstractC3251q;
import x4.AbstractC3252r;

/* JADX INFO: loaded from: classes.dex */
public final class G extends C0173b implements View.OnAttachStateChangeListener, AccessibilityManager.AccessibilityStateChangeListener, AccessibilityManager.TouchExplorationStateChangeListener {

    /* JADX INFO: renamed from: R, reason: collision with root package name */
    public static final C2598z f2839R;

    /* JADX INFO: renamed from: A, reason: collision with root package name */
    public final X4.e f2840A;

    /* JADX INFO: renamed from: B, reason: collision with root package name */
    public boolean f2841B;

    /* JADX INFO: renamed from: C, reason: collision with root package name */
    public C f2842C;

    /* JADX INFO: renamed from: D, reason: collision with root package name */
    public C2566A f2843D;

    /* JADX INFO: renamed from: E, reason: collision with root package name */
    public final C2567B f2844E;

    /* JADX INFO: renamed from: F, reason: collision with root package name */
    public final C2597y f2845F;

    /* JADX INFO: renamed from: G, reason: collision with root package name */
    public final C2597y f2846G;

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

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

    /* JADX INFO: renamed from: J, reason: collision with root package name */
    public final C4.f f2849J;

    /* JADX INFO: renamed from: K, reason: collision with root package name */
    public final C2566A f2850K;

    /* JADX INFO: renamed from: L, reason: collision with root package name */
    public Y0 f2851L;

    /* JADX INFO: renamed from: M, reason: collision with root package name */
    public boolean f2852M;

    /* JADX INFO: renamed from: N, reason: collision with root package name */
    public final C2597y f2853N;

    /* JADX INFO: renamed from: O, reason: collision with root package name */
    public final F1.r f2854O;

    /* JADX INFO: renamed from: P, reason: collision with root package name */
    public final ArrayList f2855P;

    /* JADX INFO: renamed from: Q, reason: collision with root package name */
    public final F f2856Q;

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public int f2858e = Integer.MIN_VALUE;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final F f2859f = new F(this, 0);

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final AccessibilityManager f2860j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public long f2861k;
    public List l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final Handler f2862m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final B f2863n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public int f2864o;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public int f2865p;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public G1.g f2866q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public G1.g f2867r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public boolean f2868s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final C2566A f2869t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public final C2566A f2870u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final n.e0 f2871v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final n.e0 f2872w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public int f2873x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public Integer f2874y;

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public final C2579f f2875z;

    static {
        int[] iArr = {R.id.accessibility_custom_action_0, R.id.accessibility_custom_action_1, R.id.accessibility_custom_action_2, R.id.accessibility_custom_action_3, R.id.accessibility_custom_action_4, R.id.accessibility_custom_action_5, R.id.accessibility_custom_action_6, R.id.accessibility_custom_action_7, R.id.accessibility_custom_action_8, R.id.accessibility_custom_action_9, R.id.accessibility_custom_action_10, R.id.accessibility_custom_action_11, R.id.accessibility_custom_action_12, R.id.accessibility_custom_action_13, R.id.accessibility_custom_action_14, R.id.accessibility_custom_action_15, R.id.accessibility_custom_action_16, R.id.accessibility_custom_action_17, R.id.accessibility_custom_action_18, R.id.accessibility_custom_action_19, R.id.accessibility_custom_action_20, R.id.accessibility_custom_action_21, R.id.accessibility_custom_action_22, R.id.accessibility_custom_action_23, R.id.accessibility_custom_action_24, R.id.accessibility_custom_action_25, R.id.accessibility_custom_action_26, R.id.accessibility_custom_action_27, R.id.accessibility_custom_action_28, R.id.accessibility_custom_action_29, R.id.accessibility_custom_action_30, R.id.accessibility_custom_action_31};
        C2598z c2598z = AbstractC2586m.f21455a;
        C2598z c2598z2 = new C2598z(32);
        int i6 = c2598z2.f21454b;
        if (i6 < 0) {
            AbstractC2628a.d("");
            throw null;
        }
        int i7 = i6 + 32;
        c2598z2.d(i7);
        int[] iArr2 = c2598z2.f21453a;
        int i8 = c2598z2.f21454b;
        if (i6 != i8) {
            AbstractC3250p.x(i7, i6, i8, iArr2, iArr2);
        }
        AbstractC3250p.C(i6, 0, 12, iArr, iArr2);
        c2598z2.f21454b += 32;
        f2839R = c2598z2;
    }

    public G(A a6) {
        int i6 = 1;
        this.f2857d = a6;
        Object systemService = a6.getContext().getSystemService("accessibility");
        kotlin.jvm.internal.o.f(systemService, "null cannot be cast to non-null type android.view.accessibility.AccessibilityManager");
        this.f2860j = (AccessibilityManager) systemService;
        this.f2861k = 100L;
        this.f2862m = new Handler(Looper.getMainLooper());
        this.f2863n = new B(this);
        this.f2864o = Integer.MIN_VALUE;
        this.f2865p = Integer.MIN_VALUE;
        this.f2869t = new C2566A();
        this.f2870u = new C2566A();
        this.f2871v = new n.e0(0);
        this.f2872w = new n.e0(0);
        this.f2873x = -1;
        this.f2875z = new C2579f(0);
        this.f2840A = W.a.I(1, 6, null);
        this.f2841B = true;
        C2566A c2566a = AbstractC2588o.f21461a;
        kotlin.jvm.internal.o.f(c2566a, "null cannot be cast to non-null type androidx.collection.IntObjectMap<V of androidx.collection.IntObjectMapKt.intObjectMapOf>");
        this.f2843D = c2566a;
        this.f2844E = new C2567B();
        this.f2845F = new C2597y();
        this.f2846G = new C2597y();
        this.f2847H = "android.view.accessibility.extra.EXTRA_DATA_TEST_TRAVERSALBEFORE_VAL";
        this.f2848I = "android.view.accessibility.extra.EXTRA_DATA_TEST_TRAVERSALAFTER_VAL";
        this.f2849J = new C4.f(24);
        this.f2850K = new C2566A();
        Q0.s sVarA = a6.getSemanticsOwner().a();
        kotlin.jvm.internal.o.f(c2566a, "null cannot be cast to non-null type androidx.collection.IntObjectMap<V of androidx.collection.IntObjectMapKt.intObjectMapOf>");
        this.f2851L = new Y0(sVarA, c2566a);
        int i7 = AbstractC2583j.f21451a;
        this.f2853N = new C2597y();
        a6.addOnAttachStateChangeListener(this);
        this.f2854O = new F1.r(this, i6);
        this.f2855P = new ArrayList();
        this.f2856Q = new F(this, i6);
    }

    public static /* synthetic */ void E(G g6, int i6, int i7, Integer num, int i8) {
        if ((i8 & 4) != 0) {
            num = null;
        }
        g6.D(i6, i7, num, null);
    }

    public static Rect L(p0.N n6, float f6, float f7) {
        if (!(n6 instanceof C2694L) && !(n6 instanceof p0.M)) {
            return null;
        }
        C2632c c2632cA = n6.a();
        return new Rect((int) (c2632cA.f21787a + f6), (int) (c2632cA.f21788b + f7), (int) (c2632cA.f21789c + f6), (int) (c2632cA.f21790d + f7));
    }

    public static float[] N(p0.N n6) {
        if (!(n6 instanceof p0.M)) {
            return null;
        }
        p0.M m6 = (p0.M) n6;
        float fIntBitsToFloat = Float.intBitsToFloat((int) (m6.f22857a.f21795e >> 32));
        C2633d c2633d = m6.f22857a;
        return new float[]{fIntBitsToFloat, Float.intBitsToFloat((int) (c2633d.f21795e & 4294967295L)), Float.intBitsToFloat((int) (c2633d.f21796f >> 32)), Float.intBitsToFloat((int) (c2633d.f21796f & 4294967295L)), Float.intBitsToFloat((int) (c2633d.f21797g >> 32)), Float.intBitsToFloat((int) (c2633d.f21797g & 4294967295L)), Float.intBitsToFloat((int) (c2633d.f21798h >> 32)), Float.intBitsToFloat((int) (4294967295L & c2633d.f21798h))};
    }

    public static Region O(p0.N n6, float f6, float f7) {
        if (!(n6 instanceof C2693K)) {
            return null;
        }
        C2693K c2693k = (C2693K) n6;
        C2632c c2632cH = c2693k.f22855a.e().h(f6, f7);
        Region region = new Region(new Rect((int) (c2632cH.f21787a + 0.0f), (int) (c2632cH.f21788b + 0.0f), (int) (c2632cH.f21789c + 0.0f), (int) (c2632cH.f21790d + 0.0f)));
        Region region2 = new Region();
        C2702h c2702h = c2693k.f22855a;
        if (c2702h == null) {
            throw new UnsupportedOperationException("Unable to obtain android.graphics.Path");
        }
        Path path = c2702h.f22920a;
        path.offset(f6, f7);
        region2.setPath(path, region);
        return region2;
    }

    public static CharSequence P(CharSequence charSequence) {
        if (charSequence.length() != 0) {
            int length = charSequence.length();
            int i6 = AacUtil.AAC_LC_MAX_RATE_BYTES_PER_SECOND;
            if (length > 100000) {
                if (Character.isHighSurrogate(charSequence.charAt(99999)) && Character.isLowSurrogate(charSequence.charAt(AacUtil.AAC_LC_MAX_RATE_BYTES_PER_SECOND))) {
                    i6 = 99999;
                }
                CharSequence charSequenceSubSequence = charSequence.subSequence(0, i6);
                kotlin.jvm.internal.o.f(charSequenceSubSequence, "null cannot be cast to non-null type T of androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat.trimToSize");
                return charSequenceSubSequence;
            }
        }
        return charSequence;
    }

    public static String t(Q0.s sVar) {
        C0596g c0596g;
        if (sVar != null) {
            Q0.z zVar = Q0.w.f5835a;
            Q0.n nVar = sVar.f5808d;
            n.N n6 = nVar.f5799a;
            if (n6.b(zVar)) {
                return AbstractC2319a.a((List) nVar.j(zVar), ",", null, 62);
            }
            Q0.z zVar2 = Q0.w.f5824F;
            if (n6.b(zVar2)) {
                Object objD = n6.d(zVar2);
                if (objD == null) {
                    objD = null;
                }
                C0596g c0596g2 = (C0596g) objD;
                if (c0596g2 != null) {
                    return c0596g2.f6510b;
                }
            } else {
                Object objD2 = n6.d(Q0.w.f5820B);
                if (objD2 == null) {
                    objD2 = null;
                }
                List list = (List) objD2;
                if (list != null && (c0596g = (C0596g) AbstractC3251q.g0(list)) != null) {
                    return c0596g.f6510b;
                }
            }
        }
        return null;
    }

    public static final boolean x(Q0.k kVar, float f6) {
        J4.a aVar = kVar.f5748a;
        if (f6 >= 0.0f || ((Number) aVar.invoke()).floatValue() <= 0.0f) {
            return f6 > 0.0f && ((Number) aVar.invoke()).floatValue() < ((Number) kVar.f5749b.invoke()).floatValue();
        }
        return true;
    }

    public static final boolean y(Q0.k kVar) {
        J4.a aVar = kVar.f5748a;
        if (((Number) aVar.invoke()).floatValue() > 0.0f) {
            return true;
        }
        ((Number) aVar.invoke()).floatValue();
        ((Number) kVar.f5749b.invoke()).floatValue();
        return false;
    }

    public static final boolean z(Q0.k kVar) {
        J4.a aVar = kVar.f5748a;
        if (((Number) aVar.invoke()).floatValue() < ((Number) kVar.f5749b.invoke()).floatValue()) {
            return true;
        }
        ((Number) aVar.invoke()).floatValue();
        return false;
    }

    public final int A(int i6) {
        if (i6 == this.f2857d.getSemanticsOwner().a().f5811g) {
            return -1;
        }
        return i6;
    }

    /* JADX WARN: Removed duplicated region for block: B:28:0x0088  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void B(Q0.s sVar, Y0 y02) {
        int[] iArr = AbstractC2589p.f21462a;
        C2567B c2567b = new C2567B();
        List listJ = Q0.s.j(4, sVar);
        int size = listJ.size();
        int i6 = 0;
        while (true) {
            I0.H h5 = sVar.f5807c;
            if (i6 >= size) {
                C2567B c2567b2 = y02.f2975b;
                int[] iArr2 = c2567b2.f21313b;
                long[] jArr = c2567b2.f21312a;
                int length = jArr.length - 2;
                if (length >= 0) {
                    int i7 = 0;
                    while (true) {
                        long j4 = jArr[i7];
                        if ((((~j4) << 7) & j4 & (-9187201950435737472L)) != -9187201950435737472L) {
                            int i8 = 8 - ((~(i7 - length)) >>> 31);
                            for (int i9 = 0; i9 < i8; i9++) {
                                if ((255 & j4) < 128 && !c2567b.b(iArr2[(i7 << 3) + i9])) {
                                    w(h5);
                                    return;
                                }
                                j4 >>= 8;
                            }
                            if (i8 != 8) {
                                break;
                            } else if (i7 == length) {
                                break;
                            } else {
                                i7++;
                            }
                        }
                    }
                }
                List listJ2 = Q0.s.j(4, sVar);
                int size2 = listJ2.size();
                for (int i10 = 0; i10 < size2; i10++) {
                    Q0.s sVar2 = (Q0.s) listJ2.get(i10);
                    Y0 y03 = (Y0) this.f2850K.b(sVar2.f5811g);
                    if (y03 != null && s().a(sVar2.f5811g)) {
                        B(sVar2, y03);
                    }
                }
                return;
            }
            Q0.s sVar3 = (Q0.s) listJ.get(i6);
            if (s().a(sVar3.f5811g)) {
                C2567B c2567b3 = y02.f2975b;
                int i11 = sVar3.f5811g;
                if (!c2567b3.b(i11)) {
                    w(h5);
                    return;
                }
                c2567b.a(i11);
            }
            i6++;
        }
    }

    public final boolean C(AccessibilityEvent accessibilityEvent) {
        if (!v()) {
            return false;
        }
        if (accessibilityEvent.getEventType() == 2048 || accessibilityEvent.getEventType() == 32768) {
            this.f2868s = true;
        }
        try {
            return ((Boolean) this.f2859f.invoke(accessibilityEvent)).booleanValue();
        } finally {
            this.f2868s = false;
        }
    }

    public final boolean D(int i6, int i7, Integer num, List list) {
        if (i6 == Integer.MIN_VALUE || !v()) {
            return false;
        }
        AccessibilityEvent accessibilityEventO = o(i6, i7);
        if (num != null) {
            accessibilityEventO.setContentChangeTypes(num.intValue());
        }
        if (list != null) {
            accessibilityEventO.setContentDescription(AbstractC2319a.a(list, ",", null, 62));
        }
        return C(accessibilityEventO);
    }

    public final void F(int i6, int i7, String str) {
        AccessibilityEvent accessibilityEventO = o(A(i6), 32);
        accessibilityEventO.setContentChangeTypes(i7);
        if (str != null) {
            accessibilityEventO.getText().add(str);
        }
        C(accessibilityEventO);
    }

    public final void G(int i6) {
        C c6 = this.f2842C;
        if (c6 != null) {
            Q0.s sVar = c6.f2788a;
            if (i6 != sVar.f5811g) {
                return;
            }
            if (SystemClock.uptimeMillis() - c6.f2793f <= 1000) {
                AccessibilityEvent accessibilityEventO = o(A(sVar.f5811g), 131072);
                accessibilityEventO.setFromIndex(c6.f2791d);
                accessibilityEventO.setToIndex(c6.f2792e);
                accessibilityEventO.setAction(c6.f2789b);
                accessibilityEventO.setMovementGranularity(c6.f2790c);
                accessibilityEventO.getText().add(t(sVar));
                C(accessibilityEventO);
            }
        }
        this.f2842C = null;
    }

    /* JADX WARN: Removed duplicated region for block: B:242:0x050b  */
    /* JADX WARN: Removed duplicated region for block: B:244:0x050e  */
    /* JADX WARN: Removed duplicated region for block: B:245:0x0510  */
    /* JADX WARN: Removed duplicated region for block: B:288:0x064e  */
    /* JADX WARN: Removed duplicated region for block: B:48:0x0109  */
    /* JADX WARN: Removed duplicated region for block: B:54:0x0121  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void H(AbstractC2587n abstractC2587n) throws Throwable {
        ArrayList arrayList;
        int[] iArr;
        long[] jArr;
        int i6;
        int i7;
        int i8;
        int i9;
        ArrayList arrayList2;
        int[] iArr2;
        long[] jArr2;
        int i10;
        int i11;
        int i12;
        char c6;
        int i13;
        Q0.n nVar;
        int i14;
        int i15;
        int i16;
        int i17;
        Q0.n nVar2;
        ArrayList arrayList3;
        int i18;
        int i19;
        int i20;
        int i21;
        int i22;
        int i23;
        X0 x02;
        int i24;
        X0 x03;
        int i25;
        String str;
        int i26;
        int i27;
        int i28;
        int i29;
        int i30;
        int i31;
        int i32;
        AccessibilityEvent accessibilityEventP;
        Object obj;
        int i33;
        G g6 = this;
        AbstractC2587n abstractC2587n2 = abstractC2587n;
        ArrayList arrayList4 = g6.f2855P;
        ArrayList arrayList5 = new ArrayList(arrayList4);
        arrayList4.clear();
        int[] iArr3 = abstractC2587n2.f21457b;
        long[] jArr3 = abstractC2587n2.f21456a;
        int i34 = 2;
        int length = jArr3.length - 2;
        if (length < 0) {
            return;
        }
        int i35 = 0;
        while (true) {
            long j4 = jArr3[i35];
            char c7 = 7;
            if ((((~j4) << 7) & j4 & (-9187201950435737472L)) != -9187201950435737472L) {
                int i36 = 8;
                int i37 = 8 - ((~(i35 - length)) >>> 31);
                long j6 = j4;
                int i38 = 0;
                while (i38 < i37) {
                    if ((j6 & 255) < 128) {
                        int i39 = iArr3[(i35 << 3) + i38];
                        Y0 y02 = (Y0) g6.f2850K.b(i39);
                        if (y02 == null) {
                            i9 = i38;
                            arrayList2 = arrayList5;
                            iArr2 = iArr3;
                            jArr2 = jArr3;
                            i10 = i34;
                            i11 = length;
                            i12 = i35;
                            c6 = c7;
                            i13 = i37;
                        } else {
                            i10 = i34;
                            Q0.t tVar = (Q0.t) abstractC2587n2.b(i39);
                            c6 = c7;
                            Q0.s sVar = tVar != null ? tVar.f5812a : null;
                            if (sVar == null) {
                                throw com.google.android.recaptcha.internal.a.g("no value for specified key");
                            }
                            int i40 = 0;
                            Q0.n nVar3 = sVar.f5808d;
                            n.N n6 = nVar3.f5799a;
                            int i41 = i36;
                            Object[] objArr = n6.f21382b;
                            Object[] objArr2 = n6.f21383c;
                            long[] jArr4 = n6.f21381a;
                            i9 = i38;
                            int length2 = jArr4.length - 2;
                            Q0.n nVar4 = y02.f2974a;
                            if (length2 >= 0) {
                                int i42 = i37;
                                int i43 = 0;
                                i15 = 0;
                                while (true) {
                                    long j7 = jArr4[i43];
                                    iArr2 = iArr3;
                                    jArr2 = jArr3;
                                    if ((((~j7) << c6) & j7 & (-9187201950435737472L)) != -9187201950435737472L) {
                                        int i44 = 8 - ((~(i43 - length2)) >>> 31);
                                        long j8 = j7;
                                        int i45 = i40;
                                        while (i45 < i44) {
                                            if ((j8 & 255) < 128) {
                                                int i46 = (i43 << 3) + i45;
                                                Object obj2 = objArr[i46];
                                                Object obj3 = objArr2[i46];
                                                Q0.z zVar = (Q0.z) obj2;
                                                int i47 = length2;
                                                Q0.z zVar2 = Q0.w.f5854u;
                                                if (kotlin.jvm.internal.o.c(zVar, zVar2)) {
                                                    i18 = i45;
                                                } else {
                                                    i18 = i45;
                                                    if (!kotlin.jvm.internal.o.c(zVar, Q0.w.f5855v)) {
                                                        i19 = length;
                                                        i24 = i40;
                                                    }
                                                    n.N n7 = nVar4.f5799a;
                                                    if (i24 != 0) {
                                                        Q0.z zVar3 = Q0.w.f5838d;
                                                        if (kotlin.jvm.internal.o.c(zVar, zVar3)) {
                                                            kotlin.jvm.internal.o.f(obj3, "null cannot be cast to non-null type kotlin.String");
                                                            String str2 = (String) obj3;
                                                            if (n7.b(zVar3)) {
                                                                g6.F(i39, i41, str2);
                                                            }
                                                            i23 = i39;
                                                            nVar2 = nVar4;
                                                            arrayList3 = arrayList5;
                                                            i20 = i35;
                                                            i22 = i42;
                                                            i17 = i47;
                                                            i21 = 8;
                                                        } else if (kotlin.jvm.internal.o.c(zVar, Q0.w.f5836b) || kotlin.jvm.internal.o.c(zVar, Q0.w.f5828J)) {
                                                            i23 = i39;
                                                            nVar2 = nVar4;
                                                            arrayList3 = arrayList5;
                                                            i20 = i35;
                                                            i22 = i42;
                                                            i17 = i47;
                                                            i21 = 8;
                                                            E(g6, g6.A(i23), 2048, 64, 8);
                                                            E(g6, g6.A(i23), 2048, 0, 8);
                                                        } else if (kotlin.jvm.internal.o.c(zVar, Q0.w.f5837c)) {
                                                            i21 = 8;
                                                            E(g6, g6.A(i39), 2048, 64, 8);
                                                            E(g6, g6.A(i39), 2048, Integer.valueOf(i40), 8);
                                                            i23 = i39;
                                                            nVar2 = nVar4;
                                                            arrayList3 = arrayList5;
                                                            i20 = i35;
                                                            i22 = i42;
                                                            i17 = i47;
                                                        } else {
                                                            Q0.z zVar4 = Q0.w.f5827I;
                                                            boolean zC = kotlin.jvm.internal.o.c(zVar, zVar4);
                                                            nVar2 = nVar4;
                                                            I0.H h5 = sVar.f5807c;
                                                            arrayList3 = arrayList5;
                                                            if (zC) {
                                                                Object objD = n6.d(Q0.w.f5858y);
                                                                if (objD == null) {
                                                                    objD = null;
                                                                }
                                                                Q0.j jVar = (Q0.j) objD;
                                                                if (((jVar != null && jVar.f5747a == 4) ? 1 : i40) != 0) {
                                                                    Object objD2 = n6.d(zVar4);
                                                                    if (objD2 == null) {
                                                                        objD2 = null;
                                                                    }
                                                                    if (kotlin.jvm.internal.o.c(objD2, Boolean.TRUE)) {
                                                                        AccessibilityEvent accessibilityEventO = g6.o(g6.A(i39), 4);
                                                                        Q0.s sVar2 = new Q0.s(sVar.f5805a, true, h5, nVar3);
                                                                        Object objD3 = sVar2.k().f5799a.d(Q0.w.f5835a);
                                                                        if (objD3 == null) {
                                                                            objD3 = null;
                                                                        }
                                                                        List list = (List) objD3;
                                                                        String strA = list != null ? AbstractC2319a.a(list, ",", null, 62) : null;
                                                                        Object objD4 = sVar2.k().f5799a.d(Q0.w.f5820B);
                                                                        if (objD4 == null) {
                                                                            objD4 = null;
                                                                        }
                                                                        List list2 = (List) objD4;
                                                                        obj = null;
                                                                        String strA2 = list2 != null ? AbstractC2319a.a(list2, ",", null, 62) : null;
                                                                        if (strA != null) {
                                                                            accessibilityEventO.setContentDescription(strA);
                                                                        }
                                                                        if (strA2 != null) {
                                                                            accessibilityEventO.getText().add(strA2);
                                                                        }
                                                                        g6.C(accessibilityEventO);
                                                                        i33 = 8;
                                                                    } else {
                                                                        obj = null;
                                                                        i33 = 8;
                                                                        E(g6, g6.A(i39), 2048, Integer.valueOf(i40), 8);
                                                                    }
                                                                } else {
                                                                    obj = null;
                                                                    i33 = 8;
                                                                    E(g6, g6.A(i39), 2048, 64, 8);
                                                                    E(g6, g6.A(i39), 2048, Integer.valueOf(i40), 8);
                                                                }
                                                                i23 = i39;
                                                                i21 = i33;
                                                                i20 = i35;
                                                            } else if (kotlin.jvm.internal.o.c(zVar, Q0.w.f5835a)) {
                                                                int iA = g6.A(i39);
                                                                kotlin.jvm.internal.o.f(obj3, "null cannot be cast to non-null type kotlin.collections.List<kotlin.String>");
                                                                g6.D(iA, 2048, 4, (List) obj3);
                                                                i23 = i39;
                                                                i20 = i35;
                                                                i21 = 8;
                                                            } else {
                                                                Q0.z zVar5 = Q0.w.f5824F;
                                                                String str3 = "";
                                                                if (kotlin.jvm.internal.o.c(zVar, zVar5)) {
                                                                    if (n6.b(Q0.m.f5784k)) {
                                                                        Object objD5 = n7.d(zVar5);
                                                                        if (objD5 == null) {
                                                                            objD5 = null;
                                                                        }
                                                                        C0596g c0596g = (C0596g) objD5;
                                                                        if (c0596g == null) {
                                                                            c0596g = "";
                                                                        }
                                                                        Object objD6 = n6.d(zVar5);
                                                                        if (objD6 == null) {
                                                                            objD6 = null;
                                                                        }
                                                                        CharSequence charSequence = (C0596g) objD6;
                                                                        if (charSequence == null) {
                                                                            charSequence = "";
                                                                        }
                                                                        CharSequence charSequenceP = P(charSequence);
                                                                        int length3 = c0596g.length();
                                                                        int length4 = charSequence.length();
                                                                        int i48 = length3 > length4 ? length4 : length3;
                                                                        int i49 = i40;
                                                                        while (true) {
                                                                            i28 = length4;
                                                                            if (i49 >= i48) {
                                                                                i29 = i48;
                                                                                break;
                                                                            }
                                                                            i29 = i48;
                                                                            if (c0596g.charAt(i49) != charSequence.charAt(i49)) {
                                                                                break;
                                                                            }
                                                                            i49++;
                                                                            length4 = i28;
                                                                            i48 = i29;
                                                                        }
                                                                        int i50 = i40;
                                                                        while (true) {
                                                                            if (i50 >= i29 - i49) {
                                                                                i30 = i50;
                                                                                break;
                                                                            }
                                                                            i30 = i50;
                                                                            if (c0596g.charAt((length3 - 1) - i50) != charSequence.charAt((i28 - 1) - i30)) {
                                                                                break;
                                                                            } else {
                                                                                i50 = i30 + 1;
                                                                            }
                                                                        }
                                                                        int i51 = (length3 - i30) - i49;
                                                                        int i52 = (i28 - i30) - i49;
                                                                        Q0.z zVar6 = Q0.w.f5829K;
                                                                        boolean zB = n7.b(zVar6);
                                                                        boolean zB2 = n6.b(zVar6);
                                                                        boolean zB3 = n7.b(Q0.w.f5824F);
                                                                        int i53 = (zB3 && !zB && zB2) ? 1 : i40;
                                                                        int i54 = (zB3 && zB && !zB2) ? 1 : i40;
                                                                        if (i53 == 0 && i54 == 0) {
                                                                            i31 = i54;
                                                                            i32 = i53;
                                                                            accessibilityEventP = g6.o(g6.A(i39), 16);
                                                                            accessibilityEventP.setFromIndex(i49);
                                                                            accessibilityEventP.setRemovedCount(i51);
                                                                            accessibilityEventP.setAddedCount(i52);
                                                                            accessibilityEventP.setBeforeText(c0596g);
                                                                            accessibilityEventP.getText().add(charSequenceP);
                                                                            i26 = i39;
                                                                            i27 = 8;
                                                                        } else {
                                                                            i31 = i54;
                                                                            i32 = i53;
                                                                            i26 = i39;
                                                                            i27 = 8;
                                                                            accessibilityEventP = g6.p(g6.A(i39), Integer.valueOf(i40), Integer.valueOf(i40), Integer.valueOf(i28), charSequenceP);
                                                                        }
                                                                        accessibilityEventP.setClassName("android.widget.EditText");
                                                                        g6.C(accessibilityEventP);
                                                                        if (i32 != 0 || i31 != 0) {
                                                                            long j9 = ((T0.N) nVar3.j(Q0.w.f5825G)).f6483a;
                                                                            accessibilityEventP.setFromIndex((int) (j9 >> 32));
                                                                            accessibilityEventP.setToIndex((int) (j9 & 4294967295L));
                                                                            g6.C(accessibilityEventP);
                                                                        }
                                                                    } else {
                                                                        i26 = i39;
                                                                        i27 = 8;
                                                                        E(g6, g6.A(i26), 2048, Integer.valueOf(i10), 8);
                                                                    }
                                                                    i21 = i27;
                                                                    i20 = i35;
                                                                    i17 = i47;
                                                                    i23 = i26;
                                                                    i22 = i42;
                                                                } else {
                                                                    i17 = i47;
                                                                    Q0.z zVar7 = Q0.w.f5825G;
                                                                    boolean zC2 = kotlin.jvm.internal.o.c(zVar, zVar7);
                                                                    i20 = i35;
                                                                    int i55 = sVar.f5811g;
                                                                    if (zC2) {
                                                                        Object objD7 = n6.d(zVar5);
                                                                        if (objD7 == null) {
                                                                            objD7 = null;
                                                                        }
                                                                        C0596g c0596g2 = (C0596g) objD7;
                                                                        if (c0596g2 != null && (str = c0596g2.f6510b) != null) {
                                                                            str3 = str;
                                                                        }
                                                                        T0.N n8 = (T0.N) nVar3.j(zVar7);
                                                                        int iA2 = g6.A(i39);
                                                                        long j10 = n8.f6483a;
                                                                        i23 = i39;
                                                                        i22 = i42;
                                                                        g6 = this;
                                                                        g6.C(g6.p(iA2, Integer.valueOf((int) (j10 >> 32)), Integer.valueOf((int) (j10 & 4294967295L)), Integer.valueOf(str3.length()), P(str3)));
                                                                        g6.G(i55);
                                                                    } else {
                                                                        i23 = i39;
                                                                        i22 = i42;
                                                                        if (kotlin.jvm.internal.o.c(zVar, zVar2) || kotlin.jvm.internal.o.c(zVar, Q0.w.f5855v)) {
                                                                            g6.w(h5);
                                                                            int size = arrayList4.size();
                                                                            int i56 = 0;
                                                                            while (true) {
                                                                                if (i56 >= size) {
                                                                                    x03 = null;
                                                                                    break;
                                                                                } else {
                                                                                    if (((X0) arrayList4.get(i56)).f2968a == i23) {
                                                                                        x03 = (X0) arrayList4.get(i56);
                                                                                        break;
                                                                                    }
                                                                                    i56++;
                                                                                }
                                                                            }
                                                                            kotlin.jvm.internal.o.e(x03);
                                                                            Object objD8 = n6.d(zVar2);
                                                                            if (objD8 == null) {
                                                                                objD8 = null;
                                                                            }
                                                                            x03.f2972e = (Q0.k) objD8;
                                                                            Object objD9 = n6.d(Q0.w.f5855v);
                                                                            if (objD9 == null) {
                                                                                objD9 = null;
                                                                            }
                                                                            x03.f2973f = (Q0.k) objD9;
                                                                            if (x03.f2969b.contains(x03)) {
                                                                                g6.f2857d.getSnapshotObserver().f2468a.observeReads(x03, g6.f2856Q, new C0104e(5, x03, g6));
                                                                            }
                                                                        } else if (kotlin.jvm.internal.o.c(zVar, Q0.w.f5845k)) {
                                                                            kotlin.jvm.internal.o.f(obj3, "null cannot be cast to non-null type kotlin.Boolean");
                                                                            if (((Boolean) obj3).booleanValue()) {
                                                                                i21 = 8;
                                                                                g6.C(g6.o(g6.A(i55), 8));
                                                                            } else {
                                                                                i21 = 8;
                                                                            }
                                                                            E(g6, g6.A(i55), 2048, Integer.valueOf(i40), i21);
                                                                        } else {
                                                                            Q0.z zVar8 = Q0.m.f5796x;
                                                                            if (kotlin.jvm.internal.o.c(zVar, zVar8)) {
                                                                                List list3 = (List) nVar3.j(zVar8);
                                                                                Object objD10 = n7.d(zVar8);
                                                                                if (objD10 == null) {
                                                                                    objD10 = null;
                                                                                }
                                                                                List list4 = (List) objD10;
                                                                                if (list4 != null) {
                                                                                    LinkedHashSet linkedHashSet = new LinkedHashSet();
                                                                                    if (list3.size() > 0) {
                                                                                        list3.get(i40).getClass();
                                                                                        throw new ClassCastException();
                                                                                    }
                                                                                    LinkedHashSet linkedHashSet2 = new LinkedHashSet();
                                                                                    if (list4.size() > 0) {
                                                                                        list4.get(i40).getClass();
                                                                                        throw new ClassCastException();
                                                                                    }
                                                                                    i25 = (linkedHashSet.containsAll(linkedHashSet2) && linkedHashSet2.containsAll(linkedHashSet)) ? i40 : 1;
                                                                                } else if (!list3.isEmpty()) {
                                                                                    i15 = 1;
                                                                                }
                                                                            } else if (obj3 instanceof C0586a) {
                                                                                C0586a c0586a = (C0586a) obj3;
                                                                                Object objD11 = n7.d(zVar);
                                                                                if (objD11 == null) {
                                                                                    objD11 = null;
                                                                                }
                                                                                if (c0586a != objD11) {
                                                                                    if (objD11 instanceof C0586a) {
                                                                                        C0586a c0586a2 = (C0586a) objD11;
                                                                                        if (kotlin.jvm.internal.o.c(c0586a.f5729a, c0586a2.f5729a)) {
                                                                                            InterfaceC3143e interfaceC3143e = c0586a2.f5730b;
                                                                                            InterfaceC3143e interfaceC3143e2 = c0586a.f5730b;
                                                                                            boolean z6 = (interfaceC3143e2 != null || interfaceC3143e == null) && (interfaceC3143e2 == null || interfaceC3143e != null);
                                                                                            i25 = z6 ? 1 : 0;
                                                                                        }
                                                                                    }
                                                                                    if (z6) {
                                                                                    }
                                                                                }
                                                                            }
                                                                            i15 = i25;
                                                                        }
                                                                    }
                                                                    i21 = 8;
                                                                }
                                                            }
                                                            i22 = i42;
                                                            i17 = i47;
                                                        }
                                                    } else {
                                                        Object objD12 = n7.d(zVar);
                                                        if (objD12 == null) {
                                                            objD12 = null;
                                                        }
                                                        if (kotlin.jvm.internal.o.c(obj3, objD12)) {
                                                            i23 = i39;
                                                            nVar2 = nVar4;
                                                            arrayList3 = arrayList5;
                                                            i20 = i35;
                                                            i21 = i41;
                                                        }
                                                        i22 = i42;
                                                        i17 = i47;
                                                    }
                                                }
                                                int size2 = arrayList5.size();
                                                i19 = length;
                                                int i57 = i40;
                                                while (true) {
                                                    if (i57 >= size2) {
                                                        x02 = null;
                                                        break;
                                                    }
                                                    int i58 = size2;
                                                    if (((X0) arrayList5.get(i57)).f2968a == i39) {
                                                        x02 = (X0) arrayList5.get(i57);
                                                        break;
                                                    } else {
                                                        i57++;
                                                        size2 = i58;
                                                    }
                                                }
                                                if (x02 != null) {
                                                    i24 = i40;
                                                } else {
                                                    x02 = new X0(i39, arrayList4);
                                                    i24 = 1;
                                                }
                                                arrayList4.add(x02);
                                                n.N n72 = nVar4.f5799a;
                                                if (i24 != 0) {
                                                }
                                            } else {
                                                i17 = length2;
                                                nVar2 = nVar4;
                                                arrayList3 = arrayList5;
                                                i18 = i45;
                                                i19 = length;
                                                i20 = i35;
                                                i21 = i41;
                                                i22 = i42;
                                                i23 = i39;
                                            }
                                            j8 >>= i21;
                                            i45 = i18 + 1;
                                            i41 = i21;
                                            i42 = i22;
                                            i39 = i23;
                                            length = i19;
                                            nVar4 = nVar2;
                                            arrayList5 = arrayList3;
                                            i35 = i20;
                                            length2 = i17;
                                            i40 = 0;
                                        }
                                        int i59 = length2;
                                        nVar = nVar4;
                                        arrayList2 = arrayList5;
                                        i11 = length;
                                        i12 = i35;
                                        i13 = i42;
                                        i14 = i39;
                                        if (i44 != i41) {
                                            break;
                                        } else {
                                            length2 = i59;
                                        }
                                    } else {
                                        nVar = nVar4;
                                        arrayList2 = arrayList5;
                                        i11 = length;
                                        i12 = i35;
                                        i13 = i42;
                                        i14 = i39;
                                    }
                                    if (i43 == length2) {
                                        break;
                                    }
                                    i43++;
                                    i42 = i13;
                                    i39 = i14;
                                    iArr3 = iArr2;
                                    jArr3 = jArr2;
                                    length = i11;
                                    nVar4 = nVar;
                                    arrayList5 = arrayList2;
                                    i35 = i12;
                                    i40 = 0;
                                    i41 = 8;
                                }
                            } else {
                                nVar = nVar4;
                                arrayList2 = arrayList5;
                                iArr2 = iArr3;
                                jArr2 = jArr3;
                                i11 = length;
                                i12 = i35;
                                i14 = i39;
                                i13 = i37;
                                i15 = 0;
                            }
                            if (i15 == 0) {
                                Iterator it = nVar.iterator();
                                while (true) {
                                    if (!it.hasNext()) {
                                        i16 = 0;
                                        break;
                                    } else {
                                        if (!sVar.k().f5799a.b((Q0.z) ((Map.Entry) it.next()).getKey())) {
                                            i16 = 1;
                                            break;
                                        }
                                    }
                                }
                                i15 = i16;
                            }
                            if (i15 != 0) {
                                i36 = 8;
                                E(g6, g6.A(i14), 2048, 0, 8);
                            } else {
                                i36 = 8;
                            }
                        }
                    }
                    j6 >>= i36;
                    i38 = i9 + 1;
                    abstractC2587n2 = abstractC2587n;
                    i37 = i13;
                    c7 = c6;
                    i34 = i10;
                    iArr3 = iArr2;
                    jArr3 = jArr2;
                    length = i11;
                    arrayList5 = arrayList2;
                    i35 = i12;
                }
                arrayList = arrayList5;
                iArr = iArr3;
                jArr = jArr3;
                i6 = i34;
                int i60 = length;
                int i61 = i35;
                if (i37 != i36) {
                    return;
                }
                i7 = i60;
                i8 = i61;
            } else {
                arrayList = arrayList5;
                iArr = iArr3;
                jArr = jArr3;
                i6 = i34;
                i7 = length;
                i8 = i35;
            }
            if (i8 == i7) {
                return;
            }
            i35 = i8 + 1;
            abstractC2587n2 = abstractC2587n;
            length = i7;
            i34 = i6;
            iArr3 = iArr;
            jArr3 = jArr;
            arrayList5 = arrayList;
        }
    }

    public final void I(I0.H h5, C2567B c2567b) {
        Q0.n nVarV;
        if (h5.F() && !this.f2857d.getAndroidViewsHandler$ui().getLayoutNodeToHolder().containsKey(h5)) {
            I0.H h6 = null;
            if (!h5.f2162J.f(8)) {
                h5 = h5.t();
                while (true) {
                    if (h5 == null) {
                        h5 = null;
                        break;
                    } else if (h5.f2162J.f(8)) {
                        break;
                    } else {
                        h5 = h5.t();
                    }
                }
            }
            if (h5 == null || (nVarV = h5.v()) == null) {
                return;
            }
            if (!nVarV.f5801c) {
                I0.H hT = h5.t();
                while (true) {
                    if (hT != null) {
                        Q0.n nVarV2 = hT.v();
                        if (nVarV2 != null && nVarV2.f5801c) {
                            h6 = hT;
                            break;
                        }
                        hT = hT.t();
                    } else {
                        break;
                    }
                }
                if (h6 != null) {
                    h5 = h6;
                }
            }
            int i6 = h5.f2175b;
            if (c2567b.a(i6)) {
                E(this, A(i6), 2048, 1, 8);
            }
        }
    }

    public final void J(I0.H h5) {
        if (h5.F() && !this.f2857d.getAndroidViewsHandler$ui().getLayoutNodeToHolder().containsKey(h5)) {
            int i6 = h5.f2175b;
            Q0.k kVar = (Q0.k) this.f2869t.b(i6);
            Q0.k kVar2 = (Q0.k) this.f2870u.b(i6);
            if (kVar == null && kVar2 == null) {
                return;
            }
            AccessibilityEvent accessibilityEventO = o(i6, 4096);
            if (kVar != null) {
                accessibilityEventO.setScrollX((int) ((Number) kVar.f5748a.invoke()).floatValue());
                accessibilityEventO.setMaxScrollX((int) ((Number) kVar.f5749b.invoke()).floatValue());
            }
            if (kVar2 != null) {
                accessibilityEventO.setScrollY((int) ((Number) kVar2.f5748a.invoke()).floatValue());
                accessibilityEventO.setMaxScrollY((int) ((Number) kVar2.f5749b.invoke()).floatValue());
            }
            C(accessibilityEventO);
        }
    }

    public final boolean K(Q0.s sVar, int i6, int i7, boolean z6) {
        String strT;
        Q0.n nVar = sVar.f5808d;
        Q0.z zVar = Q0.m.f5783j;
        if (nVar.f5799a.b(zVar) && O.d(sVar)) {
            J4.f fVar = (J4.f) ((C0586a) sVar.f5808d.j(zVar)).f5730b;
            if (fVar != null) {
                return ((Boolean) fVar.invoke(Integer.valueOf(i6), Integer.valueOf(i7), Boolean.valueOf(z6))).booleanValue();
            }
        } else if ((i6 != i7 || i7 != this.f2873x) && (strT = t(sVar)) != null) {
            if (i6 < 0 || i6 != i7 || i7 > strT.length()) {
                i6 = -1;
            }
            this.f2873x = i6;
            boolean z7 = strT.length() > 0;
            int i8 = sVar.f5811g;
            C(p(A(i8), z7 ? Integer.valueOf(this.f2873x) : null, z7 ? Integer.valueOf(this.f2873x) : null, z7 ? Integer.valueOf(strT.length()) : null, strT));
            G(i8);
            return true;
        }
        return false;
    }

    public final Rect M(float f6, float f7, float f8, float f9) {
        long jFloatToRawIntBits = (((long) Float.floatToRawIntBits(f7)) & 4294967295L) | (Float.floatToRawIntBits(f6) << 32);
        A a6 = this.f2857d;
        long jS = a6.s(jFloatToRawIntBits);
        long jS2 = a6.s((((long) Float.floatToRawIntBits(f9)) & 4294967295L) | (Float.floatToRawIntBits(f8) << 32));
        int i6 = (int) (jS >> 32);
        int i7 = (int) (jS2 >> 32);
        int i8 = (int) (jS & 4294967295L);
        int i9 = (int) (jS2 & 4294967295L);
        return new Rect((int) Math.floor(Math.min(Float.intBitsToFloat(i6), Float.intBitsToFloat(i7))), (int) Math.floor(Math.min(Float.intBitsToFloat(i8), Float.intBitsToFloat(i9))), (int) Math.ceil(Math.max(Float.intBitsToFloat(i6), Float.intBitsToFloat(i7))), (int) Math.ceil(Math.max(Float.intBitsToFloat(i8), Float.intBitsToFloat(i9))));
    }

    /* JADX WARN: Code restructure failed: missing block: B:53:0x0147, code lost:
    
        r28 = r1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:54:0x0151, code lost:
    
        if (((r7 & ((~r7) << 6)) & r22) == 0) goto L58;
     */
    /* JADX WARN: Code restructure failed: missing block: B:55:0x0153, code lost:
    
        r25 = -1;
     */
    /* JADX WARN: Removed duplicated region for block: B:18:0x0063  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void Q() {
        char c6;
        long j4;
        long j6;
        long j7;
        long[] jArr;
        long[] jArr2;
        long j8;
        int i6;
        int i7;
        int iNumberOfTrailingZeros;
        char c7;
        long j9;
        String str;
        C2567B c2567b = new C2567B();
        C2567B c2567b2 = this.f2844E;
        int[] iArr = c2567b2.f21313b;
        long[] jArr3 = c2567b2.f21312a;
        int length = jArr3.length - 2;
        C2566A c2566a = this.f2850K;
        char c8 = 7;
        long j10 = -9187201950435737472L;
        int i8 = 8;
        if (length >= 0) {
            int i9 = 0;
            j6 = 128;
            while (true) {
                long j11 = jArr3[i9];
                j7 = 255;
                if ((((~j11) << c8) & j11 & j10) != j10) {
                    int i10 = 8 - ((~(i9 - length)) >>> 31);
                    int i11 = 0;
                    while (i11 < i10) {
                        if ((j11 & 255) < 128) {
                            c7 = c8;
                            int i12 = iArr[(i9 << 3) + i11];
                            j9 = j10;
                            Q0.t tVar = (Q0.t) s().b(i12);
                            Q0.s sVar = tVar != null ? tVar.f5812a : null;
                            if (sVar != null) {
                                if (!sVar.f5808d.f5799a.b(Q0.w.f5838d)) {
                                    c2567b.a(i12);
                                    Y0 y02 = (Y0) c2566a.b(i12);
                                    if (y02 != null) {
                                        Object objD = y02.f2974a.f5799a.d(Q0.w.f5838d);
                                        str = (String) (objD == null ? null : objD);
                                    } else {
                                        str = null;
                                    }
                                    F(i12, 32, str);
                                }
                            }
                        } else {
                            c7 = c8;
                            j9 = j10;
                        }
                        j11 >>= 8;
                        i11++;
                        c8 = c7;
                        j10 = j9;
                    }
                    c6 = c8;
                    j4 = j10;
                    if (i10 != 8) {
                        break;
                    }
                } else {
                    c6 = c8;
                    j4 = j10;
                }
                if (i9 == length) {
                    break;
                }
                i9++;
                c8 = c6;
                j10 = j4;
            }
        } else {
            c6 = 7;
            j4 = -9187201950435737472L;
            j6 = 128;
            j7 = 255;
        }
        int[] iArr2 = c2567b.f21313b;
        long[] jArr4 = c2567b.f21312a;
        int length2 = jArr4.length - 2;
        if (length2 >= 0) {
            int i13 = 0;
            while (true) {
                long j12 = jArr4[i13];
                if ((((~j12) << c6) & j12 & j4) != j4) {
                    int i14 = 8 - ((~(i13 - length2)) >>> 31);
                    int i15 = 0;
                    while (i15 < i14) {
                        if ((j12 & j7) < j6) {
                            int i16 = iArr2[(i13 << 3) + i15];
                            int iHashCode = Integer.hashCode(i16) * (-862048943);
                            int i17 = iHashCode ^ (iHashCode << 16);
                            int i18 = i17 & 127;
                            int i19 = c2567b2.f21314c;
                            int i20 = (i17 >>> 7) & i19;
                            i6 = i8;
                            int i21 = 0;
                            while (true) {
                                long[] jArr5 = c2567b2.f21312a;
                                int i22 = i20 >> 3;
                                jArr2 = jArr4;
                                int i23 = (i20 & 7) << 3;
                                j8 = j12;
                                long j13 = (jArr5[i22] >>> i23) | ((jArr5[i22 + 1] << (64 - i23)) & ((-i23) >> 63));
                                int i24 = i19;
                                long j14 = (((long) i18) * 72340172838076673L) ^ j13;
                                long j15 = (j14 - 72340172838076673L) & (~j14) & j4;
                                while (true) {
                                    if (j15 == 0) {
                                        break;
                                    }
                                    iNumberOfTrailingZeros = (i20 + (Long.numberOfTrailingZeros(j15) >> 3)) & i24;
                                    int i25 = i24;
                                    if (c2567b2.f21313b[iNumberOfTrailingZeros] == i16) {
                                        break;
                                    }
                                    j15 &= j15 - 1;
                                    i24 = i25;
                                }
                                i21 += 8;
                                i20 = (i20 + i21) & i7;
                                jArr4 = jArr2;
                                i19 = i7;
                                j12 = j8;
                            }
                            int i26 = iNumberOfTrailingZeros;
                            if (i26 >= 0) {
                                c2567b2.g(i26);
                            }
                        } else {
                            jArr2 = jArr4;
                            j8 = j12;
                            i6 = i8;
                        }
                        j12 = j8 >> i6;
                        i15++;
                        i8 = i6;
                        jArr4 = jArr2;
                    }
                    jArr = jArr4;
                    if (i14 != i8) {
                        break;
                    }
                } else {
                    jArr = jArr4;
                }
                if (i13 == length2) {
                    break;
                }
                i13++;
                jArr4 = jArr;
                i8 = 8;
            }
        }
        c2566a.c();
        AbstractC2587n abstractC2587nS = s();
        int[] iArr3 = abstractC2587nS.f21457b;
        Object[] objArr = abstractC2587nS.f21458c;
        long[] jArr6 = abstractC2587nS.f21456a;
        int length3 = jArr6.length - 2;
        if (length3 >= 0) {
            int i27 = 0;
            while (true) {
                long j16 = jArr6[i27];
                if ((((~j16) << c6) & j16 & j4) != j4) {
                    int i28 = 8 - ((~(i27 - length3)) >>> 31);
                    for (int i29 = 0; i29 < i28; i29++) {
                        if ((j16 & j7) < j6) {
                            int i30 = (i27 << 3) + i29;
                            int i31 = iArr3[i30];
                            Q0.t tVar2 = (Q0.t) objArr[i30];
                            Q0.n nVar = tVar2.f5812a.f5808d;
                            Q0.z zVar = Q0.w.f5838d;
                            boolean zB = nVar.f5799a.b(zVar);
                            Q0.s sVar2 = tVar2.f5812a;
                            if (zB && c2567b2.a(i31)) {
                                F(i31, 16, (String) sVar2.f5808d.j(zVar));
                            }
                            c2566a.i(i31, new Y0(sVar2, s()));
                        }
                        j16 >>= 8;
                    }
                    if (i28 != 8) {
                        break;
                    }
                }
                if (i27 == length3) {
                    break;
                } else {
                    i27++;
                }
            }
        }
        this.f2851L = new Y0(this.f2857d.getSemanticsOwner().a(), s());
    }

    @Override // F1.C0173b
    public final C0.B b(View view) {
        return this.f2863n;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public final void j(int i6, G1.g gVar, String str, Bundle bundle) {
        Q0.s sVar;
        int i7;
        A a6;
        RectF rectF;
        Q0.t tVar = (Q0.t) s().b(i6);
        if (tVar == null || (sVar = tVar.f5812a) == null) {
            return;
        }
        String strT = t(sVar);
        boolean zC = kotlin.jvm.internal.o.c(str, this.f2847H);
        AccessibilityNodeInfo accessibilityNodeInfo = gVar.f2048a;
        if (zC) {
            int iD = this.f2845F.d(i6);
            if (iD != -1) {
                accessibilityNodeInfo.getExtras().putInt(str, iD);
                return;
            }
            return;
        }
        if (kotlin.jvm.internal.o.c(str, this.f2848I)) {
            int iD2 = this.f2846G.d(i6);
            if (iD2 != -1) {
                accessibilityNodeInfo.getExtras().putInt(str, iD2);
                return;
            }
            return;
        }
        Q0.z zVar = Q0.m.f5774a;
        Q0.n nVar = sVar.f5808d;
        n.N n6 = nVar.f5799a;
        boolean zB = n6.b(zVar);
        A a7 = this.f2857d;
        AbstractC0300j0 abstractC0300j0 = null;
        if (zB && bundle != null && kotlin.jvm.internal.o.c(str, "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_KEY")) {
            int i8 = bundle.getInt("android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX", -1);
            int i9 = bundle.getInt("android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH", -1);
            if (i9 > 0 && i8 >= 0) {
                if (i8 < (strT != null ? strT.length() : Integer.MAX_VALUE)) {
                    T0.L lO = O.o(nVar);
                    if (lO == null) {
                        return;
                    }
                    ArrayList arrayList = new ArrayList();
                    int i10 = 0;
                    while (i10 < i9) {
                        int i11 = i8 + i10;
                        if (i11 >= lO.f6471a.f6461a.f6510b.length()) {
                            arrayList.add(abstractC0300j0);
                            i7 = i10;
                            a6 = a7;
                        } else {
                            C2632c c2632cB = lO.b(i11);
                            AbstractC0300j0 abstractC0300j0D = sVar.d();
                            long jE0 = 0;
                            if (abstractC0300j0D != null) {
                                if (!abstractC0300j0D.w()) {
                                    abstractC0300j0D = abstractC0300j0;
                                }
                                if (abstractC0300j0D != null) {
                                    jE0 = abstractC0300j0D.e0(0L);
                                }
                            }
                            C2632c c2632cI = c2632cB.i(jE0);
                            C2632c c2632cG = sVar.g();
                            C2632c c2632cE = c2632cI.g(c2632cG) ? c2632cI.e(c2632cG) : abstractC0300j0;
                            if (c2632cE != 0) {
                                long jS = a7.s((((long) Float.floatToRawIntBits(c2632cE.f21788b)) & 4294967295L) | (((long) Float.floatToRawIntBits(c2632cE.f21787a)) << 32));
                                i7 = i10;
                                long jS2 = a7.s((((long) Float.floatToRawIntBits(c2632cE.f21790d)) & 4294967295L) | (((long) Float.floatToRawIntBits(c2632cE.f21789c)) << 32));
                                int i12 = (int) (jS >> 32);
                                int i13 = (int) (jS2 >> 32);
                                int i14 = (int) (jS & 4294967295L);
                                a6 = a7;
                                int i15 = (int) (jS2 & 4294967295L);
                                rectF = new RectF(Math.min(Float.intBitsToFloat(i12), Float.intBitsToFloat(i13)), Math.min(Float.intBitsToFloat(i14), Float.intBitsToFloat(i15)), Math.max(Float.intBitsToFloat(i12), Float.intBitsToFloat(i13)), Math.max(Float.intBitsToFloat(i14), Float.intBitsToFloat(i15)));
                            } else {
                                i7 = i10;
                                a6 = a7;
                                rectF = null;
                            }
                            arrayList.add(rectF);
                        }
                        i10 = i7 + 1;
                        a7 = a6;
                        abstractC0300j0 = null;
                    }
                    accessibilityNodeInfo.getExtras().putParcelableArray(str, (Parcelable[]) arrayList.toArray(new RectF[0]));
                    return;
                }
            }
            Log.e("AccessibilityDelegate", "Invalid arguments for accessibility character locations");
            return;
        }
        Q0.z zVar2 = Q0.w.f5859z;
        if (n6.b(zVar2) && bundle != null && kotlin.jvm.internal.o.c(str, "androidx.compose.ui.semantics.testTag")) {
            Object objD = n6.d(zVar2);
            String str2 = (String) (objD == null ? null : objD);
            if (str2 != null) {
                accessibilityNodeInfo.getExtras().putCharSequence(str, str2);
                return;
            }
            return;
        }
        if (kotlin.jvm.internal.o.c(str, "androidx.compose.ui.semantics.id")) {
            accessibilityNodeInfo.getExtras().putInt(str, sVar.f5811g);
            return;
        }
        boolean zC2 = kotlin.jvm.internal.o.c(str, "androidx.compose.ui.semantics.shapeType");
        I0.H h5 = sVar.f5807c;
        if (zC2) {
            Object objD2 = n6.d(Q0.w.f5834P);
            if (objD2 == null) {
                objD2 = null;
            }
            p0.X x6 = (p0.X) objD2;
            if (x6 != null) {
                Rect rect = new Rect();
                accessibilityNodeInfo.getBoundsInScreen(rect);
                C2632c c2632cU = u(sVar, rect, x6);
                p0.N nMo3createOutlinePq9zytI = x6.mo3createOutlinePq9zytI(c2632cU.c(), h5.f2156D, a7.getDensity());
                boolean z6 = nMo3createOutlinePq9zytI instanceof C2694L;
                float f6 = c2632cU.f21788b;
                float f7 = c2632cU.f21787a;
                if (z6) {
                    accessibilityNodeInfo.getExtras().putInt("androidx.compose.ui.semantics.shapeType", 0);
                    accessibilityNodeInfo.getExtras().putParcelable("androidx.compose.ui.semantics.shapeRect", L(nMo3createOutlinePq9zytI, f7, f6));
                    return;
                } else if (nMo3createOutlinePq9zytI instanceof p0.M) {
                    accessibilityNodeInfo.getExtras().putInt("androidx.compose.ui.semantics.shapeType", 1);
                    accessibilityNodeInfo.getExtras().putParcelable("androidx.compose.ui.semantics.shapeRect", L(nMo3createOutlinePq9zytI, f7, f6));
                    accessibilityNodeInfo.getExtras().putFloatArray("androidx.compose.ui.semantics.shapeCorners", N(nMo3createOutlinePq9zytI));
                    return;
                } else {
                    if (!(nMo3createOutlinePq9zytI instanceof C2693K)) {
                        throw new E3.v();
                    }
                    accessibilityNodeInfo.getExtras().putInt("androidx.compose.ui.semantics.shapeType", 2);
                    accessibilityNodeInfo.getExtras().putParcelable("androidx.compose.ui.semantics.shapeRegion", O(nMo3createOutlinePq9zytI, f7, f6));
                    return;
                }
            }
            return;
        }
        if (kotlin.jvm.internal.o.c(str, "androidx.compose.ui.semantics.shapeRect")) {
            Object objD3 = n6.d(Q0.w.f5834P);
            if (objD3 == null) {
                objD3 = null;
            }
            p0.X x7 = (p0.X) objD3;
            if (x7 != null) {
                Rect rect2 = new Rect();
                accessibilityNodeInfo.getBoundsInScreen(rect2);
                C2632c c2632cU2 = u(sVar, rect2, x7);
                Rect rectL = L(x7.mo3createOutlinePq9zytI(c2632cU2.c(), h5.f2156D, a7.getDensity()), c2632cU2.f21787a, c2632cU2.f21788b);
                if (rectL != null) {
                    accessibilityNodeInfo.getExtras().putParcelable("androidx.compose.ui.semantics.shapeRect", rectL);
                    return;
                }
                return;
            }
            return;
        }
        if (kotlin.jvm.internal.o.c(str, "androidx.compose.ui.semantics.shapeCorners")) {
            Object objD4 = n6.d(Q0.w.f5834P);
            if (objD4 == null) {
                objD4 = null;
            }
            p0.X x8 = (p0.X) objD4;
            if (x8 != null) {
                Rect rect3 = new Rect();
                accessibilityNodeInfo.getBoundsInScreen(rect3);
                float[] fArrN = N(x8.mo3createOutlinePq9zytI(u(sVar, rect3, x8).c(), h5.f2156D, a7.getDensity()));
                if (fArrN != null) {
                    accessibilityNodeInfo.getExtras().putFloatArray("androidx.compose.ui.semantics.shapeCorners", fArrN);
                    return;
                }
                return;
            }
            return;
        }
        if (kotlin.jvm.internal.o.c(str, "androidx.compose.ui.semantics.shapeRegion")) {
            Object objD5 = n6.d(Q0.w.f5834P);
            if (objD5 == null) {
                objD5 = null;
            }
            p0.X x9 = (p0.X) objD5;
            if (x9 != null) {
                Rect rect4 = new Rect();
                accessibilityNodeInfo.getBoundsInScreen(rect4);
                C2632c c2632cU3 = u(sVar, rect4, x9);
                Region regionO = O(x9.mo3createOutlinePq9zytI(c2632cU3.c(), h5.f2156D, a7.getDensity()), c2632cU3.f21787a, c2632cU3.f21788b);
                if (regionO != null) {
                    accessibilityNodeInfo.getExtras().putParcelable("androidx.compose.ui.semantics.shapeRegion", regionO);
                }
            }
        }
    }

    public final Rect k(Q0.t tVar) {
        h1.k kVar = tVar.f5813b;
        return M(kVar.f16623a, kVar.f16624b, kVar.f16625c, kVar.f16626d);
    }

    /* JADX WARN: Code restructure failed: missing block: B:48:0x00f2, code lost:
    
        if (V4.E.l(r6, r2) == r3) goto L49;
     */
    /* JADX WARN: Removed duplicated region for block: B:26:0x0069  */
    /* JADX WARN: Removed duplicated region for block: B:27:0x006b  */
    /* JADX WARN: Removed duplicated region for block: B:30:0x0077 A[Catch: all -> 0x0037, TryCatch #1 {all -> 0x0037, blocks: (B:13:0x0030, B:24:0x005d, B:28:0x006f, B:30:0x0077, B:32:0x0080, B:34:0x0085, B:35:0x0094, B:37:0x009d, B:20:0x0047, B:23:0x004e), top: B:57:0x0026 }] */
    /* JADX WARN: Removed duplicated region for block: B:51:0x00fb  */
    /* JADX WARN: Removed duplicated region for block: B:7:0x0017  */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:48:0x00f2 -> B:50:0x00f5). Please report as a decompilation issue!!! */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object l(C4.c cVar) throws Throwable {
        D d6;
        C2579f c2579f;
        C2567B c2567b;
        X4.b bVar;
        C2567B c2567b2;
        X4.b bVar2;
        int i6;
        long j4;
        Object objB;
        if (cVar instanceof D) {
            d6 = (D) cVar;
            int i7 = d6.f2806e;
            if ((i7 & Integer.MIN_VALUE) != 0) {
                d6.f2806e = i7 - Integer.MIN_VALUE;
            } else {
                d6 = new D(this, cVar);
            }
        }
        Object obj = d6.f2804c;
        B4.a aVar = B4.a.f492a;
        int i8 = d6.f2806e;
        C2579f c2579f2 = this.f2875z;
        try {
            if (i8 == 0) {
                AbstractC2467b.l(obj);
                c2567b = new C2567B();
                X4.e eVar = this.f2840A;
                eVar.getClass();
                bVar = new X4.b(eVar);
                d6.f2802a = c2567b;
                d6.f2803b = bVar;
                d6.f2806e = 1;
                objB = bVar.b(d6);
                if (objB != aVar) {
                }
            } else if (i8 == 1) {
                bVar2 = d6.f2803b;
                c2567b2 = d6.f2802a;
                AbstractC2467b.l(obj);
                if (((Boolean) obj).booleanValue()) {
                }
            } else {
                if (i8 != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                bVar2 = d6.f2803b;
                c2567b2 = d6.f2802a;
                AbstractC2467b.l(obj);
                char c6 = 2;
                c2579f = c2579f2;
                c2567b = c2567b2;
                c2579f2 = c2579f;
                bVar = bVar2;
                d6.f2802a = c2567b;
                d6.f2803b = bVar;
                d6.f2806e = 1;
                objB = bVar.b(d6);
                if (objB != aVar) {
                    return aVar;
                }
                X4.b bVar3 = bVar;
                c2567b2 = c2567b;
                obj = objB;
                bVar2 = bVar3;
                if (((Boolean) obj).booleanValue()) {
                    c2579f2.clear();
                    return C3137A.f25453a;
                }
                bVar2.c();
                if (v()) {
                    int i9 = c2579f2.f21426c;
                    for (int i10 = 0; i10 < i9; i10++) {
                        I0.H h5 = (I0.H) c2579f2.f21425b[i10];
                        I(h5, c2567b2);
                        J(h5);
                    }
                    c2567b2.f21315d = 0;
                    long[] jArr = c2567b2.f21312a;
                    if (jArr != n.Y.f21386a) {
                        try {
                            AbstractC3250p.I(jArr, -9187201950435737472L);
                            long[] jArr2 = c2567b2.f21312a;
                            i6 = c2567b2.f21314c;
                            int i11 = i6 >> 3;
                            jArr2[i11] = ((~j4) & jArr2[i11]) | j4;
                        } catch (Throwable th) {
                            th = th;
                            c2579f.clear();
                            throw th;
                        }
                        j4 = 255 << ((i6 & 7) << 3);
                        c2579f = c2579f2;
                    } else {
                        c2579f = c2579f2;
                    }
                    c2567b2.f21316e = n.Y.a(c2567b2.f21314c) - c2567b2.f21315d;
                    if (!this.f2852M) {
                        this.f2852M = true;
                        this.f2862m.post(this.f2854O);
                    }
                } else {
                    c2579f = c2579f2;
                }
                c2579f.clear();
                this.f2869t.c();
                this.f2870u.c();
                long j6 = this.f2861k;
                d6.f2802a = c2567b2;
                d6.f2803b = bVar2;
                c6 = 2;
                d6.f2806e = 2;
            }
        } catch (Throwable th2) {
            th = th2;
            c2579f = c2579f2;
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:52:0x00f9  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean m(int i6, boolean z6, long j4) {
        Q0.z zVar;
        int i7;
        if (!kotlin.jvm.internal.o.c(Looper.getMainLooper().getThread(), Thread.currentThread())) {
            return false;
        }
        AbstractC2587n abstractC2587nS = s();
        if (C2631b.b(j4, 9205357640488583168L) || (((9223372034707292159L & j4) + 36028792732385279L) & (-9223372034707292160L)) != 0) {
            return false;
        }
        if (z6) {
            zVar = Q0.w.f5855v;
        } else {
            if (z6) {
                throw new E3.v();
            }
            zVar = Q0.w.f5854u;
        }
        Object[] objArr = abstractC2587nS.f21458c;
        long[] jArr = abstractC2587nS.f21456a;
        int length = jArr.length - 2;
        if (length < 0) {
            return false;
        }
        int i8 = 0;
        boolean z7 = false;
        while (true) {
            long j6 = jArr[i8];
            if ((((~j6) << 7) & j6 & (-9187201950435737472L)) != -9187201950435737472L) {
                int i9 = 8;
                int i10 = 8 - ((~(i8 - length)) >>> 31);
                int i11 = 0;
                while (i11 < i10) {
                    if ((255 & j6) < 128) {
                        Q0.t tVar = (Q0.t) objArr[(i8 << 3) + i11];
                        h1.k kVar = tVar.f5813b;
                        float f6 = kVar.f16623a;
                        i7 = i9;
                        float f7 = kVar.f16624b;
                        float f8 = kVar.f16625c;
                        float f9 = kVar.f16626d;
                        float fIntBitsToFloat = Float.intBitsToFloat((int) (j4 >> 32));
                        float fIntBitsToFloat2 = Float.intBitsToFloat((int) (j4 & 4294967295L));
                        if ((fIntBitsToFloat2 < f9) & (fIntBitsToFloat >= f6) & (fIntBitsToFloat < f8) & (fIntBitsToFloat2 >= f7)) {
                            Object objD = tVar.f5812a.f5808d.f5799a.d(zVar);
                            if (objD == null) {
                                objD = null;
                            }
                            Q0.k kVar2 = (Q0.k) objD;
                            if (kVar2 != null) {
                                J4.a aVar = kVar2.f5748a;
                                if (i6 < 0) {
                                    if (((Number) aVar.invoke()).floatValue() > 0.0f) {
                                        z7 = true;
                                    }
                                } else if (((Number) aVar.invoke()).floatValue() < ((Number) kVar2.f5749b.invoke()).floatValue()) {
                                }
                            }
                        }
                    } else {
                        i7 = i9;
                    }
                    j6 >>= i7;
                    i11++;
                    i9 = i7;
                }
                if (i10 != i9) {
                    return z7;
                }
            }
            if (i8 == length) {
                return z7;
            }
            i8++;
        }
    }

    public final void n() {
        Trace.beginSection("sendAccessibilitySemanticsStructureChangeEvents");
        try {
            if (v()) {
                B(this.f2857d.getSemanticsOwner().a(), this.f2851L);
            }
            Trace.endSection();
            Trace.beginSection("sendSemanticsPropertyChangeEvents");
            try {
                H(s());
                Trace.endSection();
                Trace.beginSection("updateSemanticsNodesCopyAndPanes");
                try {
                    Q();
                } finally {
                }
            } finally {
            }
        } finally {
        }
    }

    public final AccessibilityEvent o(int i6, int i7) {
        Q0.t tVar;
        AccessibilityEvent accessibilityEventObtain = AccessibilityEvent.obtain(i7);
        accessibilityEventObtain.setEnabled(true);
        accessibilityEventObtain.setClassName("android.view.View");
        A a6 = this.f2857d;
        accessibilityEventObtain.setPackageName(a6.getContext().getPackageName());
        accessibilityEventObtain.setSource(a6, i6);
        if (v() && (tVar = (Q0.t) s().b(i6)) != null) {
            Q0.s sVar = tVar.f5812a;
            accessibilityEventObtain.setPassword(sVar.f5808d.f5799a.b(Q0.w.f5829K));
            Object objD = sVar.f5808d.f5799a.d(Q0.w.f5847n);
            if (objD == null) {
                objD = null;
            }
            boolean zC = kotlin.jvm.internal.o.c(objD, Boolean.TRUE);
            if (Build.VERSION.SDK_INT >= 34) {
                G1.b.g(accessibilityEventObtain, zC);
            }
        }
        return accessibilityEventObtain;
    }

    @Override // android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener
    public final void onAccessibilityStateChanged(boolean z6) {
        this.l = null;
    }

    @Override // android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener
    public final void onTouchExplorationStateChanged(boolean z6) {
        this.l = null;
    }

    @Override // android.view.View.OnAttachStateChangeListener
    public final void onViewAttachedToWindow(View view) {
        AccessibilityManager accessibilityManager = this.f2860j;
        if (accessibilityManager.isEnabled()) {
            this.l = null;
        }
        accessibilityManager.addAccessibilityStateChangeListener(this);
        accessibilityManager.addTouchExplorationStateChangeListener(this);
    }

    @Override // android.view.View.OnAttachStateChangeListener
    public final void onViewDetachedFromWindow(View view) {
        this.f2862m.removeCallbacks(this.f2854O);
        AccessibilityManager accessibilityManager = this.f2860j;
        accessibilityManager.removeAccessibilityStateChangeListener(this);
        accessibilityManager.removeTouchExplorationStateChangeListener(this);
    }

    public final AccessibilityEvent p(int i6, Integer num, Integer num2, Integer num3, CharSequence charSequence) {
        AccessibilityEvent accessibilityEventO = o(i6, 8192);
        if (num != null) {
            accessibilityEventO.setFromIndex(num.intValue());
        }
        if (num2 != null) {
            accessibilityEventO.setToIndex(num2.intValue());
        }
        if (num3 != null) {
            accessibilityEventO.setItemCount(num3.intValue());
        }
        if (charSequence != null) {
            accessibilityEventO.getText().add(charSequence);
        }
        return accessibilityEventO;
    }

    public final int q(Q0.s sVar) {
        Q0.n nVar = sVar.f5808d;
        Q0.z zVar = Q0.w.f5835a;
        if (!nVar.f5799a.b(Q0.w.f5835a)) {
            Q0.z zVar2 = Q0.w.f5825G;
            Q0.n nVar2 = sVar.f5808d;
            if (nVar2.f5799a.b(zVar2)) {
                return (int) (4294967295L & ((T0.N) nVar2.j(zVar2)).f6483a);
            }
        }
        return this.f2873x;
    }

    public final int r(Q0.s sVar) {
        Q0.n nVar = sVar.f5808d;
        Q0.z zVar = Q0.w.f5835a;
        if (!nVar.f5799a.b(Q0.w.f5835a)) {
            Q0.z zVar2 = Q0.w.f5825G;
            Q0.n nVar2 = sVar.f5808d;
            if (nVar2.f5799a.b(zVar2)) {
                return (int) (((T0.N) nVar2.j(zVar2)).f6483a >> 32);
            }
        }
        return this.f2873x;
    }

    public final AbstractC2587n s() {
        if (this.f2841B) {
            this.f2841B = false;
            A a6 = this.f2857d;
            this.f2843D = Q0.v.b(a6.getSemanticsOwner(), C0382s.f3056c);
            if (v()) {
                C2566A c2566a = this.f2843D;
                Resources resources = a6.getContext().getResources();
                C2597y c2597y = this.f2845F;
                c2597y.a();
                C2597y c2597y2 = this.f2846G;
                c2597y2.a();
                Q0.t tVar = (Q0.t) c2566a.b(-1);
                Q0.s sVar = tVar != null ? tVar.f5812a : null;
                kotlin.jvm.internal.o.e(sVar);
                ArrayList arrayListB = Q0.D.b(sVar, new C0.Z(c2566a, 5), new C0.Z(resources, 6), AbstractC2612c.q(sVar));
                int iA = AbstractC3252r.A(arrayListB);
                int i6 = 1;
                if (1 <= iA) {
                    while (true) {
                        int i7 = ((Q0.s) arrayListB.get(i6 - 1)).f5811g;
                        int i8 = ((Q0.s) arrayListB.get(i6)).f5811g;
                        c2597y.f(i7, i8);
                        c2597y2.f(i8, i7);
                        if (i6 == iA) {
                            break;
                        }
                        i6++;
                    }
                }
            }
        }
        return this.f2843D;
    }

    /* JADX WARN: Removed duplicated region for block: B:37:0x0085 A[LOOP:0: B:5:0x001c->B:37:0x0085, LOOP_END] */
    /* JADX WARN: Removed duplicated region for block: B:50:0x008a A[EDGE_INSN: B:50:0x008a->B:38:0x008a BREAK  A[LOOP:0: B:5:0x001c->B:37:0x0085], SYNTHETIC] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final C2632c u(Q0.s sVar, Rect rect, p0.X x6) {
        AbstractC2254r node;
        E e6 = new E(x6);
        I0.H h5 = sVar.f5807c;
        C0290e0 c0290e0 = h5.f2162J;
        InterfaceC0299j interfaceC0299j = null;
        if ((((AbstractC2254r) c0290e0.f2365g).getAggregateChildKindSet$ui() & 8) != 0) {
            AbstractC2254r child$ui = (AbstractC2254r) c0290e0.f2365g;
            loop0: while (true) {
                if (child$ui == null) {
                    break;
                }
                if ((child$ui.getKindSet$ui() & 8) != 0) {
                    AbstractC2254r abstractC2254rE = child$ui;
                    MutableVector mutableVector = null;
                    while (abstractC2254rE != null) {
                        if (abstractC2254rE instanceof I0.D0) {
                            ((I0.D0) abstractC2254rE).R(e6);
                            if (e6.f2812a) {
                                interfaceC0299j = abstractC2254rE;
                                break loop0;
                            }
                        } else if ((abstractC2254rE.getKindSet$ui() & 8) != 0 && (abstractC2254rE instanceof AbstractC0301k)) {
                            int i6 = 0;
                            for (AbstractC2254r child$ui2 = ((AbstractC0301k) abstractC2254rE).f2431b; child$ui2 != null; child$ui2 = child$ui2.getChild$ui()) {
                                if ((child$ui2.getKindSet$ui() & 8) != 0) {
                                    i6++;
                                    if (i6 == 1) {
                                        abstractC2254rE = child$ui2;
                                    } else {
                                        if (mutableVector == null) {
                                            mutableVector = new MutableVector(new AbstractC2254r[16], 0);
                                        }
                                        if (abstractC2254rE != null) {
                                            mutableVector.add(abstractC2254rE);
                                            abstractC2254rE = null;
                                        }
                                        mutableVector.add(child$ui2);
                                    }
                                }
                            }
                            if (i6 == 1) {
                            }
                        }
                        abstractC2254rE = AbstractC0303l.e(mutableVector);
                    }
                    if ((child$ui.getAggregateChildKindSet$ui() & 8) != 0) {
                        break;
                    }
                    child$ui = child$ui.getChild$ui();
                } else if ((child$ui.getAggregateChildKindSet$ui() & 8) != 0) {
                }
            }
        }
        InterfaceC0299j interfaceC0299j2 = (I0.D0) interfaceC0299j;
        if (interfaceC0299j2 == null || (node = ((AbstractC2254r) interfaceC0299j2).getNode()) == null || !node.isAttached()) {
            return G0.B.g((AbstractC0300j0) h5.f2162J.f2363e, false);
        }
        AbstractC0300j0 abstractC0300j0S = AbstractC0303l.s(interfaceC0299j2);
        C2632c c2632cD0 = G0.B.i(abstractC0300j0S).d0(abstractC0300j0S, true);
        Rect rectM = M(c2632cD0.f21787a, c2632cD0.f21788b, c2632cD0.f21789c, c2632cD0.f21790d);
        float f6 = rectM.left - rect.left;
        float f7 = rectM.top - rect.top;
        return new C2632c(f6, f7, rectM.width() + f6, rectM.height() + f7);
    }

    public final boolean v() {
        AccessibilityManager accessibilityManager = this.f2860j;
        if (!accessibilityManager.isEnabled()) {
            return false;
        }
        List<AccessibilityServiceInfo> enabledAccessibilityServiceList = this.l;
        if (enabledAccessibilityServiceList == null) {
            enabledAccessibilityServiceList = accessibilityManager.getEnabledAccessibilityServiceList(-1);
            this.l = enabledAccessibilityServiceList;
        }
        return !enabledAccessibilityServiceList.isEmpty();
    }

    public final void w(I0.H h5) {
        if (this.f2875z.add(h5)) {
            this.f2840A.f(C3137A.f25453a);
        }
    }
}
