package o;

import android.view.View;
import android.view.translation.ViewTranslationCallback;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class B3 implements ViewTranslationCallback {
    public static final B3 a = new B3();

    /* JADX WARN: Removed duplicated region for block: B:26:0x0076  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final boolean onClearTranslation(android.view.View r15) {
        /*
            r14 = this;
            o.q3 r15 = (o.C2207q3) r15
            o.Q3 r15 = r15.getContentCaptureManager$ui_release()
            r0 = 1
            r15.q = r0
            o.YH r15 = r15.h()
            java.lang.Object[] r1 = r15.c
            long[] r15 = r15.a
            int r2 = r15.length
            int r2 = r2 + (-2)
            if (r2 < 0) goto L7b
            r3 = 0
            r4 = r3
        L18:
            r5 = r15[r4]
            long r7 = ~r5
            r9 = 7
            long r7 = r7 << r9
            long r7 = r7 & r5
            r9 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
            long r7 = r7 & r9
            int r7 = (r7 > r9 ? 1 : (r7 == r9 ? 0 : -1))
            if (r7 == 0) goto L76
            int r7 = r4 - r2
            int r7 = ~r7
            int r7 = r7 >>> 31
            r8 = 8
            int r7 = 8 - r7
            r9 = r3
        L32:
            if (r9 >= r7) goto L74
            r10 = 255(0xff, double:1.26E-321)
            long r10 = r10 & r5
            r12 = 128(0x80, double:6.3E-322)
            int r10 = (r10 > r12 ? 1 : (r10 == r12 ? 0 : -1))
            if (r10 >= 0) goto L70
            int r10 = r4 << 3
            int r10 = r10 + r9
            r10 = r1[r10]
            o.T50 r10 = (o.T50) r10
            o.R50 r10 = r10.a
            o.N50 r10 = r10.d
            o.ZQ r10 = r10.l
            o.Z50 r11 = o.W50.C
            java.lang.Object r11 = r10.g(r11)
            r12 = 0
            if (r11 != 0) goto L54
            r11 = r12
        L54:
            if (r11 == 0) goto L70
            o.Z50 r11 = o.M50.l
            java.lang.Object r10 = r10.g(r11)
            if (r10 != 0) goto L5f
            goto L60
        L5f:
            r12 = r10
        L60:
            o.l0 r12 = (o.C1726l0) r12
            if (r12 == 0) goto L70
            o.QC r10 = r12.b
            o.NC r10 = (o.NC) r10
            if (r10 == 0) goto L70
            java.lang.Object r10 = r10.a()
            java.lang.Boolean r10 = (java.lang.Boolean) r10
        L70:
            long r5 = r5 >> r8
            int r9 = r9 + 1
            goto L32
        L74:
            if (r7 != r8) goto L7b
        L76:
            if (r4 == r2) goto L7b
            int r4 = r4 + 1
            goto L18
        L7b:
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: o.B3.onClearTranslation(android.view.View):boolean");
    }

    /* JADX WARN: Removed duplicated region for block: B:27:0x007e  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final boolean onHideTranslation(android.view.View r15) {
        /*
            r14 = this;
            o.q3 r15 = (o.C2207q3) r15
            o.Q3 r15 = r15.getContentCaptureManager$ui_release()
            r0 = 1
            r15.q = r0
            o.YH r15 = r15.h()
            java.lang.Object[] r1 = r15.c
            long[] r15 = r15.a
            int r2 = r15.length
            int r2 = r2 + (-2)
            if (r2 < 0) goto L83
            r3 = 0
            r4 = r3
        L18:
            r5 = r15[r4]
            long r7 = ~r5
            r9 = 7
            long r7 = r7 << r9
            long r7 = r7 & r5
            r9 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
            long r7 = r7 & r9
            int r7 = (r7 > r9 ? 1 : (r7 == r9 ? 0 : -1))
            if (r7 == 0) goto L7e
            int r7 = r4 - r2
            int r7 = ~r7
            int r7 = r7 >>> 31
            r8 = 8
            int r7 = 8 - r7
            r9 = r3
        L32:
            if (r9 >= r7) goto L7c
            r10 = 255(0xff, double:1.26E-321)
            long r10 = r10 & r5
            r12 = 128(0x80, double:6.3E-322)
            int r10 = (r10 > r12 ? 1 : (r10 == r12 ? 0 : -1))
            if (r10 >= 0) goto L78
            int r10 = r4 << 3
            int r10 = r10 + r9
            r10 = r1[r10]
            o.T50 r10 = (o.T50) r10
            o.R50 r10 = r10.a
            o.N50 r10 = r10.d
            o.ZQ r10 = r10.l
            o.Z50 r11 = o.W50.C
            java.lang.Object r11 = r10.g(r11)
            r12 = 0
            if (r11 != 0) goto L54
            r11 = r12
        L54:
            java.lang.Boolean r13 = java.lang.Boolean.TRUE
            boolean r11 = o.F3.c(r11, r13)
            if (r11 == 0) goto L78
            o.Z50 r11 = o.M50.k
            java.lang.Object r10 = r10.g(r11)
            if (r10 != 0) goto L65
            goto L66
        L65:
            r12 = r10
        L66:
            o.l0 r12 = (o.C1726l0) r12
            if (r12 == 0) goto L78
            o.QC r10 = r12.b
            o.OC r10 = (o.OC) r10
            if (r10 == 0) goto L78
            java.lang.Boolean r11 = java.lang.Boolean.FALSE
            java.lang.Object r10 = r10.g(r11)
            java.lang.Boolean r10 = (java.lang.Boolean) r10
        L78:
            long r5 = r5 >> r8
            int r9 = r9 + 1
            goto L32
        L7c:
            if (r7 != r8) goto L83
        L7e:
            if (r4 == r2) goto L83
            int r4 = r4 + 1
            goto L18
        L83:
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: o.B3.onHideTranslation(android.view.View):boolean");
    }

    public final boolean onShowTranslation(View view) {
        OC oc;
        Q3 contentCaptureManager$ui_release = ((C2207q3) view).getContentCaptureManager$ui_release();
        contentCaptureManager$ui_release.q = 2;
        YH yhH = contentCaptureManager$ui_release.h();
        Object[] objArr = yhH.c;
        long[] jArr = yhH.a;
        int length = jArr.length - 2;
        if (length < 0) {
            return true;
        }
        int i = 0;
        while (true) {
            long j = jArr[i];
            if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
                int i2 = 8 - ((~(i - length)) >>> 31);
                for (int i3 = 0; i3 < i2; i3++) {
                    if ((255 & j) < 128) {
                        ZQ zq = ((T50) objArr[(i << 3) + i3]).a.d.l;
                        Object objG = zq.g(W50.C);
                        if (objG == null) {
                            objG = null;
                        }
                        if (F3.c(objG, Boolean.FALSE)) {
                            Object objG2 = zq.g(M50.k);
                            C1726l0 c1726l0 = (C1726l0) (objG2 != null ? objG2 : null);
                            if (c1726l0 != null && (oc = (OC) c1726l0.b) != null) {
                            }
                        }
                    }
                    j >>= 8;
                }
                if (i2 != 8) {
                    return true;
                }
            }
            if (i == length) {
                return true;
            }
            i++;
        }
    }
}
