/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.util.CollectionUtils
 *  com.l7tech.util.Config
 *  com.l7tech.util.ConfigFactory
 *  com.l7tech.util.Functions$UnaryVoid
 *  org.apache.hc.client5.http.io.HttpClientConnectionManager
 */
package com.l7tech.server.transport.http;

import com.l7tech.server.transport.http.f;
import com.l7tech.server.transport.http.g;
import com.l7tech.server.util.ManagedTimerTask;
import com.l7tech.util.CollectionUtils;
import com.l7tech.util.Config;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.Functions;
import java.util.HashSet;
import java.util.Map;
import org.apache.hc.client5.http.io.HttpClientConnectionManager;

final class p
extends ManagedTimerTask {
    private final Config c;
    private final Map<HttpClientConnectionManager, Void> d;
    private static final String[] e;

    private p(Config config, Map<HttpClientConnectionManager, Void> map) {
        this.c = config;
        this.d = map;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    @Override
    protected void doRun() {
        boolean bl2;
        HashSet<HttpClientConnectionManager> hashSet = new HashSet<HttpClientConnectionManager>();
        Map<HttpClientConnectionManager, Void> map = this.d;
        synchronized (map) {
            hashSet.addAll(this.d.keySet());
        }
        String[] stringArray = e;
        long l2 = this.c.getTimeUnitProperty(stringArray[0], 0L);
        if (l2 > 0L) {
            CollectionUtils.foreach(hashSet, (boolean)false, (Functions.UnaryVoid)new f(this, l2));
        }
        if (bl2 = ConfigFactory.getBooleanProperty((String)e[1], (boolean)true)) {
            CollectionUtils.foreach(hashSet, (boolean)false, (Functions.UnaryVoid)new g(this));
        }
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[2];
        int n2 = 0;
        String string = "\b[\\YF.\u000e\u000eWYYY|\b\u001dQCY^k\u001b\u0005GA\u0018XmT\u0003@E\u0007\u0004q\u000e\u001fDr\u0018Dw\u001f\b@X\u0018DP\u001e\u0007Qe\u001eG|\u0015\u001e@4\b[\\YF.\u000e\u000eWYYIv\u0017\u0006[_YBm\u000e\u001b\u001aA\u0005EoT\nDP\u0014B|T\u0018@P\u001bOZ\u0012\u000eWZ2Dx\u0018\u0007QU";
        int n3 = "\b[\\YF.\u000e\u000eWYYY|\b\u001dQCY^k\u001b\u0005GA\u0018XmT\u0003@E\u0007\u0004q\u000e\u001fDr\u0018Dw\u001f\b@X\u0018DP\u001e\u0007Qe\u001eG|\u0015\u001e@4\b[\\YF.\u000e\u000eWYYIv\u0017\u0006[_YBm\u000e\u001b\u001aA\u0005EoT\nDP\u0014B|T\u0018@P\u001bOZ\u0012\u000eWZ2Dx\u0018\u0007QU".length();
        int n4 = 58;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = p.b(3, p.b(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                e = stringArray;
                return;
            }
            n4 = string.charAt(n5);
        }
    }

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

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String b(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 -> 104;
                    case 1 -> 55;
                    case 2 -> 50;
                    case 3 -> 116;
                    case 4 -> 41;
                    case 5 -> 26;
                    default -> 121;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

