package o;

import android.content.res.Resources;
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.view.View;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
import com.google.android.gms.common.R;
import com.google.android.gms.common.api.Api;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.y3, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2966y3 extends C2011o0 {
    public static final HQ Q;
    public boolean A;
    public C2681v3 B;
    public IQ C;
    public final JQ D;
    public final GQ E;
    public final GQ F;
    public final String G;
    public final String H;
    public final C70 I;
    public final IQ J;
    public S50 K;
    public boolean L;
    public final GQ M;
    public final RunnableC2108p1 N;
    public final ArrayList O;
    public final C2871x3 P;
    public final C2207q3 d;
    public int e = Integer.MIN_VALUE;
    public final C2871x3 f;
    public final AccessibilityManager g;
    public long h;
    public final AccessibilityManagerAccessibilityStateChangeListenerC2301r3 i;
    public final AccessibilityManagerTouchExplorationStateChangeListenerC2396s3 j;
    public List k;
    public final Handler l;
    public final C2586u3 m;
    public int n;

    /* renamed from: o, reason: collision with root package name */
    public int f798o;
    public H0 p;
    public H0 q;
    public boolean r;
    public final IQ s;
    public final IQ t;
    public final C0914ca0 u;
    public final C0914ca0 v;
    public int w;
    public Integer x;
    public final C2124p9 y;
    public final C1210ff z;

    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};
        int i = XH.a;
        HQ hq = new HQ(32);
        int i2 = hq.b;
        if (i2 < 0) {
            AbstractC2841wm0.J("");
            throw null;
        }
        int i3 = i2 + 32;
        hq.b(i3);
        int[] iArr2 = hq.a;
        int i4 = hq.b;
        if (i2 != i4) {
            AbstractC2219q9.I(i3, i2, i4, iArr2, iArr2);
        }
        AbstractC2219q9.L(i2, 0, 12, iArr, iArr2);
        hq.b += 32;
        Q = hq;
    }

    /* JADX WARN: Type inference failed for: r3v2, types: [o.r3] */
    /* JADX WARN: Type inference failed for: r3v3, types: [o.s3] */
    public C2966y3(C2207q3 c2207q3) {
        this.d = c2207q3;
        int i = 0;
        this.f = new C2871x3(this, i);
        AccessibilityManager accessibilityManager = (AccessibilityManager) c2207q3.getContext().getSystemService("accessibility");
        this.g = accessibilityManager;
        this.h = 100L;
        this.i = new AccessibilityManager.AccessibilityStateChangeListener() { // from class: o.r3
            @Override // android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener
            public final void onAccessibilityStateChanged(boolean z) {
                C2966y3 c2966y3 = this.a;
                c2966y3.k = z ? c2966y3.g.getEnabledAccessibilityServiceList(-1) : C0332Mv.l;
            }
        };
        this.j = new AccessibilityManager.TouchExplorationStateChangeListener() { // from class: o.s3
            @Override // android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener
            public final void onTouchExplorationStateChanged(boolean z) {
                C2966y3 c2966y3 = this.a;
                c2966y3.k = c2966y3.g.getEnabledAccessibilityServiceList(-1);
            }
        };
        this.k = accessibilityManager.getEnabledAccessibilityServiceList(-1);
        this.l = new Handler(Looper.getMainLooper());
        this.m = new C2586u3(this, i);
        this.n = Integer.MIN_VALUE;
        this.f798o = Integer.MIN_VALUE;
        this.s = new IQ();
        this.t = new IQ();
        this.u = new C0914ca0(0);
        this.v = new C0914ca0(0);
        this.w = -1;
        this.y = new C2124p9(0);
        this.z = AbstractC2841wm0.a(1, 0, 6);
        this.A = true;
        IQ iq = ZH.a;
        this.C = iq;
        this.D = new JQ();
        this.E = new GQ();
        this.F = new GQ();
        this.G = "android.view.accessibility.extra.EXTRA_DATA_TEST_TRAVERSALBEFORE_VAL";
        this.H = "android.view.accessibility.extra.EXTRA_DATA_TEST_TRAVERSALAFTER_VAL";
        this.I = new C70(6);
        this.J = new IQ();
        this.K = new S50(c2207q3.getSemanticsOwner().a(), iq);
        int i2 = WH.a;
        this.M = new GQ();
        c2207q3.addOnAttachStateChangeListener(new ViewOnAttachStateChangeListenerC2491t3(i, this));
        this.N = new RunnableC2108p1(2, this);
        this.O = new ArrayList();
        this.P = new C2871x3(this, 1);
    }

    public static /* synthetic */ void E(C2966y3 c2966y3, int i, int i2, Integer num, int i3) {
        if ((i3 & 4) != 0) {
            num = null;
        }
        c2966y3.D(i, i2, num, null);
    }

    public static Rect L(F3 f3) {
        if (!(f3 instanceof SU) && !(f3 instanceof TU)) {
            return null;
        }
        T00 t00X = f3.x();
        return new Rect((int) t00X.a, (int) t00X.b, (int) t00X.c, (int) t00X.d);
    }

    public static float[] M(F3 f3) {
        if (!(f3 instanceof TU)) {
            return null;
        }
        C2018o30 c2018o30 = ((TU) f3).l;
        long j = c2018o30.h;
        long j2 = c2018o30.g;
        long j3 = c2018o30.f;
        long j4 = c2018o30.e;
        return new float[]{Float.intBitsToFloat((int) (j4 >> 32)), Float.intBitsToFloat((int) (j4 & 4294967295L)), Float.intBitsToFloat((int) (j3 >> 32)), Float.intBitsToFloat((int) (j3 & 4294967295L)), Float.intBitsToFloat((int) (j2 >> 32)), Float.intBitsToFloat((int) (j2 & 4294967295L)), Float.intBitsToFloat((int) (j >> 32)), Float.intBitsToFloat((int) (j & 4294967295L))};
    }

    public static Region N(F3 f3) {
        if (!(f3 instanceof RU)) {
            return null;
        }
        RU ru = (RU) f3;
        T00 t00X = ru.x();
        Region region = new Region(new Rect((int) t00X.a, (int) t00X.b, (int) t00X.c, (int) t00X.d));
        Region region2 = new Region();
        O4 o4 = ru.l;
        if (!(o4 instanceof O4)) {
            throw new UnsupportedOperationException("Unable to obtain android.graphics.Path");
        }
        region2.setPath(o4.a, region);
        return region2;
    }

    public static CharSequence O(CharSequence charSequence) {
        if (charSequence.length() != 0) {
            int i = 100000;
            if (charSequence.length() > 100000) {
                if (Character.isHighSurrogate(charSequence.charAt(99999)) && Character.isLowSurrogate(charSequence.charAt(100000))) {
                    i = 99999;
                }
                return charSequence.subSequence(0, i);
            }
        }
        return charSequence;
    }

    public static String u(R50 r50) {
        C0977d7 c0977d7;
        if (r50 != null) {
            N50 n50 = r50.d;
            ZQ zq = n50.l;
            Z50 z50 = W50.a;
            if (zq.c(z50)) {
                return WL.a((List) n50.b(z50), ",", null, 62);
            }
            Z50 z502 = W50.E;
            if (zq.c(z502)) {
                Object objG = zq.g(z502);
                if (objG == null) {
                    objG = null;
                }
                C0977d7 c0977d72 = (C0977d7) objG;
                if (c0977d72 != null) {
                    return c0977d72.m;
                }
            } else {
                Object objG2 = zq.g(W50.A);
                if (objG2 == null) {
                    objG2 = null;
                }
                List list = (List) objG2;
                if (list != null && (c0977d7 = (C0977d7) AbstractC3117zi.f0(list)) != null) {
                    return c0977d7.m;
                }
            }
        }
        return null;
    }

    public static final boolean x(O40 o40, float f) {
        U40 u40 = o40.a;
        if (f >= 0.0f || ((Number) u40.a()).floatValue() <= 0.0f) {
            return f > 0.0f && ((Number) u40.a()).floatValue() < ((Number) o40.b.a()).floatValue();
        }
        return true;
    }

    public static final boolean y(O40 o40) {
        U40 u40 = o40.a;
        if (((Number) u40.a()).floatValue() > 0.0f) {
            return true;
        }
        ((Number) u40.a()).floatValue();
        ((Number) o40.b.a()).floatValue();
        return false;
    }

    public static final boolean z(O40 o40) {
        U40 u40 = o40.a;
        if (((Number) u40.a()).floatValue() < ((Number) o40.b.a()).floatValue()) {
            return true;
        }
        ((Number) u40.a()).floatValue();
        return false;
    }

    public final int A(int i) {
        if (i == this.d.getSemanticsOwner().a().g) {
            return -1;
        }
        return i;
    }

    /* JADX WARN: Removed duplicated region for block: B:27:0x0086  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void B(o.R50 r20, o.S50 r21) {
        /*
            r19 = this;
            r0 = r19
            r1 = r20
            r2 = r21
            int[] r3 = o.AbstractC1374hI.a
            o.JQ r3 = new o.JQ
            r3.<init>()
            r4 = 4
            java.util.List r5 = o.R50.j(r4, r1)
            o.sK r6 = r1.c
            int r7 = r5.size()
            r8 = 0
            r9 = r8
        L1a:
            if (r9 >= r7) goto L40
            java.lang.Object r10 = r5.get(r9)
            o.R50 r10 = (o.R50) r10
            o.YH r11 = r0.t()
            int r10 = r10.g
            boolean r11 = r11.a(r10)
            if (r11 == 0) goto L3d
            o.JQ r11 = r2.b
            boolean r11 = r11.b(r10)
            if (r11 != 0) goto L3a
            r0.w(r6)
            return
        L3a:
            r3.a(r10)
        L3d:
            int r9 = r9 + 1
            goto L1a
        L40:
            o.JQ r2 = r2.b
            int[] r5 = r2.b
            long[] r2 = r2.a
            int r7 = r2.length
            int r7 = r7 + (-2)
            if (r7 < 0) goto L8b
            r9 = r8
        L4c:
            r10 = r2[r9]
            long r12 = ~r10
            r14 = 7
            long r12 = r12 << r14
            long r12 = r12 & r10
            r14 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
            long r12 = r12 & r14
            int r12 = (r12 > r14 ? 1 : (r12 == r14 ? 0 : -1))
            if (r12 == 0) goto L86
            int r12 = r9 - r7
            int r12 = ~r12
            int r12 = r12 >>> 31
            r13 = 8
            int r12 = 8 - r12
            r14 = r8
        L66:
            if (r14 >= r12) goto L84
            r15 = 255(0xff, double:1.26E-321)
            long r15 = r15 & r10
            r17 = 128(0x80, double:6.3E-322)
            int r15 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))
            if (r15 >= 0) goto L80
            int r15 = r9 << 3
            int r15 = r15 + r14
            r15 = r5[r15]
            boolean r15 = r3.b(r15)
            if (r15 != 0) goto L80
            r0.w(r6)
            return
        L80:
            long r10 = r10 >> r13
            int r14 = r14 + 1
            goto L66
        L84:
            if (r12 != r13) goto L8b
        L86:
            if (r9 == r7) goto L8b
            int r9 = r9 + 1
            goto L4c
        L8b:
            java.util.List r1 = o.R50.j(r4, r1)
            int r2 = r1.size()
        L93:
            if (r8 >= r2) goto Lb9
            java.lang.Object r3 = r1.get(r8)
            o.R50 r3 = (o.R50) r3
            o.IQ r4 = r0.J
            int r5 = r3.g
            java.lang.Object r4 = r4.b(r5)
            o.S50 r4 = (o.S50) r4
            if (r4 == 0) goto Lb6
            o.YH r5 = r0.t()
            int r6 = r3.g
            boolean r5 = r5.a(r6)
            if (r5 == 0) goto Lb6
            r0.B(r3, r4)
        Lb6:
            int r8 = r8 + 1
            goto L93
        Lb9:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2966y3.B(o.R50, o.S50):void");
    }

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

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

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

    public final void G(int i) {
        C2681v3 c2681v3 = this.B;
        if (c2681v3 != null) {
            R50 r50 = c2681v3.a;
            if (i != r50.g) {
                return;
            }
            if (SystemClock.uptimeMillis() - c2681v3.f <= 1000) {
                AccessibilityEvent accessibilityEventO = o(A(r50.g), 131072);
                accessibilityEventO.setFromIndex(c2681v3.d);
                accessibilityEventO.setToIndex(c2681v3.e);
                accessibilityEventO.setAction(c2681v3.b);
                accessibilityEventO.setMovementGranularity(c2681v3.c);
                accessibilityEventO.getText().add(u(r50));
                C(accessibilityEventO);
            }
        }
        this.B = null;
    }

    /* JADX WARN: Removed duplicated region for block: B:223:0x04cb  */
    /* JADX WARN: Removed duplicated region for block: B:244:0x0501  */
    /* JADX WARN: Removed duplicated region for block: B:247:0x0506  */
    /* JADX WARN: Removed duplicated region for block: B:289:0x0628  */
    /* JADX WARN: Removed duplicated region for block: B:52:0x0132  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void H(o.YH r59) {
        /*
            Method dump skipped, instructions count: 1658
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2966y3.H(o.YH):void");
    }

    public final void I(C2420sK c2420sK, JQ jq) {
        N50 n50U;
        if (c2420sK.G() && !this.d.getAndroidViewsHandler$ui_release().getLayoutNodeToHolder().containsKey(c2420sK)) {
            C2420sK c2420sK2 = null;
            if (!c2420sK.N.j(8)) {
                c2420sK = c2420sK.s();
                while (true) {
                    if (c2420sK == null) {
                        c2420sK = null;
                        break;
                    } else if (c2420sK.N.j(8)) {
                        break;
                    } else {
                        c2420sK = c2420sK.s();
                    }
                }
            }
            if (c2420sK == null || (n50U = c2420sK.u()) == null) {
                return;
            }
            if (!n50U.n) {
                C2420sK c2420sKS = c2420sK.s();
                while (true) {
                    if (c2420sKS != null) {
                        N50 n50U2 = c2420sKS.u();
                        if (n50U2 != null && n50U2.n) {
                            c2420sK2 = c2420sKS;
                            break;
                        }
                        c2420sKS = c2420sKS.s();
                    } else {
                        break;
                    }
                }
                if (c2420sK2 != null) {
                    c2420sK = c2420sK2;
                }
            }
            int i = c2420sK.m;
            if (jq.a(i)) {
                E(this, A(i), 2048, 1, 8);
            }
        }
    }

    public final void J(C2420sK c2420sK) {
        if (c2420sK.G() && !this.d.getAndroidViewsHandler$ui_release().getLayoutNodeToHolder().containsKey(c2420sK)) {
            int i = c2420sK.m;
            O40 o40 = (O40) this.s.b(i);
            O40 o402 = (O40) this.t.b(i);
            if (o40 == null && o402 == null) {
                return;
            }
            AccessibilityEvent accessibilityEventO = o(i, 4096);
            if (o40 != null) {
                accessibilityEventO.setScrollX((int) ((Number) o40.a.a()).floatValue());
                accessibilityEventO.setMaxScrollX((int) ((Number) o40.b.a()).floatValue());
            }
            if (o402 != null) {
                accessibilityEventO.setScrollY((int) ((Number) o402.a.a()).floatValue());
                accessibilityEventO.setMaxScrollY((int) ((Number) o402.b.a()).floatValue());
            }
            C(accessibilityEventO);
        }
    }

    public final boolean K(R50 r50, int i, int i2, boolean z) {
        String strU;
        N50 n50 = r50.d;
        int i3 = r50.g;
        Z50 z50 = M50.h;
        if (n50.l.c(z50) && Co0.f(r50)) {
            TC tc = (TC) ((C1726l0) r50.d.b(z50)).b;
            if (tc != null) {
                return ((Boolean) tc.d(Integer.valueOf(i), Integer.valueOf(i2), Boolean.valueOf(z))).booleanValue();
            }
        } else if ((i != i2 || i2 != this.w) && (strU = u(r50)) != null) {
            if (i < 0 || i != i2 || i2 > strU.length()) {
                i = -1;
            }
            this.w = i;
            boolean z2 = strU.length() > 0;
            C(q(A(i3), z2 ? Integer.valueOf(this.w) : null, z2 ? Integer.valueOf(this.w) : null, z2 ? Integer.valueOf(strU.length()) : null, strU));
            G(i3);
            return true;
        }
        return false;
    }

    /* JADX WARN: Code restructure failed: missing block: B:52:0x013f, code lost:
    
        r28 = r1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:53:0x0149, code lost:
    
        if (((r7 & ((~r7) << 6)) & r20) == 0) goto L57;
     */
    /* JADX WARN: Code restructure failed: missing block: B:54:0x014b, code lost:
    
        r25 = -1;
     */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:18:0x0064  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void P() {
        /*
            Method dump skipped, instructions count: 530
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2966y3.P():void");
    }

    @Override // o.C2011o0
    public final OD b(View view) {
        return this.m;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public final void j(int i, H0 h0, String str, Bundle bundle) {
        R50 r50;
        Region regionN;
        float[] fArrM;
        Rect rectL;
        Ne0 ne0S;
        AccessibilityNodeInfo accessibilityNodeInfo;
        int i2;
        RectF rectF;
        AccessibilityNodeInfo accessibilityNodeInfo2 = h0.a;
        T50 t50 = (T50) t().b(i);
        if (t50 == null || (r50 = t50.a) == null) {
            return;
        }
        N50 n50 = r50.d;
        ZQ zq = n50.l;
        String strU = u(r50);
        if (F3.c(str, this.G)) {
            int iD = this.E.d(i);
            if (iD != -1) {
                accessibilityNodeInfo2.getExtras().putInt(str, iD);
                return;
            }
            return;
        }
        if (F3.c(str, this.H)) {
            int iD2 = this.F.d(i);
            if (iD2 != -1) {
                accessibilityNodeInfo2.getExtras().putInt(str, iD2);
                return;
            }
            return;
        }
        AbstractC2239qS abstractC2239qS = null;
        if (zq.c(M50.a) && bundle != null && F3.c(str, "android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_KEY")) {
            int i3 = bundle.getInt("android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_START_INDEX", -1);
            int i4 = bundle.getInt("android.view.accessibility.extra.DATA_TEXT_CHARACTER_LOCATION_ARG_LENGTH", -1);
            if (i4 <= 0 || i3 < 0) {
                return;
            }
            if (i3 < (strU != null ? strU.length() : Api.BaseClientBuilder.API_PRIORITY_OTHER) && (ne0S = AbstractC1155f00.s(n50)) != null) {
                ArrayList arrayList = new ArrayList();
                int i5 = 0;
                while (i5 < i4) {
                    int i6 = i3 + i5;
                    if (i6 >= ne0S.a.a.m.length()) {
                        arrayList.add(abstractC2239qS);
                        accessibilityNodeInfo = accessibilityNodeInfo2;
                        i2 = i4;
                    } else {
                        T00 t00B = ne0S.b(i6);
                        AbstractC2239qS abstractC2239qSD = r50.d();
                        long jL = 0;
                        if (abstractC2239qSD != null) {
                            if (!abstractC2239qSD.P0().y) {
                                abstractC2239qSD = abstractC2239qS;
                            }
                            if (abstractC2239qSD != null) {
                                jL = abstractC2239qSD.L(0L);
                            }
                        }
                        T00 t00H = t00B.h(jL);
                        T00 t00G = r50.g();
                        if ((t00H.f(t00G) ? t00H.d(t00G) : abstractC2239qS) != 0) {
                            C2207q3 c2207q3 = this.d;
                            long jU = c2207q3.u((Float.floatToRawIntBits(r10.b) & 4294967295L) | (Float.floatToRawIntBits(r10.a) << 32));
                            long jU2 = c2207q3.u((Float.floatToRawIntBits(r10.c) << 32) | (Float.floatToRawIntBits(r10.d) & 4294967295L));
                            int i7 = (int) (jU >> 32);
                            int i8 = (int) (jU2 >> 32);
                            accessibilityNodeInfo = accessibilityNodeInfo2;
                            i2 = i4;
                            int i9 = (int) (jU & 4294967295L);
                            int i10 = (int) (jU2 & 4294967295L);
                            rectF = new RectF(Math.min(Float.intBitsToFloat(i7), Float.intBitsToFloat(i8)), Math.min(Float.intBitsToFloat(i9), Float.intBitsToFloat(i10)), Math.max(Float.intBitsToFloat(i7), Float.intBitsToFloat(i8)), Math.max(Float.intBitsToFloat(i9), Float.intBitsToFloat(i10)));
                        } else {
                            accessibilityNodeInfo = accessibilityNodeInfo2;
                            i2 = i4;
                            rectF = null;
                        }
                        arrayList.add(rectF);
                    }
                    i5++;
                    i4 = i2;
                    accessibilityNodeInfo2 = accessibilityNodeInfo;
                    abstractC2239qS = null;
                }
                accessibilityNodeInfo2.getExtras().putParcelableArray(str, (Parcelable[]) arrayList.toArray(new RectF[0]));
                return;
            }
            return;
        }
        Z50 z50 = W50.y;
        if (zq.c(z50) && bundle != null && F3.c(str, "androidx.compose.ui.semantics.testTag")) {
            Object objG = zq.g(z50);
            String str2 = (String) (objG == null ? null : objG);
            if (str2 != null) {
                accessibilityNodeInfo2.getExtras().putCharSequence(str, str2);
                return;
            }
            return;
        }
        if (F3.c(str, "androidx.compose.ui.semantics.id")) {
            accessibilityNodeInfo2.getExtras().putInt(str, r50.g);
            return;
        }
        if (F3.c(str, "androidx.compose.ui.semantics.shapeType")) {
            Object objG2 = zq.g(W50.N);
            L70 l70 = (L70) (objG2 == null ? null : objG2);
            if (l70 != null) {
                F3 f3P = p(l70, r50);
                if (f3P instanceof SU) {
                    accessibilityNodeInfo2.getExtras().putInt("androidx.compose.ui.semantics.shapeType", 0);
                    accessibilityNodeInfo2.getExtras().putParcelable("androidx.compose.ui.semantics.shapeRect", L(f3P));
                    return;
                } else if (f3P instanceof TU) {
                    accessibilityNodeInfo2.getExtras().putInt("androidx.compose.ui.semantics.shapeType", 1);
                    accessibilityNodeInfo2.getExtras().putParcelable("androidx.compose.ui.semantics.shapeRect", L(f3P));
                    accessibilityNodeInfo2.getExtras().putFloatArray("androidx.compose.ui.semantics.shapeCorners", M(f3P));
                    return;
                } else {
                    if (!(f3P instanceof RU)) {
                        throw new C2170pj();
                    }
                    accessibilityNodeInfo2.getExtras().putInt("androidx.compose.ui.semantics.shapeType", 2);
                    accessibilityNodeInfo2.getExtras().putParcelable("androidx.compose.ui.semantics.shapeRegion", N(f3P));
                    return;
                }
            }
            return;
        }
        if (F3.c(str, "androidx.compose.ui.semantics.shapeRect")) {
            Object objG3 = zq.g(W50.N);
            L70 l702 = (L70) (objG3 == null ? null : objG3);
            if (l702 == null || (rectL = L(p(l702, r50))) == null) {
                return;
            }
            accessibilityNodeInfo2.getExtras().putParcelable("androidx.compose.ui.semantics.shapeRect", rectL);
            return;
        }
        if (F3.c(str, "androidx.compose.ui.semantics.shapeCorners")) {
            Object objG4 = zq.g(W50.N);
            L70 l703 = (L70) (objG4 == null ? null : objG4);
            if (l703 == null || (fArrM = M(p(l703, r50))) == null) {
                return;
            }
            accessibilityNodeInfo2.getExtras().putFloatArray("androidx.compose.ui.semantics.shapeCorners", fArrM);
            return;
        }
        if (F3.c(str, "androidx.compose.ui.semantics.shapeRegion")) {
            Object objG5 = zq.g(W50.N);
            L70 l704 = (L70) (objG5 == null ? null : objG5);
            if (l704 == null || (regionN = N(p(l704, r50))) == null) {
                return;
            }
            accessibilityNodeInfo2.getExtras().putParcelable("androidx.compose.ui.semantics.shapeRegion", regionN);
        }
    }

    public final Rect k(T50 t50) {
        C1086eI c1086eI = t50.b;
        float f = c1086eI.a;
        float f2 = c1086eI.b;
        long jFloatToRawIntBits = (Float.floatToRawIntBits(f2) & 4294967295L) | (Float.floatToRawIntBits(f) << 32);
        C2207q3 c2207q3 = this.d;
        long jU = c2207q3.u(jFloatToRawIntBits);
        float f3 = c1086eI.c;
        float f4 = c1086eI.d;
        long jU2 = c2207q3.u((Float.floatToRawIntBits(f3) << 32) | (Float.floatToRawIntBits(f4) & 4294967295L));
        int i = (int) (jU >> 32);
        int i2 = (int) (jU2 >> 32);
        int i3 = (int) (jU & 4294967295L);
        int i4 = (int) (jU2 & 4294967295L);
        return new Rect((int) Math.floor(Math.min(Float.intBitsToFloat(i), Float.intBitsToFloat(i2))), (int) Math.floor(Math.min(Float.intBitsToFloat(i3), Float.intBitsToFloat(i4))), (int) Math.ceil(Math.max(Float.intBitsToFloat(i), Float.intBitsToFloat(i2))), (int) Math.ceil(Math.max(Float.intBitsToFloat(i3), Float.intBitsToFloat(i4))));
    }

    /* JADX WARN: Code restructure failed: missing block: B:48:0x00ed, code lost:
    
        if (o.F3.t(r4, r2) == r7) 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:0x0086, B:35:0x0095, B:37:0x009d, B:20:0x0047, B:23:0x004e), top: B:57:0x0026 }] */
    /* JADX WARN: Removed duplicated region for block: B:51:0x00f6  */
    /* JADX WARN: Removed duplicated region for block: B:7:0x0017  */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:48:0x00ed -> B:50:0x00f0). Please report as a decompilation issue!!! */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.Object l(o.AbstractC0298Lm r17) throws java.lang.Throwable {
        /*
            Method dump skipped, instructions count: 257
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2966y3.l(o.Lm):java.lang.Object");
    }

    /* JADX WARN: Removed duplicated region for block: B:52:0x00f9  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final boolean m(boolean r23, int r24, long r25) {
        /*
            Method dump skipped, instructions count: 319
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2966y3.m(boolean, int, long):boolean");
    }

    public final void n() {
        Trace.beginSection("sendAccessibilitySemanticsStructureChangeEvents");
        try {
            if (v()) {
                B(this.d.getSemanticsOwner().a(), this.K);
            }
            Trace.endSection();
            Trace.beginSection("sendSemanticsPropertyChangeEvents");
            try {
                H(t());
                Trace.endSection();
                Trace.beginSection("updateSemanticsNodesCopyAndPanes");
                try {
                    P();
                } finally {
                }
            } finally {
            }
        } finally {
        }
    }

    public final AccessibilityEvent o(int i, int i2) {
        T50 t50;
        AccessibilityEvent accessibilityEventObtain = AccessibilityEvent.obtain(i2);
        accessibilityEventObtain.setEnabled(true);
        accessibilityEventObtain.setClassName("android.view.View");
        C2207q3 c2207q3 = this.d;
        accessibilityEventObtain.setPackageName(c2207q3.getContext().getPackageName());
        accessibilityEventObtain.setSource(c2207q3, i);
        if (v() && (t50 = (T50) t().b(i)) != null) {
            R50 r50 = t50.a;
            accessibilityEventObtain.setPassword(r50.d.l.c(W50.J));
            Object objG = r50.d.l.g(W50.n);
            if (objG == null) {
                objG = null;
            }
            boolean zC = F3.c(objG, Boolean.TRUE);
            if (Build.VERSION.SDK_INT >= 34) {
                AbstractC2106p0.i(accessibilityEventObtain, zC);
            }
        }
        return accessibilityEventObtain;
    }

    public final F3 p(L70 l70, R50 r50) {
        AbstractC2239qS abstractC2239qSD = r50.d();
        return l70.a(C1884mi0.O(abstractC2239qSD != null ? abstractC2239qSD.n : 0L), r50.c.J, this.d.getDensity());
    }

    public final AccessibilityEvent q(int i, Integer num, Integer num2, Integer num3, CharSequence charSequence) {
        AccessibilityEvent accessibilityEventO = o(i, 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 r(R50 r50) {
        N50 n50 = r50.d;
        N50 n502 = r50.d;
        Z50 z50 = W50.a;
        if (!n50.l.c(W50.a)) {
            Z50 z502 = W50.F;
            if (n502.l.c(z502)) {
                return (int) (((Ue0) n502.b(z502)).a & 4294967295L);
            }
        }
        return this.w;
    }

    public final int s(R50 r50) {
        N50 n50 = r50.d;
        N50 n502 = r50.d;
        Z50 z50 = W50.a;
        if (!n50.l.c(W50.a)) {
            Z50 z502 = W50.F;
            if (n502.l.c(z502)) {
                return (int) (((Ue0) n502.b(z502)).a >> 32);
            }
        }
        return this.w;
    }

    public final YH t() {
        if (this.A) {
            this.A = false;
            C2207q3 c2207q3 = this.d;
            this.C = As0.B(c2207q3.getSemanticsOwner());
            if (v()) {
                IQ iq = this.C;
                Resources resources = c2207q3.getContext().getResources();
                GQ gq = this.E;
                gq.a();
                GQ gq2 = this.F;
                gq2.a();
                T50 t50 = (T50) iq.b(-1);
                R50 r50 = t50 != null ? t50.a : null;
                ArrayList arrayListB = AbstractC0689a60.b(r50, new C2769w(3, iq), new C2769w(4, resources), Collections.singletonList(r50));
                int iR = AbstractC0008Ai.R(arrayListB);
                int i = 1;
                if (1 <= iR) {
                    while (true) {
                        int i2 = ((R50) arrayListB.get(i - 1)).g;
                        int i3 = ((R50) arrayListB.get(i)).g;
                        gq.f(i2, i3);
                        gq2.f(i3, i2);
                        if (i == iR) {
                            break;
                        }
                        i++;
                    }
                }
            }
        }
        return this.C;
    }

    public final boolean v() {
        return this.g.isEnabled() && !this.k.isEmpty();
    }

    public final void w(C2420sK c2420sK) {
        if (this.y.add(c2420sK)) {
            this.z.p(Oh0.a);
        }
    }
}
