package b.e.a.j;

import b.e.a.j.c;
import b.e.a.j.l.m;
import com.cvte.vman.BuildConfig;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;

/* JADX INFO: loaded from: classes.dex */
public class d {
    public int A;
    public float B;
    public int[] C;
    public float D;
    public boolean E;
    public boolean F;
    public boolean G;
    public int H;
    public int I;
    public c J;
    public c K;
    public c L;
    public c M;
    public c N;
    public c O;
    public c P;
    public c Q;
    public c[] R;
    public ArrayList<c> S;
    public boolean[] T;
    public int[] U;
    public d V;
    public int W;
    public int X;
    public float Y;
    public int Z;
    public int a0;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public b.e.a.j.l.c f752b;
    public int b0;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public b.e.a.j.l.c f753c;
    public int c0;
    public int d0;
    public int e0;
    public float f0;
    public float g0;
    public Object h0;
    public int i0;
    public String j;
    public String j0;
    public boolean k;
    public int k0;
    public boolean l;
    public int l0;
    public boolean m;
    public float[] m0;
    public boolean n;
    public d[] n0;
    public int o;
    public d[] o0;
    public int p;
    public int p0;
    public int q;
    public int q0;
    public int r;
    public int s;
    public int[] t;
    public int u;
    public int v;
    public float w;
    public int x;
    public int y;
    public float z;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public boolean f751a = false;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public b.e.a.j.l.k f754d = null;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public m f755e = null;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public boolean[] f756f = {true, true};
    public boolean g = true;
    public int h = -1;
    public int i = -1;

    public d() {
        new HashMap();
        this.k = false;
        this.l = false;
        this.m = false;
        this.n = false;
        this.o = -1;
        this.p = -1;
        this.q = 0;
        this.r = 0;
        this.s = 0;
        this.t = new int[2];
        this.u = 0;
        this.v = 0;
        this.w = 1.0f;
        this.x = 0;
        this.y = 0;
        this.z = 1.0f;
        this.A = -1;
        this.B = 1.0f;
        this.C = new int[]{Integer.MAX_VALUE, Integer.MAX_VALUE};
        this.D = 0.0f;
        this.E = false;
        this.G = false;
        this.H = 0;
        this.I = 0;
        c cVar = new c(this, c.a.LEFT);
        this.J = cVar;
        c cVar2 = new c(this, c.a.TOP);
        this.K = cVar2;
        c cVar3 = new c(this, c.a.RIGHT);
        this.L = cVar3;
        c cVar4 = new c(this, c.a.BOTTOM);
        this.M = cVar4;
        c cVar5 = new c(this, c.a.BASELINE);
        this.N = cVar5;
        this.O = new c(this, c.a.CENTER_X);
        this.P = new c(this, c.a.CENTER_Y);
        c cVar6 = new c(this, c.a.CENTER);
        this.Q = cVar6;
        this.R = new c[]{cVar, cVar3, cVar2, cVar4, cVar5, cVar6};
        ArrayList<c> arrayList = new ArrayList<>();
        this.S = arrayList;
        this.T = new boolean[2];
        this.U = new int[]{1, 1};
        this.V = null;
        this.W = 0;
        this.X = 0;
        this.Y = 0.0f;
        this.Z = -1;
        this.a0 = 0;
        this.b0 = 0;
        this.c0 = 0;
        this.f0 = 0.5f;
        this.g0 = 0.5f;
        this.i0 = 0;
        this.j0 = null;
        this.k0 = 0;
        this.l0 = 0;
        this.m0 = new float[]{-1.0f, -1.0f};
        this.n0 = new d[]{null, null};
        this.o0 = new d[]{null, null};
        this.p0 = -1;
        this.q0 = -1;
        arrayList.add(this.J);
        this.S.add(this.K);
        this.S.add(this.L);
        this.S.add(this.M);
        this.S.add(this.O);
        this.S.add(this.P);
        this.S.add(this.Q);
        this.S.add(this.N);
    }

    public boolean A() {
        c cVar = this.J;
        c cVar2 = cVar.f744f;
        if (cVar2 != null && cVar2.f744f == cVar) {
            return true;
        }
        c cVar3 = this.L;
        c cVar4 = cVar3.f744f;
        return cVar4 != null && cVar4.f744f == cVar3;
    }

