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

public final class mv
extends px
implements ma {
    private volatile boolean l = false;
    private final Object a = new Object();
    private final gu k;
    private static int o = 6;
    private ej j;
    private Vector p;
    private Vector q;

    private static boolean a(ej ej2) {
        return ej2 == null || System.currentTimeMillis() - ej2.e > 720000L;
    }

    public final String b() {
        return "cellid";
    }

    public final boolean e() {
        return false;
    }

    public final boolean f() {
        return this.l;
    }

    public final void c() {
        this.m();
        this.k.ai();
    }

    public mv(lh lh2) {
        super(lh2, true, false);
        new gu(false, false, false, false, false, false, false, false, false, false, false, false, false, false);
        this.k = gu.e();
    }

    private void m() {
        Object object = this.a;
        synchronized (object) {
            this.a.notifyAll();
            return;
        }
    }

    private void b(int n) {
        if (n != 2) {
            if (n != 1) {
                this.a(1);
                return;
            }
            this.a(4);
            return;
        }
        this.g = false;
    }

    private void a(b b2) {
        if (b2 != null && b2.a()) {
            this.a(b2.a, -1, -1, b2.d);
        }
        if (b2 != null && b2.a()) {
            int n;
            iv iv2;
            long l = System.currentTimeMillis();
            if (this.p.size() == o) {
                this.p.removeElementAt(0);
                this.q.removeElementAt(0);
            }
            this.p.addElement(b2);
            this.q.addElement(new Long(l));
            int n2 = this.p.size();
            int n3 = n2 - 1;
            long l2 = l - (long)30000;
            b b3 = null;
            int n4 = 0;
            long l3 = 0L;
            l = 0L;
            int n5 = Integer.MAX_VALUE;
            long l4 = 0L;
            while (n3 >= 0) {
                b b4 = (b)this.p.elementAt(n3);
                if ((Long)this.q.elementAt(n3) < l2) break;
                iv2 = b4.a;
                l += (long)iv2.a;
                l3 += (long)iv2.b;
                n = b4.d;
                l4 += (long)b4.d;
                if (n >= n5) {
                    b4 = b3;
                    n = n5;
                }
                --n3;
                b3 = b4;
                ++n4;
                n5 = n;
            }
            n3 = b2.d;
            iv2 = b2.a;
            if (n4 != 0) {
                n = 0;
                iv2 = new iv((int)(l / (long)n4), (int)(l3 / (long)n4));
                n3 = n2 - n4;
                l = 0L;
                while (n3 < n2) {
                    b b5 = (b)this.p.elementAt(n3);
                    l3 = b5.a.a(iv2);
                    int n6 = b5.d;
                    l2 = n6 * n6;
                    if (l3 > l2) {
                        n = 1;
                    }
                    ++n3;
                    l += l3;
                }
                if (n == 0) {
                    long l5 = b3.a.a(iv2);
                    n3 = (int)Math.max((long)n5, ck.a(l5, 0L, l5 / (long)2));
                } else {
                    n3 = (int)((l4 + ck.a(l, 0L, l / (long)2)) / (long)n4);
                }
            }
            this.a(iv2, -1, -1, n3);
        }
    }

    public final void a(jt[] jtArray) {
        if (jtArray != null && jtArray.length == 1) {
            jt jt2 = jtArray[0];
            if (jt2.b()) {
                b b2 = new b(this.j.d, this.j.c, jt2.b, jt2.a, System.currentTimeMillis());
                this.a(b2);
                this.k.a(b2);
            } else {
                this.k.a(b.a(this.j.d, this.j.c));
                this.b(1);
            }
        } else {
            this.b(1);
        }
        this.l = false;
        this.m();
    }

    /*
     * Exception decompiling
     */
    public final void a() {
        /*
         * 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 : 52->87)] 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");
    }
}

