/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.util.ConfigFactory
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.IOUtils
 *  com.l7tech.util.IteratorEnumeration
 *  com.l7tech.util.ResourceUtils
 *  org.apache.commons.lang3.StringUtils
 */
package com.l7tech.server.policy.module;

import com.l7tech.server.policy.ServerAssertionRegistry;
import com.l7tech.server.policy.module.g;
import com.l7tech.server.policy.module.k;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.IOUtils;
import com.l7tech.util.IteratorEnumeration;
import com.l7tech.util.ResourceUtils;
import java.io.ByteArrayInputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.security.CodeSource;
import java.security.cert.Certificate;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.lang3.StringUtils;

class h
extends URLClassLoader
implements Closeable {
    private static final Logger a;
    private static final Map<String, Set<String>> b;
    private static final String c;
    public static final String NR_PROTO;
    static ServerAssertionRegistry d;
    private final Set<Class> e = Collections.synchronizedSet(new HashSet());
    private final String f;
    private final Map<g, Object> g;
    private final Set<ClassLoader> h = Collections.synchronizedSet(new LinkedHashSet());
    private final String i;
    private final CodeSource j;
    private final String k;
    private static final String[] l;

    static void a() {
        b.clear();
    }

    static void a(String string2) {
        if (string2 != null) {
            String[] stringArray;
            for (String string3 : stringArray = string2.split(",")) {
                String string4;
                Set set;
                String[] stringArray2 = string3.split(":");
                if (stringArray2.length != 2) continue;
                String string5 = stringArray2[1];
                try {
                    a.log(Level.INFO, l[28], string3);
                    set = b.computeIfAbsent(stringArray2[0].toLowerCase(), string -> new HashSet());
                    string4 = string5.endsWith(l[4]) ? string5.substring(0, string5.length() - 1) : string5;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
                }
                set.add(string4);
            }
        }
    }

    boolean b(String string) {
        Set<String> set = b.get(this.k.toLowerCase());
        try {
            if (set == null) {
                return false;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
        }
        try {
            if (set.contains(string)) {
                return true;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
        }
        for (String string2 : set) {
            try {
                try {
                    if (!string2.endsWith(".") || !string.startsWith(string2)) continue;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
                }
                return true;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
            }
        }
        return false;
    }

    h(String string, URL uRL, ClassLoader classLoader, Set<g> set, boolean bl2, String string2) {
        super(new URL[]{uRL}, classLoader);
        String string3;
        String string4;
        this.f = string;
        this.g = new ConcurrentHashMap<g, Object>();
        for (g g2 : set) {
            this.g.put(g2, new Object());
        }
        try {
            h h2 = this;
            string4 = bl2 ? l[15] : null;
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
        }
        try {
            h2.i = string4;
            this.j = new CodeSource(uRL, (Certificate[])null);
            h h3 = this;
            string3 = StringUtils.isEmpty((CharSequence)string2) ? string : string2;
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
        }
        h3.k = string3;
    }

    h(String string, URL uRL, ClassLoader classLoader, Set<g> set, boolean bl2) {
        this(string, uRL, classLoader, set, bl2, null);
    }

    public void addDelegate(ClassLoader classLoader) {
        try {
            if (classLoader == null) {
                throw new IllegalArgumentException(l[11]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
        }
        this.h.add(classLoader);
    }

    public boolean removeDelegate(ClassLoader classLoader) {
        return this.h.remove(classLoader);
    }

    @Override
    protected synchronized Class<?> loadClass(String string, boolean bl2) throws ClassNotFoundException {
        Class<?> clazz;
        block11: {
            block14: {
                block12: {
                    clazz = this.findLoadedClass(string);
                    try {
                        block13: {
                            try {
                                try {
                                    try {
                                        if (clazz != null) break block11;
                                        if (this.c(string)) break block12;
                                    }
                                    catch (ClassNotFoundException classNotFoundException) {
                                        throw com.l7tech.server.policy.module.h.a(classNotFoundException);
                                    }
                                    if (!this.f.contains(l[6])) break block13;
                                }
                                catch (ClassNotFoundException classNotFoundException) {
                                    throw com.l7tech.server.policy.module.h.a(classNotFoundException);
                                }
                                if (string.startsWith(l[25])) break block12;
                            }
                            catch (ClassNotFoundException classNotFoundException) {
                                throw com.l7tech.server.policy.module.h.a(classNotFoundException);
                            }
                        }
                        if (!this.b(string)) break block14;
                    }
                    catch (ClassNotFoundException classNotFoundException) {
                        throw com.l7tech.server.policy.module.h.a(classNotFoundException);
                    }
                }
                clazz = this.findClass(string);
                break block11;
            }
            clazz = super.loadClass(string, bl2);
        }
        try {
            if (bl2) {
                this.resolveClass(clazz);
            }
        }
        catch (ClassNotFoundException classNotFoundException) {
            throw com.l7tech.server.policy.module.h.a(classNotFoundException);
        }
        return clazz;
    }

    /*
     * Loose catch block
     */
    @Override
    protected Class<?> findClass(String string) throws ClassNotFoundException {
        Class clazz = null;
        try {
            block11: {
                block13: {
                    block12: {
                        if (!this.c(string)) break block12;
                        clazz = this.d(string);
                        break block11;
                    }
                    if (string.startsWith(l[24])) break block13;
                    try {
                        block14: {
                            if (string.startsWith(l[7])) break block11;
                            break block14;
                            catch (ClassNotFoundException classNotFoundException) {
                                throw com.l7tech.server.policy.module.h.a(classNotFoundException);
                            }
                        }
                        if (string.startsWith(l[12])) break block11;
                    }
                    catch (ClassNotFoundException classNotFoundException) {
                        throw com.l7tech.server.policy.module.h.a(classNotFoundException);
                    }
                }
                clazz = this.a(string, false);
            }
            if (clazz == null) {
                clazz = h.super.findClass(string);
            }
        }
        catch (ClassNotFoundException classNotFoundException) {
            clazz = this.a(string, false);
            if (clazz == null) {
                clazz = this.g(string);
            }
            try {
                if (clazz == null) {
                    throw new ClassNotFoundException(ExceptionUtils.getMessage((Throwable)classNotFoundException), classNotFoundException);
                }
            }
            catch (ClassNotFoundException classNotFoundException2) {
                throw com.l7tech.server.policy.module.h.a(classNotFoundException2);
            }
        }
        this.e.add(clazz);
        return clazz;
    }

    private boolean c(String string) {
        boolean bl2;
        block5: {
            block4: {
                try {
                    try {
                        if (this.i == null || !string.startsWith(this.i + ".")) break block4;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
                    }
                    bl2 = true;
                    break block5;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    private Class d(String string) {
        Class clazz;
        String string2 = this.e(string);
        InputStream inputStream = super.getResourceAsStream(string2);
        try {
            clazz = this.a(string, inputStream);
        }
        catch (Throwable throwable) {
            try {
                if (inputStream != null) {
                    try {
                        inputStream.close();
                    }
                    catch (Throwable throwable2) {
                        throwable.addSuppressed(throwable2);
                    }
                }
                throw throwable;
            }
            catch (IOException iOException) {
                throw new RuntimeException(l[16] + string2, iOException);
            }
        }
        try {
            if (inputStream != null) {
                inputStream.close();
            }
        }
        catch (Throwable throwable) {
            throw com.l7tech.server.policy.module.h.a(throwable);
        }
        return clazz;
    }

    private Class a(String string, boolean bl2) {
        String string2 = this.e(string);
        return this.a(string, this.d(string2, bl2));
    }

    private String e(String string) {
        return string.replace('.', '/').concat(l[20]);
    }

    private String f(String string) {
        return string.replace('/', '.');
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    private Class a(String string, InputStream inputStream) {
        try {
            if (inputStream == null) return null;
            try {
                return this.a(string, IOUtils.slurpStream((InputStream)inputStream));
            }
            catch (IOException iOException) {
                String string2 = ExceptionUtils.getMessage((Throwable)iOException);
                String string3 = this.f;
                String string4 = string;
                String[] stringArray = l;
                a.log(Level.SEVERE, stringArray[31] + string4 + stringArray[18] + string3 + stringArray[14] + string2, iOException);
                return null;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
        }
    }

    private Class a(String string, byte[] byArray) {
        try {
            if (byArray == null) {
                return null;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
        }
        int n2 = string.lastIndexOf(46);
        if (n2 != -1) {
            String string2 = string.substring(0, n2);
            Package package_ = this.getDefinedPackage(string2);
            try {
                if (package_ == null) {
                    this.definePackage(string2, null, null, null, null, null, null, null);
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
            }
        }
        return this.defineClass(string, byArray, 0, byArray.length, this.j);
    }

    private Class g(String string) {
        for (ClassLoader classLoader : this.h) {
            try {
                return classLoader.loadClass(string);
            }
            catch (ClassNotFoundException classNotFoundException) {
            }
        }
        return null;
    }

    InputStream b(String string, boolean bl2) throws IOException {
        URL uRL;
        try {
            URL uRL2 = uRL = this.c(this.f(string)) ? super.getResource(string) : super.findResource(string);
        }
        catch (IOException iOException) {
            throw com.l7tech.server.policy.module.h.a(iOException);
        }
        if (uRL == null) {
            byte[] byArray = this.d(string, bl2);
            try {
                if (byArray != null) {
                    return new ByteArrayInputStream(byArray);
                }
            }
            catch (IOException iOException) {
                throw com.l7tech.server.policy.module.h.a(iOException);
            }
            return this.i(string);
        }
        return uRL.openStream();
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    byte[] c(String string, boolean bl2) throws IOException {
        URL uRL;
        try {
            URL uRL2 = uRL = this.c(this.f(string)) ? super.getResource(string) : super.findResource(string);
        }
        catch (IOException iOException) {
            throw com.l7tech.server.policy.module.h.a(iOException);
        }
        if (uRL == null) {
            byte[] byArray = this.d(string, bl2);
            if (byArray == null) {
                byArray = this.h(string);
            }
            return byArray;
        }
        InputStream inputStream = null;
        try {
            inputStream = uRL.openStream();
            byte[] byArray = IOUtils.slurpStream((InputStream)inputStream);
            return byArray;
        }
        finally {
            ResourceUtils.closeQuietly((Closeable)inputStream);
        }
    }

    private byte[] d(String string, boolean bl2) {
        for (g g2 : this.g.keySet()) {
            try {
                if (bl2 && g2.isPrivateLibrary()) continue;
            }
            catch (IOException iOException) {
                throw com.l7tech.server.policy.module.h.a(iOException);
            }
            try {
                byte[] byArray = g2.getFile(string);
                if (byArray == null) continue;
                return byArray;
            }
            catch (IOException iOException) {
                String string2 = ExceptionUtils.getMessage((Throwable)iOException);
                String string3 = this.f;
                String string4 = g2.getEntryName();
                String[] stringArray = l;
                a.log(Level.SEVERE, stringArray[30] + string4 + stringArray[13] + string3 + stringArray[27] + string2, iOException);
            }
        }
        return null;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    private byte[] h(String string) {
        InputStream inputStream = this.i(string);
        if (inputStream != null) {
            try {
                byte[] byArray = IOUtils.slurpStream((InputStream)inputStream);
                return byArray;
            }
            catch (IOException iOException) {
                String string2 = ExceptionUtils.getMessage((Throwable)iOException);
                String string3 = this.f;
                String string4 = string;
                String[] stringArray = l;
                a.log(Level.WARNING, stringArray[2] + string4 + stringArray[26] + string3 + stringArray[27] + string2, iOException);
            }
            finally {
                ResourceUtils.closeQuietly((Closeable)inputStream);
            }
        }
        return null;
    }

    private InputStream i(String string) {
        for (ClassLoader classLoader : this.h) {
            InputStream inputStream = classLoader.getResourceAsStream(string);
            try {
                if (inputStream == null) continue;
                return inputStream;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
            }
        }
        return null;
    }

    @Override
    public URL findResource(String string) {
        URL uRL = h.super.findResource(string);
        if (uRL == null) {
            uRL = this.j(string);
        }
        if (uRL == null) {
            uRL = this.l(string);
        }
        return uRL;
    }

    private URL j(String string) {
        for (g g2 : this.g.keySet()) {
            try {
                byte[] byArray = g2.getFile(string);
                if (byArray == null) continue;
                return this.a(g2, string, byArray);
            }
            catch (IOException iOException) {
                String string2 = ExceptionUtils.getMessage((Throwable)iOException);
                String string3 = this.f;
                String string4 = g2.getEntryName();
                String[] stringArray = l;
                a.log(Level.SEVERE, stringArray[30] + string4 + stringArray[13] + string3 + stringArray[27] + string2, iOException);
                return null;
            }
        }
        return null;
    }

    private List<URL> k(String string) {
        ArrayList<URL> arrayList = new ArrayList<URL>();
        for (g g2 : this.g.keySet()) {
            try {
                byte[] byArray = g2.getFile(string);
                try {
                    if (byArray == null) continue;
                    arrayList.add(this.a(g2, string, byArray));
                }
                catch (IOException iOException) {
                    throw com.l7tech.server.policy.module.h.a(iOException);
                }
            }
            catch (IOException iOException) {
                String string2 = ExceptionUtils.getMessage((Throwable)iOException);
                String string3 = this.f;
                String string4 = g2.getEntryName();
                String[] stringArray = l;
                a.log(Level.SEVERE, stringArray[8] + string4 + stringArray[13] + string3 + stringArray[27] + string2, iOException);
            }
        }
        return arrayList;
    }

    private URL l(String string) {
        for (ClassLoader classLoader : this.h) {
            URL uRL = classLoader.getResource(string);
            try {
                if (uRL == null) continue;
                return uRL;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
            }
        }
        return null;
    }

    private List<URL> m(String string) {
        ArrayList<URL> arrayList = new ArrayList<URL>();
        for (ClassLoader classLoader : this.h) {
            URL uRL = classLoader.getResource(string);
            try {
                if (uRL == null) continue;
                arrayList.add(uRL);
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw com.l7tech.server.policy.module.h.a(illegalArgumentException);
            }
        }
        return arrayList;
    }

    private URL a(g g2, String string, byte[] byArray) {
        try {
            String[] stringArray = l;
            return new URL(stringArray[29], null, -1, this.f + "!" + g2.getEntryName() + "!" + string, new k(this, byArray));
        }
        catch (MalformedURLException malformedURLException) {
            a.log(Level.SEVERE, l[21] + ExceptionUtils.getMessage((Throwable)malformedURLException), malformedURLException);
            return null;
        }
    }

    @Override
    public Enumeration<URL> findResources(String string) throws IOException {
        List<URL> list;
        ArrayList<Object> arrayList = new ArrayList<Object>();
        Enumeration<URL> enumeration = super.findResources(string);
        while (true) {
            try {
                if (enumeration == null || !enumeration.hasMoreElements()) break;
            }
            catch (IOException iOException) {
                throw com.l7tech.server.policy.module.h.a(iOException);
            }
            list = enumeration.nextElement();
            arrayList.add(list);
        }
        list = this.k(string);
        try {
            if (!list.isEmpty()) {
                arrayList.addAll(list);
            }
        }
        catch (IOException iOException) {
            throw com.l7tech.server.policy.module.h.a(iOException);
        }
        list = this.m(string);
        try {
            if (!list.isEmpty()) {
                arrayList.addAll(list);
            }
        }
        catch (IOException iOException) {
            throw com.l7tech.server.policy.module.h.a(iOException);
        }
        return new IteratorEnumeration(arrayList.iterator());
    }

    void b() {
        HashSet<Class> hashSet = new HashSet<Class>(this.e);
        for (Class clazz : hashSet) {
            this.onModuleUnloaded(clazz);
            this.e.remove(clazz);
        }
    }

    protected void onModuleUnloaded(Class clazz) {
        try {
            String[] stringArray = l;
            clazz.getMethod(stringArray[3], new Class[0]).invoke(null, new Object[0]);
        }
        catch (IllegalAccessException | NoClassDefFoundError throwable) {
            String string = ExceptionUtils.getMessage((Throwable)throwable);
            String string2 = clazz.getName();
            String string3 = this.f;
            String[] stringArray = l;
            a.log(Level.WARNING, stringArray[19] + string3 + stringArray[22] + string2 + stringArray[17] + string);
        }
        catch (NoSuchMethodException noSuchMethodException) {
        }
        catch (InvocationTargetException invocationTargetException) {
            String string = ExceptionUtils.getMessage((Throwable)invocationTargetException);
            String string4 = clazz.getName();
            String string5 = this.f;
            String[] stringArray = l;
            a.log(Level.SEVERE, stringArray[0] + string5 + stringArray[23] + string4 + stringArray[10] + string, invocationTargetException);
        }
    }

    public static ServerAssertionRegistry getRegistry() {
        return d;
    }

    public static void setRegistry(ServerAssertionRegistry serverAssertionRegistry) {
        d = serverAssertionRegistry;
    }

    @Override
    public void close() throws IOException {
        this.b();
        HashSet<g> hashSet = new HashSet<g>(this.g.keySet());
        for (g g2 : hashSet) {
            g2.close();
            this.g.remove(g2);
        }
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[32];
                var3_1 = 0;
                var2_2 = "\u0006\u000fZ\u001e\u0017-\u001a\u0007*\u0013M\u0005\u0016'^\u0017\u000e\u0012L\u0004\thH.\u0001Z\u0002\u0015/\u001a9\u0005M\u0004\u000e:Y.@\u0010$\u000es\u0004\u001f=V.5P\u0007\u0014)^.\u0004\u0002eJ3(\u000fSE\u0017\u007fN.\u0003VE\b-H=\u0005LE6'^>\f_\u0019:;I.\u0012J\u0002\u0014&y'\u0001M\u00187'[/\u0005LE\u0013!T?\u0013\u001d\u001b\u000fR\u0002\u00181x>\u000eZ\u0007\u001e\rB;\u000fL\u001f\u001e:{8\u0013[\u0019\u000f!U%\u000b(\u000fSE\u0017\u007fN.\u0003VE-\u001e\u000e_\t\u0017-\u001a?\u000f\u001e\u0019\u001e)^k\u0012[\u0018\u0014=H(\u0005\u001e\r\t'Wk\u000e[\u0018\u000f-^k\n_\u0019[.S'\u0005\u001e3(\u000fSE\u0017\u007fN.\u0003VE\b-H=\u0005LE6'^>\f_\u0019:;I.\u0012J\u0002\u0014&y'\u0001M\u00187'[/\u0005LE\u0013!T?\u0013\u0013k\u000fXK\u0016'^>\f[K\u000e&V$\u0001ZQ[%(\f_\u0018\b\u0004U*\u0004[\u0019[)H,\u0015S\u000e\u0015<\u001a&\u0015M\u001f[*_k\u000eQ\u0005V&O'\f\u0005!\u0001H\nU\u000bk\tPK\u0016'^>\f[K\u0002q@\u001e(\u000fSE\u0017\u007fN.\u0003VE\u001e0N.\u0012P\n\u0017f[8\u0013[\u0019\u000f!U%\u0013%\u000e\u0012L\u0004\thY'\u000fM\u0002\u0015/\u001a9\u0005M\u0004\u000e:Y.@W\u0005\u000b=Nk\u0013J\u0019\u001e)Wq@\u0013k\u000fXK\u0016'^>\f[K\u000e&V$\u0001ZQ[\u000bk\tPK\u0016'^>\f[K\u0007\u0006\u000fZ\u001e\u0017-\u001a\u0006e\u0003R\n\b;\u001f\u001e\u000e_\t\u0017-\u001a?\u000f\u001e\b\t-[?\u0005\u001e\u0019\u001e;U>\u0012]\u000e[\u001dh\u0007Z\u001e\u0019q@K\u0005\u001a*V.@J\u0004[&U?\tX\u0012[+V*\u0013MK\"q@[\u0013\u0018-J?\tQ\u0005[?R\"\f[K\u0015'N\"\u0006G\u0002\u0015/\u001a(\f_\u0018\bh\u0014(\u000fSE\u0017\u007fN.\u0003VE\u001e0N.\u0012P\n\u0017f\u0011$\u0012YE\u0014*P.\u0003J\u001c\u001e*\u0014*\u0013S+k\u0006L\u0004\u0016h^.\f[\f\u001a<_k#R\n\b;v$\u0001Z\u000e\th\\$\u0012\u001e\u0006\u0014,O'\u0005\u001e\u0005\u001a%_k\u0002q@%\u0006\u000fZ\u001e\u0017)H\n\u0013M\u000e\t<S$\u000e}\u0007\u001a;I\u0007\u000f_\u000f\u001e:\u0014#\tP\u001f\bhA{\u001d\u0007*\u0013M\u0005\u0016'^";
                var4_3 = "\u0006\u000fZ\u001e\u0017-\u001a\u0007*\u0013M\u0005\u0016'^\u0017\u000e\u0012L\u0004\thH.\u0001Z\u0002\u0015/\u001a9\u0005M\u0004\u000e:Y.@\u0010$\u000es\u0004\u001f=V.5P\u0007\u0014)^.\u0004\u0002eJ3(\u000fSE\u0017\u007fN.\u0003VE\b-H=\u0005LE6'^>\f_\u0019:;I.\u0012J\u0002\u0014&y'\u0001M\u00187'[/\u0005LE\u0013!T?\u0013\u001d\u001b\u000fR\u0002\u00181x>\u000eZ\u0007\u001e\rB;\u000fL\u001f\u001e:{8\u0013[\u0019\u000f!U%\u000b(\u000fSE\u0017\u007fN.\u0003VE-\u001e\u000e_\t\u0017-\u001a?\u000f\u001e\u0019\u001e)^k\u0012[\u0018\u0014=H(\u0005\u001e\r\t'Wk\u000e[\u0018\u000f-^k\n_\u0019[.S'\u0005\u001e3(\u000fSE\u0017\u007fN.\u0003VE\b-H=\u0005LE6'^>\f_\u0019:;I.\u0012J\u0002\u0014&y'\u0001M\u00187'[/\u0005LE\u0013!T?\u0013\u0013k\u000fXK\u0016'^>\f[K\u000e&V$\u0001ZQ[%(\f_\u0018\b\u0004U*\u0004[\u0019[)H,\u0015S\u000e\u0015<\u001a&\u0015M\u001f[*_k\u000eQ\u0005V&O'\f\u0005!\u0001H\nU\u000bk\tPK\u0016'^>\f[K\u0002q@\u001e(\u000fSE\u0017\u007fN.\u0003VE\u001e0N.\u0012P\n\u0017f[8\u0013[\u0019\u000f!U%\u0013%\u000e\u0012L\u0004\thY'\u000fM\u0002\u0015/\u001a9\u0005M\u0004\u000e:Y.@W\u0005\u000b=Nk\u0013J\u0019\u001e)Wq@\u0013k\u000fXK\u0016'^>\f[K\u000e&V$\u0001ZQ[\u000bk\tPK\u0016'^>\f[K\u0007\u0006\u000fZ\u001e\u0017-\u001a\u0006e\u0003R\n\b;\u001f\u001e\u000e_\t\u0017-\u001a?\u000f\u001e\b\t-[?\u0005\u001e\u0019\u001e;U>\u0012]\u000e[\u001dh\u0007Z\u001e\u0019q@K\u0005\u001a*V.@J\u0004[&U?\tX\u0012[+V*\u0013MK\"q@[\u0013\u0018-J?\tQ\u0005[?R\"\f[K\u0015'N\"\u0006G\u0002\u0015/\u001a(\f_\u0018\bh\u0014(\u000fSE\u0017\u007fN.\u0003VE\u001e0N.\u0012P\n\u0017f\u0011$\u0012YE\u0014*P.\u0003J\u001c\u001e*\u0014*\u0013S+k\u0006L\u0004\u0016h^.\f[\f\u001a<_k#R\n\b;v$\u0001Z\u000e\th\\$\u0012\u001e\u0006\u0014,O'\u0005\u001e\u0005\u001a%_k\u0002q@%\u0006\u000fZ\u001e\u0017)H\n\u0013M\u000e\t<S$\u000e}\u0007\u001a;I\u0007\u000f_\u000f\u001e:\u0014#\tP\u001f\bhA{\u001d\u0007*\u0013M\u0005\u0016'^".length();
                var1_4 = 7;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 125;
                    v1 = ++var0_5;
                    v2 = var2_2.substring(v1, v1 + var1_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var5[var3_1++] = com.l7tech.server.policy.module.h.a(v0, com.l7tech.server.policy.module.h.n(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "\u001d\r\\\n\u0014.\u0019<\f\u001d\u001a\u001d*]h\u0011X\u001b\u0017>K+\u0006\u001d\u000e\n$Th\rX\u001b\f.]h\t\\\u001aX-P$\u0006\u001d\"\u001d\r\\\n\u0014.\u0019<\f\u001d\u001a\u001d*]h\u0011X\u001b\u0017>K+\u0006\u001d\u000e\u00179\u0019+\u000f\\\u001b\u000bk";
                    var4_3 = "\u001d\r\\\n\u0014.\u0019<\f\u001d\u001a\u001d*]h\u0011X\u001b\u0017>K+\u0006\u001d\u000e\n$Th\rX\u001b\f.]h\t\\\u001aX-P$\u0006\u001d\"\u001d\r\\\n\u0014.\u0019<\f\u001d\u001a\u001d*]h\u0011X\u001b\u0017>K+\u0006\u001d\u000e\u00179\u0019+\u000f\\\u001b\u000bk".length();
                    var1_4 = 45;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 126;
                        v4 = ++var0_5;
                        v2 = var2_2.substring(v4, v4 + var1_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var5[var3_1++] = com.l7tech.server.policy.module.h.a(v0, com.l7tech.server.policy.module.h.n(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        com.l7tech.server.policy.module.h.l = var5;
        com.l7tech.server.policy.module.h.NR_PROTO = com.l7tech.server.policy.module.h.l[1];
        com.l7tech.server.policy.module.h.c = com.l7tech.server.policy.module.h.l[9];
        com.l7tech.server.policy.module.h.a = Logger.getLogger(h.class.getName());
        com.l7tech.server.policy.module.h.b = new HashMap<String, Set<String>>();
        com.l7tech.server.policy.module.h.d = null;
        com.l7tech.server.policy.module.h.a(ConfigFactory.getProperty((String)com.l7tech.server.policy.module.h.l[5]));
    }

    private static Throwable a(Throwable throwable) {
        return throwable;
    }

    private static char[] n(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x47);
        }
        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 -> 54;
                    case 1 -> 29;
                    case 2 -> 67;
                    case 3 -> 22;
                    case 4 -> 6;
                    case 5 -> 53;
                    default -> 71;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