    public boolean B() {
        c cVar = this.K;
        c cVar2 = cVar.f744f;
        if (cVar2 != null && cVar2.f744f == cVar) {
            return true;
        }
        c cVar3 = this.M;
        c cVar4 = cVar3.f744f;
        return cVar4 != null && cVar4.f744f == cVar3;
    }

    public boolean C() {
        return this.g && this.i0 != 8;
    }

    public boolean D() {
        return this.k || (this.J.f741c && this.L.f741c);
    }

    public boolean E() {
        return this.l || (this.K.f741c && this.M.f741c);
    }

    public void F() {
        this.J.h();
        this.K.h();
        this.L.h();
        this.M.h();
        this.N.h();
        this.O.h();
        this.P.h();
        this.Q.h();
        this.V = null;
        this.D = 0.0f;
        this.W = 0;
        this.X = 0;
        this.Y = 0.0f;
        this.Z = -1;
        this.a0 = 0;
        this.b0 = 0;
        this.c0 = 0;
        this.d0 = 0;
        this.e0 = 0;
        this.f0 = 0.5f;
        this.g0 = 0.5f;
        int[] iArr = this.U;
        iArr[0] = 1;
        iArr[1] = 1;
        this.h0 = null;
        this.i0 = 0;
        this.k0 = 0;
        this.l0 = 0;
        float[] fArr = this.m0;
        fArr[0] = -1.0f;
        fArr[1] = -1.0f;
        this.o = -1;
        this.p = -1;
        int[] iArr2 = this.C;
        iArr2[0] = Integer.MAX_VALUE;
        iArr2[1] = Integer.MAX_VALUE;
        this.r = 0;
        this.s = 0;
        this.w = 1.0f;
        this.z = 1.0f;
        this.v = Integer.MAX_VALUE;
        this.y = Integer.MAX_VALUE;
        this.u = 0;
        this.x = 0;
        this.A = -1;
        this.B = 1.0f;
        boolean[] zArr = this.f756f;
        zArr[0] = true;
        zArr[1] = true;
        this.G = false;
        boolean[] zArr2 = this.T;
        zArr2[0] = false;
        zArr2[1] = false;
        this.g = true;
        int[] iArr3 = this.t;
        iArr3[0] = 0;
        iArr3[1] = 0;
        this.h = -1;
        this.i = -1;
    }

    public void G() {
        this.k = false;
        this.l = false;
        this.m = false;
        this.n = false;
        int size = this.S.size();
        for (int i = 0; i < size; i++) {
            c cVar = this.S.get(i);
            cVar.f741c = false;
            cVar.f740b = 0;
        }
    }

    public void H(b.e.a.c cVar) {
        this.J.i();
        this.K.i();
        this.L.i();
        this.M.i();
        this.N.i();
        this.Q.i();
        this.O.i();
        this.P.i();
    }

    public final void I(StringBuilder sb, String str, float f2, float f3) {
        if (f2 == f3) {
            return;
        }
        sb.append(str);
        sb.append(" :   ");
        sb.append(f2);
        sb.append(",\n");
    }

    public final void J(StringBuilder sb, String str, int i, int i2) {
        if (i == i2) {
            return;
        }
        sb.append(str);
        sb.append(" :   ");
        sb.append(i);
        sb.append(",\n");
    }

    public void K(int i) {
        this.c0 = i;
        this.E = i > 0;
    }

    public void L(int i, int i2) {
        if (this.k) {
            return;
        }
        c cVar = this.J;
        cVar.f740b = i;
        cVar.f741c = true;
        c cVar2 = this.L;
        cVar2.f740b = i2;
        cVar2.f741c = true;
        this.a0 = i;
        this.W = i2 - i;
        this.k = true;
    }

    public void M(int i, int i2) {
        if (this.l) {
            return;
        }
        c cVar = this.K;
        cVar.f740b = i;
        cVar.f741c = true;
        c cVar2 = this.M;
        cVar2.f740b = i2;
        cVar2.f741c = true;
        this.b0 = i;
        this.X = i2 - i;
        if (this.E) {
            this.N.j(i + this.c0);
        }
        this.l = true;
    }

