package o;

import java.util.Collections;
import java.util.HashMap;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class Ze0 extends LP implements InterfaceC1851mK, InterfaceC1905mt, P50 {
    public C0733af0 A;
    public InterfaceC2221qA B;
    public int C;
    public boolean D;
    public int E;
    public int F;
    public HashMap G;
    public EV H;
    public Xe0 I;
    public Ye0 J;
    public String z;

    public final EV H0() {
        if (this.H == null) {
            this.H = new EV(this.z, this.A, this.B, this.C, this.D, this.E, this.F);
        }
        return this.H;
    }

    /* JADX WARN: Removed duplicated region for block: B:12:0x0015 A[Catch: all -> 0x0045, TryCatch #0 {all -> 0x0045, blocks: (B:3:0x0005, B:5:0x0009, B:10:0x0011, B:13:0x0019, B:15:0x0028, B:16:0x002b, B:18:0x0031, B:20:0x003d, B:23:0x0047, B:24:0x0072, B:12:0x0015), top: B:29:0x0005 }] */
    @Override // o.InterfaceC1851mK
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final o.InterfaceC2329rO a(o.InterfaceC2424sO r6, o.InterfaceC1760lO r7, long r8) {
        /*
            r5 = this;
            java.lang.String r0 = "TextStringSimpleNode::measure"
            android.os.Trace.beginSection(r0)
            o.Ye0 r0 = r5.J     // Catch: java.lang.Throwable -> L45
            if (r0 == 0) goto L15
            boolean r1 = r0.c     // Catch: java.lang.Throwable -> L45
            if (r1 == 0) goto Le
            goto Lf
        Le:
            r0 = 0
        Lf:
            if (r0 == 0) goto L15
            o.EV r0 = r0.d     // Catch: java.lang.Throwable -> L45
            if (r0 != 0) goto L19
        L15:
            o.EV r0 = r5.H0()     // Catch: java.lang.Throwable -> L45
        L19:
            r0.d(r6)     // Catch: java.lang.Throwable -> L45
            o.gK r1 = r6.getLayoutDirection()     // Catch: java.lang.Throwable -> L45
            boolean r8 = r0.b(r8, r1)     // Catch: java.lang.Throwable -> L45
            o.DV r9 = r0.n     // Catch: java.lang.Throwable -> L45
            if (r9 == 0) goto L2b
            r9.b()     // Catch: java.lang.Throwable -> L45
        L2b:
            o.J4 r9 = r0.j     // Catch: java.lang.Throwable -> L45
            long r0 = r0.l     // Catch: java.lang.Throwable -> L45
            if (r8 == 0) goto L72
            r8 = 2
            o.qS r2 = o.AbstractC2539te.Q(r5, r8)     // Catch: java.lang.Throwable -> L45
            r2.W0()     // Catch: java.lang.Throwable -> L45
            java.util.HashMap r2 = r5.G     // Catch: java.lang.Throwable -> L45
            if (r2 != 0) goto L47
            java.util.HashMap r2 = new java.util.HashMap     // Catch: java.lang.Throwable -> L45
            r2.<init>(r8)     // Catch: java.lang.Throwable -> L45
            r5.G = r2     // Catch: java.lang.Throwable -> L45
            goto L47
        L45:
            r6 = move-exception
            goto L96
        L47:
            o.iF r8 = o.AbstractC2964y2.a     // Catch: java.lang.Throwable -> L45
            o.Le0 r3 = r9.d     // Catch: java.lang.Throwable -> L45
            r4 = 0
            float r3 = r3.d(r4)     // Catch: java.lang.Throwable -> L45
            int r3 = java.lang.Math.round(r3)     // Catch: java.lang.Throwable -> L45
            java.lang.Integer r3 = java.lang.Integer.valueOf(r3)     // Catch: java.lang.Throwable -> L45
            r2.put(r8, r3)     // Catch: java.lang.Throwable -> L45
            o.iF r8 = o.AbstractC2964y2.b     // Catch: java.lang.Throwable -> L45
            o.Le0 r9 = r9.d     // Catch: java.lang.Throwable -> L45
            int r3 = r9.g     // Catch: java.lang.Throwable -> L45
            int r3 = r3 + (-1)
            float r9 = r9.d(r3)     // Catch: java.lang.Throwable -> L45
            int r9 = java.lang.Math.round(r9)     // Catch: java.lang.Throwable -> L45
            java.lang.Integer r9 = java.lang.Integer.valueOf(r9)     // Catch: java.lang.Throwable -> L45
            r2.put(r8, r9)     // Catch: java.lang.Throwable -> L45
        L72:
            r8 = 32
            long r8 = r0 >> r8
            int r8 = (int) r8     // Catch: java.lang.Throwable -> L45
            r2 = 4294967295(0xffffffff, double:2.1219957905E-314)
            long r0 = r0 & r2
            int r9 = (int) r0     // Catch: java.lang.Throwable -> L45
            long r0 = o.Co0.t(r8, r8, r9, r9)     // Catch: java.lang.Throwable -> L45
            o.VW r7 = r7.c(r0)     // Catch: java.lang.Throwable -> L45
            java.util.HashMap r0 = r5.G     // Catch: java.lang.Throwable -> L45
            o.py r1 = new o.py     // Catch: java.lang.Throwable -> L45
            r2 = 5
            r1.<init>(r7, r2)     // Catch: java.lang.Throwable -> L45
            o.rO r6 = r6.H(r8, r9, r0, r1)     // Catch: java.lang.Throwable -> L45
            android.os.Trace.endSection()
            return r6
        L96:
            android.os.Trace.endSection()
            throw r6
        */
        throw new UnsupportedOperationException("Method not decompiled: o.Ze0.a(o.sO, o.lO, long):o.rO");
    }

    /* JADX WARN: Removed duplicated region for block: B:11:0x0010  */
    @Override // o.InterfaceC1851mK
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final int b(o.YM r2, o.InterfaceC1760lO r3, int r4) {
        /*
            r1 = this;
            o.Ye0 r3 = r1.J
            if (r3 == 0) goto L10
            boolean r0 = r3.c
            if (r0 == 0) goto L9
            goto La
        L9:
            r3 = 0
        La:
            if (r3 == 0) goto L10
            o.EV r3 = r3.d
            if (r3 != 0) goto L14
        L10:
            o.EV r3 = r1.H0()
        L14:
            r3.d(r2)
            o.gK r2 = r2.getLayoutDirection()
            int r2 = r3.a(r4, r2)
            return r2
        */
        throw new UnsupportedOperationException("Method not decompiled: o.Ze0.b(o.YM, o.lO, int):int");
    }

    /* JADX WARN: Removed duplicated region for block: B:11:0x0010  */
    @Override // o.InterfaceC1851mK
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final int d(o.YM r1, o.InterfaceC1760lO r2, int r3) {
        /*
            r0 = this;
            o.Ye0 r2 = r0.J
            if (r2 == 0) goto L10
            boolean r3 = r2.c
            if (r3 == 0) goto L9
            goto La
        L9:
            r2 = 0
        La:
            if (r2 == 0) goto L10
            o.EV r2 = r2.d
            if (r2 != 0) goto L14
        L10:
            o.EV r2 = r0.H0()
        L14:
            r2.d(r1)
            o.gK r1 = r1.getLayoutDirection()
            o.DV r1 = r2.e(r1)
            float r1 = r1.c()
            int r1 = o.C2887xC.k(r1)
            return r1
        */
        throw new UnsupportedOperationException("Method not decompiled: o.Ze0.d(o.YM, o.lO, int):int");
    }

    /* JADX WARN: Type inference failed for: r0v2, types: [o.Xe0] */
    @Override // o.P50
    public final void d0(N50 n50) {
        Xe0 xe0 = this.I;
        Xe0 xe02 = xe0;
        if (xe0 == null) {
            final int i = 0;
            ?? r0 = new OC(this) { // from class: o.Xe0
                public final /* synthetic */ Ze0 m;

                {
                    this.m = this;
                }

                /* JADX WARN: Removed duplicated region for block: B:23:0x00bd  */
                @Override // o.OC
                /*
                    Code decompiled incorrectly, please refer to instructions dump.
                    To view partially-correct add '--show-bad-code' argument
                */
                public final java.lang.Object g(java.lang.Object r29) {
                    /*
                        Method dump skipped, instructions count: 308
                        To view this dump add '--comments-level debug' option
                    */
                    throw new UnsupportedOperationException("Method not decompiled: o.Xe0.g(java.lang.Object):java.lang.Object");
                }
            };
            this.I = r0;
            xe02 = r0;
        }
        C0977d7 c0977d7 = new C0977d7(this.z);
        DJ[] djArr = Y50.a;
        n50.d(W50.A, Collections.singletonList(c0977d7));
        Ye0 ye0 = this.J;
        if (ye0 != null) {
            boolean z = ye0.c;
            Z50 z50 = W50.C;
            DJ[] djArr2 = Y50.a;
            DJ dj = djArr2[16];
            z50.a(n50, Boolean.valueOf(z));
            C0977d7 c0977d72 = new C0977d7(ye0.b);
            Z50 z502 = W50.B;
            DJ dj2 = djArr2[15];
            z502.a(n50, c0977d72);
        }
        final int i2 = 1;
        n50.d(M50.j, new C1726l0(null, new OC(this) { // from class: o.Xe0
            public final /* synthetic */ Ze0 m;

            {
                this.m = this;
            }

            @Override // o.OC
            public final Object g(Object v) {
                /*
                    Method dump skipped, instructions count: 308
                    To view this dump add '--comments-level debug' option
                */
                throw new UnsupportedOperationException("Method not decompiled: o.Xe0.g(java.lang.Object):java.lang.Object");
            }
        }));
        final int i3 = 2;
        n50.d(M50.k, new C1726l0(null, new OC(this) { // from class: o.Xe0
            public final /* synthetic */ Ze0 m;

            {
                this.m = this;
            }

            @Override // o.OC
            public final Object g(Object v) {
                /*
                    Method dump skipped, instructions count: 308
                    To view this dump add '--comments-level debug' option
                */
                throw new UnsupportedOperationException("Method not decompiled: o.Xe0.g(java.lang.Object):java.lang.Object");
            }
        }));
        n50.d(M50.l, new C1726l0(null, new C1164f5(23, this)));
        Y50.a(n50, xe02);
    }

    /* JADX WARN: Removed duplicated region for block: B:11:0x0010  */
    @Override // o.InterfaceC1851mK
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final int h(o.YM r2, o.InterfaceC1760lO r3, int r4) {
        /*
            r1 = this;
            o.Ye0 r3 = r1.J
            if (r3 == 0) goto L10
            boolean r0 = r3.c
            if (r0 == 0) goto L9
            goto La
        L9:
            r3 = 0
        La:
            if (r3 == 0) goto L10
            o.EV r3 = r3.d
            if (r3 != 0) goto L14
        L10:
            o.EV r3 = r1.H0()
        L14:
            r3.d(r2)
            o.gK r2 = r2.getLayoutDirection()
            int r2 = r3.a(r4, r2)
            return r2
        */
        throw new UnsupportedOperationException("Method not decompiled: o.Ze0.h(o.YM, o.lO, int):int");
    }

    /* JADX WARN: Removed duplicated region for block: B:11:0x0010  */
    @Override // o.InterfaceC1851mK
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final int i(o.YM r1, o.InterfaceC1760lO r2, int r3) {
        /*
            r0 = this;
            o.Ye0 r2 = r0.J
            if (r2 == 0) goto L10
            boolean r3 = r2.c
            if (r3 == 0) goto L9
            goto La
        L9:
            r2 = 0
        La:
            if (r2 == 0) goto L10
            o.EV r2 = r2.d
            if (r2 != 0) goto L14
        L10:
            o.EV r2 = r0.H0()
        L14:
            r2.d(r1)
            o.gK r1 = r1.getLayoutDirection()
            o.DV r1 = r2.e(r1)
            float r1 = r1.a()
            int r1 = o.C2887xC.k(r1)
            return r1
        */
        throw new UnsupportedOperationException("Method not decompiled: o.Ze0.i(o.YM, o.lO, int):int");
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x0016  */
    @Override // o.InterfaceC1905mt
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void r(o.C2610uK r11) {
        /*
            r10 = this;
            boolean r0 = r10.y
            if (r0 != 0) goto L6
            goto L99
        L6:
            o.Ye0 r0 = r10.J
            if (r0 == 0) goto L16
            boolean r1 = r0.c
            if (r1 == 0) goto Lf
            goto L10
        Lf:
            r0 = 0
        L10:
            if (r0 == 0) goto L16
            o.EV r0 = r0.d
            if (r0 != 0) goto L1a
        L16:
            o.EV r0 = r10.H0()
        L1a:
            o.J4 r1 = r0.j
            if (r1 == 0) goto La0
            o.zg r11 = r11.l
            o.zm0 r11 = r11.m
            o.xg r2 = r11.x()
            boolean r11 = r0.k
            if (r11 == 0) goto L43
            long r3 = r0.l
            r0 = 32
            long r5 = r3 >> r0
            int r0 = (int) r5
            float r5 = (float) r0
            r6 = 4294967295(0xffffffff, double:2.1219957905E-314)
            long r3 = r3 & r6
            int r0 = (int) r3
            float r6 = (float) r0
            r2.n()
            r4 = 0
            r7 = 1
            r3 = 0
            r2.i(r3, r4, r5, r6, r7)
        L43:
            o.af0 r0 = r10.A     // Catch: java.lang.Throwable -> L4f
            o.Y90 r0 = r0.a     // Catch: java.lang.Throwable -> L4f
            o.wd0 r3 = r0.m     // Catch: java.lang.Throwable -> L4f
            if (r3 != 0) goto L4d
            o.wd0 r3 = o.C2823wd0.b     // Catch: java.lang.Throwable -> L4f
        L4d:
            r6 = r3
            goto L51
        L4f:
            r0 = move-exception
            goto L9a
        L51:
            o.I70 r3 = r0.n     // Catch: java.lang.Throwable -> L4f
            if (r3 != 0) goto L57
            o.I70 r3 = o.I70.d     // Catch: java.lang.Throwable -> L4f
        L57:
            r5 = r3
            o.pt r3 = r0.p     // Catch: java.lang.Throwable -> L4f
            if (r3 != 0) goto L5e
            o.oy r3 = o.C2103oy.a     // Catch: java.lang.Throwable -> L4f
        L5e:
            r7 = r3
            o.xe0 r0 = r0.a     // Catch: java.lang.Throwable -> L4f
            o.Xe r3 = r0.c()     // Catch: java.lang.Throwable -> L4f
            if (r3 == 0) goto L75
            o.af0 r0 = r10.A     // Catch: java.lang.Throwable -> L4f
            o.Y90 r0 = r0.a     // Catch: java.lang.Throwable -> L4f
            o.xe0 r0 = r0.a     // Catch: java.lang.Throwable -> L4f
            float r4 = r0.a()     // Catch: java.lang.Throwable -> L4f
            r1.g(r2, r3, r4, r5, r6, r7)     // Catch: java.lang.Throwable -> L4f
            goto L94
        L75:
            long r3 = o.C0190Hi.g     // Catch: java.lang.Throwable -> L4f
            r8 = 16
            int r0 = (r3 > r8 ? 1 : (r3 == r8 ? 0 : -1))
            if (r0 == 0) goto L7e
            goto L91
        L7e:
            o.af0 r0 = r10.A     // Catch: java.lang.Throwable -> L4f
            long r3 = r0.b()     // Catch: java.lang.Throwable -> L4f
            int r0 = (r3 > r8 ? 1 : (r3 == r8 ? 0 : -1))
            if (r0 == 0) goto L8f
            o.af0 r0 = r10.A     // Catch: java.lang.Throwable -> L4f
            long r3 = r0.b()     // Catch: java.lang.Throwable -> L4f
            goto L91
        L8f:
            long r3 = o.C0190Hi.b     // Catch: java.lang.Throwable -> L4f
        L91:
            r1.f(r2, r3, r5, r6, r7)     // Catch: java.lang.Throwable -> L4f
        L94:
            if (r11 == 0) goto L99
            r2.k()
        L99:
            return
        L9a:
            if (r11 == 0) goto L9f
            r2.k()
        L9f:
            throw r0
        La0:
            java.lang.StringBuilder r11 = new java.lang.StringBuilder
            java.lang.String r0 = "Internal Error: ParagraphLayoutCache could not provide a Paragraph during the draw phase. Please report this bug on the official Issue Tracker with the following diagnostic information: (layoutCache="
            r11.<init>(r0)
            o.EV r0 = r10.H
            r11.append(r0)
            java.lang.String r0 = ", textSubstitution="
            r11.append(r0)
            o.Ye0 r0 = r10.J
            r11.append(r0)
            r0 = 41
            r11.append(r0)
            java.lang.String r11 = r11.toString()
            o.AbstractC2417sH.b(r11)
            o.pj r11 = new o.pj
            r11.<init>()
            throw r11
        */
        throw new UnsupportedOperationException("Method not decompiled: o.Ze0.r(o.uK):void");
    }

    @Override // o.LP
    public final boolean w0() {
        return false;
    }
}
