package o;

import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Canvas;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Build;
import android.os.Looper;
import android.os.StrictMode;
import android.os.Trace;
import android.util.LongSparseArray;
import android.util.SparseArray;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.PointerIcon;
import android.view.ScrollCaptureTarget;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.ViewStructure;
import android.view.ViewTreeObserver;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.AnimationUtils;
import android.view.autofill.AutofillManager;
import android.view.autofill.AutofillValue;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.translation.TranslationRequestValue;
import android.view.translation.ViewTranslationRequest;
import androidx.compose.ui.semantics.EmptySemanticsElement;
import com.google.android.gms.common.R;
import com.google.android.gms.common.api.Api;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import o.C0160Ge;
import o.LP;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.q3, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2207q3 extends ViewGroup implements InterfaceC1577jV, InterfaceC1638k30, InterfaceC1665kO, InterfaceC1994nq, QU {
    public static Class S0;
    public static Method T0;
    public static Method U0;
    public static final UQ V0 = new UQ();
    public static Y1 W0;
    public static Method X0;
    public final U00 A;
    public final HH A0;
    public final C2207q3 B;
    public final NP B0;
    public final U50 C;
    public final H5 C0;
    public final C2966y3 D;
    public MotionEvent D0;
    public Q3 E;
    public long E0;
    public final N2 F;
    public final Gm0 F0;
    public final C2398s4 G;
    public final UQ G0;
    public final C2915xc H;
    public float H0;
    public final ArrayList I;
    public float I0;
    public ArrayList J;
    public final RunnableC2017o3 J0;
    public boolean K;
    public final RunnableC2108p1 K0;
    public boolean L;
    public boolean L0;
    public final XP M;
    public final C1922n3 M0;
    public final C2398s4 N;
    public final InterfaceC0472Sf N0;
    public OC O;
    public boolean O0;
    public final S60 P;
    public final WT P0;
    public final R2 Q;
    public View Q0;
    public boolean R;
    public final C1732l3 R0;
    public final Y2 S;
    public final X2 T;
    public final C1767lV U;
    public boolean V;
    public C1166f6 W;
    public C0634Yl a0;
    public boolean b0;
    public final C1950nO c0;
    public long d0;
    public final int[] e0;
    public final float[] f0;
    public final float[] g0;
    public final float[] h0;
    public long i0;
    public boolean j0;
    public long k0;
    public long l;
    public final MV l0;
    public final boolean m;
    public final C0095Dr m0;
    public final C2610uK n;
    public OC n0;

    /* renamed from: o, reason: collision with root package name */
    public final MV f684o;
    public final ViewTreeObserverOnGlobalLayoutListenerC0682a3 o0;
    public final View p;
    public final ViewTreeObserverOnScrollChangedListenerC0778b3 p0;
    public final boolean q;
    public final ViewTreeObserverOnTouchModeChangeListenerC0873c3 q0;
    public final C0674Zz r;
    public final Ge0 r0;
    public InterfaceC2747vn s;
    public final Ee0 s0;
    public final ViewOnDragListenerC1450i4 t;
    public final AtomicReference t0;
    public final FK u;
    public final C1234fr u0;
    public final C0006Ag v;
    public final C0669Zu v0;
    public final Q5 w;
    public final MV w0;
    public final NH x;
    public int x0;
    public final C2420sK y;
    public final MV y0;
    public final IQ z;
    public final C0664Zp z0;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    /* JADX WARN: Type inference failed for: r1v37, types: [o.a3] */
    /* JADX WARN: Type inference failed for: r1v38, types: [o.b3] */
    /* JADX WARN: Type inference failed for: r1v39, types: [o.c3] */
    public C2207q3(Context context, InterfaceC2747vn interfaceC2747vn) {
        R2 r2;
        super(context);
        final C2207q3 c2207q3 = this;
        c2207q3.l = 9205357640488583168L;
        int i = 1;
        c2207q3.m = true;
        c2207q3.n = new C2610uK();
        C2470sr c2470srM = AbstractC2378rs0.m(context);
        C0669Zu c0669Zu = C0669Zu.S;
        c2207q3.f684o = new MV(c2470srM, c0669Zu);
        int i2 = Build.VERSION.SDK_INT;
        int i3 = 0;
        boolean z = i2 >= 35;
        c2207q3.q = z;
        C0410Pv c0410Pv = new C0410Pv();
        EmptySemanticsElement emptySemanticsElement = new EmptySemanticsElement(c0410Pv);
        RP rp = new RP() { // from class: androidx.compose.ui.platform.AndroidComposeView$bringIntoViewNode$1
            public final boolean equals(Object obj) {
                return obj == this;
            }

            @Override // o.RP
            public final LP f() {
                C0160Ge c0160Ge = new C0160Ge();
                c0160Ge.z = this.a;
                return c0160Ge;
            }

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

            @Override // o.RP
            public final void j(LP lp) {
                ((C0160Ge) lp).z = this.a;
            }
        };
        c2207q3.r = new C0674Zz(c2207q3, c2207q3);
        c2207q3.s = interfaceC2747vn;
        c2207q3.t = new ViewOnDragListenerC1450i4();
        c2207q3.u = new FK();
        MP mpA = androidx.compose.ui.input.key.a.a(new C1637k3(c2207q3, i3));
        MP mpA2 = androidx.compose.ui.input.rotary.a.a();
        c2207q3.v = new C0006Ag();
        c2207q3.w = new Q5(ViewConfiguration.get(context));
        NH nh = new NH();
        c2207q3.x = nh;
        C2420sK c2420sK = new C2420sK(3);
        c2420sK.Y(C1733l30.b);
        c2420sK.V(c2207q3.getDensity());
        c2420sK.a0(c2207q3.getViewConfiguration());
        c2420sK.Z(androidx.compose.ui.layout.b.b(nh).g(emptySemanticsElement).g(mpA2).g(mpA).g(((C0674Zz) c2207q3.getFocusOwner()).e).g(c2207q3.getDragAndDropManager().c).g(rp));
        c2207q3.y = c2420sK;
        IQ iq = ZH.a;
        c2207q3.z = new IQ();
        c2207q3.m6getLayoutNodes();
        c2207q3.A = new U00();
        c2207q3.B = c2207q3;
        c2207q3.C = new U50(c2207q3.getRoot(), c0410Pv, c2207q3.m6getLayoutNodes());
        C2966y3 c2966y3 = new C2966y3(c2207q3);
        c2207q3.D = c2966y3;
        c2207q3.E = new Q3(c2207q3, new C1256g3(0, c2207q3, F3.class, "getContentCaptureSessionCompat", "getContentCaptureSessionCompat(Landroid/view/View;)Landroidx/compose/ui/platform/coreshims/ContentCaptureSessionCompat;", 1, 0, 0));
        N2 n2 = new N2();
        c2207q3.F = n2;
        C2398s4 c2398s4 = new C2398s4();
        c2398s4.b = c2207q3;
        c2398s4.c = new Object();
        ComponentCallbacks2C2303r4 componentCallbacks2C2303r4 = new ComponentCallbacks2C2303r4(c2398s4);
        c2398s4.e = componentCallbacks2C2303r4;
        if (c2207q3.isAttachedToWindow()) {
            Context context2 = c2207q3.getContext();
            if (!c2398s4.a) {
                context2.getApplicationContext().registerComponentCallbacks(componentCallbacks2C2303r4);
                c2398s4.a = true;
            }
        }
        c2207q3.addOnAttachStateChangeListener(new ViewOnAttachStateChangeListenerC2491t3(i, c2398s4));
        c2207q3.G = c2398s4;
        c2207q3.H = new C2915xc();
        c2207q3.I = new ArrayList();
        c2207q3.M = new XP();
        C2420sK root = c2207q3.getRoot();
        C2398s4 c2398s42 = new C2398s4();
        c2398s42.b = root;
        c2398s42.c = new C0988dF((C2702vH) root.N.d);
        c2398s42.d = new WT(3);
        c2398s42.e = new C1275gF();
        c2207q3.N = c2398s42;
        c2207q3.O = C1160f3.n;
        c2207q3.P = i() ? new S60(c2207q3, c2207q3.getAutofillTree()) : null;
        if (i()) {
            AutofillManager autofillManagerG = AbstractC2865x0.g(context.getSystemService(AbstractC2865x0.k()));
            if (autofillManagerG == null) {
                throw AbstractC2462sn.q("Autofill service could not be located.");
            }
            c2207q3 = this;
            r2 = new R2(new WT(i, autofillManagerG), getSemanticsOwner(), this, getRectManager(), context.getPackageName());
        } else {
            r2 = null;
        }
        c2207q3.Q = r2;
        c2207q3.S = new Y2(context);
        c2207q3.T = new X2(c2207q3.m4getClipboardManager());
        c2207q3.U = new C1767lV(new C1637k3(c2207q3, i));
        c2207q3.c0 = new C1950nO(c2207q3.getRoot());
        long j = Api.BaseClientBuilder.API_PRIORITY_OTHER;
        c2207q3.d0 = (j & 4294967295L) | (j << 32);
        c2207q3.e0 = new int[]{0, 0};
        float[] fArrA = C1570jO.a();
        c2207q3.f0 = fArrA;
        c2207q3.g0 = C1570jO.a();
        c2207q3.h0 = C1570jO.a();
        c2207q3.i0 = -1L;
        c2207q3.k0 = 9187343241974906880L;
        c2207q3.l0 = AbstractC0752ap.X(null);
        c2207q3.m0 = AbstractC0752ap.E(new C1922n3(c2207q3, i));
        c2207q3.o0 = new ViewTreeObserver.OnGlobalLayoutListener() { // from class: o.a3
            @Override // android.view.ViewTreeObserver.OnGlobalLayoutListener
            public final void onGlobalLayout() {
                this.l.K();
            }
        };
        c2207q3.p0 = new ViewTreeObserver.OnScrollChangedListener() { // from class: o.b3
            @Override // android.view.ViewTreeObserver.OnScrollChangedListener
            public final void onScrollChanged() {
                this.a.K();
            }
        };
        c2207q3.q0 = new ViewTreeObserver.OnTouchModeChangeListener() { // from class: o.c3
            @Override // android.view.ViewTreeObserver.OnTouchModeChangeListener
            public final void onTouchModeChanged(boolean z2) {
                this.l.A0.a.setValue(new FH(z2 ? 1 : 2));
            }
        };
        Ge0 ge0 = new Ge0(c2207q3.getView(), c2207q3);
        c2207q3.r0 = ge0;
        c2207q3.s0 = new Ee0(ge0);
        c2207q3.t0 = new AtomicReference(null);
        c2207q3.u0 = new C1234fr(c2207q3.getTextInputService());
        c2207q3.v0 = new C0669Zu(29);
        c2207q3.w0 = new MV(AbstractC0249Jp.D(context), c0669Zu);
        c2207q3.x0 = i2 >= 31 ? context.getResources().getConfiguration().fontWeightAdjustment : 0;
        int layoutDirection = context.getResources().getConfiguration().getLayoutDirection();
        EnumC1280gK enumC1280gK = EnumC1280gK.l;
        EnumC1280gK enumC1280gK2 = layoutDirection != 0 ? layoutDirection != 1 ? null : EnumC1280gK.m : enumC1280gK;
        c2207q3.y0 = AbstractC0752ap.X(enumC1280gK2 != null ? enumC1280gK2 : enumC1280gK);
        c2207q3.z0 = new C0664Zp(c2207q3, 1);
        c2207q3.A0 = new HH(c2207q3.isInTouchMode() ? 1 : 2);
        c2207q3.B0 = new NP(c2207q3);
        H5 h5 = new H5();
        new C2616uQ(20, new U4(i, h5));
        c2207q3.C0 = h5;
        c2207q3.F0 = new Gm0(13);
        c2207q3.G0 = new UQ();
        int i4 = 0;
        c2207q3.J0 = new RunnableC2017o3(i4, c2207q3);
        c2207q3.K0 = new RunnableC2108p1(i, c2207q3);
        c2207q3.M0 = new C1922n3(c2207q3, i4);
        c2207q3.N0 = i2 < 29 ? new C0498Tf(fArrA) : new C0524Uf();
        c2207q3.addOnAttachStateChangeListener(c2207q3.E);
        c2207q3.setWillNotDraw(false);
        c2207q3.setFocusable(true);
        if (i2 >= 26) {
            E3.a.a(c2207q3, 1, false);
        }
        c2207q3.setFocusableInTouchMode(true);
        c2207q3.setClipChildren(false);
        Oj0.m(c2207q3, c2966y3);
        c2207q3.setOnDragListener(c2207q3.getDragAndDropManager());
        c2207q3.getRoot().b(c2207q3);
        if (i2 >= 29) {
            A3.a.a(c2207q3);
        }
        if (z) {
            View view = new View(context);
            view.setLayoutParams(new ViewGroup.LayoutParams(1, 1));
            view.setTag(R.id.hide_in_inspector_tag, Boolean.TRUE);
            c2207q3.p = view;
            c2207q3.addView(view, -1);
        }
        c2207q3.P0 = i2 >= 31 ? new WT(10) : null;
        c2207q3.R0 = new C1732l3(c2207q3);
    }

    public static final void a(C2207q3 c2207q3, int i, AccessibilityNodeInfo accessibilityNodeInfo, String str) {
        int iD;
        C2966y3 c2966y3 = c2207q3.D;
        if (F3.c(str, c2966y3.G)) {
            int iD2 = c2966y3.E.d(i);
            if (iD2 != -1) {
                accessibilityNodeInfo.getExtras().putInt(str, iD2);
                return;
            }
            return;
        }
        if (!F3.c(str, c2966y3.H) || (iD = c2966y3.F.d(i)) == -1) {
            return;
        }
        accessibilityNodeInfo.getExtras().putInt(str, iD);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final C0969d3 get_viewTreeOwners() {
        return (C0969d3) this.l0.getValue();
    }

    public static boolean i() {
        return Build.VERSION.SDK_INT >= 26;
    }

    public static void j(ViewGroup viewGroup) {
        int childCount = viewGroup.getChildCount();
        for (int i = 0; i < childCount; i++) {
            View childAt = viewGroup.getChildAt(i);
            if (childAt instanceof C2207q3) {
                ((C2207q3) childAt).x();
            } else if (childAt instanceof ViewGroup) {
                j((ViewGroup) childAt);
            }
        }
    }

    public static long k(int i) {
        int mode = View.MeasureSpec.getMode(i);
        int size = View.MeasureSpec.getSize(i);
        if (mode == Integer.MIN_VALUE) {
            return (0 << 32) | size;
        }
        if (mode == 0) {
            return (0 << 32) | Api.BaseClientBuilder.API_PRIORITY_OTHER;
        }
        if (mode != 1073741824) {
            throw new IllegalStateException();
        }
        long j = size;
        return j | (j << 32);
    }

    public static View l(View view, int i) throws NoSuchMethodException, SecurityException {
        if (Build.VERSION.SDK_INT < 29) {
            Method declaredMethod = View.class.getDeclaredMethod("getAccessibilityViewId", null);
            declaredMethod.setAccessible(true);
            if (F3.c(declaredMethod.invoke(view, null), Integer.valueOf(i))) {
                return view;
            }
            if (view instanceof ViewGroup) {
                ViewGroup viewGroup = (ViewGroup) view;
                int childCount = viewGroup.getChildCount();
                for (int i2 = 0; i2 < childCount; i2++) {
                    View viewL = l(viewGroup.getChildAt(i2), i);
                    if (viewL != null) {
                        return viewL;
                    }
                }
            }
        }
        return null;
    }

    public static void o(C2420sK c2420sK) {
        c2420sK.A();
        C1479iR c1479iRW = c2420sK.w();
        Object[] objArr = c1479iRW.l;
        int i = c1479iRW.n;
        for (int i2 = 0; i2 < i; i2++) {
            o((C2420sK) objArr[i2]);
        }
    }

    public static boolean q(MotionEvent motionEvent) {
        boolean z = (Float.floatToRawIntBits(motionEvent.getX()) & Api.BaseClientBuilder.API_PRIORITY_OTHER) >= 2139095040 || (Float.floatToRawIntBits(motionEvent.getY()) & Api.BaseClientBuilder.API_PRIORITY_OTHER) >= 2139095040 || (Float.floatToRawIntBits(motionEvent.getRawX()) & Api.BaseClientBuilder.API_PRIORITY_OTHER) >= 2139095040 || (Float.floatToRawIntBits(motionEvent.getRawY()) & Api.BaseClientBuilder.API_PRIORITY_OTHER) >= 2139095040;
        if (!z) {
            int pointerCount = motionEvent.getPointerCount();
            for (int i = 1; i < pointerCount; i++) {
                z = (Float.floatToRawIntBits(motionEvent.getX(i)) & Api.BaseClientBuilder.API_PRIORITY_OTHER) >= 2139095040 || (Float.floatToRawIntBits(motionEvent.getY(i)) & Api.BaseClientBuilder.API_PRIORITY_OTHER) >= 2139095040 || (Build.VERSION.SDK_INT >= 29 && !YP.a.a(motionEvent, i));
                if (z) {
                    break;
                }
            }
        }
        return z;
    }

    private void setDensity(InterfaceC2281qr interfaceC2281qr) {
        this.f684o.setValue(interfaceC2281qr);
    }

    private void setFontFamilyResolver(InterfaceC2221qA interfaceC2221qA) {
        this.w0.setValue(interfaceC2221qA);
    }

    private void setLayoutDirection(EnumC1280gK enumC1280gK) {
        this.y0.setValue(enumC1280gK);
    }

    private final void set_viewTreeOwners(C0969d3 c0969d3) {
        this.l0.setValue(c0969d3);
    }

    public final void A(C2420sK c2420sK, boolean z, boolean z2) {
        C2800wK c2800wK = c2420sK.O;
        C1950nO c1950nO = this.c0;
        if (!z) {
            c1950nO.getClass();
            int iW = AbstractC2462sn.w(c2800wK.c);
            if (iW == 0 || iW == 1 || iW == 2 || iW == 3) {
                return;
            }
            if (iW != 4) {
                throw new C2170pj();
            }
            C2420sK c2420sKS = c2420sK.s();
            boolean z3 = c2420sKS == null || c2420sKS.H();
            if (!z2) {
                if (c2420sK.o()) {
                    return;
                }
                if (c2420sK.n() && c2420sK.H() == z3 && c2420sK.H() == c2800wK.f773o.C) {
                    return;
                }
            }
            C2140pO c2140pO = c2800wK.f773o;
            c2140pO.E = true;
            c2140pO.F = true;
            if (!c2420sK.X && c2140pO.C && z3) {
                if ((c2420sKS == null || !c2420sKS.n()) && (c2420sKS == null || !c2420sKS.o())) {
                    c1950nO.b.i(4, c2420sK);
                }
                if (c1950nO.d) {
                    return;
                }
                F(null);
                return;
            }
            return;
        }
        C3126zm0 c3126zm0 = c1950nO.b;
        int iW2 = AbstractC2462sn.w(c2800wK.c);
        if (iW2 != 0) {
            if (iW2 == 1) {
                return;
            }
            if (iW2 != 2) {
                if (iW2 == 3) {
                    return;
                }
                if (iW2 != 4) {
                    throw new C2170pj();
                }
            }
        }
        if ((c2800wK.d || c2800wK.e) && !z2) {
            return;
        }
        c2800wK.e = true;
        c2800wK.f = true;
        C2140pO c2140pO2 = c2800wK.f773o;
        c2140pO2.E = true;
        c2140pO2.F = true;
        if (c2420sK.X) {
            return;
        }
        C2420sK c2420sKS2 = c2420sK.s();
        if (F3.c(c2420sK.I(), Boolean.TRUE) && ((c2420sKS2 == null || !c2420sKS2.O.d) && (c2420sKS2 == null || !c2420sKS2.O.e))) {
            c3126zm0.i(2, c2420sK);
        } else if (c2420sK.H() && ((c2420sKS2 == null || !c2420sKS2.n()) && (c2420sKS2 == null || !c2420sKS2.o()))) {
            c3126zm0.i(4, c2420sK);
        }
        if (c1950nO.d) {
            return;
        }
        F(null);
    }

    public final void B() {
        C2966y3 c2966y3 = this.D;
        c2966y3.A = true;
        if (c2966y3.v() && !c2966y3.L) {
            c2966y3.L = true;
            c2966y3.l.post(c2966y3.N);
        }
        Q3 q3 = this.E;
        q3.r = true;
        if (!q3.i() || q3.y) {
            return;
        }
        q3.y = true;
        q3.t.post(q3.z);
    }

    public final void C() {
        if (this.j0) {
            return;
        }
        long jCurrentAnimationTimeMillis = AnimationUtils.currentAnimationTimeMillis();
        if (jCurrentAnimationTimeMillis != this.i0) {
            this.i0 = jCurrentAnimationTimeMillis;
            InterfaceC0472Sf interfaceC0472Sf = this.N0;
            float[] fArr = this.g0;
            interfaceC0472Sf.a(this, fArr);
            AbstractC0662Zn.x(fArr, this.h0);
            ViewParent parent = getParent();
            View view = this;
            while (parent instanceof ViewGroup) {
                view = (View) parent;
                parent = ((ViewGroup) view).getParent();
            }
            int[] iArr = this.e0;
            view.getLocationOnScreen(iArr);
            float f = iArr[0];
            float f2 = iArr[1];
            view.getLocationInWindow(iArr);
            float f3 = iArr[0];
            float f4 = f2 - iArr[1];
            this.k0 = (Float.floatToRawIntBits(f - f3) << 32) | (Float.floatToRawIntBits(f4) & 4294967295L);
        }
    }

    public final void D(MotionEvent motionEvent) {
        this.i0 = AnimationUtils.currentAnimationTimeMillis();
        InterfaceC0472Sf interfaceC0472Sf = this.N0;
        float[] fArr = this.g0;
        interfaceC0472Sf.a(this, fArr);
        AbstractC0662Zn.x(fArr, this.h0);
        float x = motionEvent.getX();
        float y = motionEvent.getY();
        long jB = C1570jO.b((Float.floatToRawIntBits(x) << 32) | (Float.floatToRawIntBits(y) & 4294967295L), fArr);
        float rawX = motionEvent.getRawX() - Float.intBitsToFloat((int) (jB >> 32));
        float rawY = motionEvent.getRawY() - Float.intBitsToFloat((int) (jB & 4294967295L));
        this.k0 = (Float.floatToRawIntBits(rawX) << 32) | (Float.floatToRawIntBits(rawY) & 4294967295L);
    }

    public final boolean E() {
        if (isFocused() || hasFocus()) {
            return true;
        }
        return super.requestFocus(130, null);
    }

    public final void F(C2420sK c2420sK) {
        if (isLayoutRequested() || !isAttachedToWindow()) {
            return;
        }
        if (c2420sK != null) {
            while (c2420sK != null && c2420sK.p() == 1) {
                if (!this.b0) {
                    C2420sK c2420sKS = c2420sK.s();
                    if (c2420sKS == null) {
                        break;
                    }
                    long j = ((C2702vH) c2420sKS.N.d).f376o;
                    if (C0634Yl.f(j) && C0634Yl.e(j)) {
                        break;
                    }
                }
                c2420sK = c2420sK.s();
            }
            if (c2420sK == getRoot()) {
                requestLayout();
                return;
            }
        }
        if (getWidth() == 0 || getHeight() == 0) {
            requestLayout();
        } else {
            invalidate();
        }
    }

    public final long G(long j) {
        C();
        float fIntBitsToFloat = Float.intBitsToFloat((int) (j >> 32)) - Float.intBitsToFloat((int) (this.k0 >> 32));
        float fIntBitsToFloat2 = Float.intBitsToFloat((int) (j & 4294967295L)) - Float.intBitsToFloat((int) (this.k0 & 4294967295L));
        return C1570jO.b((Float.floatToRawIntBits(fIntBitsToFloat2) & 4294967295L) | (Float.floatToRawIntBits(fIntBitsToFloat) << 32), this.h0);
    }

    public final int H(MotionEvent motionEvent) {
        Object obj;
        if (this.O0) {
            this.O0 = false;
            int metaState = motionEvent.getMetaState();
            this.u.getClass();
            AbstractC1700kl0.a.setValue(new OX(metaState));
        }
        XP xp = this.M;
        C1390hY c1390hYA = xp.a(motionEvent, this);
        C2398s4 c2398s4 = this.N;
        if (c1390hYA == null) {
            if (!c2398s4.a) {
                ((UM) ((WT) c2398s4.d).m).a();
                ((C0988dF) c2398s4.c).c();
            }
            return 0;
        }
        List list = (List) c1390hYA.m;
        int size = list.size() - 1;
        if (size >= 0) {
            while (true) {
                int i = size - 1;
                obj = list.get(size);
                if (((KX) obj).e) {
                    break;
                }
                if (i < 0) {
                    break;
                }
                size = i;
            }
            obj = null;
        } else {
            obj = null;
        }
        KX kx = (KX) obj;
        if (kx != null) {
            this.l = kx.d;
        }
        int iE = c2398s4.e(c1390hYA, this, r(motionEvent));
        c1390hYA.n = null;
        int actionMasked = motionEvent.getActionMasked();
        if ((actionMasked != 0 && actionMasked != 5) || (iE & 1) != 0) {
            return iE;
        }
        int pointerId = motionEvent.getPointerId(motionEvent.getActionIndex());
        xp.c.delete(pointerId);
        xp.b.delete(pointerId);
        return iE;
    }

    public final void I(MotionEvent motionEvent, int i, long j, boolean z) {
        int actionMasked = motionEvent.getActionMasked();
        int actionIndex = -1;
        if (actionMasked != 1) {
            if (actionMasked == 6) {
                actionIndex = motionEvent.getActionIndex();
            }
        } else if (i != 9 && i != 10) {
            actionIndex = 0;
        }
        int pointerCount = motionEvent.getPointerCount() - (actionIndex >= 0 ? 1 : 0);
        if (pointerCount == 0) {
            return;
        }
        MotionEvent.PointerProperties[] pointerPropertiesArr = new MotionEvent.PointerProperties[pointerCount];
        for (int i2 = 0; i2 < pointerCount; i2++) {
            pointerPropertiesArr[i2] = new MotionEvent.PointerProperties();
        }
        MotionEvent.PointerCoords[] pointerCoordsArr = new MotionEvent.PointerCoords[pointerCount];
        for (int i3 = 0; i3 < pointerCount; i3++) {
            pointerCoordsArr[i3] = new MotionEvent.PointerCoords();
        }
        int i4 = 0;
        while (i4 < pointerCount) {
            int i5 = ((actionIndex < 0 || i4 < actionIndex) ? 0 : 1) + i4;
            motionEvent.getPointerProperties(i5, pointerPropertiesArr[i4]);
            MotionEvent.PointerCoords pointerCoords = pointerCoordsArr[i4];
            motionEvent.getPointerCoords(i5, pointerCoords);
            float f = pointerCoords.x;
            long jU = u((Float.floatToRawIntBits(pointerCoords.y) & 4294967295L) | (Float.floatToRawIntBits(f) << 32));
            pointerCoords.x = Float.intBitsToFloat((int) (jU >> 32));
            pointerCoords.y = Float.intBitsToFloat((int) (jU & 4294967295L));
            i4++;
        }
        MotionEvent motionEventObtain = MotionEvent.obtain(motionEvent.getDownTime() == motionEvent.getEventTime() ? j : motionEvent.getDownTime(), j, i, pointerCount, pointerPropertiesArr, pointerCoordsArr, motionEvent.getMetaState(), z ? 0 : motionEvent.getButtonState(), motionEvent.getXPrecision(), motionEvent.getYPrecision(), motionEvent.getDeviceId(), motionEvent.getEdgeFlags(), motionEvent.getSource(), motionEvent.getFlags());
        this.N.e(this.M.a(motionEventObtain, this), this, true);
        motionEventObtain.recycle();
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void J(o.SC r5, o.AbstractC0298Lm r6) {
        /*
            r4 = this;
            boolean r0 = r6 instanceof o.C2112p3
            if (r0 == 0) goto L13
            r0 = r6
            o.p3 r0 = (o.C2112p3) r0
            int r1 = r0.q
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r3 = r1 & r2
            if (r3 == 0) goto L13
            int r1 = r1 - r2
            r0.q = r1
            goto L18
        L13:
            o.p3 r0 = new o.p3
            r0.<init>(r4, r6)
        L18:
            java.lang.Object r6 = r0.f671o
            int r1 = r0.q
            r2 = 1
            if (r1 == 0) goto L2d
            if (r1 == r2) goto L29
            java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
            java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
            r5.<init>(r6)
            throw r5
        L29:
            o.IJ.H(r6)
            goto L49
        L2d:
            o.IJ.H(r6)
            o.k3 r6 = new o.k3
            r1 = 2
            r6.<init>(r4, r1)
            r0.q = r2
            o.z4 r1 = new o.z4
            r2 = 0
            java.util.concurrent.atomic.AtomicReference r3 = r4.t0
            r1.<init>(r6, r3, r5, r2)
            java.lang.Object r5 = o.C80.r(r1, r0)
            o.Dn r6 = o.EnumC0091Dn.l
            if (r5 != r6) goto L49
            return
        L49:
            o.pj r5 = new o.pj
            r5.<init>()
            throw r5
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2207q3.J(o.SC, o.Lm):void");
    }

    /* JADX WARN: Removed duplicated region for block: B:12:0x0044  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void K() {
        /*
            r18 = this;
            r0 = r18
            int[] r1 = r0.e0
            r0.getLocationOnScreen(r1)
            long r2 = r0.d0
            r4 = 32
            long r5 = r2 >> r4
            int r5 = (int) r5
            r6 = 4294967295(0xffffffff, double:2.1219957905E-314)
            long r2 = r2 & r6
            int r2 = (int) r2
            r3 = 0
            r8 = r1[r3]
            r9 = 1
            if (r5 != r8) goto L27
            r10 = r1[r9]
            if (r2 != r10) goto L27
            long r10 = r0.i0
            r12 = 0
            int r10 = (r10 > r12 ? 1 : (r10 == r12 ? 0 : -1))
            if (r10 >= 0) goto L44
        L27:
            r1 = r1[r9]
            long r10 = (long) r8
            long r10 = r10 << r4
            long r12 = (long) r1
            long r12 = r12 & r6
            long r10 = r10 | r12
            r0.d0 = r10
            r1 = 2147483647(0x7fffffff, float:NaN)
            if (r5 == r1) goto L44
            if (r2 == r1) goto L44
            o.sK r1 = r0.getRoot()
            o.wK r1 = r1.O
            o.pO r1 = r1.f773o
            r1.g0()
            r1 = r9
            goto L45
        L44:
            r1 = r3
        L45:
            r0.C()
            android.view.View r2 = r0.Q0
            if (r2 != 0) goto L52
            android.view.View r2 = r0.getRootView()
            r0.Q0 = r2
        L52:
            o.U00 r5 = r0.getRectManager()
            long r10 = r0.d0
            long r12 = r0.k0
            long r12 = o.As0.P(r12)
            int r8 = r2.getWidth()
            int r2 = r2.getHeight()
            r5.getClass()
            float[] r14 = r0.g0
            int r15 = o.C1884mi0.f(r14)
            o.qf0 r3 = r5.b
            r15 = r15 & 2
            if (r15 != 0) goto L78
        L75:
            r16 = r6
            goto L7a
        L78:
            r14 = 0
            goto L75
        L7a:
            long r6 = r3.c
            boolean r6 = o.C0704aI.a(r12, r6)
            if (r6 != 0) goto L86
            r3.c = r12
            r6 = r9
            goto L87
        L86:
            r6 = 0
        L87:
            long r12 = r3.d
            boolean r7 = o.C0704aI.a(r10, r12)
            if (r7 != 0) goto L92
            r3.d = r10
            r6 = r9
        L92:
            if (r14 == 0) goto L95
            r6 = r9
        L95:
            long r7 = (long) r8
            long r7 = r7 << r4
            long r10 = (long) r2
            long r10 = r10 & r16
            long r7 = r7 | r10
            long r10 = r3.e
            int r2 = (r7 > r10 ? 1 : (r7 == r10 ? 0 : -1))
            if (r2 == 0) goto La4
            r3.e = r7
            r6 = r9
        La4:
            if (r6 != 0) goto Lad
            boolean r2 = r5.e
            if (r2 == 0) goto Lab
            goto Lad
        Lab:
            r3 = 0
            goto Lae
        Lad:
            r3 = r9
        Lae:
            r5.e = r3
            o.nO r2 = r0.c0
            r2.a(r1)
            o.U00 r1 = r0.getRectManager()
            r1.b()
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2207q3.K():void");
    }

    public final void L(float f) {
        if (this.q) {
            if (f > 0.0f) {
                if (Float.isNaN(this.H0) || f > this.H0) {
                    this.H0 = f;
                    return;
                }
                return;
            }
            if (f < 0.0f) {
                if (Float.isNaN(this.I0) || f < this.I0) {
                    this.I0 = f;
                }
            }
        }
    }

    @Override // android.view.ViewGroup
    public final void addView(View view) {
        addView(view, -1);
    }

    @Override // android.view.View
    public final void autofill(SparseArray sparseArray) {
        N50 n50U;
        OC oc;
        if (i()) {
            R2 r2 = this.Q;
            if (r2 != null) {
                int size = sparseArray.size();
                for (int i = 0; i < size; i++) {
                    int iKeyAt = sparseArray.keyAt(i);
                    AutofillValue autofillValueH = AbstractC2865x0.h(sparseArray.get(iKeyAt));
                    if (autofillValueH.isText()) {
                        C2420sK c2420sK = (C2420sK) r2.b.c.b(iKeyAt);
                        if (c2420sK != null && (n50U = c2420sK.u()) != null) {
                            Object objG = n50U.l.g(M50.f);
                            if (objG == null) {
                                objG = null;
                            }
                            C1726l0 c1726l0 = (C1726l0) objG;
                            if (c1726l0 != null && (oc = (OC) c1726l0.b) != null) {
                            }
                        }
                    } else if (!autofillValueH.isDate() && !autofillValueH.isList()) {
                        autofillValueH.isToggle();
                    }
                }
            }
            S60 s60 = this.P;
            if (s60 != null) {
                C2915xc c2915xc = (C2915xc) s60.n;
                if (c2915xc.a.isEmpty()) {
                    return;
                }
                int size2 = sparseArray.size();
                for (int i2 = 0; i2 < size2; i2++) {
                    int iKeyAt2 = sparseArray.keyAt(i2);
                    AutofillValue autofillValueH2 = AbstractC2865x0.h(sparseArray.get(iKeyAt2));
                    if (autofillValueH2.isText()) {
                        autofillValueH2.getTextValue().toString();
                        if (c2915xc.a.get(Integer.valueOf(iKeyAt2)) != null) {
                            throw new ClassCastException();
                        }
                    } else {
                        if (autofillValueH2.isDate()) {
                            throw new C0143Fn("An operation is not implemented: b/138604541: Add onFill() callback for date");
                        }
                        if (autofillValueH2.isList()) {
                            throw new C0143Fn("An operation is not implemented: b/138604541: Add onFill() callback for list");
                        }
                        if (autofillValueH2.isToggle()) {
                            throw new C0143Fn("An operation is not implemented: b/138604541:  Add onFill() callback for toggle");
                        }
                    }
                }
            }
        }
    }

    @Override // android.view.View
    public final boolean canScrollHorizontally(int i) {
        return this.D.m(false, i, this.l);
    }

    @Override // android.view.View
    public final boolean canScrollVertically(int i) {
        return this.D.m(true, i, this.l);
    }

    @Override // o.InterfaceC1994nq
    public final void d() {
        if (Build.VERSION.SDK_INT < 30) {
            setShowLayoutBounds(AbstractC2461sm0.w());
        }
    }

    @Override // android.view.ViewGroup, android.view.View
    public final void dispatchDraw(Canvas canvas) {
        if (!isAttachedToWindow()) {
            o(getRoot());
        }
        v(true);
        AbstractC2884x90.k().m();
        this.K = true;
        C0006Ag c0006Ag = this.v;
        T2 t2 = c0006Ag.a;
        Canvas canvas2 = t2.a;
        t2.a = canvas;
        getRoot().i(t2, null);
        c0006Ag.a.a = canvas2;
        ArrayList arrayList = this.I;
        if (!arrayList.isEmpty()) {
            int size = arrayList.size();
            for (int i = 0; i < size; i++) {
                ((C1274gE) ((InterfaceC1483iV) arrayList.get(i))).g();
            }
        }
        int i2 = Zj0.l;
        arrayList.clear();
        this.K = false;
        ArrayList arrayList2 = this.J;
        if (arrayList2 != null) {
            arrayList.addAll(arrayList2);
            arrayList2.clear();
        }
        if (this.q) {
            AbstractC2309r7.a(this, this.H0);
            View view = this.p;
            AbstractC2309r7.a(view == null ? null : view, this.I0);
            if (!Float.isNaN(this.I0)) {
                (view == null ? null : view).invalidate();
                drawChild(canvas, view != null ? view : null, getDrawingTime());
            }
            this.H0 = Float.NaN;
            this.I0 = Float.NaN;
        }
        getRectManager().b();
    }

    @Override // android.view.View
    public final boolean dispatchGenericMotionEvent(MotionEvent motionEvent) {
        C0312Mb c0312Mb;
        C1828m30 c1828m30;
        int size;
        C0312Mb c0312Mb2;
        LP lpI;
        C0312Mb c0312Mb3;
        if (this.L0) {
            RunnableC2108p1 runnableC2108p1 = this.K0;
            removeCallbacks(runnableC2108p1);
            if (motionEvent.getActionMasked() == 8) {
                this.L0 = false;
            } else {
                runnableC2108p1.run();
            }
        }
        if (q(motionEvent) || !isAttachedToWindow()) {
            return super.dispatchGenericMotionEvent(motionEvent);
        }
        if (motionEvent.getActionMasked() != 8) {
            if (!motionEvent.isFromSource(2)) {
                float x = motionEvent.getX();
                float y = motionEvent.getY();
                Float.floatToRawIntBits(x);
                Float.floatToRawIntBits(y);
                motionEvent.getEventTime();
                motionEvent.getActionMasked();
                C0674Zz c0674Zz = (C0674Zz) getFocusOwner();
                if (c0674Zz.d.e) {
                    System.out.println((Object) "FocusRelatedWarning: Dispatching indirect touch event while the focus system is invalidated.");
                } else {
                    C1556jA c1556jAG = AbstractC0752ap.G(c0674Zz.c);
                    if (c1556jAG != null) {
                        if (!c1556jAG.l.y) {
                            AbstractC2133pH.b("visitAncestors called on an unattached node");
                        }
                        LP lp = c1556jAG.l;
                        C2420sK c2420sKS = AbstractC2539te.S(c1556jAG);
                        while (c2420sKS != null) {
                            if ((((LP) c2420sKS.N.g).f209o & 2097152) != 0) {
                                while (lp != null) {
                                    if ((lp.n & 2097152) != 0) {
                                        LP lpI2 = lp;
                                        C1479iR c1479iR = null;
                                        while (lpI2 != null) {
                                            if ((lpI2.n & 2097152) != 0 && (lpI2 instanceof AbstractC0561Vq)) {
                                                int i = 0;
                                                for (LP lp2 = ((AbstractC0561Vq) lpI2).A; lp2 != null; lp2 = lp2.q) {
                                                    if ((lp2.n & 2097152) != 0) {
                                                        i++;
                                                        if (i == 1) {
                                                            lpI2 = lp2;
                                                        } else {
                                                            if (c1479iR == null) {
                                                                c1479iR = new C1479iR(new LP[16]);
                                                            }
                                                            if (lpI2 != null) {
                                                                c1479iR.b(lpI2);
                                                                lpI2 = null;
                                                            }
                                                            c1479iR.b(lp2);
                                                        }
                                                    }
                                                }
                                                if (i == 1) {
                                                }
                                            }
                                            lpI2 = AbstractC2539te.i(c1479iR);
                                        }
                                    }
                                    lp = lp.p;
                                }
                            }
                            c2420sKS = c2420sKS.s();
                            lp = (c2420sKS == null || (c0312Mb = c2420sKS.N) == null) ? null : (Bc0) c0312Mb.f;
                        }
                    }
                }
            }
            return super.dispatchGenericMotionEvent(motionEvent);
        }
        if (!motionEvent.isFromSource(4194304)) {
            return (n(motionEvent) & 1) != 0;
        }
        ViewConfiguration viewConfiguration = ViewConfiguration.get(getContext());
        motionEvent.getAxisValue(26);
        Context context = getContext();
        int i2 = Build.VERSION.SDK_INT;
        if (i2 >= 26) {
            Method method = Rj0.a;
            AbstractC1456i7.g(viewConfiguration);
        } else {
            Rj0.a(viewConfiguration, context);
        }
        Context context2 = getContext();
        if (i2 >= 26) {
            AbstractC1456i7.f(viewConfiguration);
        } else {
            Rj0.a(viewConfiguration, context2);
        }
        motionEvent.getEventTime();
        motionEvent.getDeviceId();
        C0674Zz c0674Zz2 = (C0674Zz) getFocusOwner();
        if (c0674Zz2.d.e) {
            System.out.println((Object) "FocusRelatedWarning: Dispatching rotary event while the focus system is invalidated.");
            return false;
        }
        C1556jA c1556jAG2 = AbstractC0752ap.G(c0674Zz2.c);
        if (c1556jAG2 != null) {
            if (!c1556jAG2.l.y) {
                AbstractC2133pH.b("visitAncestors called on an unattached node");
            }
            LP lp3 = c1556jAG2.l;
            C2420sK c2420sKS2 = AbstractC2539te.S(c1556jAG2);
            loop0: while (true) {
                if (c2420sKS2 == null) {
                    lpI = null;
                    break;
                }
                if ((((LP) c2420sKS2.N.g).f209o & 16384) != 0) {
                    while (lp3 != null) {
                        if ((lp3.n & 16384) != 0) {
                            lpI = lp3;
                            C1479iR c1479iR2 = null;
                            while (lpI != null) {
                                if (lpI instanceof C1828m30) {
                                    break loop0;
                                }
                                if ((lpI.n & 16384) != 0 && (lpI instanceof AbstractC0561Vq)) {
                                    int i3 = 0;
                                    for (LP lp4 = ((AbstractC0561Vq) lpI).A; lp4 != null; lp4 = lp4.q) {
                                        if ((lp4.n & 16384) != 0) {
                                            i3++;
                                            if (i3 == 1) {
                                                lpI = lp4;
                                            } else {
                                                if (c1479iR2 == null) {
                                                    c1479iR2 = new C1479iR(new LP[16]);
                                                }
                                                if (lpI != null) {
                                                    c1479iR2.b(lpI);
                                                    lpI = null;
                                                }
                                                c1479iR2.b(lp4);
                                            }
                                        }
                                    }
                                    if (i3 == 1) {
                                    }
                                }
                                lpI = AbstractC2539te.i(c1479iR2);
                            }
                        }
                        lp3 = lp3.p;
                    }
                }
                c2420sKS2 = c2420sKS2.s();
                lp3 = (c2420sKS2 == null || (c0312Mb3 = c2420sKS2.N) == null) ? null : (Bc0) c0312Mb3.f;
            }
            c1828m30 = (C1828m30) lpI;
        } else {
            c1828m30 = null;
        }
        if (c1828m30 != null) {
            C1828m30 c1828m302 = c1828m30;
            if (!c1828m302.l.y) {
                AbstractC2133pH.b("visitAncestors called on an unattached node");
            }
            LP lp5 = c1828m302.l.p;
            C2420sK c2420sKS3 = AbstractC2539te.S(c1828m30);
            ArrayList arrayList = null;
            while (c2420sKS3 != null) {
                if ((((LP) c2420sKS3.N.g).f209o & 16384) != 0) {
                    while (lp5 != null) {
                        if ((lp5.n & 16384) != 0) {
                            LP lpI3 = lp5;
                            C1479iR c1479iR3 = null;
                            while (lpI3 != null) {
                                if (lpI3 instanceof C1828m30) {
                                    if (arrayList == null) {
                                        arrayList = new ArrayList();
                                    }
                                    arrayList.add(lpI3);
                                } else if ((lpI3.n & 16384) != 0 && (lpI3 instanceof AbstractC0561Vq)) {
                                    int i4 = 0;
                                    for (LP lp6 = ((AbstractC0561Vq) lpI3).A; lp6 != null; lp6 = lp6.q) {
                                        if ((lp6.n & 16384) != 0) {
                                            i4++;
                                            if (i4 == 1) {
                                                lpI3 = lp6;
                                            } else {
                                                if (c1479iR3 == null) {
                                                    c1479iR3 = new C1479iR(new LP[16]);
                                                }
                                                if (lpI3 != null) {
                                                    c1479iR3.b(lpI3);
                                                    lpI3 = null;
                                                }
                                                c1479iR3.b(lp6);
                                            }
                                        }
                                    }
                                    if (i4 == 1) {
                                    }
                                }
                                lpI3 = AbstractC2539te.i(c1479iR3);
                            }
                        }
                        lp5 = lp5.p;
                    }
                }
                c2420sKS3 = c2420sKS3.s();
                lp5 = (c2420sKS3 == null || (c0312Mb2 = c2420sKS3.N) == null) ? null : (Bc0) c0312Mb2.f;
            }
            if (arrayList != null && arrayList.size() - 1 >= 0) {
                while (true) {
                    int i5 = size - 1;
                    ((C1828m30) arrayList.get(size)).getClass();
                    if (i5 < 0) {
                        break;
                    }
                    size = i5;
                }
            }
            LP lpI4 = c1828m302.l;
            C1479iR c1479iR4 = null;
            while (lpI4 != null) {
                if (lpI4 instanceof C1828m30) {
                } else if ((lpI4.n & 16384) != 0 && (lpI4 instanceof AbstractC0561Vq)) {
                    int i6 = 0;
                    for (LP lp7 = ((AbstractC0561Vq) lpI4).A; lp7 != null; lp7 = lp7.q) {
                        if ((lp7.n & 16384) != 0) {
                            i6++;
                            if (i6 == 1) {
                                lpI4 = lp7;
                            } else {
                                if (c1479iR4 == null) {
                                    c1479iR4 = new C1479iR(new LP[16]);
                                }
                                if (lpI4 != null) {
                                    c1479iR4.b(lpI4);
                                    lpI4 = null;
                                }
                                c1479iR4.b(lp7);
                            }
                        }
                    }
                    if (i6 == 1) {
                    }
                }
                lpI4 = AbstractC2539te.i(c1479iR4);
            }
            if (!super.dispatchGenericMotionEvent(motionEvent)) {
                LP lpI5 = c1828m302.l;
                C1479iR c1479iR5 = null;
                while (lpI5 != null) {
                    if (lpI5 instanceof C1828m30) {
                    } else if ((lpI5.n & 16384) != 0 && (lpI5 instanceof AbstractC0561Vq)) {
                        int i7 = 0;
                        for (LP lp8 = ((AbstractC0561Vq) lpI5).A; lp8 != null; lp8 = lp8.q) {
                            if ((lp8.n & 16384) != 0) {
                                i7++;
                                if (i7 == 1) {
                                    lpI5 = lp8;
                                } else {
                                    if (c1479iR5 == null) {
                                        c1479iR5 = new C1479iR(new LP[16]);
                                    }
                                    if (lpI5 != null) {
                                        c1479iR5.b(lpI5);
                                        lpI5 = null;
                                    }
                                    c1479iR5.b(lp8);
                                }
                            }
                        }
                        if (i7 == 1) {
                        }
                    }
                    lpI5 = AbstractC2539te.i(c1479iR5);
                }
                if (arrayList != null) {
                    int size2 = arrayList.size();
                    for (int i8 = 0; i8 < size2; i8++) {
                        C1160f3 c1160f3 = ((C1828m30) arrayList.get(i8)).z;
                    }
                }
            }
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:66:0x0157  */
    @Override // android.view.ViewGroup, android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final boolean dispatchHoverEvent(android.view.MotionEvent r24) {
        /*
            Method dump skipped, instructions count: 352
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2207q3.dispatchHoverEvent(android.view.MotionEvent):boolean");
    }

    @Override // android.view.ViewGroup, android.view.View
    public final boolean dispatchKeyEvent(KeyEvent keyEvent) {
        if (!isFocused()) {
            return ((C0674Zz) getFocusOwner()).d(keyEvent, new C1352h3(0, this, keyEvent));
        }
        int metaState = keyEvent.getMetaState();
        this.u.getClass();
        AbstractC1700kl0.a.setValue(new OX(metaState));
        return ((C0674Zz) getFocusOwner()).d(keyEvent, C0744al.v) || super.dispatchKeyEvent(keyEvent);
    }

    @Override // android.view.ViewGroup, android.view.View
    public final boolean dispatchKeyEventPreIme(KeyEvent keyEvent) {
        C0312Mb c0312Mb;
        if (isFocused()) {
            C0674Zz c0674Zz = (C0674Zz) getFocusOwner();
            if (c0674Zz.d.e) {
                System.out.println((Object) "FocusRelatedWarning: Dispatching intercepted soft keyboard event while the focus system is invalidated.");
            } else {
                C1556jA c1556jAG = AbstractC0752ap.G(c0674Zz.c);
                if (c1556jAG != null) {
                    if (!c1556jAG.l.y) {
                        AbstractC2133pH.b("visitAncestors called on an unattached node");
                    }
                    LP lp = c1556jAG.l;
                    C2420sK c2420sKS = AbstractC2539te.S(c1556jAG);
                    while (c2420sKS != null) {
                        if ((((LP) c2420sKS.N.g).f209o & 131072) != 0) {
                            while (lp != null) {
                                if ((lp.n & 131072) != 0) {
                                    LP lpI = lp;
                                    C1479iR c1479iR = null;
                                    while (lpI != null) {
                                        if ((lpI.n & 131072) != 0 && (lpI instanceof AbstractC0561Vq)) {
                                            int i = 0;
                                            for (LP lp2 = ((AbstractC0561Vq) lpI).A; lp2 != null; lp2 = lp2.q) {
                                                if ((lp2.n & 131072) != 0) {
                                                    i++;
                                                    if (i == 1) {
                                                        lpI = lp2;
                                                    } else {
                                                        if (c1479iR == null) {
                                                            c1479iR = new C1479iR(new LP[16]);
                                                        }
                                                        if (lpI != null) {
                                                            c1479iR.b(lpI);
                                                            lpI = null;
                                                        }
                                                        c1479iR.b(lp2);
                                                    }
                                                }
                                            }
                                            if (i == 1) {
                                            }
                                        }
                                        lpI = AbstractC2539te.i(c1479iR);
                                    }
                                }
                                lp = lp.p;
                            }
                        }
                        c2420sKS = c2420sKS.s();
                        lp = (c2420sKS == null || (c0312Mb = c2420sKS.N) == null) ? null : (Bc0) c0312Mb.f;
                    }
                }
            }
        }
        return super.dispatchKeyEventPreIme(keyEvent);
    }

    @Override // android.view.ViewGroup, android.view.View
    public final void dispatchProvideStructure(ViewStructure viewStructure) {
        if (Build.VERSION.SDK_INT < 28) {
            C3061z3.a.a(viewStructure, getView());
        } else {
            super.dispatchProvideStructure(viewStructure);
        }
    }

    @Override // android.view.ViewGroup, android.view.View
    public final boolean dispatchTouchEvent(MotionEvent motionEvent) {
        if (this.L0) {
            RunnableC2108p1 runnableC2108p1 = this.K0;
            removeCallbacks(runnableC2108p1);
            MotionEvent motionEvent2 = this.D0;
            if (motionEvent.getActionMasked() == 0 && motionEvent2.getSource() == motionEvent.getSource() && motionEvent2.getToolType(0) == motionEvent.getToolType(0)) {
                this.L0 = false;
            } else {
                runnableC2108p1.run();
            }
        }
        if (!q(motionEvent) && isAttachedToWindow() && (motionEvent.getActionMasked() != 2 || s(motionEvent))) {
            int iN = n(motionEvent);
            if ((iN & 2) != 0) {
                getParent().requestDisallowInterceptTouchEvent(true);
            }
            if ((iN & 1) != 0) {
                return true;
            }
        }
        return false;
    }

    public final View findViewByAccessibilityIdTraversal(int i) throws IllegalAccessException, NoSuchMethodException, SecurityException, IllegalArgumentException, InvocationTargetException {
        try {
            if (Build.VERSION.SDK_INT < 29) {
                return l(this, i);
            }
            Method declaredMethod = View.class.getDeclaredMethod("findViewByAccessibilityIdTraversal", Integer.TYPE);
            declaredMethod.setAccessible(true);
            Object objInvoke = declaredMethod.invoke(this, Integer.valueOf(i));
            if (objInvoke instanceof View) {
                return (View) objInvoke;
            }
            return null;
        } catch (NoSuchMethodException unused) {
            return null;
        }
    }

    @Override // android.view.ViewGroup, android.view.ViewParent
    public final View focusSearch(View view, int i) {
        T00 t00H;
        if (view == null || this.c0.c) {
            return super.focusSearch(view, i);
        }
        View viewB = ((C0466Rz) C0466Rz.f.get()).b(i, view, this);
        if (view == this) {
            C1556jA c1556jAG = AbstractC0752ap.G(((C0674Zz) getFocusOwner()).c);
            t00H = c1556jAG != null ? AbstractC0752ap.H(c1556jAG) : null;
            if (t00H == null) {
                t00H = F3.h(view, this);
            }
        } else {
            t00H = F3.h(view, this);
        }
        C0388Oz c0388OzU = F3.U(i);
        int i2 = c0388OzU != null ? c0388OzU.a : 6;
        B10 b10 = new B10();
        if (((C0674Zz) getFocusOwner()).e(i2, t00H, new C1448i3(b10, 0)) != null) {
            Object obj = b10.l;
            if (obj != null) {
                if (viewB != null) {
                    if (i2 == 1 || i2 == 2) {
                        return super.focusSearch(view, i);
                    }
                    if (C80.E(AbstractC0752ap.H((C1556jA) obj), F3.h(viewB, this), t00H, i2)) {
                    }
                }
                return this;
            }
            if (viewB == null) {
            }
            return viewB;
        }
        return view;
    }

    public final C1166f6 getAndroidViewsHandler$ui_release() {
        if (this.W == null) {
            C1166f6 c1166f6 = new C1166f6(getContext());
            this.W = c1166f6;
            addView(c1166f6, -1);
            requestLayout();
        }
        return this.W;
    }

    public InterfaceC2251qc getAutofill() {
        return this.P;
    }

    public AbstractC2820wc getAutofillManager() {
        return this.Q;
    }

    public C2915xc getAutofillTree() {
        return this.H;
    }

    public final OC getConfigurationChangeObserver() {
        return this.O;
    }

    public final Q3 getContentCaptureManager$ui_release() {
        return this.E;
    }

    public InterfaceC2747vn getCoroutineContext() {
        return this.s;
    }

    public InterfaceC2281qr getDensity() {
        return (InterfaceC2281qr) this.f684o.getValue();
    }

    public T00 getEmbeddedViewFocusRect() {
        if (isFocused()) {
            C1556jA c1556jAG = AbstractC0752ap.G(((C0674Zz) getFocusOwner()).c);
            if (c1556jAG != null) {
                return AbstractC0752ap.H(c1556jAG);
            }
            return null;
        }
        View viewFindFocus = findFocus();
        if (viewFindFocus != null) {
            return F3.h(viewFindFocus, this);
        }
        return null;
    }

    public InterfaceC0622Xz getFocusOwner() {
        return this.r;
    }

    @Override // android.view.View
    public final void getFocusedRect(Rect rect) {
        T00 embeddedViewFocusRect = getEmbeddedViewFocusRect();
        if (embeddedViewFocusRect != null) {
            rect.left = Math.round(embeddedViewFocusRect.a);
            rect.top = Math.round(embeddedViewFocusRect.b);
            rect.right = Math.round(embeddedViewFocusRect.c);
            rect.bottom = Math.round(embeddedViewFocusRect.d);
            return;
        }
        if (F3.c(((C0674Zz) getFocusOwner()).e(6, null, C1160f3.f521o), Boolean.TRUE)) {
            super.getFocusedRect(rect);
        } else {
            rect.set(Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE);
        }
    }

    public InterfaceC2221qA getFontFamilyResolver() {
        return (InterfaceC2221qA) this.w0.getValue();
    }

    public InterfaceC2126pA getFontLoader() {
        return this.v0;
    }

    public InterfaceC0987dE getGraphicsContext() {
        return this.G;
    }

    public GE getHapticFeedBack() {
        return this.z0;
    }

    public boolean getHasPendingMeasureOrLayout() {
        return this.c0.b.K();
    }

    @Override // android.view.View
    public int getImportantForAutofill() {
        return 1;
    }

    public GH getInputModeManager() {
        return this.A0;
    }

    public final NH getInsetsListener() {
        return this.x;
    }

    public final long getLastMatrixRecalculationAnimationTime$ui_release() {
        return this.i0;
    }

    @Override // android.view.View, android.view.ViewParent
    public EnumC1280gK getLayoutDirection() {
        return (EnumC1280gK) this.y0.getValue();
    }

    public long getMeasureIteration() {
        C1950nO c1950nO = this.c0;
        if (!c1950nO.c) {
            AbstractC2133pH.a("measureIteration should be only used during the measure/layout pass");
        }
        return c1950nO.g;
    }

    public NP getModifierLocalManager() {
        return this.B0;
    }

    public UW getPlacementScope() {
        int i = WW.b;
        return new ZM(1, this);
    }

    public HX getPointerIconService() {
        return this.R0;
    }

    public U00 getRectManager() {
        return this.A;
    }

    public C2420sK getRoot() {
        return this.y;
    }

    public InterfaceC1638k30 getRootForTest() {
        return this.B;
    }

    public final boolean getScrollCaptureInProgress$ui_release() {
        WT wt;
        if (Build.VERSION.SDK_INT < 31 || (wt = this.P0) == null) {
            return false;
        }
        return ((Boolean) ((MV) wt.m).getValue()).booleanValue();
    }

    public U50 getSemanticsOwner() {
        return this.C;
    }

    public C2610uK getSharedDrawScope() {
        return this.n;
    }

    public boolean getShowLayoutBounds() {
        return Build.VERSION.SDK_INT >= 30 ? C1835m7.a.a(this) : this.V;
    }

    public C1767lV getSnapshotObserver() {
        return this.U;
    }

    public M90 getSoftwareKeyboardController() {
        return this.u0;
    }

    public Ee0 getTextInputService() {
        return this.s0;
    }

    public InterfaceC0829bf0 getTextToolbar() {
        return this.C0;
    }

    public final InterfaceC1543j30 getUncaughtExceptionHandler$ui_release() {
        return null;
    }

    public Qj0 getViewConfiguration() {
        return this.w;
    }

    public final C0969d3 getViewTreeOwners() {
        return (C0969d3) this.m0.getValue();
    }

    public InterfaceC1605jl0 getWindowInfo() {
        return this.u;
    }

    public final R2 get_autofillManager$ui_release() {
        return this.Q;
    }

    public final void m(C2420sK c2420sK, boolean z) {
        this.c0.d(c2420sK, z);
    }

    /* JADX WARN: Removed duplicated region for block: B:37:0x007b  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final int n(android.view.MotionEvent r17) {
        /*
            Method dump skipped, instructions count: 373
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2207q3.n(android.view.MotionEvent):int");
    }

    @Override // android.view.ViewGroup, android.view.View
    public final void onAttachedToWindow() {
        WK lifecycle;
        InterfaceC0898cL interfaceC0898cL;
        S60 s60;
        super.onAttachedToWindow();
        int i = Build.VERSION.SDK_INT;
        if (i < 30) {
            setShowLayoutBounds(AbstractC2461sm0.w());
        }
        this.x.onViewAttachedToWindow(this);
        if (i > 28) {
            if (W0 == null) {
                Y1 y1 = new Y1(i);
                W0 = y1;
                StrictMode.VmPolicy vmPolicy = StrictMode.getVmPolicy();
                try {
                    if (S0 == null) {
                        S0 = Class.forName("android.os.SystemProperties");
                    }
                    if (U0 == null) {
                        StrictMode.setVmPolicy(StrictMode.VmPolicy.LAX);
                        Class cls = S0;
                        U0 = cls != null ? cls.getDeclaredMethod("addChangeCallback", Runnable.class) : null;
                    }
                    Method method = U0;
                    if (method != null) {
                        method.invoke(null, y1);
                    }
                } catch (Throwable unused) {
                }
                StrictMode.setVmPolicy(vmPolicy);
            }
            UQ uq = V0;
            synchronized (uq) {
                uq.a(this);
            }
        }
        this.u.a.setValue(Boolean.valueOf(hasWindowFocus()));
        this.u.getClass();
        this.u.getClass();
        p(getRoot());
        o(getRoot());
        getSnapshotObserver().a.d();
        if (i() && (s60 = this.P) != null) {
            C2535tc c2535tc = C2535tc.a;
            c2535tc.getClass();
            ((AutofillManager) s60.f325o).registerCallback(AbstractC2865x0.f(c2535tc));
        }
        InterfaceC0898cL interfaceC0898cLP = AbstractC2461sm0.p(this);
        InterfaceC1925n40 interfaceC1925n40U = AbstractC2841wm0.u(this);
        C0969d3 viewTreeOwners = getViewTreeOwners();
        if (viewTreeOwners == null || (interfaceC0898cLP != null && interfaceC1925n40U != null && (interfaceC0898cLP != (interfaceC0898cL = viewTreeOwners.a) || interfaceC1925n40U != interfaceC0898cL))) {
            if (interfaceC0898cLP == null) {
                throw new IllegalStateException("Composed into the View which doesn't propagate ViewTreeLifecycleOwner!");
            }
            if (interfaceC1925n40U == null) {
                throw new IllegalStateException("Composed into the View which doesn't propagateViewTreeSavedStateRegistryOwner!");
            }
            if (viewTreeOwners != null && (lifecycle = viewTreeOwners.a.getLifecycle()) != null) {
                lifecycle.c(this);
            }
            interfaceC0898cLP.getLifecycle().a(this);
            C0969d3 c0969d3 = new C0969d3(interfaceC0898cLP, interfaceC1925n40U);
            set_viewTreeOwners(c0969d3);
            OC oc = this.n0;
            if (oc != null) {
                oc.g(c0969d3);
            }
            this.n0 = null;
        }
        this.A0.a.setValue(new FH(isInTouchMode() ? 1 : 2));
        C0969d3 viewTreeOwners2 = getViewTreeOwners();
        WK lifecycle2 = viewTreeOwners2 != null ? viewTreeOwners2.a.getLifecycle() : null;
        if (lifecycle2 == null) {
            throw AbstractC2462sn.q("No lifecycle owner exists");
        }
        lifecycle2.a(this);
        lifecycle2.a(this.E);
        getViewTreeObserver().addOnGlobalLayoutListener(this.o0);
        getViewTreeObserver().addOnScrollChangedListener(this.p0);
        getViewTreeObserver().addOnTouchModeChangeListener(this.q0);
        if (Build.VERSION.SDK_INT >= 31) {
            C3.a.b(this);
        }
        R2 r2 = this.Q;
        if (r2 != null) {
            ((C0674Zz) getFocusOwner()).g.a(r2);
            getSemanticsOwner().d.a(r2);
        }
    }

    @Override // android.view.View
    public final boolean onCheckIsTextEditor() {
        C1646k70 c1646k70 = (C1646k70) this.t0.get();
        V4 v4 = (V4) (c1646k70 != null ? c1646k70.b : null);
        if (v4 == null) {
            return this.r0.d;
        }
        C1646k70 c1646k702 = (C1646k70) v4.f368o.get();
        EH eh = (EH) (c1646k702 != null ? c1646k702.b : null);
        return eh != null && (eh.e ^ true);
    }

    @Override // android.view.View
    public final void onConfigurationChanged(Configuration configuration) {
        super.onConfigurationChanged(configuration);
        setDensity(AbstractC2378rs0.m(getContext()));
        this.u.getClass();
        int i = Build.VERSION.SDK_INT;
        if ((i >= 31 ? configuration.fontWeightAdjustment : 0) != this.x0) {
            this.x0 = i >= 31 ? configuration.fontWeightAdjustment : 0;
            setFontFamilyResolver(AbstractC0249Jp.D(getContext()));
        }
        this.O.g(configuration);
    }

    @Override // android.view.View
    public final InputConnection onCreateInputConnection(EditorInfo editorInfo) {
        int i;
        C1646k70 c1646k70 = (C1646k70) this.t0.get();
        V4 v4 = (V4) (c1646k70 != null ? c1646k70.b : null);
        if (v4 == null) {
            Ge0 ge0 = this.r0;
            if (ge0.d) {
                HG hg = ge0.h;
                C2730ve0 c2730ve0 = ge0.g;
                int i2 = hg.e;
                boolean z = hg.a;
                if (i2 == 1) {
                    i = z ? 6 : 0;
                } else if (i2 == 0) {
                    i = 1;
                } else if (i2 == 2) {
                    i = 2;
                } else if (i2 == 6) {
                    i = 5;
                } else if (i2 == 5) {
                    i = 7;
                } else if (i2 == 3) {
                    i = 3;
                } else if (i2 == 4) {
                    i = 4;
                } else {
                    if (i2 != 7) {
                        throw new IllegalStateException("invalid ImeAction");
                    }
                }
                editorInfo.imeOptions = i;
                int i3 = hg.d;
                if (i3 == 1) {
                    editorInfo.inputType = 1;
                } else if (i3 == 2) {
                    editorInfo.inputType = 1;
                    editorInfo.imeOptions = Integer.MIN_VALUE | i;
                } else if (i3 == 3) {
                    editorInfo.inputType = 2;
                } else if (i3 == 4) {
                    editorInfo.inputType = 3;
                } else if (i3 == 5) {
                    editorInfo.inputType = 17;
                } else if (i3 == 6) {
                    editorInfo.inputType = 33;
                } else if (i3 == 7) {
                    editorInfo.inputType = 129;
                } else if (i3 == 8) {
                    editorInfo.inputType = 18;
                } else {
                    if (i3 != 9) {
                        throw new IllegalStateException("Invalid Keyboard Type");
                    }
                    editorInfo.inputType = 8194;
                }
                if (!z) {
                    int i4 = editorInfo.inputType;
                    if ((i4 & 1) == 1) {
                        editorInfo.inputType = i4 | 131072;
                        if (i2 == 1) {
                            editorInfo.imeOptions |= 1073741824;
                        }
                    }
                }
                int i5 = editorInfo.inputType;
                if ((i5 & 1) == 1) {
                    int i6 = hg.b;
                    if (i6 == 1) {
                        editorInfo.inputType = i5 | 4096;
                    } else if (i6 == 2) {
                        editorInfo.inputType = i5 | 8192;
                    } else if (i6 == 3) {
                        editorInfo.inputType = i5 | 16384;
                    }
                    if (hg.c) {
                        editorInfo.inputType |= 32768;
                    }
                }
                long j = c2730ve0.b;
                int i7 = Ue0.c;
                editorInfo.initialSelStart = (int) (j >> 32);
                editorInfo.initialSelEnd = (int) (j & 4294967295L);
                AbstractC0752ap.c0(editorInfo, c2730ve0.a.m);
                editorInfo.imeOptions |= 33554432;
                if (C2004nv.d()) {
                    C2004nv.a().i(editorInfo);
                }
                Q00 q00 = new Q00(ge0.g, new WT(23, ge0), ge0.h.c);
                ge0.i.add(new WeakReference(q00));
                return q00;
            }
        } else {
            C1646k70 c1646k702 = (C1646k70) v4.f368o.get();
            EH eh = (EH) (c1646k702 != null ? c1646k702.b : null);
            if (eh != null) {
                synchronized (eh.c) {
                    if (eh.e) {
                        return null;
                    }
                    R00 r00A = eh.a.a(editorInfo);
                    C2769w c2769w = new C2769w(21, eh);
                    int i8 = Build.VERSION.SDK_INT;
                    InputConnection ys = i8 >= 34 ? new YS(r00A, c2769w) : i8 >= 25 ? new XS(r00A, c2769w) : new WS(r00A, c2769w);
                    eh.d.b(new Ok0(ys));
                    return ys;
                }
            }
        }
        return null;
    }

    @Override // android.view.View
    public final void onCreateVirtualViewTranslationRequests(long[] jArr, int[] iArr, Consumer consumer) {
        R50 r50;
        String strA;
        Q3 q3 = this.E;
        q3.getClass();
        for (long j : jArr) {
            T50 t50 = (T50) q3.h().b((int) j);
            if (t50 != null && (r50 = t50.a) != null) {
                Z2.r();
                ViewTranslationRequest.Builder builderM = Z2.m(q3.l.getAutofillId(), r50.g);
                Object objG = r50.d.l.g(W50.A);
                if (objG == null) {
                    objG = null;
                }
                List list = (List) objG;
                if (list != null && (strA = WL.a(list, "\n", null, 62)) != null) {
                    builderM.setValue("android:text", TranslationRequestValue.forText(new C0977d7(strA)));
                    consumer.accept(builderM.build());
                }
            }
        }
    }

    @Override // android.view.ViewGroup, android.view.View
    public final void onDetachedFromWindow() {
        S60 s60;
        super.onDetachedFromWindow();
        this.x.onViewDetachedFromWindow(this);
        if (this.q) {
            View view = this.p;
            if (view == null) {
                view = null;
            }
            removeView(view);
        }
        int i = Build.VERSION.SDK_INT;
        if (i > 28) {
            UQ uq = V0;
            synchronized (uq) {
                uq.i(this);
            }
        }
        J90 j90 = getSnapshotObserver().a;
        G1 g1 = j90.h;
        if (g1 != null) {
            g1.g();
        }
        j90.a();
        this.u.getClass();
        C0969d3 viewTreeOwners = getViewTreeOwners();
        WK lifecycle = viewTreeOwners != null ? viewTreeOwners.a.getLifecycle() : null;
        if (lifecycle == null) {
            throw AbstractC2462sn.q("No lifecycle owner exists");
        }
        lifecycle.c(this.E);
        lifecycle.c(this);
        if (i() && (s60 = this.P) != null) {
            C2535tc c2535tc = C2535tc.a;
            c2535tc.getClass();
            ((AutofillManager) s60.f325o).unregisterCallback(AbstractC2865x0.f(c2535tc));
        }
        getViewTreeObserver().removeOnGlobalLayoutListener(this.o0);
        getViewTreeObserver().removeOnScrollChangedListener(this.p0);
        getViewTreeObserver().removeOnTouchModeChangeListener(this.q0);
        if (i >= 31) {
            C3.a.a(this);
        }
        R2 r2 = this.Q;
        if (r2 != null) {
            getSemanticsOwner().d.i(r2);
            ((C0674Zz) getFocusOwner()).g.i(r2);
        }
    }

    @Override // android.view.View
    public final void onFocusChanged(boolean z, int i, Rect rect) {
        super.onFocusChanged(z, i, rect);
        if (z || hasFocus()) {
            return;
        }
        AbstractC0662Zn.o(((C0674Zz) getFocusOwner()).c, true);
    }

    @Override // android.view.ViewGroup, android.view.View
    public final void onLayout(boolean z, int i, int i2, int i3, int i4) {
        this.i0 = 0L;
        this.c0.h(this.M0);
        this.a0 = null;
        K();
        if (this.W != null) {
            getAndroidViewsHandler$ui_release().layout(0, 0, i3 - i, i4 - i2);
        }
    }

    @Override // android.view.View
    public final void onMeasure(int i, int i2) {
        C1950nO c1950nO = this.c0;
        Trace.beginSection("AndroidOwner:onMeasure");
        try {
            if (!isAttachedToWindow()) {
                p(getRoot());
            }
            long jK = k(i);
            long jK2 = k(i2);
            long jS = Co0.s((int) (jK >>> 32), (int) (jK & 4294967295L), (int) (jK2 >>> 32), (int) (4294967295L & jK2));
            C0634Yl c0634Yl = this.a0;
            if (c0634Yl == null) {
                this.a0 = new C0634Yl(jS);
                this.b0 = false;
            } else if (!C0634Yl.b(c0634Yl.a, jS)) {
                this.b0 = true;
            }
            c1950nO.n(jS);
            c1950nO.i();
            setMeasuredDimension(getRoot().O.f773o.l, getRoot().O.f773o.m);
            if (this.W != null) {
                getAndroidViewsHandler$ui_release().measure(View.MeasureSpec.makeMeasureSpec(getRoot().O.f773o.l, 1073741824), View.MeasureSpec.makeMeasureSpec(getRoot().O.f773o.m, 1073741824));
            }
            Trace.endSection();
        } catch (Throwable th) {
            Trace.endSection();
            throw th;
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:28:0x009a  */
    @Override // android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void onProvideAutofillVirtualStructure(android.view.ViewStructure r12, int r13) {
        /*
            Method dump skipped, instructions count: 265
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2207q3.onProvideAutofillVirtualStructure(android.view.ViewStructure, int):void");
    }

    @Override // android.view.ViewGroup, android.view.View
    public final PointerIcon onResolvePointerIcon(MotionEvent motionEvent, int i) {
        GX gx;
        int toolType = motionEvent.getToolType(i);
        if (motionEvent.isFromSource(8194) || !motionEvent.isFromSource(16386) || (!(toolType == 2 || toolType == 4) || (gx = ((C1732l3) getPointerIconService()).a) == null)) {
            return super.onResolvePointerIcon(motionEvent, i);
        }
        Context context = getContext();
        return gx instanceof W4 ? PointerIcon.getSystemIcon(context, ((W4) gx).b) : PointerIcon.getSystemIcon(context, 1000);
    }

    @Override // android.view.View
    public final void onRtlPropertiesChanged(int i) {
        if (this.m) {
            EnumC1280gK enumC1280gK = EnumC1280gK.l;
            EnumC1280gK enumC1280gK2 = i != 0 ? i != 1 ? null : EnumC1280gK.m : enumC1280gK;
            if (enumC1280gK2 != null) {
                enumC1280gK = enumC1280gK2;
            }
            setLayoutDirection(enumC1280gK);
        }
    }

    @Override // android.view.View
    public final void onScrollCaptureSearch(Rect rect, Point point, Consumer consumer) {
        WT wt;
        if (Build.VERSION.SDK_INT >= 31 && (wt = this.P0) != null) {
            U50 semanticsOwner = getSemanticsOwner();
            InterfaceC2747vn coroutineContext = getCoroutineContext();
            C1479iR c1479iR = new C1479iR(new Q40[16]);
            C1884mi0.Q(semanticsOwner.a(), 0, new P40(1, 8, C1479iR.class, c1479iR, "add", "add(Ljava/lang/Object;)Z"));
            Arrays.sort(c1479iR.l, 0, c1479iR.n, new C1600jj(0, new OC[]{C2291qw.K, C2291qw.L}));
            int i = c1479iR.n;
            Q40 q40 = (Q40) (i == 0 ? null : c1479iR.l[i - 1]);
            if (q40 != null) {
                C1086eI c1086eI = q40.c;
                ScrollCaptureCallbackC3026yk scrollCaptureCallbackC3026yk = new ScrollCaptureCallbackC3026yk(q40.a, c1086eI, C80.e(coroutineContext), wt, this);
                AbstractC2239qS abstractC2239qS = q40.d;
                long j = (c1086eI.a << 32) | (c1086eI.b & 4294967295L);
                ScrollCaptureTarget scrollCaptureTargetF = AbstractC1959nX.f(this, As0.V(AbstractC2001nt0.F(AbstractC2841wm0.s(abstractC2239qS).h(abstractC2239qS, true))), new Point((int) (j >> 32), (int) (j & 4294967295L)), scrollCaptureCallbackC3026yk);
                scrollCaptureTargetF.setScrollBounds(As0.V(c1086eI));
                consumer.accept(scrollCaptureTargetF);
            }
        }
    }

    @Override // android.view.View
    public final void onVirtualViewTranslationResponses(LongSparseArray longSparseArray) {
        Q3 q3 = this.E;
        q3.getClass();
        if (Build.VERSION.SDK_INT < 31) {
            return;
        }
        if (F3.c(Looper.getMainLooper().getThread(), Thread.currentThread())) {
            AbstractC1904ms0.d(q3, longSparseArray);
        } else {
            q3.l.post(new O3(0, q3, longSparseArray));
        }
    }

    @Override // android.view.View
    public final void onWindowFocusChanged(boolean z) {
        boolean zW;
        this.u.a.setValue(Boolean.valueOf(z));
        this.O0 = true;
        super.onWindowFocusChanged(z);
        if (!z || Build.VERSION.SDK_INT >= 30 || getShowLayoutBounds() == (zW = AbstractC2461sm0.w())) {
            return;
        }
        setShowLayoutBounds(zW);
        o(getRoot());
    }

    public final void p(C2420sK c2420sK) {
        this.c0.m(c2420sK, false);
        C1479iR c1479iRW = c2420sK.w();
        Object[] objArr = c1479iRW.l;
        int i = c1479iRW.n;
        for (int i2 = 0; i2 < i; i2++) {
            p((C2420sK) objArr[i2]);
        }
    }

    public final boolean r(MotionEvent motionEvent) {
        float x = motionEvent.getX();
        float y = motionEvent.getY();
        return 0.0f <= x && x <= ((float) getWidth()) && 0.0f <= y && y <= ((float) getHeight());
    }

    @Override // android.view.ViewGroup, android.view.View
    public final boolean requestFocus(int i, Rect rect) {
        if (isFocused()) {
            return true;
        }
        int iOrdinal = ((C0674Zz) getFocusOwner()).c.J0().ordinal();
        if (iOrdinal == 0 || iOrdinal == 1 || iOrdinal == 2) {
            return super.requestFocus(i, rect);
        }
        if (iOrdinal != 3) {
            throw new C2170pj();
        }
        C0388Oz c0388OzU = F3.U(i);
        int i2 = c0388OzU != null ? c0388OzU.a : 7;
        return F3.c(((C0674Zz) getFocusOwner()).e(i2, rect != null ? As0.Z(rect) : null, new C1827m3(i2, 0)), Boolean.TRUE);
    }

    public final boolean s(MotionEvent motionEvent) {
        MotionEvent motionEvent2;
        return (motionEvent.getPointerCount() == 1 && (motionEvent2 = this.D0) != null && motionEvent2.getPointerCount() == motionEvent.getPointerCount() && motionEvent.getRawX() == motionEvent2.getRawX() && motionEvent.getRawY() == motionEvent2.getRawY()) ? false : true;
    }

    public void setAccessibilityEventBatchIntervalMillis(long j) {
        this.D.h = j;
    }

    public final void setConfigurationChangeObserver(OC oc) {
        this.O = oc;
    }

    public final void setContentCaptureManager$ui_release(Q3 q3) {
        this.E = q3;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r4v0 */
    /* JADX WARN: Type inference failed for: r4v1, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r4v10 */
    /* JADX WARN: Type inference failed for: r4v11 */
    /* JADX WARN: Type inference failed for: r4v12 */
    /* JADX WARN: Type inference failed for: r4v4 */
    /* JADX WARN: Type inference failed for: r4v5, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r4v6, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r4v7 */
    /* JADX WARN: Type inference failed for: r4v8 */
    /* JADX WARN: Type inference failed for: r4v9 */
    /* JADX WARN: Type inference failed for: r5v0 */
    /* JADX WARN: Type inference failed for: r5v1 */
    /* JADX WARN: Type inference failed for: r5v10 */
    /* JADX WARN: Type inference failed for: r5v11 */
    /* JADX WARN: Type inference failed for: r5v2 */
    /* JADX WARN: Type inference failed for: r5v3, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r5v4 */
    /* JADX WARN: Type inference failed for: r5v5 */
    /* JADX WARN: Type inference failed for: r5v6, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r5v8 */
    /* JADX WARN: Type inference failed for: r5v9 */
    public void setCoroutineContext(InterfaceC2747vn interfaceC2747vn) {
        this.s = interfaceC2747vn;
        LP lp = (LP) getRoot().N.g;
        if (lp instanceof Wb0) {
            ((Wb0) lp).J0();
        }
        if (!lp.l.y) {
            AbstractC2133pH.b("visitSubtreeIf called on an unattached node");
        }
        C1479iR c1479iR = new C1479iR(new LP[16]);
        LP lp2 = lp.l;
        LP lp3 = lp2.q;
        if (lp3 == null) {
            AbstractC2539te.g(c1479iR, lp2);
        } else {
            c1479iR.b(lp3);
        }
        while (true) {
            int i = c1479iR.n;
            if (i == 0) {
                return;
            }
            LP lp4 = (LP) c1479iR.k(i - 1);
            if ((lp4.f209o & 16) != 0) {
                for (LP lp5 = lp4; lp5 != null; lp5 = lp5.q) {
                    if ((lp5.n & 16) != 0) {
                        AbstractC0561Vq abstractC0561VqI = lp5;
                        ?? c1479iR2 = 0;
                        while (abstractC0561VqI != 0) {
                            if (abstractC0561VqI instanceof LX) {
                                LX lx = (LX) abstractC0561VqI;
                                if (lx instanceof Wb0) {
                                    ((Wb0) lx).J0();
                                }
                            } else if ((abstractC0561VqI.n & 16) != 0 && (abstractC0561VqI instanceof AbstractC0561Vq)) {
                                LP lp6 = abstractC0561VqI.A;
                                int i2 = 0;
                                abstractC0561VqI = abstractC0561VqI;
                                c1479iR2 = c1479iR2;
                                while (lp6 != null) {
                                    if ((lp6.n & 16) != 0) {
                                        i2++;
                                        c1479iR2 = c1479iR2;
                                        if (i2 == 1) {
                                            abstractC0561VqI = lp6;
                                        } else {
                                            if (c1479iR2 == 0) {
                                                c1479iR2 = new C1479iR(new LP[16]);
                                            }
                                            if (abstractC0561VqI != 0) {
                                                c1479iR2.b(abstractC0561VqI);
                                                abstractC0561VqI = 0;
                                            }
                                            c1479iR2.b(lp6);
                                        }
                                    }
                                    lp6 = lp6.q;
                                    abstractC0561VqI = abstractC0561VqI;
                                    c1479iR2 = c1479iR2;
                                }
                                if (i2 == 1) {
                                }
                            }
                            abstractC0561VqI = AbstractC2539te.i(c1479iR2);
                        }
                    }
                }
            }
            AbstractC2539te.g(c1479iR, lp4);
        }
    }

    public final void setLastMatrixRecalculationAnimationTime$ui_release(long j) {
        this.i0 = j;
    }

    public final void setOnViewTreeOwnersAvailable(OC oc) {
        C0969d3 viewTreeOwners = getViewTreeOwners();
        if (viewTreeOwners != null) {
            oc.g(viewTreeOwners);
        }
        if (isAttachedToWindow()) {
            return;
        }
        this.n0 = oc;
    }

    public void setShowLayoutBounds(boolean z) {
        this.V = z;
    }

    public void setUncaughtExceptionHandler(InterfaceC1543j30 interfaceC1543j30) {
        this.c0.getClass();
    }

    @Override // android.view.ViewGroup
    public final boolean shouldDelayChildPressedState() {
        return false;
    }

    public final void t(float[] fArr) {
        C();
        C1570jO.e(fArr, this.g0);
        float fIntBitsToFloat = Float.intBitsToFloat((int) (this.k0 >> 32));
        float fIntBitsToFloat2 = Float.intBitsToFloat((int) (this.k0 & 4294967295L));
        float[] fArr2 = this.f0;
        C1570jO.d(fArr2);
        C1570jO.f(fArr2, fIntBitsToFloat, fIntBitsToFloat2);
        F3.I(fArr, fArr2);
    }

    public final long u(long j) {
        C();
        long jB = C1570jO.b(j, this.g0);
        float fIntBitsToFloat = Float.intBitsToFloat((int) (this.k0 >> 32)) + Float.intBitsToFloat((int) (jB >> 32));
        float fIntBitsToFloat2 = Float.intBitsToFloat((int) (this.k0 & 4294967295L)) + Float.intBitsToFloat((int) (jB & 4294967295L));
        return (Float.floatToRawIntBits(fIntBitsToFloat2) & 4294967295L) | (Float.floatToRawIntBits(fIntBitsToFloat) << 32);
    }

    public final void v(boolean z) {
        C1922n3 c1922n3;
        C1950nO c1950nO = this.c0;
        if (c1950nO.b.K() || ((C1479iR) c1950nO.e.m).n != 0) {
            Trace.beginSection("AndroidOwner:measureAndLayout");
            if (z) {
                try {
                    c1922n3 = this.M0;
                } catch (Throwable th) {
                    Trace.endSection();
                    throw th;
                }
            } else {
                c1922n3 = null;
            }
            if (c1950nO.h(c1922n3)) {
                requestLayout();
            }
            c1950nO.a(false);
            if (this.L) {
                getViewTreeObserver().dispatchOnGlobalLayout();
                this.L = false;
            }
            Trace.endSection();
        }
    }

    public final void w(InterfaceC1483iV interfaceC1483iV, boolean z) {
        ArrayList arrayList = this.I;
        if (!z) {
            if (this.K) {
                return;
            }
            arrayList.remove(interfaceC1483iV);
            ArrayList arrayList2 = this.J;
            if (arrayList2 != null) {
                arrayList2.remove(interfaceC1483iV);
                return;
            }
            return;
        }
        if (!this.K) {
            arrayList.add(interfaceC1483iV);
            return;
        }
        ArrayList arrayList3 = this.J;
        if (arrayList3 == null) {
            arrayList3 = new ArrayList();
            this.J = arrayList3;
        }
        arrayList3.add(interfaceC1483iV);
    }

    public final void x() {
        R2 r2;
        if (this.R) {
            J90 j90 = getSnapshotObserver().a;
            synchronized (j90.g) {
                try {
                    C1479iR c1479iR = j90.f;
                    int i = c1479iR.n;
                    int i2 = 0;
                    for (int i3 = 0; i3 < i; i3++) {
                        I90 i90 = (I90) c1479iR.l[i3];
                        i90.e();
                        if (!i90.f.j()) {
                            i2++;
                        } else if (i2 > 0) {
                            Object[] objArr = c1479iR.l;
                            objArr[i3 - i2] = objArr[i3];
                        }
                    }
                    int i4 = i - i2;
                    Arrays.fill(c1479iR.l, i4, i, (Object) null);
                    c1479iR.n = i4;
                } catch (Throwable th) {
                    throw th;
                }
            }
            this.R = false;
        }
        C1166f6 c1166f6 = this.W;
        if (c1166f6 != null) {
            j(c1166f6);
        }
        if (i() && (r2 = this.Q) != null) {
            JQ jq = r2.h;
            if (jq.d == 0 && r2.i) {
                ((AutofillManager) r2.a.m).commit();
                r2.i = false;
            }
            if (jq.d != 0) {
                r2.i = true;
            }
        }
        while (this.G0.h() && this.G0.e(0) != null) {
            int i5 = this.G0.b;
            for (int i6 = 0; i6 < i5; i6++) {
                NC nc = (NC) this.G0.e(i6);
                UQ uq = this.G0;
                if (i6 < 0 || i6 >= uq.b) {
                    uq.m(i6);
                    throw null;
                }
                Object[] objArr2 = uq.a;
                Object obj = objArr2[i6];
                objArr2[i6] = null;
                if (nc != null) {
                    nc.a();
                }
            }
            this.G0.k(0, i5);
        }
    }

    public final void y(C2420sK c2420sK) {
        C2966y3 c2966y3 = this.D;
        c2966y3.A = true;
        if (c2966y3.v()) {
            c2966y3.w(c2420sK);
        }
        Q3 q3 = this.E;
        q3.r = true;
        if (q3.i()) {
            q3.s.p(Oh0.a);
        }
    }

    public final void z(C2420sK c2420sK, boolean z, boolean z2) {
        C2420sK c2420sKS;
        C2420sK c2420sKS2;
        C1950nO c1950nO = this.c0;
        if (!z) {
            if (c1950nO.m(c2420sK, z2)) {
                F(c2420sK);
                return;
            }
            return;
        }
        C3126zm0 c3126zm0 = c1950nO.b;
        C2420sK c2420sK2 = c2420sK.r;
        C2800wK c2800wK = c2420sK.O;
        if (c2420sK2 == null) {
            AbstractC2133pH.b("Error: requestLookaheadRemeasure cannot be called on a node outside LookaheadScope");
        }
        int iW = AbstractC2462sn.w(c2800wK.c);
        if (iW != 0) {
            if (iW == 1) {
                return;
            }
            if (iW != 2 && iW != 3) {
                if (iW != 4) {
                    throw new C2170pj();
                }
                if (!c2800wK.d || z2) {
                    c2800wK.d = true;
                    c2800wK.f773o.D = true;
                    if (c2420sK.X) {
                        return;
                    }
                    if ((F3.c(c2420sK.I(), Boolean.TRUE) || C1950nO.f(c2420sK)) && ((c2420sKS = c2420sK.s()) == null || !c2420sKS.O.d)) {
                        c3126zm0.i(1, c2420sK);
                    } else if ((c2420sK.H() || C1950nO.g(c2420sK)) && ((c2420sKS2 = c2420sK.s()) == null || !c2420sKS2.o())) {
                        c3126zm0.i(3, c2420sK);
                    }
                    if (c1950nO.d) {
                        return;
                    }
                    F(c2420sK);
                    return;
                }
                return;
            }
        }
        c1950nO.h.b(new C1855mO(c2420sK, true, z2));
    }

    @Override // android.view.ViewGroup
    public final void addView(View view, int i) {
        ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
        if (layoutParams == null) {
            layoutParams = generateDefaultLayoutParams();
        }
        addViewInLayout(view, i, layoutParams, true);
    }

    /* renamed from: getAccessibilityManager, reason: merged with bridge method [inline-methods] */
    public N2 m2getAccessibilityManager() {
        return this.F;
    }

    /* renamed from: getClipboard, reason: merged with bridge method [inline-methods] */
    public X2 m3getClipboard() {
        return this.T;
    }

    /* renamed from: getClipboardManager, reason: merged with bridge method [inline-methods] */
    public Y2 m4getClipboardManager() {
        return this.S;
    }

    public ViewOnDragListenerC1450i4 getDragAndDropManager() {
        return this.t;
    }

    /* renamed from: getLayoutNodes, reason: merged with bridge method [inline-methods] */
    public IQ m6getLayoutNodes() {
        return this.z;
    }

    public C2207q3 getOutOfFrameExecutor() {
        if (isAttachedToWindow()) {
            return this;
        }
        return null;
    }

    @Override // android.view.ViewGroup
    public final void addView(View view, int i, int i2) {
        ViewGroup.LayoutParams layoutParamsGenerateDefaultLayoutParams = generateDefaultLayoutParams();
        layoutParamsGenerateDefaultLayoutParams.width = i;
        layoutParamsGenerateDefaultLayoutParams.height = i2;
        addViewInLayout(view, -1, layoutParamsGenerateDefaultLayoutParams, true);
    }

    @Override // android.view.ViewGroup
    public final void addView(View view, int i, ViewGroup.LayoutParams layoutParams) {
        addViewInLayout(view, i, layoutParams, true);
    }

    @Override // android.view.ViewGroup, android.view.ViewManager
    public final void addView(View view, ViewGroup.LayoutParams layoutParams) {
        addViewInLayout(view, -1, layoutParams, true);
    }

    @InterfaceC0043Br
    public static /* synthetic */ void getFontLoader$annotations() {
    }

    public static /* synthetic */ void getLastMatrixRecalculationAnimationTime$ui_release$annotations() {
    }

    public static /* synthetic */ void getRoot$annotations() {
    }

    public static /* synthetic */ void getShowLayoutBounds$annotations() {
    }

    @InterfaceC0043Br
    public static /* synthetic */ void getTextInputService$annotations() {
    }

    public View getView() {
        return this;
    }

    @Override // android.view.View
    public final void onDraw(Canvas canvas) {
    }

    public final void setUncaughtExceptionHandler$ui_release(InterfaceC1543j30 interfaceC1543j30) {
    }
}
