package o;

import android.graphics.Outline;
import android.graphics.RectF;
import android.os.Build;
import java.util.Locale;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.eE, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1082eE {
    public final InterfaceC1178fE a;
    public Outline f;
    public float j;
    public F3 k;
    public O4 l;
    public O4 m;
    public boolean n;

    /* renamed from: o, reason: collision with root package name */
    public C3113zg f506o;
    public Ew0 p;
    public int q;
    public boolean s;
    public long t;
    public long u;
    public long v;
    public boolean w;
    public RectF x;
    public InterfaceC2281qr b = AbstractC2539te.b;
    public EnumC1280gK c = EnumC1280gK.l;
    public AbstractC0706aK d = C2291qw.t;
    public final C2769w e = new C2769w(18, this);
    public boolean g = true;
    public long h = 0;
    public long i = 9205357640488583168L;
    public final C2398s4 r = new C2398s4();

    static {
        Build.FINGERPRINT.toLowerCase(Locale.ROOT).equals("robolectric");
    }

    public C1082eE(InterfaceC1178fE interfaceC1178fE) {
        this.a = interfaceC1178fE;
        interfaceC1178fE.t(false);
        this.t = 0L;
        this.u = 0L;
        this.v = 9205357640488583168L;
    }

    public final void a() {
        Outline outline;
        if (this.g) {
            boolean z = this.w;
            Outline outline2 = null;
            InterfaceC1178fE interfaceC1178fE = this.a;
            if (z || interfaceC1178fE.G() > 0.0f) {
                O4 o4 = this.l;
                if (o4 != null) {
                    RectF rectF = this.x;
                    if (rectF == null) {
                        rectF = new RectF();
                        this.x = rectF;
                    }
                    boolean z2 = o4 instanceof O4;
                    if (!z2) {
                        throw new UnsupportedOperationException("Unable to obtain android.graphics.Path");
                    }
                    o4.a.computeBounds(rectF, false);
                    int i = Build.VERSION.SDK_INT;
                    if (i > 28 || o4.a.isConvex()) {
                        outline = this.f;
                        if (outline == null) {
                            outline = new Outline();
                            this.f = outline;
                        }
                        if (i >= 30) {
                            if (!z2) {
                                throw new UnsupportedOperationException("Unable to obtain android.graphics.Path");
                            }
                            outline.setPath(o4.a);
                        } else {
                            if (!z2) {
                                throw new UnsupportedOperationException("Unable to obtain android.graphics.Path");
                            }
                            outline.setConvexPath(o4.a);
                        }
                        this.n = !outline.canClip();
                    } else {
                        Outline outline3 = this.f;
                        if (outline3 != null) {
                            outline3.setEmpty();
                        }
                        this.n = true;
                        outline = null;
                    }
                    this.l = o4;
                    if (outline != null) {
                        outline.setAlpha(interfaceC1178fE.a());
                        outline2 = outline;
                    }
                    interfaceC1178fE.l(outline2, (4294967295L & Math.round(rectF.height())) | (Math.round(rectF.width()) << 32));
                    if (this.n && this.w) {
                        interfaceC1178fE.t(false);
                        interfaceC1178fE.q();
                    } else {
                        interfaceC1178fE.t(this.w);
                    }
                } else {
                    interfaceC1178fE.t(this.w);
                    Outline outline4 = this.f;
                    if (outline4 == null) {
                        outline4 = new Outline();
                        this.f = outline4;
                    }
                    Outline outline5 = outline4;
                    long jO = C1884mi0.O(this.u);
                    long j = this.h;
                    long j2 = this.i;
                    if (j2 != 9205357640488583168L) {
                        jO = j2;
                    }
                    int i2 = (int) (j >> 32);
                    int i3 = (int) (j & 4294967295L);
                    int i4 = (int) (jO >> 32);
                    outline5.setRoundRect(Math.round(Float.intBitsToFloat(i2)), Math.round(Float.intBitsToFloat(i3)), Math.round(Float.intBitsToFloat(i4) + Float.intBitsToFloat(i2)), Math.round(Float.intBitsToFloat((int) (jO & 4294967295L)) + Float.intBitsToFloat(i3)), this.j);
                    outline5.setAlpha(interfaceC1178fE.a());
                    interfaceC1178fE.l(outline5, (4294967295L & Math.round(Float.intBitsToFloat(r15))) | (Math.round(Float.intBitsToFloat(i4)) << 32));
                }
            } else {
                interfaceC1178fE.t(false);
                interfaceC1178fE.l(null, 0L);
            }
        }
        this.g = false;
    }

    /* JADX WARN: Removed duplicated region for block: B:23:0x0068  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void b() {
        /*
            r15 = this;
            boolean r0 = r15.s
            if (r0 == 0) goto L75
            int r0 = r15.q
            if (r0 != 0) goto L75
            o.s4 r0 = r15.r
            java.lang.Object r1 = r0.b
            o.eE r1 = (o.C1082eE) r1
            if (r1 == 0) goto L1c
            int r2 = r1.q
            int r2 = r2 + (-1)
            r1.q = r2
            r1.b()
            r1 = 0
            r0.b = r1
        L1c:
            java.lang.Object r0 = r0.d
            o.aR r0 = (o.C0713aR) r0
            if (r0 == 0) goto L70
            java.lang.Object[] r1 = r0.b
            long[] r2 = r0.a
            int r3 = r2.length
            int r3 = r3 + (-2)
            if (r3 < 0) goto L6d
            r4 = 0
            r5 = r4
        L2d:
            r6 = r2[r5]
            long r8 = ~r6
            r10 = 7
            long r8 = r8 << r10
            long r8 = r8 & r6
            r10 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
            long r8 = r8 & r10
            int r8 = (r8 > r10 ? 1 : (r8 == r10 ? 0 : -1))
            if (r8 == 0) goto L68
            int r8 = r5 - r3
            int r8 = ~r8
            int r8 = r8 >>> 31
            r9 = 8
            int r8 = 8 - r8
            r10 = r4
        L47:
            if (r10 >= r8) goto L66
            r11 = 255(0xff, double:1.26E-321)
            long r11 = r11 & r6
            r13 = 128(0x80, double:6.3E-322)
            int r11 = (r11 > r13 ? 1 : (r11 == r13 ? 0 : -1))
            if (r11 >= 0) goto L62
            int r11 = r5 << 3
            int r11 = r11 + r10
            r11 = r1[r11]
            o.eE r11 = (o.C1082eE) r11
            int r12 = r11.q
            int r12 = r12 + (-1)
            r11.q = r12
            r11.b()
        L62:
            long r6 = r6 >> r9
            int r10 = r10 + 1
            goto L47
        L66:
            if (r8 != r9) goto L6d
        L68:
            if (r5 == r3) goto L6d
            int r5 = r5 + 1
            goto L2d
        L6d:
            r0.b()
        L70:
            o.fE r0 = r15.a
            r0.q()
        L75:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1082eE.b():void");
    }

    /* JADX WARN: Removed duplicated region for block: B:29:0x0094  */
    /* JADX WARN: Type inference failed for: r1v5, types: [o.OC, o.aK] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void c(o.InterfaceC2095ot r15) {
        /*
            r14 = this;
            o.s4 r0 = r14.r
            java.lang.Object r1 = r0.b
            o.eE r1 = (o.C1082eE) r1
            r0.c = r1
            java.lang.Object r1 = r0.d
            o.aR r1 = (o.C0713aR) r1
            if (r1 == 0) goto L29
            boolean r2 = r1.h()
            if (r2 == 0) goto L29
            java.lang.Object r2 = r0.e
            o.aR r2 = (o.C0713aR) r2
            if (r2 != 0) goto L23
            int r2 = o.A40.a
            o.aR r2 = new o.aR
            r2.<init>()
            r0.e = r2
        L23:
            r2.j(r1)
            r1.b()
        L29:
            r1 = 1
            r0.a = r1
            o.aK r1 = r14.d
            r1.g(r15)
            r15 = 0
            r0.a = r15
            java.lang.Object r1 = r0.c
            o.eE r1 = (o.C1082eE) r1
            if (r1 == 0) goto L43
            int r2 = r1.q
            int r2 = r2 + (-1)
            r1.q = r2
            r1.b()
        L43:
            java.lang.Object r0 = r0.e
            o.aR r0 = (o.C0713aR) r0
            if (r0 == 0) goto L9c
            boolean r1 = r0.h()
            if (r1 == 0) goto L9c
            java.lang.Object[] r1 = r0.b
            long[] r2 = r0.a
            int r3 = r2.length
            int r3 = r3 + (-2)
            if (r3 < 0) goto L99
            r4 = r15
        L59:
            r5 = r2[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 L94
            int r7 = r4 - r3
            int r7 = ~r7
            int r7 = r7 >>> 31
            r8 = 8
            int r7 = 8 - r7
            r9 = r15
        L73:
            if (r9 >= r7) goto L92
            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 L8e
            int r10 = r4 << 3
            int r10 = r10 + r9
            r10 = r1[r10]
            o.eE r10 = (o.C1082eE) r10
            int r11 = r10.q
            int r11 = r11 + (-1)
            r10.q = r11
            r10.b()
        L8e:
            long r5 = r5 >> r8
            int r9 = r9 + 1
            goto L73
        L92:
            if (r7 != r8) goto L99
        L94:
            if (r4 == r3) goto L99
            int r4 = r4 + 1
            goto L59
        L99:
            r0.b()
        L9c:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1082eE.c(o.ot):void");
    }

    public final F3 d() {
        F3 su;
        F3 f3 = this.k;
        O4 o4 = this.l;
        if (f3 != null) {
            return f3;
        }
        if (o4 != null) {
            RU ru = new RU(o4);
            this.k = ru;
            return ru;
        }
        long jO = C1884mi0.O(this.u);
        long j = this.h;
        long j2 = this.i;
        if (j2 != 9205357640488583168L) {
            jO = j2;
        }
        float fIntBitsToFloat = Float.intBitsToFloat((int) (j >> 32));
        float fIntBitsToFloat2 = Float.intBitsToFloat((int) (j & 4294967295L));
        float fIntBitsToFloat3 = Float.intBitsToFloat((int) (jO >> 32)) + fIntBitsToFloat;
        float fIntBitsToFloat4 = Float.intBitsToFloat((int) (jO & 4294967295L)) + fIntBitsToFloat2;
        if (this.j > 0.0f) {
            su = new TU(AbstractC1155f00.e(fIntBitsToFloat, fIntBitsToFloat2, fIntBitsToFloat3, fIntBitsToFloat4, (Float.floatToRawIntBits(r0) << 32) | (4294967295L & Float.floatToRawIntBits(r0))));
        } else {
            su = new SU(new T00(fIntBitsToFloat, fIntBitsToFloat2, fIntBitsToFloat3, fIntBitsToFloat4));
        }
        this.k = su;
        return su;
    }

    public final void e(float f, long j, long j2) {
        if (C1765lT.b(this.h, j) && T80.a(this.i, j2) && this.j == f && this.l == null) {
            return;
        }
        this.k = null;
        this.l = null;
        this.g = true;
        this.n = false;
        this.h = j;
        this.i = j2;
        this.j = f;
        a();
    }
}