    public void N(int i) {
        this.X = i;
        int i2 = this.e0;
        if (i < i2) {
            this.X = i2;
        }
    }

    public void O(int i) {
        this.U[0] = i;
    }

    public void P(int i) {
        if (i < 0) {
            i = 0;
        }
        this.e0 = i;
    }

    public void Q(int i) {
        if (i < 0) {
            i = 0;
        }
        this.d0 = i;
    }

    public void R(int i) {
        this.U[1] = i;
    }

    public void S(int i) {
        this.W = i;
        int i2 = this.d0;
        if (i < i2) {
            this.W = i2;
        }
    }

    public void T(boolean z, boolean z2) {
        int i;
        int i2;
        b.e.a.j.l.k kVar = this.f754d;
        boolean z3 = z & kVar.g;
        m mVar = this.f755e;
        boolean z4 = z2 & mVar.g;
        int i3 = kVar.h.g;
        int i4 = mVar.h.g;
        int i5 = kVar.i.g;
        int i6 = mVar.i.g;
        int i7 = i6 - i4;
        if (i5 - i3 < 0 || i7 < 0 || i3 == Integer.MIN_VALUE || i3 == Integer.MAX_VALUE || i4 == Integer.MIN_VALUE || i4 == Integer.MAX_VALUE || i5 == Integer.MIN_VALUE || i5 == Integer.MAX_VALUE || i6 == Integer.MIN_VALUE || i6 == Integer.MAX_VALUE) {
            i5 = 0;
            i6 = 0;
            i3 = 0;
            i4 = 0;
        }
        int i8 = i5 - i3;
        int i9 = i6 - i4;
        if (z3) {
            this.a0 = i3;
        }
        if (z4) {
            this.b0 = i4;
        }
        if (this.i0 == 8) {
            this.W = 0;
            this.X = 0;
            return;
        }
        if (z3) {
            if (this.U[0] == 1 && i8 < (i2 = this.W)) {
                i8 = i2;
            }
            this.W = i8;
            int i10 = this.d0;
            if (i8 < i10) {
                this.W = i10;
            }
        }
        if (z4) {
            if (this.U[1] == 1 && i9 < (i = this.X)) {
                i9 = i;
            }
            this.X = i9;
            int i11 = this.e0;
            if (i9 < i11) {
                this.X = i11;
            }
        }
    }

    public void U(b.e.a.d dVar, boolean z) {
        int i;
        int i2;
        m mVar;
        b.e.a.j.l.k kVar;
        int iO = dVar.o(this.J);
        int iO2 = dVar.o(this.K);
        int iO3 = dVar.o(this.L);
        int iO4 = dVar.o(this.M);
        if (z && (kVar = this.f754d) != null) {
            b.e.a.j.l.f fVar = kVar.h;
            if (fVar.j) {
                b.e.a.j.l.f fVar2 = kVar.i;
                if (fVar2.j) {
                    iO = fVar.g;
                    iO3 = fVar2.g;
                }
            }
        }
        if (z && (mVar = this.f755e) != null) {
            b.e.a.j.l.f fVar3 = mVar.h;
            if (fVar3.j) {
                b.e.a.j.l.f fVar4 = mVar.i;
                if (fVar4.j) {
                    iO2 = fVar3.g;
                    iO4 = fVar4.g;
                }
            }
        }
        int i3 = iO4 - iO2;
        if (iO3 - iO < 0 || i3 < 0 || iO == Integer.MIN_VALUE || iO == Integer.MAX_VALUE || iO2 == Integer.MIN_VALUE || iO2 == Integer.MAX_VALUE || iO3 == Integer.MIN_VALUE || iO3 == Integer.MAX_VALUE || iO4 == Integer.MIN_VALUE || iO4 == Integer.MAX_VALUE) {
            iO4 = 0;
            iO = 0;
            iO2 = 0;
            iO3 = 0;
        }
        int i4 = iO3 - iO;
        int i5 = iO4 - iO2;
        this.a0 = iO;
        this.b0 = iO2;
        if (this.i0 == 8) {
            this.W = 0;
            this.X = 0;
            return;
        }
        int[] iArr = this.U;
        if (iArr[0] == 1 && i4 < (i2 = this.W)) {
            i4 = i2;
        }
        if (iArr[1] == 1 && i5 < (i = this.X)) {
            i5 = i;
        }
        this.W = i4;
        this.X = i5;
        int i6 = this.e0;
        if (i5 < i6) {
            this.X = i6;
        }
        int i7 = this.d0;
        if (i4 < i7) {
            this.W = i7;
        }
        int i8 = this.v;
        if (i8 > 0 && iArr[0] == 3) {
            this.W = Math.min(this.W, i8);
        }
        int i9 = this.y;
        if (i9 > 0 && this.U[1] == 3) {
            this.X = Math.min(this.X, i9);
        }
        int i10 = this.W;
        if (i4 != i10) {
            this.h = i10;
        }
        int i11 = this.X;
        if (i5 != i11) {
            this.i = i11;
        }
    }

