/*
 * Decompiled with CFR 0.152.
 */
import java.util.Vector;

public class jp
extends cu {
    private final w[] D;
    private final int J;
    private final boolean o;
    private final lc w;
    private final int y;
    public final int l;
    private int A = -16777216;
    private boolean B = false;
    private boolean C;
    private int[][] E;
    private int[] F;
    private int[][] G;
    private int[][] H;
    private int[] I;
    private char n = '\u0000';
    private ij x;
    private int z = -16621882;
    public boolean e = true;
    public int f = -2687;
    public int g = -1571;
    public boolean h = false;
    public String[] i;
    public String[] j;
    public w[] k;
    public oe m;

    public final boolean b() {
        return this.e;
    }

    public final String c() {
        return this.a;
    }

    public oe e() {
        return this.m;
    }

    public void a(ht ht2, int n, int n2, int n3, w w2) {
        w2.a(ht2, this.j[n3], n, n2);
    }

    public final void c(int n, int n2) {
        this.z = n;
        this.A = n2;
    }

    public final void a(char c, boolean bl2) {
        this.n = c;
        this.B = bl2;
    }

    public final void a(int[][] nArray, int[] nArray2, int[][] nArray3, int[][] nArray4, int[] nArray5) {
        this.E = nArray;
        this.F = nArray2;
        this.G = nArray3;
        this.H = nArray4;
        this.I = nArray5;
    }

    public jp(int n, int n2, int n3, int n4, int n5, w w2, String string, boolean bl2, lc lc2) {
        this(n, n2, n3, n4, n5, w2, string, bl2, lc2, 0, null, null);
    }

    public jp(int n, int n2, int n3, int n4, int n5, w w2, String string, boolean bl2, lc lc2, int n6, w[] wArray, le le2) {
        this(n, n2, n3, n4, n5, w2, string, bl2, lc2, n6, n6, wArray, le2);
    }

    public jp(int n, int n2, int n3, int n4, int n5, w w2, String string, boolean bl2, lc lc2, int n6, int n7, w[] wArray, le le2) {
        super(n, n2, n3, w2.l() + jp.d() * 2, n4, n5, w2);
        this.o = bl2;
        this.w = lc2;
        this.l = n6;
        this.J = n7;
        this.D = wArray;
        this.m = new oe(le2);
        this.y = lc2.c('\ued23');
        this.a(string);
        this.b(false);
    }

    public void a(boolean bl2) {
        int n = this.j.length;
        for (int i = 0; i < n; ++i) {
            this.j[i] = null;
        }
        if (this.C) {
            this.a(this.a);
            this.b(bl2);
        }
        super.a(bl2);
    }

    private int j() {
        if (this.o && !lh.t()) {
            return this.y + 8 + 4 + this.b.a(lh.d(83));
        }
        return 0;
    }

    public final boolean A() {
        return this.n != '\u0000';
    }

    private boolean f() {
        return this.t_() && this.x != null;
    }

    public final void b(int n, int n2) {
        if (n2 != this.r) {
            this.a(this.a);
        }
    }

    public final void d(boolean bl2) {
        if (this.C != bl2) {
            this.C = bl2;
            this.a(this.a);
            this.b(this.t_());
        }
    }

    public void c_(int n) {
        if (this.f()) {
            this.t();
        }
    }

    public final int a(nj nj2) {
        if (nj2.j()) {
            return -3;
        }
        return -1;
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    public int a(pb pb2) {
        if (this.n != '\u0000' && pb2.b == this.n) {
            boolean bl2 = this.t_();
            this.z();
            if (this.B || bl2) return -3;
            return -2;
        }
        if (!this.t_()) return super.a(pb2);
        switch (pb2.c) {
            default: {
                return super.a(pb2);
            }
            case 7: {
                return -3;
            }
            case 4: 
            case 11: 
        }
        if (!this.o) return -1;
        return -4;
    }

    public w a(int n, boolean bl2) {
        if (this.k != null && n < this.k.length) {
            return this.k[n];
        }
        return this.b;
    }

    /*
     * WARNING - void declaration
     */
    public void b(boolean bl2) {
        void var1_3;
        int n = jp.d() * 2;
        for (int i = 0; i < this.i.length; ++i) {
            if (this.k != null && i < this.k.length) {
                var1_3 += this.k[i].l();
                continue;
            }
            var1_3 += this.b.l();
        }
        this.m((int)var1_3);
    }

    public final void a(String string) {
        this.a = string;
        this.i = ed.a(string, '\n');
        this.k = this.D;
        int n = this.a();
        if (this.C) {
            int n2;
            Vector<String> vector = new Vector<String>();
            Vector<w> vector2 = new Vector<w>();
            for (n2 = 0; n2 < this.i.length; ++n2) {
                w w2 = this.a(n2, this.t_());
                if (w2.a(this.i[n2]) > n) {
                    String[] stringArray = bk.a(w2, this.i[n2], n, Integer.MAX_VALUE, this.w);
                    for (int i = 0; i < stringArray.length; ++i) {
                        vector.addElement(stringArray[i]);
                        vector2.addElement(w2);
                    }
                    continue;
                }
                vector.addElement(this.i[n2]);
                vector2.addElement(w2);
            }
            this.i = new String[vector.size()];
            this.k = new w[vector2.size()];
            for (n2 = 0; n2 < vector.size(); ++n2) {
                this.i[n2] = (String)vector.elementAt(n2);
                this.k[n2] = (w)vector2.elementAt(n2);
            }
        }
        this.j = new String[this.i.length];
        if (this.i.length == 1 && this.b.a(this.i[0]) > n) {
            this.x = new ij(this.b, this.a, n - this.j(), -14006936);
            return;
        }
        this.x = null;
    }

    public void b(ht ht2, int n, int n2) {
        int n3;
        int n4 = jp.d();
        int n5 = this.r;
        int n6 = this.s;
        int n7 = 0;
        if (this.t_()) {
            if (this.h) {
                a.a(ht2, n, n2, n5, n6, this.E, this.F, this.G, this.H, this.I);
                a.a(ht2, this.g, this.f, n + 3, n2 + 3, n5 - 6, n6 - 6);
            } else {
                a.a(ht2, n, n2, this);
            }
            if (this.o && !lh.t()) {
                this.b.i(this.A);
                int n8 = this.j();
                n7 = n8 + 2 + 0;
                n3 = n + this.r - n8;
                this.b.a(ht2, lh.d(83), n3, n2 + n4);
                n3 = n2 + (this.s - this.w.b('\ued23')) / 2;
                this.w.a('\ued23', ht2, n + this.r - this.y - 4, n3);
            }
        } else if (!this.h) {
            if (this.x != null) {
                this.x.l();
            }
        } else {
            a.a(ht2, this.f, this.g, n, n2, n5, n6);
        }
        w w2 = this.b;
        n3 = !this.e ? -3618616 : this.z;
        w2.i(n3);
        int n9 = n + this.c;
        n4 = n2 + n4;
        if (this.i.length == 1 && this.f()) {
            this.x.a(ht2, n9, n4);
        } else {
            for (n3 = 0; n3 < this.i.length; ++n3) {
                if (n3 == this.J && this.e().a()) {
                    int n10 = ht2.g();
                    int n11 = ht2.f();
                    int n12 = ht2.h();
                    int n13 = ht2.d();
                    ht2.b(n, n2, n5, n6);
                    this.e().a(ht2, n9, n4);
                    ht2.a(n10, n11, n12, n13);
                    int n14 = this.e().h() + 4;
                    n7 += n14;
                    n9 += n14;
                }
                if ((w2 = this.a(n3, this.t_())) == null) continue;
                if (this.j[n3] == null) {
                    this.j[n3] = bk.a(this.i[n3], w2, this.a(n3) - n7, "...");
                }
                this.a(ht2, n9, n4, n3, w2);
                n4 += w2.l();
            }
        }
        this.b.i(0);
    }
}

