/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.util.ExceptionUtils
 */
package com.l7tech.server.communityschemas;

import com.l7tech.server.communityschemas.p;
import com.l7tech.util.ExceptionUtils;
import java.lang.ref.WeakReference;
import java.util.Iterator;
import java.util.logging.Level;

class q
extends Thread {
    private static final String[] a;

    q(String string) {
        super(string);
    }

    @Override
    public void run() {
        try {
            this.a();
        }
        catch (InterruptedException interruptedException) {
            String[] stringArray = a;
            p.c.info(stringArray[0]);
        }
        catch (Throwable throwable) {
            p.c.log(Level.SEVERE, a[1] + ExceptionUtils.getMessage((Throwable)throwable), throwable);
        }
    }

    private void a() throws InterruptedException {
        while (true) {
            Thread.sleep(4057L);
            this.b();
        }
    }

    private void b() {
        while (p.e.getAndSet(false)) {
            Iterator iterator = p.f.keySet().iterator();
            while (iterator.hasNext()) {
                WeakReference weakReference = (WeakReference)iterator.next();
                iterator.remove();
                p p2 = (p)weakReference.get();
                if (p2 == null || p2.isClosed()) continue;
                p2.a(System.currentTimeMillis());
            }
        }
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[2];
        int n2 = 0;
        String string = "\u00019<f\u0019\u000fN\u0007)5d\u0011N:;71#9\u000f\u001c9?&# \u0006\u001c7;0#\u001d\u0000\u001a7(&v\u0004\u001a\u000b6vtf\f\u0007\u001a;437\u000747b\u0001\t\u0006&z1{\u0017\u000b\u001e&3;mT\u0007\u0000r\t7k\u0011\u0003\u000fr\u000f'b\u0013\u000bN\u000639fT#\u000f 11qT:\u0006 ?5gNN";
        int n3 = "\u00019<f\u0019\u000fN\u0007)5d\u0011N:;71#9\u000f\u001c9?&# \u0006\u001c7;0#\u001d\u0000\u001a7(&v\u0004\u001a\u000b6vtf\f\u0007\u001a;437\u000747b\u0001\t\u0006&z1{\u0017\u000b\u001e&3;mT\u0007\u0000r\t7k\u0011\u0003\u000fr\u000f'b\u0013\u000bN\u000639fT#\u000f 11qT:\u0006 ?5gNN".length();
        int n4 = 52;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = q.a(94, q.a(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                a = stringArray;
                return;
            }
            n4 = string.charAt(n5);
        }
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x30);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String a(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 12;
                    case 1 -> 4;
                    case 2 -> 10;
                    case 3 -> 93;
                    case 4 -> 42;
                    case 5 -> 48;
                    default -> 48;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