    public void b(e eVar, b.e.a.d dVar, HashSet<d> hashSet, int i, boolean z) {
        if (z) {
            if (!hashSet.contains(this)) {
                return;
            }
            i.a(eVar, dVar, this);
            hashSet.remove(this);
            d(dVar, eVar.f0(64));
        }
        if (i == 0) {
            HashSet<c> hashSet2 = this.J.f739a;
            if (hashSet2 != null) {
                Iterator<c> it = hashSet2.iterator();
                while (it.hasNext()) {
                    it.next().f742d.b(eVar, dVar, hashSet, i, true);
                }
            }
            HashSet<c> hashSet3 = this.L.f739a;
            if (hashSet3 != null) {
                Iterator<c> it2 = hashSet3.iterator();
                while (it2.hasNext()) {
                    it2.next().f742d.b(eVar, dVar, hashSet, i, true);
                }
                return;
            }
            return;
        }
        HashSet<c> hashSet4 = this.K.f739a;
        if (hashSet4 != null) {
            Iterator<c> it3 = hashSet4.iterator();
            while (it3.hasNext()) {
                it3.next().f742d.b(eVar, dVar, hashSet, i, true);
            }
        }
        HashSet<c> hashSet5 = this.M.f739a;
        if (hashSet5 != null) {
            Iterator<c> it4 = hashSet5.iterator();
            while (it4.hasNext()) {
                it4.next().f742d.b(eVar, dVar, hashSet, i, true);
            }
        }
        HashSet<c> hashSet6 = this.N.f739a;
        if (hashSet6 != null) {
            Iterator<c> it5 = hashSet6.iterator();
            while (it5.hasNext()) {
                it5.next().f742d.b(eVar, dVar, hashSet, i, true);
            }
        }
    }

