/*
 * Decompiled with CFR 0.152.
 */
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;

/*
 * Duplicate member names - consider using --renamedupmembers true
 */
public final class ck
implements jf,
as,
nf,
Runnable {
    private static volatile ck A;
    public volatile boolean c;
    private static final byte[] a;
    private static final int z;
    public static final int a;
    public static final long a;
    public static final int b;
    public static final int c;
    public static final int f;
    private final aa c;
    private final boolean f;
    private final ck f;
    private final Hashtable j;
    private final Object k;
    private final gu[] n;
    public final Hashtable a;
    public final String a;
    public final String b;
    public final as b;
    public final bq e;
    public final jt f;
    public final String k;
    public final String l;
    public final px p;
    private long m;
    private int m;
    private int g;
    private jv i;
    private int j;
    private int k;
    private iv k;
    private cn l;
    private cn n;
    private ke q;
    private long u;
    public int h;
    public iu h;
    public Vector h;
    public int s;
    public boolean a;
    public ke[] c;
    public iv c;
    public jt d;
    public int d;
    public int e;
    public gd e;
    public cw e;
    public long g;
    public int i;

    public void e(boolean bl2) {
        if (bl2) {
            try {
                this.w();
                this.g();
                return;
            }
            catch (IOException iOException) {
                me.a("FLASH", iOException);
            }
        }
    }

    public oa b(iv iv2) {
        oa oa2 = new oa();
        this.a(iv2, oa2);
        return oa2;
    }

    public oa c(iv iv2) {
        oa oa2 = new oa();
        this.b(iv2, oa2);
        return oa2;
    }

    public static long a(long l, long l2) {
        return l - l2;
    }

    public void a(int n, byte[] byArray, boolean bl2, boolean bl3) {
        this.a(new oo(n, byArray, bl2, bl3));
    }

    public dx a(ke ke2, int n, boolean bl2, boolean bl3) {
        return this.b(ke2, n, bl2, bl3);
    }

    public void a(DataOutput dataOutput) {
    }

    public void a(gd gd2) {
        dx.a(gd2);
        this.f.e = gd2;
    }

    public final int d(int n) {
        return ck.a(this.a(n), 64);
    }

    public final int e(int n) {
        return ck.a(this.b(n), 64);
    }

    public int e() {
        int n = this.e(this.d());
        return (n - this.c().b) * (5000 / n);
    }

    private static boolean a(String string, String[] stringArray) {
        for (int i = 0; i < stringArray.length; ++i) {
            if (!string.equals(stringArray[i])) {
                continue;
            }
            stringArray[i] = null;
            return true;
        }
        return false;
    }

    public static boolean f(iv iv2) {
        if (iv2 != null) {
            int n = iv2.a;
            int n2 = iv2.b;
            if (n > 23883332 && n < 46072278 && n2 > 123748627 && n2 < 143789063) {
                return true;
            }
        }
        return false;
    }

    public int e(iv iv2) {
        if (!this.m()) {
            if (!lh.r()) {
                if (!ck.f(iv2)) {
                    return 19;
                }
                return 20;
            }
            return 18;
        }
        return 22;
    }

    private static int g(iv iv2) {
        if (!ck.f(iv2)) {
            return 15;
        }
        return 16;
    }

    private byte p() {
        if (this.e.a) {
            return ke.a();
        }
        return 2;
    }

    public static synchronized ck a(String string, String string2, String string3, String string4) {
        if (A == null) {
            A = new ck(string, string2, string3, string4);
            return A;
        }
        throw new RuntimeException("Attempting to create multiple DataRequestDispatchers");
    }

    public static ck e() {
        return A;
    }

    public static long e(ck ck2) {
        return ck2.m;
    }

    public synchronized int k() {
        return this.b(this.e);
    }

    public synchronized int l() {
        return this.c(this.e);
    }

    private String a(mj mj2) {
        return this.b(mj2.a);
    }

    private String b(int n) {
        return this.k + '_' + n;
    }

    private mj d(int n) {
        return (mj)this.h.elementAt(n);
    }

    public final int b(int n) {
        return this.j >> this.d - n;
    }

    public final int c(int n) {
        return this.m >> this.d - n;
    }

    public final int a(int n) {
        return this.i >> this.d - n;
    }

    private void a(dx dx2) {
        this.a.put(dx2.e, dx2);
    }

    private static void a(long[] lArray, ke[] keArray, int n, int n2) {
        ke ke2 = keArray[n2];
        keArray[n2] = keArray[n];
        keArray[n] = ke2;
        long l = lArray[n2];
        lArray[n2] = lArray[n];
        lArray[n] = l;
    }

    public void a(iv iv2, oa oa2) {
        this.b(iv2, oa2);
        oa2.a += this.g;
        oa2.b += this.h;
    }

    public synchronized void a(int n, int n2) {
        this.a(this.c(n, n2));
    }

    public synchronized void p() {
        ++this.k;
    }

    public void b() {
        this.u = System.currentTimeMillis();
    }

    public void v() {
        this.u = System.currentTimeMillis();
    }

    private synchronized void q() {
        this.u = 0L;
        this.a = false;
        this.m = 0L;
    }

    public void s() {
        this.c = false;
    }

    private synchronized void r() {
        this.j.clear();
        this.h.removeAllElements();
        this.m = 0;
        this.k = 0;
        this.c = false;
        this.c.c(this.k);
    }

    public void ae() {
        this.a(this.e.a());
    }

    public static void ad() {
        A = null;
    }

    public static void f(ck ck2) {
        ck2.q();
    }

    public static gd c(ck ck2) {
        return ck2.e;
    }

    public static Hashtable b(ck ck2) {
        return ck2.j;
    }

    public static Object a(ck ck2) {
        return ck2.k;
    }

    public static int a(ck ck2) {
        return ck2.m;
    }

    public static int b(ck ck2) {
        return ck2.d++;
    }

    public static int g(ck ck2) {
        return ck2.d--;
    }

    public static int i(ck ck2) {
        return ck2.j--;
    }

    public static int d(ck ck2) {
        return ck2.j++;
    }

    public static int c(ck ck2) {
        return ck2.m++;
    }

    public static int h(ck ck2) {
        return ck2.m--;
    }

    private void h() {
        this.d = this.i * 4 / 5;
    }

    public void ac() {
        this.f.b.v();
    }

    public void d() {
        this.b.b();
    }

    public synchronized int f() {
        return this.m + this.d();
    }

    public int z() {
        return 15;
    }

    private int c() {
        return this.h.size();
    }

    public int g() {
        return this.f.h();
    }

    public iv d() {
        return this.e.a;
    }

    public cn c() {
        return this.e.b;
    }

    public boolean m() {
        return this.e.a;
    }

    public boolean z_() {
        return true;
    }

    public boolean A_() {
        return false;
    }

    public boolean y_() {
        return false;
    }

    private int b(cw cw2) {
        iv iv2 = cw2.a;
        cn cn2 = cw2.b;
        iv iv3 = iv2.a(this.g, this.h, cn2);
        return Math.abs(iv2.a((int)(-this.g), (int)(-this.h), (cn)cn2).a - iv3.a);
    }

    private int c(cw cw2) {
        iv iv2 = cw2.a;
        cn cn2 = cw2.b;
        iv iv3 = iv2.a(this.g, this.h, cn2);
        iv2 = iv2.a(-this.g, -this.h, cn2);
        int n = iv3.b - iv2.b;
        if (n >= 0) {
            return n;
        }
        return n + 360000000;
    }

    public static int i(int n) {
        if ((n = ck.b(n, 360)) < 90) {
            return a[n] & 0xFF;
        }
        if (n >= 180) {
            if (n < 270) {
                return -(a[n - 180] & 0xFF);
            }
            return -(a[360 - n] & 0xFF);
        }
        return a[180 - n] & 0xFF;
    }

    public static int h(int n) {
        if ((n = ck.b(n, 360)) >= 90) {
            if (n < 180) {
                return -(a[n - 90] & 0xFF);
            }
            if (n < 270) {
                return -(a[270 - n] & 0xFF);
            }
            return a[n - 270] & 0xFF;
        }
        return a[90 - n] & 0xFF;
    }

    /*
     * Enabled aggressive block sorting
     */
    public static int g(int n) {
        if (n <= 0) {
            return 0;
        }
        int n2 = (n >> 15) + 2;
        for (int i = 0; i < 32; ++i) {
            int n3 = n2 + n / n2 >> 1;
            if (n2 == n3) return n2;
            n2 = n3;
        }
        while (true) {
            if (n2 <= n / n2) {
                if (n2 * n2 > n - 2 * n2 - 1) {
                    return n2;
                }
                ++n2;
                continue;
            }
            --n2;
        }
    }

    private void b(long[] lArray, ke[] keArray, int n, int n2) {
        if (n2 > n) {
            int n3 = n;
            long l = lArray[n];
            ck.a(lArray, keArray, n, n2);
            for (int i = n; i < n2; ++i) {
                if (lArray[i] < l) continue;
                ck.a(lArray, keArray, i, n3);
                ++n3;
            }
            if (lArray[n2] > lArray[n3]) {
                ck.a(lArray, keArray, n2, n3);
            } else {
                n3 = n2;
            }
            this.b(lArray, keArray, n, n3 - 1);
            this.b(lArray, keArray, n3 + 1, n2);
        }
    }

    public static long a(long l, long l2, long l3) {
        if (l <= 9223372030926249001L) {
            long l4;
            long l5 = Math.min(l3, 3037000499L);
            l3 = l2 + l5 >> 1;
            while (true) {
                l4 = l3;
                if (l5 - l2 <= 1L) break;
                l3 = l - l4 * l4;
                if (l3 <= 0L) {
                    if (l3 >= 0L) break;
                    l3 = l4 + l2 >> 1;
                    l5 = l4;
                    continue;
                }
                l2 = l4;
                l3 = l4 + l5 + 1L >> 1;
            }
            if (l4 * l4 != l) {
                return l2;
            }
            return l4;
        }
        return 3037000499L;
    }

    static {
        f = 5;
        a = 4;
        int n = 0 + 1;
        a = 200;
        z = 3;
        c = 6000;
        b = 18000;
        int n2 = "[\u0000\u0004\t\r\u0011\u0016\u001a\u001e#'+048<AEIMQVZ^bfjnquy}\u00fe\u00fb\u00f7\u00f3\u00f0\u00ec\u00e9\u00e5\u00e2\u00de\u00db\u00d8\u00d5\u00d1\u00ce\u00cb\u00c8\u00c5\u00c2\u00bf\u00bd\u00ba\u00b7\u00b5\u00b2\u00b0\u00ad\u00ab\u00a9\u00a6\u00a4\u00a2\u00a0\u009e\u009c\u009b\u0099\u0097\u0096\u0094\u0093\u0091\u0090\u008f\u008e\u008c\u008b\u008a\u008a\u0089\u0088\u0087\u0087\u0086\u0086\u0086\u0085\u0085\u0085\u0085".charAt(0);
        byte[] byArray = new byte[n2];
        for (int i = 0; i < n2; ++i) {
            int n3 = n + 1;
            int n4 = "[\u0000\u0004\t\r\u0011\u0016\u001a\u001e#'+048<AEIMQVZ^bfjnquy}\u00fe\u00fb\u00f7\u00f3\u00f0\u00ec\u00e9\u00e5\u00e2\u00de\u00db\u00d8\u00d5\u00d1\u00ce\u00cb\u00c8\u00c5\u00c2\u00bf\u00bd\u00ba\u00b7\u00b5\u00b2\u00b0\u00ad\u00ab\u00a9\u00a6\u00a4\u00a2\u00a0\u009e\u009c\u009b\u0099\u0097\u0096\u0094\u0093\u0091\u0090\u008f\u008e\u008c\u008b\u008a\u008a\u0089\u0088\u0087\u0087\u0086\u0086\u0086\u0085\u0085\u0085\u0085".charAt(n);
            if (n4 > 127) {
                n4 = 127 - n4;
            }
            n = n3;
            byArray[i] = (byte)n4;
        }
        a = byArray;
    }

    private void l() {
        if (this.a) {
            this.a = false;
            Thread thread = new Thread(this);
            thread.setPriority(1);
            thread.start();
        }
    }

    public void z() {
        if (this.c) {
            this.c = false;
            this.f.k();
            dx.h();
        }
    }

    public void ab() {
        if (!this.c) {
            this.c = true;
            this.f.l();
        }
    }

    public int b() {
        as as2 = this.f.b;
        if (as2 != null) {
            return as2.f();
        }
        return 0;
    }

    public synchronized void a(iv iv2) {
        if (iv2 != null) {
            this.a(this.e.a(iv2));
        }
    }

    public synchronized void a(cn cn2) {
        if (cn2 != null) {
            this.a(this.e.a(cn2));
        }
    }

    private static boolean a(long l) {
        return System.currentTimeMillis() - l > (long)500;
    }

    public synchronized boolean k() {
        return this.m > 0;
    }

    public synchronized boolean b() {
        return this.k > 0;
    }

    public synchronized boolean l() {
        return this.j > 0;
    }

    public synchronized boolean a() {
        return this.d > 0;
    }

    public synchronized boolean d() {
        return this.c && this.d < z && (this.p.b() || this.d == 0);
    }

    public static boolean a(IOException iOException) {
        String string = iOException.getMessage();
        return string != null && (string.equals("Network can't access") || string.equals("Network unavailable due to Network Guard setting") || string.equals("Network unavailable due to Data Roam Guard setting"));
    }

    private static int b(int n, int n2) {
        if ((n %= n2) >= 0) {
            return n;
        }
        return n + n2;
    }

    public static int a(int n, int n2) {
        if (n < 0) {
            return (n - (n2 - 1)) / n2;
        }
        return (n + (n2 - 1)) / n2;
    }

    public String a(String string, String string2) {
        if (string2 != null) {
            return this.j.put(string, string2);
        }
        return (String)this.j.remove(string);
    }

    public final String b() {
        StringBuffer stringBuffer = new StringBuffer(this.l);
        if (stringBuffer.length() > 0 && this.k.length() > 0) {
            stringBuffer.append(' ');
        }
        stringBuffer.append(this.k);
        return stringBuffer.toString();
    }

    public void d(boolean bl2) {
        if (bl2) {
            this.y();
        }
        ck ck2 = this.f;
        String cfr_ignored_0 = ck2.l;
        nz.b(ck2);
        ck2.k();
        ck2.b.e(bl2);
    }

    public synchronized void d(iv iv2) {
        iv iv3 = this.e.a;
        try {
            this.a(iv2);
            this.a((ht)null, true, false);
            return;
        }
        finally {
            this.a(iv3);
        }
    }

    /*
     * Enabled aggressive block sorting
     */
    public boolean a(iv iv2, boolean bl2) {
        dx dx2 = this.f.a(new ke(this.p(), iv2, this.e.b), 0, false, bl2);
        return bl2 && dx2.a || dx2.c();
    }

    public boolean a(int n) {
        boolean bl2 = n != this.i && this.i != -1;
        this.i = n;
        if (bl2) {
            this.r();
            this.c = true;
        }
        return bl2;
    }

    public final int a() {
        boolean bl2 = (this.g & 2) != 0 && this.h > 0;
        if (bl2) {
            return this.h;
        }
        return 0;
    }

    public int h() {
        Hashtable hashtable = this.a;
        synchronized (hashtable) {
            int n = 0;
            Enumeration enumeration = this.a.elements();
            while (enumeration.hasMoreElements()) {
                n += ((dx)enumeration.nextElement()).e();
            }
            return n;
        }
    }

    public ke[] b() {
        long l = System.currentTimeMillis();
        ke[] keArray = new ke[this.a.size()];
        long[] lArray = new long[this.a.size()];
        int n = 0;
        Enumeration enumeration = this.a.keys();
        while (enumeration.hasMoreElements()) {
            keArray[n] = (ke)enumeration.nextElement();
            lArray[n] = l - ((dx)this.a.get((Object)keArray[n])).b;
            ++n;
        }
        this.b(lArray, keArray, 0, keArray.length - 1);
        return keArray;
    }

    private synchronized boolean i() {
        int n;
        String[] stringArray = this.c.f(this.k);
        boolean bl2 = true;
        for (n = this.c() - 1; n >= 0; --n) {
            mj mj2 = (mj)this.h.elementAt(n);
            if (ck.a(this.a(mj2), stringArray)) continue;
            bl2 = false;
            this.a(mj2, n);
        }
        boolean bl3 = ck.a(this.k, stringArray);
        for (n = 0; n < stringArray.length; ++n) {
            String string = stringArray[n];
            if (string == null) continue;
            bl2 = false;
            this.c.b(string);
        }
        if (this.c() > 0 && !bl3) {
            return false;
        }
        return bl2;
    }

    private synchronized int d() {
        int n = 0;
        int n2 = this.h.size();
        for (int i = 0; i < n2; ++i) {
            n += this.d(i).b();
        }
        return n;
    }

    private synchronized cn c(int n, int n2) {
        cn cn2 = cn.b(this.e(this.e.a));
        while (cn2.b() != null && (this.b(this.e.a(cn2)) < n || this.c(this.e.a(cn2)) < n2)) {
            cn2 = cn2.b();
        }
        return cn2;
    }

    private void b(iv iv2, oa oa2) {
        oa2.a = iv2.a(this.e.b) - this.d;
        int n = this.e.b.a;
        if (oa2.a >= -n / 2) {
            if (oa2.a > n / 2) {
                oa2.a -= n;
            }
        } else {
            oa2.a += n;
        }
        oa2.b = iv2.b(this.e.b) - this.m;
    }

    private void b(mj mj2) {
        int n = mj2.a();
        this.c = true;
        this.k = Math.max(this.k, mj2.a);
        this.h.addElement(mj2);
        for (int i = 0; i < n; ++i) {
            mz mz2 = mj2.a(i);
            this.j.put(mz2.a, mj2);
        }
    }

    private void a(mj mj2, int n) {
        if (mj2.c()) {
            int n2 = mj2.a();
            this.c = true;
            mj2.d();
            this.h.removeElementAt(n);
            for (int i = 0; i < n2; ++i) {
                mz mz2 = mj2.a(i);
                this.j.remove(mz2.a);
            }
        }
    }

    public void b(int n, int n2) {
        this.e = n2;
        this.i = n;
        this.g = n / 2;
        this.h = n2 / 2;
        this.k = (n + 128 - 1) / 128 + 1;
        this.j = (n2 + 128 - 1) / 128 + 1;
        this.c = new ke[this.k * this.j];
        this.b(true);
        this.f.d();
        this.s = 0;
        this.a = false;
    }

    public synchronized void a(cw cw2) {
        if (cw2 != null) {
            this.e = cw2;
            int n = this.e(this.d());
            if (cw2.b.b > n) {
                this.e = cw2.a(cn.b(n));
            }
            this.d = this.e.a.a(this.e.b);
            this.m = this.e.a.b(this.e.b);
            this.b(false);
            this.f.d();
            this.s = 0;
            this.a = false;
        }
    }

    private static le a(ke ke2, ke ke3, le le2) {
        int n = ke2.a == ke3.a * 2 ? 0 : 64;
        int n2 = ke2.b == ke3.b * 2 ? 0 : 64;
        le le3 = lh.k().g().a(128, 128);
        if (le3.c().a(le2, 0, 0, 128, 128, n, n2, 64, 64)) {
            return le3;
        }
        return null;
    }

    public synchronized void y() {
        try {
            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(14);
            DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);
            dataOutputStream.writeShort(2);
            iv.a(this.e.a, dataOutputStream);
            dataOutputStream.writeInt(this.e.b.b);
            int n = !this.e.a ? 0 : 1;
            dataOutputStream.writeByte(n);
            byte[] byArray = byteArrayOutputStream.toByteArray();
            lh.k().f().a("Map info", byArray);
            return;
        }
        catch (IOException iOException) {
            me.a("MAP", iOException);
            return;
        }
    }

    public boolean a(DataInput dataInput) {
        long l = this.g = dataInput.readLong();
        try {
            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
            new DataOutputStream(byteArrayOutputStream).writeLong(l);
            ByteArrayOutputStream byteArrayOutputStream2 = byteArrayOutputStream;
            aa aa2 = lh.k().f();
            aa2.a("SessionID", byteArrayOutputStream2.toByteArray());
            aa2.h();
            return true;
        }
        catch (IOException iOException) {
            throw new RuntimeException(iOException.toString());
        }
    }

    private void a(iv iv2, boolean bl2, boolean bl3) {
        this.c = this.k;
        this.n = this.l;
        this.k = iv2;
        this.l = this.e.b;
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);
        try {
            iv.a(iv2, dataOutputStream);
            iv.a(this.e.a, dataOutputStream);
            dataOutputStream.writeShort(this.e.b.b);
            dataOutputStream.writeInt(this.b(this.e));
            dataOutputStream.writeInt(this.c(this.e));
            dataOutputStream.writeBoolean(bl2);
            dataOutputStream.writeBoolean(bl3);
            A.a(7, byteArrayOutputStream.toByteArray(), false, false);
        }
        catch (IOException iOException) {
            throw new RuntimeException(iOException.toString());
        }
        px.a(this.e.a, this.e.b.b);
    }

    private synchronized void a(mj mj2, byte[] byArray, int n) {
        if (this.m == 0) {
            this.c.b(new byte[0], this.k);
        }
        try {
            mj2.a(this.b(n), n, byArray);
            this.b(mj2);
            return;
        }
        catch (IllegalStateException illegalStateException) {
            me.a("FLASH", illegalStateException);
            return;
        }
        catch (dd dd2) {
            this.a(dd2, false);
            return;
        }
    }

    private void k() {
        if (!this.a) {
            this.a = true;
            Object object = this.k;
            synchronized (object) {
                this.k.notifyAll();
                return;
            }
        }
    }

    public void af() {
        mj.e();
        this.i();
        Hashtable hashtable = this.a;
        synchronized (hashtable) {
            this.c(true);
            if (!this.f) {
                this.i = Math.max(this.i - 8000, 25000);
                this.h();
            } else {
                this.i = 25000;
                this.h();
            }
            this.j();
            return;
        }
    }

    private void i() {
        Hashtable hashtable = this.a;
        synchronized (hashtable) {
            this.c = true;
            this.j.clear();
            Enumeration enumeration = this.a.elements();
            while (enumeration.hasMoreElements()) {
                ((dx)enumeration.nextElement()).a();
            }
            this.c = false;
            return;
        }
    }

    public void a(jf jf2) {
        for (int i = 0; i < this.h.size(); ++i) {
            bq bq2 = (bq)this.h.elementAt(i);
            if (!bq2.a(jf2.z())) {
                continue;
            }
            bq2.a(jf2);
            return;
        }
        this.e.a(jf2);
    }

    public void u() {
        this.c = true;
        for (int i = 0; i < this.h.size(); ++i) {
            ((bq)this.h.elementAt(i)).b();
        }
        this.e.b();
    }

    public void aa() {
        block5: {
            synchronized (this) {
                --this.k;
                if (!this.b()) {
                    break block5;
                }
                return;
            }
        }
        for (int i = 0; i < this.h.size(); ++i) {
            ((bq)this.h.elementAt(i)).c();
        }
        this.e.c();
    }

    /*
     * Exception decompiling
     */
    public void run() {
        /*
         * This method has failed to decompile.  When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
         * 
         * org.benf.cfr.reader.util.ConfusedCFRException: Back jump on a try block [egrp 0[TRYBLOCK] [1 : 30->55)] java.lang.Throwable
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op02WithProcessedDataAndRefs.insertExceptionBlocks(Op02WithProcessedDataAndRefs.java:2283)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:415)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
         *     at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
         *     at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1055)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
         *     at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
         *     at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
         *     at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
         *     at org.benf.cfr.reader.Main.main(Main.java:54)
         */
        throw new IllegalStateException("Decompilation failed");
    }

    public dx a(ke ke2) {
        mj mj2 = (mj)this.j.get(ke2);
        mz mz2 = mj2 != null ? mj2.a(ke2) : null;
        if (mz2 != null) {
            mj2 = mz2.b;
            dx dx2 = mj2.a(this.a(mj2), ke2);
            if (dx2 == null) {
                synchronized (this) {
                    int n;
                    int n2;
                    block8: {
                        n2 = mj2.a;
                        int n3 = this.h.size();
                        for (n = 0; n < n3; ++n) {
                            if (((mj)this.h.elementAt((int)n)).a != n2) {
                                continue;
                            }
                            break block8;
                        }
                        n = -1;
                    }
                    this.a(mj2, n);
                    this.c.b(this.b(n2));
                }
            }
            if (dx2 != null) {
                mz2.a(System.currentTimeMillis());
            }
            return dx2;
        }
        return null;
    }

    public void c(int n) {
        boolean bl2;
        iu iu2 = this.h;
        synchronized (this) {
            bl2 = false;
            if (!this.a) {
                bl2 = true;
                this.a = true;
                this.u = 0L;
            }
        }
        boolean bl3 = this.p.a();
        boolean bl4 = n == 3 && bl3;
        if (!bl4 && bl2 && iu2 != null) {
            iu2.a(n, bl3);
        }
    }

    public static void a(ck ck2, int n) {
        boolean bl2 = false;
        synchronized (ck2) {
            ck2.p.c();
            if (ck2.a) {
                ck2.m = ck2.m >= (long)2000 ? ck2.m * (long)f / (long)a : (long)2000;
                if (ck2.m > 300000L) {
                    ck2.m = 300000L;
                }
            } else {
                ck2.m = a;
                if (ck2.u != 0L) {
                    if (ck2.u + (long)15000 < System.currentTimeMillis()) {
                        bl2 = true;
                    }
                } else {
                    ck2.u = System.currentTimeMillis();
                }
            }
        }
        if (bl2) {
            if (n == 3 && ck2.p.c() && !ck2.p.a()) {
                n = 4;
            }
            ck2.c(n);
        }
    }

    public ck(ck ck2, String string, int n, int n2) {
        this.c = lh.k().f();
        this.i = -1;
        this.h = new Vector();
        this.j = new Hashtable();
        this.k = 0;
        this.m = 0;
        this.f = ck2;
        this.k = string;
        this.j = n - 2000;
        this.u = System.currentTimeMillis();
        this.m = System.currentTimeMillis() + (long)2113;
        this.d = n2 - 1;
        this.c = true;
        this.m();
        this.i();
    }

    private ck(String string, String string2, String string3, String string4) {
        long l;
        block2: {
            block4: {
                block3: {
                    this.h = new Vector();
                    this.c = false;
                    this.m = 0L;
                    this.u = 0L;
                    this.d = 0;
                    this.m = 0;
                    this.j = 0;
                    this.k = new Object();
                    this.h = -1;
                    if (string == null || string.length() == 0) break block3;
                    this.a = string;
                    this.k = string3;
                    this.b = string2;
                    this.l = string4;
                    this.p = lh.k().e();
                    this.s = 0;
                    this.i = 0;
                    this.e = new bq(this, this.a, new Vector(), 0);
                    DataInput dataInput = nz.c("SessionID");
                    if (dataInput == null) break block4;
                    try {
                        l = dataInput.readLong();
                        break block2;
                    }
                    catch (IOException iOException) {
                        lh.k().f().a("SessionID", null);
                    }
                }
                throw new IllegalArgumentException();
            }
            l = 0L;
            this.a(this);
        }
        this.g = l;
        this.j = new Hashtable();
    }

    public ck(int n, int n2, int n3, int n4, String string) {
        this.k = new Object();
        this.a = true;
        this.m = 26;
        if (n != -1) {
            this.i = n;
            if (n2 == -1) {
                this.h();
            } else {
                this.d = n2;
            }
        } else {
            this.f = true;
            this.i = 25000;
            this.h();
        }
        this.j = new Hashtable();
        this.a = new Hashtable();
        this.c = false;
        this.b = n3 > 0 ? new ck(this, string, n3, n4) : new gu();
        this.l();
        nz.a(this);
    }

    public ck(lk lk2) {
        lk lk3 = lk2.f(1);
        lk lk4 = lk2.f(33);
        lk2 = lk2.f(49);
        this.a = lk3.b(2);
        this.g = lk3.d(3);
        this.h = lk3.d(17);
        this.i = lk3.d(4);
        this.j = lk3.d(5);
        lk3.d(6);
        lk3.d(7);
        this.b = lk3.g(8);
        this.c = iv.a(lk3.f(10));
        lk3.g(11);
        this.k = lk3.g(12);
        this.l = lk3.g(13);
        this.d = lk3.d(14);
        this.m = lk3.d(15);
        this.e = gu.h(lk4.d(34));
        lk4.d(35);
        lk4.d(36);
        int n = lk2.i(52);
        this.n = new gu[n];
        for (int i = 0; i < n; ++i) {
            this.n[i] = new gu(lk2.e(52, i));
        }
        this.f = new jt(this);
    }

    public final gu f(int n) {
        if (this.n.length != 0) {
            int n2 = gu.a(n, this.n[0].c);
            int n3 = 0;
            for (int i = 1; i < this.n.length; ++i) {
                int n4 = gu.a(n, this.n[i].c);
                if (n4 >= n2) {
                    n4 = n2;
                } else {
                    n3 = i;
                }
                n2 = n4;
            }
            if (n2 < 5461) {
                return this.n[n3];
            }
        }
        return null;
    }

    public synchronized cn a(iv[] ivArray, iv iv2) {
        if (ivArray.length >= 2) {
            int n;
            int n2;
            int n3;
            int n4;
            int n5 = n4 = ivArray[0].a;
            int n6 = n3 = ivArray[0].b;
            for (n2 = 0; n2 < ivArray.length; ++n2) {
                n = ivArray[n2].a;
                int n7 = ivArray[n2].b;
                if (n < n5) {
                    n5 = n;
                }
                if (n <= n4) {
                    n = n4;
                }
                n4 = n;
                n = n7 >= n6 ? n6 : n7;
                n6 = n;
                n = n7 <= n3 ? n3 : n7;
                n3 = n;
            }
            n = n4 - n5;
            n2 = n3 - n6;
            if (iv2 != null) {
                n += Math.abs(iv2.a - (n4 + n5) / 2) * 2;
                n2 += Math.abs(iv2.b - (n3 + n6) / 2) * 2;
                this.e = this.e.a(iv2);
            }
            return this.c(n, n2);
        }
        throw new IllegalArgumentException();
    }

    public boolean a(ht ht2, boolean bl2, boolean bl3, boolean bl4, boolean bl5) {
        if (this.e != 0 && this.i != 0) {
            int n;
            if (!(ht2 == null || this.m() && (n = ke.a() == 6 ? 1 : 0) == 0)) {
                if (this.k != null && this.l == this.e.b) {
                    iv iv2 = null;
                    oa oa2 = this.c(this.k);
                    if (Math.abs(oa2.a) <= this.i && Math.abs(oa2.b) <= this.e) {
                        n = 0;
                        int n2 = 0;
                        if (oa2.a >= -this.g) {
                            if (oa2.a > this.g) {
                                n2 = -this.i;
                            }
                        } else {
                            n2 = this.i;
                        }
                        if (oa2.b >= -this.h) {
                            if (oa2.b > this.h) {
                                n = -this.e;
                            }
                        } else {
                            n = this.e;
                        }
                        if (n != 0 || n2 != 0) {
                            iv2 = this.k.a(n2, n, this.e.b);
                        }
                    } else {
                        iv2 = this.e.a;
                    }
                    if (iv2 != null && (this.c == null || this.n != this.l || this.e.a.a(iv2) < this.e.a.a(this.k))) {
                        this.a(iv2, bl3, bl4);
                    }
                } else {
                    this.a(this.e.a, bl3, bl4);
                }
            }
            return this.a(ht2, bl2, bl5);
        }
        throw new IllegalStateException("Map has zero size");
    }

    private void b(boolean bl2) {
        ke ke2 = this.q;
        iv iv2 = this.e.a;
        cn cn2 = this.e.b;
        int n = ke.a(iv2, cn2) - this.k / 2;
        int n2 = ke.b(iv2, cn2) - this.j / 2;
        ke ke3 = new ke(this.p(), iv2, cn2);
        int n3 = this.k % 2 != 0 ? 0 : 1;
        int n4 = this.d - ke3.b();
        if (n3 != 0 && n4 > 64) {
            ++n;
        }
        n3 = this.j % 2 != 0 ? 0 : 1;
        n4 = this.m - ke3.c();
        if (n3 != 0 && n4 > 64) {
            ++n2;
        }
        this.q = new ke(this.p(), n, n2, cn2);
        if ((bl2 || ke2 == null || !ke2.equals(this.q)) && this.c != null) {
            n2 = 0;
            byte by2 = this.p();
            for (n = 0; n < this.k; ++n) {
                for (n3 = 0; n3 < this.j; ++n3) {
                    this.c[n2] = new ke(by2, this.q.a + n, this.q.b + n3, this.e.b);
                    ++n2;
                }
            }
        }
    }

    public ck(int n, int n2, int n3, iv iv2, cn cn2, int n4) {
        this.f = new ck(n, n2, n3, n4, "Tiles");
        n = 0;
        iv iv3 = null;
        this.e = new cw(iv2, cn.b(3), false);
        byte[] byArray = lh.k().f().g("Map info");
        n2 = 0;
        n3 = 0;
        if (byArray != null) {
            try {
                DataInputStream dataInputStream = new DataInputStream(new ByteArrayInputStream(byArray));
                if (dataInputStream.readUnsignedShort() == 2) {
                    iv3 = iv.a(dataInputStream);
                    n = dataInputStream.readInt();
                    n2 = dataInputStream.readUnsignedByte();
                    n3 = 1;
                }
            }
            catch (IOException iOException) {
                me.a("MAP", iOException);
                lh.k().f().b("Map info");
            }
        }
        if (n3 != 0) {
            n2 = (n2 & 1) == 0 ? 0 : 1;
            this.a(new cw(iv3, cn.b(Math.min(n, ck.g(iv3))), n2 != 0));
        } else {
            this.a(new cw(iv2, cn2, false));
        }
        this.c = true;
    }

    private synchronized void m() {
        try {
            DataInputStream dataInputStream;
            this.c = true;
            byte[] byArray = this.c.d(this.k);
            if (byArray != null && (dataInputStream = new DataInputStream(new ByteArrayInputStream(byArray))).readInt() == 7) {
                dataInputStream.readBoolean();
                this.i = dataInputStream.readShort();
                int n = dataInputStream.readInt();
                for (int i = 0; i < n; ++i) {
                    this.b(mj.a(dataInputStream));
                }
                this.m = byArray.length;
                this.c = false;
            }
        }
        catch (IOException iOException) {
            me.a("FLASH", iOException);
        }
        if (this.c) {
            this.r();
        }
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    private synchronized boolean g() {
        boolean bl2 = true;
        if (!this.c) return true;
        int n = this.h.size();
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);
        dataOutputStream.writeInt(7);
        dataOutputStream.writeBoolean(false);
        dataOutputStream.writeShort(this.i);
        dataOutputStream.writeInt(n);
        for (int i = 0; i < n; ++i) {
            this.d(i).a(dataOutputStream);
        }
        byteArrayOutputStream.close();
        byte[] byArray = byteArrayOutputStream.toByteArray();
        try {
            this.c.a(byArray, this.k);
        }
        catch (dd dd2) {
            this.a(dd2, true);
            bl2 = false;
        }
        this.m = byArray.length;
        this.c = false;
        return bl2;
    }

    private void a(dd dd2, boolean bl2) {
        int n;
        block5: {
            block4: {
                n = this.f();
                int n2 = this.c();
                StringBuffer stringBuffer = new StringBuffer().append("FLASH ").append(n).append("B ").append(n2).append("R");
                String string = !bl2 ? "" : " catalog";
                me.b(stringBuffer.append(string).toString(), dd2);
                if (dd2.a != -2) break block4;
                string = this.k + "_Test";
                try {
                    this.c.a(new byte[0], string);
                    this.c.b(string);
                    bl2 = true;
                }
                catch (dd dd3) {
                    bl2 = false;
                }
                if (bl2) break block5;
                this.d = n2;
            }
            return;
        }
        this.j = n - 1000;
    }

    /*
     * WARNING - Removed back jump from a try to a catch block - possible behaviour change.
     * Unable to fully structure code
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    public void a(Vector var1_1, bq var2_2) {
        block54: {
            block52: {
                block51: {
                    block48: {
                        block53: {
                            block50: {
                                var7_3 = null;
                                var5_4 = null;
                                var15_5 = new ByteArrayOutputStream();
                                var9_6 = "?";
                                var11_7 = null;
                                var14_8 = false;
                                var21_9 = null;
                                var12_10 = new StringBuffer();
                                var20_11 = null;
                                for (var4_12 = 0; var4_12 < var1_1.size(); ++var4_12) {
                                    var6_13 = (jf)var1_1.elementAt(var4_12);
                                    if (!(var6_13 instanceof ps) || ed.b(var19_14 = ((ps)var6_13).a())) continue;
                                    var12_10.append(var9_6);
                                    var9_6 = "&";
                                    var12_10.append(var19_14);
                                }
                                var9_6 = var12_10.toString();
                                ed.b(var9_6);
                                var3_15 = new DataOutputStream(var15_5);
                                if (this.j.size() > 0 && var2_2.a(25)) {
                                    var6_13 = new ll(this.j);
                                    if (var1_1.size() > 0) {
                                        if ((jf)var1_1.elementAt(0) instanceof ll) {
                                            var1_1.setElementAt(var6_13, 0);
                                        } else {
                                            var1_1.insertElementAt(var6_13, 0);
                                        }
                                    } else {
                                        var1_1.insertElementAt(var6_13, 0);
                                    }
                                }
                                if (var2_2.c != 0) {
                                    if (var2_2.c == 1) {
                                        var3_15.writeShort(23);
                                        var3_15.writeLong(this.g);
                                        var3_15.writeUTF("");
                                        var3_15.writeUTF("");
                                        var3_15.writeUTF("");
                                        var3_15.writeUTF("");
                                    }
                                } else {
                                    var3_15.writeShort(23);
                                    var3_15.writeLong(this.g);
                                    var3_15.writeUTF(lh.o());
                                    var3_15.writeUTF(this.b);
                                    var3_15.writeUTF(this.k);
                                    var3_15.writeUTF(this.l);
                                }
                                for (var4_12 = 0; var4_12 < var1_1.size(); ++var4_12) {
                                    v0 = (jf)var1_1.elementAt(var4_12);
                                    var3_15.writeByte(v0.z());
                                    v0.a(var3_15);
                                }
                                var3_15.flush();
                                var13_16 = var15_5.toByteArray();
                                try {
                                    try {
                                        var22_22 = System.currentTimeMillis();
                                        var20_11 = var5_4 = this.p.a(var2_2.k + var9_6, true);
                                        var5_4.a("Content-Type", "application/binary");
                                        var5_4.a("Content-Length", "" + var13_16.length);
                                        var11_7 = var3_15 = var5_4.a();
                                        var3_15.write(var13_16);
                                        this.s += var13_16.length;
                                        var21_9 = var7_3 = var5_4.b();
                                        var4_12 = var5_4.d();
                                        var9_6 = var5_4.e();
                                        var24_23 = System.currentTimeMillis() - var22_22;
                                        if (var4_12 == 501) break block48;
                                        if (var4_12 != 200) throw new IOException();
                                    }
                                    catch (Throwable var10_19) {
                                        var5_4 = var20_11;
                                        var7_3 = var21_9;
                                        var3_15 = var11_7;
                                        break block50;
                                    }
                                    catch (IOException var18_27) {
                                        var5_4 = var20_11;
                                        var7_3 = var21_9;
                                        var3_15 = var11_7;
                                        if (ck.a(var18_27) == false) throw var18_27;
                                        var14_8 = true;
                                        throw var18_27;
                                    }
                                    catch (SecurityException var10_20) {
                                        var5_4 = var20_11;
                                        var7_3 = var21_9;
                                        var3_15 = var11_7;
                                        throw var10_20;
                                    }
                                }
                                catch (Throwable var10_18) {
                                    break block50;
                                }
                                if ("application/binary".equals(var9_6) == false) throw new IOException();
                                var4_12 = (int)var5_4.c();
                                this.i += var4_12;
                                if (var7_3.readUnsignedShort() != 23) break block53;
                                break block54;
                            }
                            if (var7_3 != null) {
                                var7_3.close();
                            }
                            ** GOTO lbl-1000
                        }
                        this.c(1);
                        var7_3.close();
                        ** GOTO lbl-1000
                    }
                    this.c(2);
                    try {}
                    catch (IOException v1) {
                        break block51;
                    }
                    if (var7_3 != null) {
                        var7_3.close();
                    }
                }
                try {}
                catch (IOException v2) {
                    break block52;
                }
                var3_15.close();
            }
            try {
                var5_4.f();
                return;
            }
            catch (IOException v3) {
                return;
            }
        }
        for (var8_24 = 0; var8_24 < var1_1.size(); ++var8_24) {
            try {
                var6_13 = (jf)var1_1.elementAt(var8_24);
                var16_25 = var7_3.readUnsignedByte();
                if (var16_25 != var6_13.z()) {
                    throw new IOException("RT: " + var16_25 + " != " + var6_13.z());
                }
                var17_26 = this.h;
                if (var6_13.a((DataInput)var7_3)) {
                    if (var17_26 == null || var6_13 == this) continue;
                    var17_26.a(var6_13);
                    continue;
                }
                var2_2.c.insertElementAt(var6_13, 0);
                continue;
            }
            catch (IOException var10_21) {
                var4_12 = 0;
                while (var4_12 < var8_24) {
                    var1_1.removeElementAt(0);
                    ++var4_12;
                }
                throw var10_21;
            }
        }
        var8_24 = (int)(System.currentTimeMillis() - var22_22);
        me.a((short)22, "fb", "" + var24_23);
        me.a((short)22, "lb", "" + var8_24);
        if (var4_12 >= 8192 && var8_24 <= 60000) {
            this.h = var4_12 * 1000 / var8_24;
        }
        var1_1.removeAllElements();
        {
            var7_3.close();
        }
        {
            var3_15.close();
        }
        {
            var5_4.f();
            return;
        }
        catch (IOException v4) {}
lbl-1000:
        // 2 sources

        {
            var3_15.close();
        }
        {
            var5_4.f();
            return;
        }
        catch (IOException v5) {}
lbl-1000:
        // 2 sources

        {
            if (var3_15 == null || var14_8) ** GOTO lbl-1000
            var3_15.close();
        }
lbl-1000:
        // 2 sources

        {
            if (var5_4 == null) throw var10_17;
            var5_4.f();
        }
        throw var10_17;
    }

    /*
     * Unable to fully structure code
     * Could not resolve type clashes
     */
    private boolean a(ht var1_1, boolean var2_2, boolean var3_3) {
        block22: {
            block23: {
                var18_5 = this.h + this.q.c() - this.e.a.b(this.e.b);
                for (var9_4 = this.g + this.q.b() - this.e.a.a(this.e.b); var9_4 > 0; var9_4 -= this.e.b.a) {
                }
                var15_7 = System.currentTimeMillis();
                var6_8 = 0;
                var4_9 = false;
                this.u = 0x7FFFFFFFFFFFFFFFL;
                for (var10_6 = 0; var10_6 < this.k; ++var10_6) {
                    var8_12 = 0;
                    while (var8_12 < this.j) {
                        var7_11 = var18_5 + var8_12 * 128;
                        var17_14 = this.c[var4_9];
                        var20_15 = var4_9 + 1;
                        var13_13 = var9_4 + var10_6 * 128;
                        if (!var17_14.d()) {
                            v0 = this.g - (var13_13 + 64);
                            v1 = this.h - (var7_11 + 64);
                            var21_16 = v0 * v0 + v1 * v1;
                            var4_9 = ck.a(var15_7) == false;
                            var5_10 = this.f.a(var17_14, var21_16, var2_2, var4_9);
                            if (this.d != null && !ck.a(var15_7)) {
                                this.d.a(var5_10, var2_2);
                            }
                            var4_9 = false;
                            if (var1_1 != null && (var5_10.d() || var3_3)) {
                                var1_1.a(var5_10.g(), var13_13, var7_11);
                                var5_10.a(var15_7, this.m);
                                if (var5_10.d > 0) {
                                    if (var5_10.d == 1) {
                                        this.u = Math.min(var5_10.c, this.u);
                                    }
                                    if (false && var5_10.d == 1) {
                                        me.a((short)22, "pc", "" + (System.currentTimeMillis() - var5_10.c));
                                    }
                                    var4_9 = true;
                                }
                            }
                        } else if (var1_1 != null) {
                            var1_1.a(0xFFFFFF);
                            var1_1.c(var13_13, var7_11, 128, 128);
                            var4_9 = true;
                        } else {
                            var4_9 = false;
                        }
                        var7_11 = var4_9 == false ? 0 : 1;
                        ++var8_12;
                        var4_9 = var20_15;
                        var6_8 += var7_11;
                    }
                }
                if (var1_1 == null) break block22;
                if (this.u == 0x7FFFFFFFFFFFFFFFL) break block23;
                switch (this.p()) {
                    case 6: {
                        var11_17 = "h";
                        ** GOTO lbl59
                    }
                    case 3: {
                        var11_17 = "s";
                        ** GOTO lbl59
                    }
                    case 2: {
                        var11_17 = "m";
lbl59:
                        // 3 sources

                        var22_18 = System.currentTimeMillis() - this.u;
                        if (this.s == 0) {
                            me.a((short)22, "tf" + var11_17, "" + var22_18);
                            this.a = true;
                        }
                        if (this.s < var6_8 && var6_8 == this.k * this.j) {
                            var14_19 = this.a == false ? "tp" : "tc";
                            me.a((short)22, var14_19 + var11_17, "" + var22_18);
                        }
                        this.s = var6_8;
                        ** break;
                    }
                }
            }
            this.s = var6_8;
        }
        if (var2_2) {
            var12_20 = this.f;
            if (var12_20.i != null) {
                var12_20.i.a = true;
                var19_21 = var12_20.i;
                var12_20.i = null;
                ck.A.a(var19_21);
            }
        }
        if (this.d != null) {
            this.d.m();
        }
        mj.e();
        this.m = var15_7;
        return ck.a(var15_7) == false;
    }

    /*
     * Unable to fully structure code
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    private dx b(ke var1_1, int var2_2, boolean var3_3, boolean var4_4) {
        block29: {
            block30: {
                var6_5 = (dx)this.a.get(var1_1);
                var12_6 = System.currentTimeMillis();
                if (var6_5 != null) break block29;
                if (!this.c) break block30;
                var6_5 = new dx(var1_1, null, true);
                break block29;
            }
            var11_7 = this.a;
            synchronized (var11_7) {
                block34: {
                    block33: {
                        block27: {
                            block31: {
                                block32: {
                                    this.c = true;
                                    try {}
                                    catch (Throwable var9_8) {
                                        this.c = false;
                                        throw var9_8;
                                    }
                                    var6_5 = this.b.a(var1_1);
                                    if (var6_5 != null) break block31;
                                    if (var4_4 == 0) break block32;
                                    var5_11 = (le)this.j.get(var1_1);
                                    if (var5_11 != null) break block33;
                                    var14_12 = System.currentTimeMillis();
                                    if (var14_12 < this.m + (long)10000) {
                                        var5_11 = null;
                                        break block27;
                                    } else {
                                        try {
                                            var7_13 = var1_1.a(false);
                                            if (var7_13 != null) {
                                                var4_4 = var7_13.c.a(var1_1.c);
                                                var6_5 = this.b(var7_13, 0, false, false);
                                                if (var4_4 == 2 && var6_5.d()) {
                                                    var5_11 = ck.a(var1_1, var7_13, var6_5.g());
                                                    break block27;
                                                }
                                                if (var4_4 != 4) {
                                                    if (var4_4 == 2) {
                                                        if (var6_5.d()) {
                                                            var5_11 = null;
                                                            break block27;
                                                        } else {
                                                            ** GOTO lbl-1000
                                                        }
                                                    }
                                                } else lbl-1000:
                                                // 3 sources

                                                {
                                                    block28: {
                                                        var8_14 = new Vector<ke>();
                                                        var8_14.addElement(var1_1);
                                                        var5_11 = null;
                                                        var7_13 = var1_1;
                                                        while (var8_14.size() <= 6 && !this.b(var7_13, 0, false, false).d()) {
                                                            if ((var7_13 = var7_13.a(true)) != null) {
                                                                var8_14.addElement(var7_13);
                                                                continue;
                                                            }
                                                            var8_14 = null;
                                                            break block28;
                                                        }
                                                        if (var8_14.size() > 6) {
                                                            var8_14 = null;
                                                        }
                                                    }
                                                    if (var8_14 != null) {
                                                        for (var4_4 = var8_14.size() - 1; var4_4 > 0; --var4_4) {
                                                            var7_13 = (ke)var8_14.elementAt(var4_4);
                                                            var10_15 = (ke)var8_14.elementAt(var4_4 - 1);
                                                            var6_5 = this.b(var7_13, 0, false, false);
                                                            if (!this.j.containsKey(var10_15)) {
                                                                var5_11 = var6_5.d() == false ? (le)this.j.get(var7_13) : var6_5.g();
                                                                if (var5_11 != null) {
                                                                    var5_11 = ck.a(var10_15, var7_13, var5_11);
                                                                    this.j.put(var10_15, var5_11);
                                                                    continue;
                                                                }
                                                            } else {
                                                                var5_11 = (le)this.j.get(var10_15);
                                                                continue;
                                                            }
                                                            var5_11 = null;
                                                            break block27;
                                                        }
                                                        break block27;
                                                    }
                                                    var5_11 = null;
                                                    break block27;
                                                }
                                                var5_11 = null;
                                                break block27;
                                            }
                                            var5_11 = null;
                                        }
                                        catch (OutOfMemoryError var9_10) {
                                            this.i();
                                            this.m = var14_12;
                                            me.b("Map Service image scaling", var9_10);
                                            var5_11 = null;
                                        }
                                    }
                                    break block27;
                                }
                                var5_11 = null;
                                break block33;
                            }
                            if (!var3_3) {
                                var12_6 -= (long)20000;
                            }
                            this.a(var6_5);
                            gu.c().ac();
lbl94:
                            // 3 sources

                            while (true) {
                                this.c = false;
                                break block29;
                                break;
                            }
                        }
                        if (var5_11 != null) {
                            this.j.put(var1_1, var5_11);
                        }
                    }
                    if (!var3_3 || !ck.A.d()) break block34;
                    var6_5 = new dx(var1_1, var5_11);
                    if (this.i == null) {
                        this.i = new jv(this);
                    }
                    this.i.a(var6_5, var2_2);
                    this.a(var6_5);
                    gu.c().d();
                    ** GOTO lbl94
                }
                var6_5 = new dx(var1_1, var5_11, true);
                ** continue;
            }
        }
        var6_5.b = var12_6;
        return var6_5;
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     * Converted monitor instructions to comments
     * Lifted jumps to return sites
     */
    public void w() {
        long l = System.currentTimeMillis();
        Hashtable hashtable = this.f.a;
        if (this.m >= l) return;
        if (this.u + (long)1500 >= l) return;
        try {
            block32: {
                mj mj2;
                int n;
                int n2;
                int n3;
                int n4;
                int n5;
                long l2;
                mj[] mjArray;
                int[] nArray;
                block33: {
                    Throwable throwable2;
                    block31: {
                        nArray = new int[]{-1, -1};
                        mjArray = new mj[]{null, null};
                        l2 = System.currentTimeMillis();
                        // MONITORENTER : this
                        n5 = this.j - this.f();
                        if (n5 >= b && this.c() < this.d) {
                            n4 = b;
                        } else {
                            int n6 = this.c();
                            long l3 = Long.MIN_VALUE;
                            n3 = 0;
                            n4 = -1;
                            l = Long.MIN_VALUE;
                            n2 = -1;
                            while (true) {
                                long l4 = l;
                                if (n3 >= n6) break;
                                long l5 = this.d(n3).a(l2);
                                if (n2 != -1 && l5 <= l3) {
                                    n = n4;
                                    n4 = n2;
                                    l = l4;
                                    l4 = l3;
                                } else if (n4 != -1 && l5 <= l4) {
                                    n = n4;
                                    n4 = n3;
                                    l = l4;
                                    l4 = l5;
                                } else {
                                    l = l5;
                                    n = n3;
                                }
                                n2 = n4;
                                n4 = n;
                                ++n3;
                                l3 = l4;
                            }
                            if (n4 != -1) {
                                nArray[0] = n4;
                                mjArray[0] = this.d(n4);
                                n5 += mjArray[0].b();
                            }
                            if (n5 < b && n2 != -1) {
                                nArray[1] = n2;
                                mjArray[1] = this.d(n2);
                                n5 += mjArray[1].b();
                            }
                            n4 = Math.min(n5, b);
                        }
                        // MONITOREXIT : this
                        if (n4 < c) {
                            if (mjArray[0] == null) return;
                            this.c.b(this.a(mjArray[0]));
                            this.a(mjArray[0], nArray[0]);
                            return;
                        }
                        new mj();
                        // MONITORENTER : hashtable
                        try {
                            this.f.c = true;
                            mj2 = new mj();
                            ke[] keArray = this.f.b();
                            n5 = 1;
                            for (n2 = keArray.length - 1; n2 >= 0; --n2) {
                                mz mz2;
                                dx dx2;
                                ke ke2 = keArray[n2];
                                if (this.j.get(ke2) != null || !(dx2 = (dx)hashtable.get(ke2)).c() || n5 + (n3 = (mz2 = new mz(dx2)).b()) > n4 || !mj2.a(mz2)) continue;
                                n5 += n3;
                            }
                        }
                        catch (Throwable throwable2) {
                            break block31;
                        }
                        this.f.c = false;
                        // MONITOREXIT : hashtable
                        n3 = mj2.b();
                        if (n3 < c) break block32;
                        break block33;
                    }
                    this.f.c = false;
                    throw throwable2;
                }
                // MONITORENTER : this
                n2 = -1;
                n = this.j - this.f();
                boolean[] blArray = new boolean[]{false, false};
                n4 = 0;
                for (n5 = 0; n5 < 2; ++n5) {
                    if (mjArray[n5] != null && mjArray[n5].c() && mjArray[n5].a(l2) > mj2.a(l2)) {
                        blArray[n5] = true;
                        n4 += mjArray[n5].b();
                    }
                    if (n3 <= n + n4) break;
                }
                n5 = this.c();
                if (n3 <= n + n4) {
                    if (blArray[0] && (n3 > n || n5 >= this.d)) {
                        n2 = mjArray[0].a;
                        this.a(mjArray[0], nArray[0]);
                        if (blArray[1]) {
                            if (nArray[0] < nArray[1]) {
                                nArray[1] = nArray[1] - 1;
                            }
                            this.c.b(this.a(mjArray[1]));
                            this.a(mjArray[1], nArray[1]);
                        }
                    } else if (n5 < this.d) {
                        this.k = n2 = this.k + 1;
                    }
                }
                // MONITOREXIT : this
                if (n2 >= 0) {
                    this.a(mj2, mj2.a(hashtable), n2);
                    System.gc();
                }
            }
            this.g();
            return;
        }
        finally {
            this.m = System.currentTimeMillis() + (long)2113;
        }
    }

    private void j() {
        Throwable throwable3;
        block11: {
            int n;
            block10: {
                block9: {
                    n = this.h();
                    if (n <= this.i) break block9;
                    if (!this.f) break block10;
                    System.gc();
                    this.i = Math.max(25000, Math.min((int)(Runtime.getRuntime().freeMemory() + (long)n - 40000L) / 2, (int)Runtime.getRuntime().totalMemory() / 3));
                    this.h();
                    if (n >= this.i) break block10;
                }
                return;
            }
            Hashtable hashtable = this.a;
            synchronized (hashtable) {
                Throwable throwable22;
                block8: {
                    try {
                        this.c = true;
                        ke[] keArray = this.b();
                        for (int i = 0; i < keArray.length && n > this.d; ++i) {
                            ke ke2 = keArray[i];
                            dx dx2 = (dx)this.a.get(ke2);
                            if (!dx2.c()) continue;
                            this.a.remove(ke2);
                            n -= dx2.e();
                        }
                    }
                    catch (Throwable throwable22) {
                        break block8;
                    }
                    try {
                        this.c = false;
                        return;
                    }
                    catch (Throwable throwable3) {}
                    break block11;
                }
                this.c = false;
                throw throwable22;
            }
        }
        throw throwable3;
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    private void c(boolean bl2) {
        long l = bl2 ? (long)2000 : (long)12000;
        Hashtable hashtable = this.a;
        synchronized (hashtable) {
            Enumeration enumeration;
            long l2;
            block7: {
                this.c = true;
                try {
                    l2 = System.currentTimeMillis();
                    enumeration = this.a.keys();
                    break block7;
                }
                catch (Throwable throwable) {}
                this.c = false;
                throw throwable;
            }
            while (true) {
                if (!enumeration.hasMoreElements()) {
                    this.c = false;
                    return;
                }
                dx dx2 = (dx)this.a.get((ke)enumeration.nextElement());
                if (dx2.b + l >= l2) continue;
                dx2.b();
            }
        }
    }

    public void a(int n) {
        if (this.b.a(n)) {
            Hashtable hashtable = this.a;
            synchronized (hashtable) {
                Enumeration enumeration = this.a.keys();
                Vector<ke> vector = new Vector<ke>();
                while (enumeration.hasMoreElements()) {
                    ke ke2 = (ke)enumeration.nextElement();
                    if (!((dx)this.a.get(ke2)).c()) continue;
                    vector.addElement(ke2);
                }
                for (n = 0; n < vector.size(); ++n) {
                    this.a.remove(vector.elementAt(n));
                }
                return;
            }
        }
    }

    public static boolean b(Vector vector) {
        for (int i = 0; i < vector.size(); ++i) {
            if (!((jf)vector.elementAt(i)).A_()) {
                continue;
            }
            return true;
        }
        return false;
    }

    public static boolean a(Vector vector) {
        block2: {
            for (int i = 0; i < vector.size(); ++i) {
                if (!((jf)vector.elementAt(i)).z_()) {
                    continue;
                }
                break block2;
            }
            return false;
        }
        return true;
    }
}