    public boolean c() {
        return (this instanceof j) || (this instanceof f);
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:195:0x02cb  */
    /* JADX WARN: Removed duplicated region for block: B:19:0x0051  */
    /* JADX WARN: Removed duplicated region for block: B:203:0x02e9  */
    /* JADX WARN: Removed duplicated region for block: B:237:0x0375  */
    /* JADX WARN: Removed duplicated region for block: B:241:0x037f  */
    /* JADX WARN: Removed duplicated region for block: B:244:0x0384  */
    /* JADX WARN: Removed duplicated region for block: B:248:0x038e  */
    /* JADX WARN: Removed duplicated region for block: B:251:0x0398  */
    /* JADX WARN: Removed duplicated region for block: B:254:0x039e  */
    /* JADX WARN: Removed duplicated region for block: B:256:0x03a1  */
    /* JADX WARN: Removed duplicated region for block: B:257:0x03a4  */
    /* JADX WARN: Removed duplicated region for block: B:260:0x03bd  */
    /* JADX WARN: Removed duplicated region for block: B:280:0x0407  */
    /* JADX WARN: Removed duplicated region for block: B:295:0x04a7  */
    /* JADX WARN: Removed duplicated region for block: B:312:0x050b  */
    /* JADX WARN: Removed duplicated region for block: B:316:0x051f  */
    /* JADX WARN: Removed duplicated region for block: B:317:0x0521  */
    /* JADX WARN: Removed duplicated region for block: B:319:0x0524  */
    /* JADX WARN: Removed duplicated region for block: B:354:0x05b0  */
    /* JADX WARN: Removed duplicated region for block: B:355:0x05b3  */
    /* JADX WARN: Removed duplicated region for block: B:357:0x05f4  */
    /* JADX WARN: Removed duplicated region for block: B:360:0x05fc  */
    /* JADX WARN: Removed duplicated region for block: B:367:0x0623  */
    /* JADX WARN: Type inference failed for: r15v1 */
    /* JADX WARN: Type inference failed for: r15v2 */
    /* JADX WARN: Type inference failed for: r15v3, types: [b.e.a.j.d] */
    /* JADX WARN: Type inference failed for: r15v6, types: [b.e.a.j.d] */
    /* JADX WARN: Type inference failed for: r15v7 */
    /* JADX WARN: Type inference failed for: r15v8 */
    /* JADX WARN: Type inference failed for: r15v9 */
    /* JADX WARN: Type inference failed for: r27v1 */
    /* JADX WARN: Type inference failed for: r27v2, types: [boolean] */
    /* JADX WARN: Type inference failed for: r27v3 */
    /* JADX WARN: Type inference failed for: r48v0, types: [b.e.a.j.d] */
    /* JADX WARN: Type inference failed for: r9v4 */
    /* JADX WARN: Type inference failed for: r9v5, types: [boolean] */
    /* JADX WARN: Type inference failed for: r9v6 */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public void d(b.e.a.d r49, boolean r50) {
        /*
            Method dump skipped, instruction units count: 1723
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: b.e.a.j.d.d(b.e.a.d, boolean):void");
    }

    public boolean e() {
        return this.i0 != 8;
    }

    /* JADX WARN: Removed duplicated region for block: B:108:0x0196  */
    /* JADX WARN: Removed duplicated region for block: B:188:0x02c4  */
    /* JADX WARN: Removed duplicated region for block: B:189:0x02c8  */
    /* JADX WARN: Removed duplicated region for block: B:228:0x037d  */
    /* JADX WARN: Removed duplicated region for block: B:230:0x0381  */
    /* JADX WARN: Removed duplicated region for block: B:238:0x03cb  */
    /* JADX WARN: Removed duplicated region for block: B:246:0x03f5  */
    /* JADX WARN: Removed duplicated region for block: B:256:0x041e  */
    /* JADX WARN: Removed duplicated region for block: B:265:0x0436  */
    /* JADX WARN: Removed duplicated region for block: B:267:0x043c  */
    /* JADX WARN: Removed duplicated region for block: B:295:0x0475 A[PHI: r2
      0x0475: PHI (r2v13 int) = (r2v12 int), (r2v17 int), (r2v17 int), (r2v17 int) binds: [B:288:0x0464, B:290:0x046a, B:291:0x046c, B:293:0x0470] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:298:0x0487  */
    /* JADX WARN: Removed duplicated region for block: B:312:0x04b0  */
    /* JADX WARN: Removed duplicated region for block: B:316:0x04b8 A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:31:0x007d  */
    /* JADX WARN: Removed duplicated region for block: B:324:0x04d0  */
    /* JADX WARN: Removed duplicated region for block: B:326:0x04e1 A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:345:0x0514  */
    /* JADX WARN: Removed duplicated region for block: B:34:0x0087  */
    /* JADX WARN: Removed duplicated region for block: B:352:? A[ADDED_TO_REGION, RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:355:? A[ADDED_TO_REGION, RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:35:0x008b  */
    /* JADX WARN: Removed duplicated region for block: B:37:0x0091  */
    /* JADX WARN: Removed duplicated region for block: B:45:0x00b2  */
    /* JADX WARN: Removed duplicated region for block: B:47:0x00b7  */
    /* JADX WARN: Removed duplicated region for block: B:57:0x00d2  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void f(b.e.a.d r36, boolean r37, boolean r38, boolean r39, boolean r40, b.e.a.h r41, b.e.a.h r42, int r43, boolean r44, b.e.a.j.c r45, b.e.a.j.c r46, int r47, int r48, int r49, int r50, float r51, boolean r52, boolean r53, boolean r54, boolean r55, boolean r56, int r57, int r58, int r59, int r60, float r61, boolean r62) {
        /*
            Method dump skipped, instruction units count: 1307
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: b.e.a.j.d.f(b.e.a.d, boolean, boolean, boolean, boolean, b.e.a.h, b.e.a.h, int, boolean, b.e.a.j.c, b.e.a.j.c, int, int, int, int, float, boolean, boolean, boolean, boolean, boolean, int, int, int, int, float, boolean):void");
    }

    public void g(b.e.a.d dVar) {
        dVar.l(this.J);
        dVar.l(this.K);
        dVar.l(this.L);
        dVar.l(this.M);
        if (this.c0 > 0) {
            dVar.l(this.N);
        }
    }

    public void h() {
        if (this.f754d == null) {
            this.f754d = new b.e.a.j.l.k(this);
        }
        if (this.f755e == null) {
            this.f755e = new m(this);
        }
    }

    public c i(c.a aVar) {
        switch (aVar) {
            case NONE:
                return null;
            case LEFT:
                return this.J;
            case TOP:
                return this.K;
            case RIGHT:
                return this.L;
            case BOTTOM:
                return this.M;
            case BASELINE:
                return this.N;
            case CENTER:
                return this.Q;
            case CENTER_X:
                return this.O;
            case CENTER_Y:
                return this.P;
            default:
                throw new AssertionError(aVar.name());
        }
    }

    public int j() {
        return w() + this.X;
    }

    public int k(int i) {
        if (i == 0) {
            return m();
        }
        if (i == 1) {
            return t();
        }
        return 0;
    }

    public int l() {
        if (this.i0 == 8) {
            return 0;
        }
        return this.X;
    }

    public int m() {
        return this.U[0];
    }

    public d n(int i) {
        c cVar;
        c cVar2;
        if (i != 0) {
            if (i == 1 && (cVar2 = (cVar = this.M).f744f) != null && cVar2.f744f == cVar) {
                return cVar2.f742d;
            }
            return null;
        }
        c cVar3 = this.L;
        c cVar4 = cVar3.f744f;
        if (cVar4 == null || cVar4.f744f != cVar3) {
            return null;
        }
        return cVar4.f742d;
    }

    public d o(int i) {
        c cVar;
        c cVar2;
        if (i != 0) {
            if (i == 1 && (cVar2 = (cVar = this.K).f744f) != null && cVar2.f744f == cVar) {
                return cVar2.f742d;
            }
            return null;
        }
        c cVar3 = this.J;
        c cVar4 = cVar3.f744f;
        if (cVar4 == null || cVar4.f744f != cVar3) {
            return null;
        }
        return cVar4.f742d;
    }

    public int p() {
        return v() + this.W;
    }

    public void q(StringBuilder sb) {
        StringBuilder sbD = c.a.a.a.a.d("  ");
        sbD.append(this.j);
        sbD.append(":{\n");
        sb.append(sbD.toString());
        sb.append("    actualWidth:" + this.W);
        sb.append("\n");
        sb.append("    actualHeight:" + this.X);
        sb.append("\n");
        sb.append("    actualLeft:" + this.a0);
        sb.append("\n");
        sb.append("    actualTop:" + this.b0);
        sb.append("\n");
        s(sb, "left", this.J);
        s(sb, "top", this.K);
        s(sb, "right", this.L);
        s(sb, "bottom", this.M);
        s(sb, "baseline", this.N);
        s(sb, "centerX", this.O);
        s(sb, "centerY", this.P);
        int i = this.W;
        int i2 = this.d0;
        int i3 = this.C[0];
        int i4 = this.u;
        int i5 = this.r;
        float f2 = this.w;
        float f3 = this.m0[0];
        r(sb, "    width", i, i2, i3, i4, i5, f2);
        int i6 = this.X;
        int i7 = this.e0;
        int i8 = this.C[1];
        int i9 = this.x;
        int i10 = this.s;
        float f4 = this.z;
        float f5 = this.m0[1];
        r(sb, "    height", i6, i7, i8, i9, i10, f4);
        float f6 = this.Y;
        int i11 = this.Z;
        if (f6 != 0.0f) {
            sb.append("    dimensionRatio");
            sb.append(" :  [");
            sb.append(f6);
            sb.append(",");
            sb.append(i11);
            sb.append(BuildConfig.FLAVOR);
            sb.append("],\n");
        }
        I(sb, "    horizontalBias", this.f0, 0.5f);
        I(sb, "    verticalBias", this.g0, 0.5f);
        J(sb, "    horizontalChainStyle", this.k0, 0);
        J(sb, "    verticalChainStyle", this.l0, 0);
        sb.append("  }");
    }

    public final void r(StringBuilder sb, String str, int i, int i2, int i3, int i4, int i5, float f2) {
        sb.append(str);
        sb.append(" :  {\n");
        J(sb, "      size", i, 0);
        J(sb, "      min", i2, 0);
        J(sb, "      max", i3, Integer.MAX_VALUE);
        J(sb, "      matchMin", i4, 0);
        J(sb, "      matchDef", i5, 0);
        I(sb, "      matchPercent", f2, 1.0f);
        sb.append("    },\n");
    }

    public final void s(StringBuilder sb, String str, c cVar) {
        if (cVar.f744f == null) {
            return;
        }
        sb.append("    ");
        sb.append(str);
        sb.append(" : [ '");
        sb.append(cVar.f744f);
        sb.append("'");
        if (cVar.h != Integer.MIN_VALUE || cVar.g != 0) {
            sb.append(",");
            sb.append(cVar.g);
            if (cVar.h != Integer.MIN_VALUE) {
                sb.append(",");
                sb.append(cVar.h);
                sb.append(",");
            }
        }
        sb.append(" ] ,\n");
    }

    public int t() {
        return this.U[1];
    }

    public String toString() {
        String string = BuildConfig.FLAVOR;
        StringBuilder sbD = c.a.a.a.a.d(BuildConfig.FLAVOR);
        if (this.j0 != null) {
            StringBuilder sbD2 = c.a.a.a.a.d("id: ");
            sbD2.append(this.j0);
            sbD2.append(" ");
            string = sbD2.toString();
        }
        sbD.append(string);
        sbD.append("(");
        sbD.append(this.a0);
        sbD.append(", ");
        sbD.append(this.b0);
        sbD.append(") - (");
        sbD.append(this.W);
        sbD.append(" x ");
        sbD.append(this.X);
        sbD.append(")");
        return sbD.toString();
    }

    public int u() {
        if (this.i0 == 8) {
            return 0;
        }
        return this.W;
    }

    public int v() {
        d dVar = this.V;
        return (dVar == null || !(dVar instanceof e)) ? this.a0 : ((e) dVar).y0 + this.a0;
    }

    public int w() {
        d dVar = this.V;
        return (dVar == null || !(dVar instanceof e)) ? this.b0 : ((e) dVar).z0 + this.b0;
    }

    public boolean x(int i) {
        if (i == 0) {
            return (this.J.f744f != null ? 1 : 0) + (this.L.f744f != null ? 1 : 0) < 2;
        }
        return ((this.K.f744f != null ? 1 : 0) + (this.M.f744f != null ? 1 : 0)) + (this.N.f744f != null ? 1 : 0) < 2;
    }

    public boolean y(int i, int i2) {
        c cVar;
        c cVar2;
        if (i == 0) {
            c cVar3 = this.J.f744f;
            if (cVar3 != null && cVar3.f741c && (cVar2 = this.L.f744f) != null && cVar2.f741c) {
                return (cVar2.c() - this.L.d()) - (this.J.d() + this.J.f744f.c()) >= i2;
            }
        } else {
            c cVar4 = this.K.f744f;
            if (cVar4 != null && cVar4.f741c && (cVar = this.M.f744f) != null && cVar.f741c) {
                return (cVar.c() - this.M.d()) - (this.K.d() + this.K.f744f.c()) >= i2;
            }
        }
        return false;
    }

    public final boolean z(int i) {
        int i2 = i * 2;
        c[] cVarArr = this.R;
        if (cVarArr[i2].f744f != null && cVarArr[i2].f744f.f744f != cVarArr[i2]) {
            int i3 = i2 + 1;
            if (cVarArr[i3].f744f != null && cVarArr[i3].f744f.f744f == cVarArr[i3]) {
                return true;
            }
        }
        return false;
    }
}
