/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.io.NonCloseableOutputStream
 *  com.l7tech.gateway.common.custom.CustomAssertionDescriptor
 *  com.l7tech.gateway.common.custom.CustomAssertionsRegistrar
 *  com.l7tech.gateway.common.custom.CustomAssertionsRegistrar$AssertionResourceData
 *  com.l7tech.gateway.common.module.AssertionModuleInfo
 *  com.l7tech.gateway.common.module.ModuleLoadingException
 *  com.l7tech.gateway.common.module.ServerModuleFile
 *  com.l7tech.policy.assertion.CustomAssertionHolder
 *  com.l7tech.policy.assertion.ext.Category
 *  com.l7tech.policy.assertion.ext.CustomAssertion
 *  com.l7tech.policy.assertion.ext.CustomAssertionUI
 *  com.l7tech.policy.assertion.ext.CustomCredentialSource
 *  com.l7tech.policy.assertion.ext.ServiceFinder
 *  com.l7tech.policy.assertion.ext.action.CustomTaskActionUI
 *  com.l7tech.policy.assertion.ext.cei.CustomExtensionInterfaceBinding
 *  com.l7tech.policy.assertion.ext.entity.CustomEntitySerializer
 *  com.l7tech.policy.assertion.ext.licensing.CustomFeatureSetName
 *  com.l7tech.policy.wsp.ClassLoaderUtil
 *  com.l7tech.util.Config
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.IOUtils
 *  com.l7tech.util.Pair
 *  com.l7tech.util.PoolByteArrayOutputStream
 *  com.l7tech.util.ResourceUtils
 *  org.apache.commons.compress.archivers.tar.TarArchiveEntry
 *  org.apache.commons.compress.archivers.tar.TarArchiveOutputStream
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 *  org.springframework.beans.factory.DisposableBean
 *  org.springframework.beans.factory.InitializingBean
 *  org.springframework.context.ApplicationContext
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.context.support.ApplicationObjectSupport
 *  org.springframework.core.io.ContextResource
 *  org.springframework.core.io.FileSystemResource
 *  org.springframework.core.io.Resource
 *  org.springframework.core.io.support.PathMatchingResourcePatternResolver
 */
package com.l7tech.server.policy.custom;

import com.l7tech.common.io.NonCloseableOutputStream;
import com.l7tech.gateway.common.custom.CustomAssertionDescriptor;
import com.l7tech.gateway.common.custom.CustomAssertionsRegistrar;
import com.l7tech.gateway.common.module.AssertionModuleInfo;
import com.l7tech.gateway.common.module.ModuleLoadingException;
import com.l7tech.gateway.common.module.ServerModuleFile;
import com.l7tech.policy.assertion.CustomAssertionHolder;
import com.l7tech.policy.assertion.ext.Category;
import com.l7tech.policy.assertion.ext.CustomAssertion;
import com.l7tech.policy.assertion.ext.CustomAssertionUI;
import com.l7tech.policy.assertion.ext.CustomCredentialSource;
import com.l7tech.policy.assertion.ext.ServiceFinder;
import com.l7tech.policy.assertion.ext.action.CustomTaskActionUI;
import com.l7tech.policy.assertion.ext.cei.CustomExtensionInterfaceBinding;
import com.l7tech.policy.assertion.ext.entity.CustomEntitySerializer;
import com.l7tech.policy.assertion.ext.licensing.CustomFeatureSetName;
import com.l7tech.policy.wsp.ClassLoaderUtil;
import com.l7tech.server.DefaultKey;
import com.l7tech.server.admin.ExtensionInterfaceManager;
import com.l7tech.server.module.AssertionModuleFinder;
import com.l7tech.server.policy.CustomKeyValueStoreManager;
import com.l7tech.server.policy.SecurePasswordServicesImpl;
import com.l7tech.server.policy.ServerAssertionRegistry;
import com.l7tech.server.policy.ServiceFinderImpl;
import com.l7tech.server.policy.custom.a;
import com.l7tech.server.policy.custom.b;
import com.l7tech.server.policy.module.AllCustomAssertionClassLoader;
import com.l7tech.server.policy.module.CustomAssertionModule;
import com.l7tech.server.policy.module.CustomAssertionModulesConfig;
import com.l7tech.server.policy.module.CustomAssertionsScanner;
import com.l7tech.server.policy.module.ModularAssertionModule;
import com.l7tech.server.policy.module.ScannerCallbacks;
import com.l7tech.server.security.SignerServicesImpl;
import com.l7tech.server.security.keystore.SsgKeyStoreManager;
import com.l7tech.server.security.password.SecurePasswordManager;
import com.l7tech.server.store.KeyValueStoreServicesImpl;
import com.l7tech.util.Config;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.IOUtils;
import com.l7tech.util.Pair;
import com.l7tech.util.PoolByteArrayOutputStream;
import com.l7tech.util.ResourceUtils;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.GZIPOutputStream;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.support.ApplicationObjectSupport;
import org.springframework.core.io.ContextResource;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

/*
 * Exception performing whole class analysis ignored.
 */
public class CustomAssertionsRegistrarImpl
extends ApplicationObjectSupport
implements CustomAssertionsRegistrar,
InitializingBean,
DisposableBean,
AssertionModuleFinder<CustomAssertionModule> {
    private static final Logger a;
    private Config b;
    private ClassLoader c;
    private final ServerAssertionRegistry d;
    private ExtensionInterfaceManager e;
    private SecurePasswordManager f;
    private CustomKeyValueStoreManager g;
    private SsgKeyStoreManager h;
    private DefaultKey i;
    private CustomAssertionsScanner j = null;
    private ServiceFinderImpl k = null;
    private static final String[] l;

    public CustomAssertionsRegistrarImpl(ServerAssertionRegistry serverAssertionRegistry) {
        if (serverAssertionRegistry == null) {
            throw new IllegalArgumentException(l[1]);
        }
        this.d = serverAssertionRegistry;
    }

    public byte[] getAssertionClass(String string) {
        block4: {
            try {
                try {
                    if (string != null && string.lastIndexOf(46) > string.indexOf(46)) break block4;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
                }
                return null;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
            }
        }
        String string2 = string.replace('.', '/') + l[52];
        return this.getAssertionResourceBytes(string2);
    }

    public byte[] getAssertionResourceBytes(String string) {
        try {
            if (a.isLoggable(Level.FINEST)) {
                a.finest(l[56] + string);
            }
        }
        catch (IOException iOException) {
            throw CustomAssertionsRegistrarImpl.a(iOException);
        }
        try {
            if (this.c == null) {
                return null;
            }
        }
        catch (IOException iOException) {
            throw CustomAssertionsRegistrarImpl.a(iOException);
        }
        byte[] byArray = this.a(string);
        try {
            if (byArray != null) {
                return byArray;
            }
        }
        catch (IOException iOException) {
            throw CustomAssertionsRegistrarImpl.a(iOException);
        }
        Set<ModularAssertionModule> set = this.d.getLoadedModules();
        for (ModularAssertionModule modularAssertionModule : set) {
            try {
                byte[] byArray2 = modularAssertionModule.getResourceBytes(string, true);
                if (byArray2 == null) continue;
                return byArray2;
            }
            catch (IOException iOException) {
                String string2 = ExceptionUtils.getMessage((Throwable)iOException);
                String string3 = string;
                String string4 = modularAssertionModule.getName();
                String[] stringArray = l;
                a.log(Level.WARNING, stringArray[42] + string4 + stringArray[76] + string3 + stringArray[73] + string2, iOException);
            }
        }
        return null;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    public byte[] getAssertionResourceDataAsBytes(Collection<String> collection) {
        byte[] byArray;
        long l2 = System.currentTimeMillis();
        ByteArrayOutputStream byteArrayOutputStream = null;
        try {
            ArrayList<Pair> arrayList = new ArrayList<Pair>(collection.size());
            for (String object2 : collection) {
                arrayList.add(new Pair((Object)object2, (Object)this.getAssertionResourceData(object2)));
            }
            byteArrayOutputStream = new ByteArrayOutputStream();
            GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(byteArrayOutputStream);
            ObjectOutputStream d11 = new ObjectOutputStream(gZIPOutputStream);
            d11.writeObject(arrayList);
            d11.flush();
            d11.close();
            byte[] byArray2 = byteArrayOutputStream.toByteArray();
            try {
                if (a.isLoggable(Level.FINE)) {
                    a.log(Level.FINE, l[16] + byArray2.length);
                }
            }
            catch (IOException iOException) {
                throw CustomAssertionsRegistrarImpl.a(iOException);
            }
            byArray = byArray2;
        }
        catch (IOException iOException) {
            String[] stringArray2;
            try {
                stringArray2 = l;
                a.log(Level.WARNING, stringArray2[81] + ExceptionUtils.getMessage((Throwable)iOException), iOException);
            }
            catch (Throwable throwable) {
                ResourceUtils.closeQuietly(byteArrayOutputStream);
                if (!a.isLoggable(Level.FINE)) throw throwable;
                long l3 = System.currentTimeMillis();
                double d10 = ((double)l3 - (double)l2) / 1000.0;
                String[] stringArray = l;
                a.log(Level.FINE, String.format(stringArray[32], d10, stringArray[53]));
                throw throwable;
            }
            ResourceUtils.closeQuietly((Closeable)byteArrayOutputStream);
            if (!a.isLoggable(Level.FINE)) return null;
            long l4 = System.currentTimeMillis();
            double d11 = ((double)l4 - (double)l2) / 1000.0;
            a.log(Level.FINE, String.format(stringArray2[32], d11, stringArray2[53]));
            return null;
        }
        ResourceUtils.closeQuietly((Closeable)byteArrayOutputStream);
        if (!a.isLoggable(Level.FINE)) return byArray;
        long l4 = System.currentTimeMillis();
        double d12 = ((double)l4 - (double)l2) / 1000.0;
        String[] stringArray = l;
        a.log(Level.FINE, String.format(stringArray[10], d12, stringArray[8]));
        return byArray;
    }

    public CustomAssertionsRegistrar.AssertionResourceData getAssertionResourceData(String string) {
        try {
            if (a.isLoggable(Level.FINEST)) {
                a.finest(l[19] + string);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        try {
            if (this.c == null) {
                return null;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        byte[] byArray = this.a(string);
        try {
            if (byArray != null) {
                return new CustomAssertionsRegistrar.AssertionResourceData(string, false, byArray);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        return this.b(string);
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    private byte[] a(String string) {
        InputStream inputStream;
        block4: {
            byte[] byArray;
            inputStream = null;
            try {
                if (!this.d(string) || (inputStream = this.c.getResourceAsStream(string)) == null) break block4;
                byArray = IOUtils.slurpStream((InputStream)inputStream);
            }
            catch (IOException iOException) {
                try {
                    String[] stringArray = l;
                    a.log(Level.WARNING, stringArray[36] + string + stringArray[73] + ExceptionUtils.getMessage((Throwable)iOException), iOException);
                }
                catch (Throwable throwable) {
                    ResourceUtils.closeQuietly(inputStream);
                    throw throwable;
                }
                ResourceUtils.closeQuietly((Closeable)inputStream);
            }
            ResourceUtils.closeQuietly((Closeable)inputStream);
            return byArray;
        }
        ResourceUtils.closeQuietly(inputStream);
        return null;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    private CustomAssertionsRegistrar.AssertionResourceData b(@NotNull String string) {
        CustomAssertionsRegistrar.AssertionResourceData assertionResourceData;
        block24: {
            String[] stringArray;
            try {
                if (string == null) {
                    CustomAssertionsRegistrarImpl.a(0);
                }
            }
            catch (IOException iOException) {
                throw CustomAssertionsRegistrarImpl.a(iOException);
            }
            assertionResourceData = null;
            long l2 = System.currentTimeMillis();
            Set<ModularAssertionModule> set = this.d.getLoadedModules();
            PoolByteArrayOutputStream poolByteArrayOutputStream = null;
            try {
                poolByteArrayOutputStream = new PoolByteArrayOutputStream(65536);
                TarArchiveOutputStream tarArchiveOutputStream = null;
                try {
                    for (ModularAssertionModule modularAssertionModule : set) {
                        byte[] byArray = modularAssertionModule.getResourceBytes(string, true);
                        if (byArray == null) continue;
                        HashSet<String> hashSet = this.a(string, modularAssertionModule.getClientResources(), modularAssertionModule);
                        try {
                            if (a.isLoggable(Level.FINE)) {
                                a.log(Level.FINE, l[23] + hashSet.size());
                            }
                        }
                        catch (IOException iOException) {
                            throw CustomAssertionsRegistrarImpl.a(iOException);
                        }
                        for (String string2 : hashSet) {
                            if (!this.a(string, string2)) continue;
                            byte[] byArray2 = modularAssertionModule.getResourceBytes(string2, true);
                            try {
                                if (byArray2 == null) {
                                    a.warning(l[62] + string2 + l[30]);
                                    continue;
                                }
                            }
                            catch (IOException iOException) {
                                throw CustomAssertionsRegistrarImpl.a(iOException);
                            }
                            if (tarArchiveOutputStream == null) {
                                tarArchiveOutputStream = new TarArchiveOutputStream((OutputStream)new GZIPOutputStream((OutputStream)new NonCloseableOutputStream((OutputStream)poolByteArrayOutputStream)));
                                tarArchiveOutputStream.setLongFileMode(3);
                            }
                            TarArchiveEntry tarArchiveEntry = new TarArchiveEntry(string2);
                            tarArchiveEntry.setSize((long)byArray2.length);
                            tarArchiveOutputStream.putArchiveEntry(tarArchiveEntry);
                            tarArchiveOutputStream.write(byArray2);
                            tarArchiveOutputStream.closeArchiveEntry();
                        }
                        if (tarArchiveOutputStream == null) {
                            assertionResourceData = new CustomAssertionsRegistrar.AssertionResourceData(string, false, byArray);
                        }
                        break;
                    }
                }
                catch (IOException iOException) {
                    stringArray = l;
                    a.log(Level.WARNING, stringArray[28], iOException);
                }
                finally {
                    ResourceUtils.closeQuietly(tarArchiveOutputStream);
                }
                if (tarArchiveOutputStream != null) {
                    assertionResourceData = new CustomAssertionsRegistrar.AssertionResourceData(this.c(string), true, poolByteArrayOutputStream.toByteArray());
                }
            }
            catch (Throwable throwable) {
                ResourceUtils.closeQuietly(poolByteArrayOutputStream);
                throw throwable;
            }
            ResourceUtils.closeQuietly((Closeable)poolByteArrayOutputStream);
            try {
                if (assertionResourceData == null || !a.isLoggable(Level.FINE)) break block24;
            }
            catch (IOException iOException) {
                throw CustomAssertionsRegistrarImpl.a(iOException);
            }
            long l3 = System.currentTimeMillis() - l2;
            String string3 = assertionResourceData.getResourceName();
            int n2 = assertionResourceData.getData().length;
            stringArray = l;
            a.log(Level.FINE, stringArray[29] + n2 + stringArray[61] + string3 + stringArray[5] + l3 + stringArray[25]);
        }
        return assertionResourceData;
    }

    @NotNull
    private HashSet<String> a(@NotNull String string, @Nullable String[] stringArray, @NotNull ModularAssertionModule modularAssertionModule) throws IOException {
        Object object;
        int n2;
        HashSet hashSet;
        HashSet hashSet2;
        String[] stringArray2;
        Object object2;
        try {
            if (string == null) {
                CustomAssertionsRegistrarImpl.a(1);
            }
        }
        catch (IOException iOException) {
            throw CustomAssertionsRegistrarImpl.a(iOException);
        }
        try {
            if (modularAssertionModule == null) {
                CustomAssertionsRegistrarImpl.a(2);
            }
        }
        catch (IOException iOException) {
            throw CustomAssertionsRegistrarImpl.a(iOException);
        }
        Resource[] resourceArray = null;
        try {
            object2 = new PathMatchingResourcePatternResolver(modularAssertionModule.getModuleClassLoader());
            stringArray2 = l;
            resourceArray = object2.getResources("/" + this.c(string) + stringArray2[15]);
        }
        catch (IOException iOException) {
            stringArray2 = l;
            a.log(Level.FINE, stringArray2[67] + string + stringArray2[60], ExceptionUtils.getDebugException((Throwable)iOException));
        }
        try {
            HashSet hashSet3;
            hashSet2 = hashSet3;
            hashSet = hashSet3;
            n2 = stringArray == null ? 0 : stringArray.length;
        }
        catch (IOException iOException) {
            throw CustomAssertionsRegistrarImpl.a(iOException);
        }
        hashSet2(n2 + (resourceArray == null ? 0 : resourceArray.length));
        object2 = hashSet;
        try {
            if (stringArray != null) {
                Collections.addAll(object2, stringArray);
            }
        }
        catch (IOException iOException) {
            throw CustomAssertionsRegistrarImpl.a(iOException);
        }
        if (resourceArray != null) {
            for (Resource resource : resourceArray) {
                ((HashSet)object2).add(CustomAssertionsRegistrarImpl.a(resource));
            }
        }
        try {
            object = object2;
            if (object == null) {
                CustomAssertionsRegistrarImpl.a(3);
            }
        }
        catch (IOException iOException) {
            throw CustomAssertionsRegistrarImpl.a(iOException);
        }
        return object;
    }

    private static String a(Resource resource) {
        block5: {
            try {
                if (resource instanceof ContextResource) {
                    return ((ContextResource)resource).getPathWithinContext();
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
            }
            try {
                if (!(resource instanceof FileSystemResource) || !((FileSystemResource)resource).getPath().contains(l[20])) break block5;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
            }
            String string = ((FileSystemResource)resource).getPath();
            return string.substring(string.indexOf(l[51]));
        }
        return resource.getFilename();
    }

    private boolean a(@NotNull String string, @NotNull String string2) {
        try {
            if (string == null) {
                CustomAssertionsRegistrarImpl.a(4);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        try {
            if (string2 == null) {
                CustomAssertionsRegistrarImpl.a(5);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        return this.c(string2).startsWith(this.c(string));
    }

    @NotNull
    private String c(@NotNull String string) {
        String string2;
        int n2;
        try {
            if (string == null) {
                CustomAssertionsRegistrarImpl.a(6);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        String string3 = string;
        if (string3.startsWith("/")) {
            string3 = string3.substring(1);
        }
        if ((n2 = string3.lastIndexOf(47)) >= 0) {
            string3 = string3.substring(0, n2);
        }
        try {
            string2 = string3;
            if (string2 == null) {
                CustomAssertionsRegistrarImpl.a(7);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        return string2;
    }

    public CustomAssertionHolder getAssertion(String string) {
        return this.a(com.l7tech.server.policy.custom.a.c(string));
    }

    public CustomAssertionHolder getAssertionByExternalName(String string) {
        return this.a(com.l7tech.server.policy.custom.a.d(string));
    }

    public Collection<CustomAssertionHolder> getAssertions() {
        Set<CustomAssertionDescriptor> set = com.l7tech.server.policy.custom.a.b();
        return this.a(set);
    }

    public Collection<CustomAssertionHolder> getAssertions(Category category) {
        Set<CustomAssertionDescriptor> set = com.l7tech.server.policy.custom.a.a(category);
        return this.a(set);
    }

    public boolean hasCustomCredentialSource() {
        try {
            Set<CustomAssertionDescriptor> set = com.l7tech.server.policy.custom.a.b();
            for (CustomAssertionDescriptor customAssertionDescriptor : set) {
                CustomCredentialSource customCredentialSource;
                if (customAssertionDescriptor.hasCategory(Category.ACCESS_CONTROL)) {
                    return true;
                }
                if (!CustomCredentialSource.class.isAssignableFrom(customAssertionDescriptor.getAssertion()) || !(customCredentialSource = (CustomCredentialSource)customAssertionDescriptor.getAssertion().newInstance()).isCredentialSource()) continue;
                return true;
            }
        }
        catch (Exception exception) {
            a.log(Level.WARNING, l[55], exception);
        }
        return false;
    }

    public CustomAssertionDescriptor getDescriptor(Class clazz) {
        return com.l7tech.server.policy.custom.a.a(clazz);
    }

    public Collection<AssertionModuleInfo> getAssertionModuleInfo() {
        ArrayList<AssertionModuleInfo> arrayList = new ArrayList<AssertionModuleInfo>();
        Set<CustomAssertionModule> set = this.getLoadedModules();
        for (CustomAssertionModule customAssertionModule : set) {
            arrayList.add(new AssertionModuleInfo(customAssertionModule.getName(), customAssertionModule.getEntityName(), customAssertionModule.getDigest(), this.a(customAssertionModule)));
        }
        return arrayList;
    }

    public AssertionModuleInfo getModuleInfoForAssertionClass(String string) {
        try {
            if (string == null) {
                throw new IllegalArgumentException(l[69]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        CustomAssertionModule customAssertionModule = this.getModuleForAssertion(string);
        try {
            if (customAssertionModule != null) {
                return new AssertionModuleInfo(customAssertionModule.getName(), customAssertionModule.getEntityName(), customAssertionModule.getDigest(), this.a(customAssertionModule));
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        return null;
    }

    private Collection<String> a(@NotNull CustomAssertionModule customAssertionModule) {
        try {
            if (customAssertionModule == null) {
                CustomAssertionsRegistrarImpl.a(8);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        ArrayList<String> arrayList = new ArrayList<String>();
        for (CustomAssertionDescriptor customAssertionDescriptor : customAssertionModule.getDescriptors()) {
            arrayList.add(customAssertionDescriptor.getAssertion().getName());
        }
        return Collections.unmodifiableCollection(arrayList);
    }

    public CustomAssertionUI getUI(String string) {
        return com.l7tech.server.policy.custom.a.a(string);
    }

    public CustomTaskActionUI getTaskActionUI(String string) {
        return com.l7tech.server.policy.custom.a.b(string);
    }

    public CustomEntitySerializer getExternalEntitySerializer(String string) {
        return com.l7tech.server.policy.custom.a.e(string);
    }

    public void setServerConfig(Config config) {
        this.b = config;
    }

    public void setExtensionInterfaceManager(ExtensionInterfaceManager extensionInterfaceManager) {
        this.e = extensionInterfaceManager;
    }

    public void setSecurePasswordManager(SecurePasswordManager securePasswordManager) {
        this.f = securePasswordManager;
    }

    public void setCustomKeyValueStoreManager(CustomKeyValueStoreManager customKeyValueStoreManager) {
        this.g = customKeyValueStoreManager;
    }

    public void setSsgKeyStoreManager(SsgKeyStoreManager ssgKeyStoreManager) {
        this.h = ssgKeyStoreManager;
    }

    public void setDefaultKey(DefaultKey defaultKey) {
        this.i = defaultKey;
    }

    public CustomAssertionsScanner createScanner(@NotNull CustomAssertionModulesConfig customAssertionModulesConfig, @NotNull ScannerCallbacks.CustomAssertion customAssertion) {
        try {
            if (customAssertionModulesConfig == null) {
                CustomAssertionsRegistrarImpl.a(9);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        try {
            if (customAssertion == null) {
                CustomAssertionsRegistrarImpl.a(10);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        return new CustomAssertionsScanner(customAssertionModulesConfig, customAssertion);
    }

    public CustomAssertionModulesConfig createScannerConfig(@NotNull Config config) {
        try {
            if (config == null) {
                CustomAssertionsRegistrarImpl.a(11);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        return new CustomAssertionModulesConfig(config);
    }

    public void afterPropertiesSet() throws Exception {
        try {
            if (this.b == null) {
                throw new IllegalArgumentException(l[70]);
            }
        }
        catch (Exception exception) {
            throw CustomAssertionsRegistrarImpl.a(exception);
        }
        try {
            if (this.e == null) {
                throw new IllegalArgumentException(l[31]);
            }
        }
        catch (Exception exception) {
            throw CustomAssertionsRegistrarImpl.a(exception);
        }
        try {
            if (this.f == null) {
                throw new IllegalArgumentException(l[27]);
            }
        }
        catch (Exception exception) {
            throw CustomAssertionsRegistrarImpl.a(exception);
        }
        try {
            if (this.g == null) {
                throw new IllegalArgumentException(l[68]);
            }
        }
        catch (Exception exception) {
            throw CustomAssertionsRegistrarImpl.a(exception);
        }
        try {
            if (this.h == null) {
                throw new IllegalArgumentException(l[75]);
            }
        }
        catch (Exception exception) {
            throw CustomAssertionsRegistrarImpl.a(exception);
        }
        try {
            if (this.i == null) {
                throw new IllegalArgumentException(l[24]);
            }
        }
        catch (Exception exception) {
            throw CustomAssertionsRegistrarImpl.a(exception);
        }
        CustomAssertionModulesConfig customAssertionModulesConfig = this.createScannerConfig(this.b);
        b b10 = new b(this);
        this.j = this.createScanner(customAssertionModulesConfig, b10);
        this.j.scanModules();
        ClassLoader classLoader = this.getClass().getClassLoader();
        if (customAssertionModulesConfig.getModuleDir() != null) {
            classLoader = new AllCustomAssertionClassLoader(AllCustomAssertionClassLoader.class.getClassLoader(), this.j.getModules(), classLoader);
            ClassLoaderUtil.setClassloader((ClassLoader)classLoader);
        }
        this.c = classLoader;
        this.j.startTimer(customAssertionModulesConfig.getRescanPeriodMillis());
    }

    private Collection<CustomAssertionHolder> a(Set set) {
        ArrayList<CustomAssertionHolder> arrayList = new ArrayList<CustomAssertionHolder>();
        for (Object e10 : set) {
            CustomAssertionHolder customAssertionHolder = this.a((CustomAssertionDescriptor)e10);
            try {
                if (customAssertionHolder == null) continue;
                arrayList.add(customAssertionHolder);
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
            }
        }
        return arrayList;
    }

    private CustomAssertionHolder a(CustomAssertionDescriptor customAssertionDescriptor) {
        CustomAssertionHolder customAssertionHolder = null;
        try {
            if (customAssertionDescriptor == null) {
                return null;
            }
        }
        catch (Exception exception) {
            throw CustomAssertionsRegistrarImpl.a(exception);
        }
        try {
            Class clazz = customAssertionDescriptor.getAssertion();
            customAssertionHolder = new CustomAssertionHolder();
            CustomAssertion customAssertion = (CustomAssertion)clazz.newInstance();
            customAssertionHolder.setCustomAssertion(customAssertion);
            customAssertionHolder.setCategories(customAssertionDescriptor.getCategories());
            customAssertionHolder.setDescriptionText(customAssertionDescriptor.getDescription());
            customAssertionHolder.setPaletteNodeName(customAssertionDescriptor.getPaletteNodeName());
            customAssertionHolder.setPolicyNodeName(customAssertionDescriptor.getPolicyNodeName());
            customAssertionHolder.setIsUiAutoOpen(customAssertionDescriptor.getIsUiAutoOpen());
            customAssertionHolder.setModuleFileName(customAssertionDescriptor.getModuleFileName());
            if (customAssertion instanceof CustomFeatureSetName) {
                CustomFeatureSetName customFeatureSetName = (CustomFeatureSetName)customAssertion;
                customAssertionHolder.setRegisteredCustomFeatureSetName(customFeatureSetName.getFeatureSetName());
            }
        }
        catch (Exception exception) {
            a.log(Level.WARNING, l[43], exception);
        }
        return customAssertionHolder;
    }

    private boolean d(String string) {
        boolean bl2 = false;
        Set<CustomAssertionDescriptor> set = com.l7tech.server.policy.custom.a.a();
        Iterator<CustomAssertionDescriptor> iterator = set.iterator();
        while (iterator.hasNext()) {
            CustomAssertionDescriptor customAssertionDescriptor;
            block10: {
                Class clazz;
                block9: {
                    CustomAssertionDescriptor customAssertionDescriptor2;
                    customAssertionDescriptor = customAssertionDescriptor2 = iterator.next();
                    Class clazz2 = customAssertionDescriptor.getAssertion();
                    clazz = customAssertionDescriptor.getUiClass();
                    try {
                        if (clazz2 == null || !string.startsWith(clazz2.getPackage().getName().replace('.', '/'))) break block9;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
                    }
                    bl2 = true;
                    break;
                }
                try {
                    if (clazz == null || !string.startsWith(clazz.getPackage().getName().replace('.', '/'))) break block10;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
                }
                bl2 = true;
                break;
            }
            String[] stringArray = customAssertionDescriptor.getUiAllowedPackages();
            for (String string2 : stringArray) {
                if (!string.startsWith(string2)) continue;
                bl2 = true;
                break;
            }
            try {
                if (bl2) {
                    break;
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
            }
            Set set2 = customAssertionDescriptor.getUiAllowedResources();
            if (!set2.contains(string)) continue;
            bl2 = true;
            break;
        }
        return bl2;
    }

    protected final void registerCustomExtensionInterface(@Nullable Class<? extends CustomExtensionInterfaceBinding> clazz) throws IllegalAccessException, InstantiationException {
        try {
            if (CustomExtensionInterfaceBinding.getServiceFinder() == null) {
                CustomExtensionInterfaceBinding.setServiceFinder((ServiceFinder)this.a());
            }
        }
        catch (IllegalAccessException illegalAccessException) {
            throw CustomAssertionsRegistrarImpl.a(illegalAccessException);
        }
        if (clazz != null) {
            CustomExtensionInterfaceBinding customExtensionInterfaceBinding = clazz.newInstance();
            this.e.registerInterface(customExtensionInterfaceBinding.getInterfaceClass(), null, customExtensionInterfaceBinding.getImplementationObject(), true);
        }
    }

    @Deprecated
    protected final String parseModuleFileName(@NotNull String string, @NotNull String string2) {
        try {
            if (string == null) {
                CustomAssertionsRegistrarImpl.a(12);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        try {
            if (string2 == null) {
                CustomAssertionsRegistrarImpl.a(13);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        String string3 = string;
        String string4 = File.separator;
        int n2 = string3.indexOf("!" + string4 + string2);
        if (n2 < 0) {
            string4 = "/";
            n2 = string3.indexOf("!" + string4 + string2);
        }
        string3 = string3.substring(0, n2);
        string3 = string3.substring(string3.lastIndexOf(string4) + 1);
        return string3;
    }

    private void a(@NotNull ApplicationEvent applicationEvent) {
        try {
            if (applicationEvent == null) {
                CustomAssertionsRegistrarImpl.a(14);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        ApplicationContext applicationContext = this.getApplicationContext();
        try {
            if (applicationContext != null) {
                applicationContext.publishEvent(applicationEvent);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
    }

    public void destroy() throws Exception {
        this.j.destroy();
    }

    private ServiceFinderImpl a() {
        try {
            if (this.f == null) {
                throw new IllegalStateException(l[9]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        try {
            if (this.g == null) {
                throw new IllegalStateException(l[74]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        try {
            if (this.h == null) {
                throw new IllegalStateException(l[48]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        try {
            if (this.i == null) {
                throw new IllegalStateException(l[14]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        try {
            if (this.k == null) {
                this.k = new ServiceFinderImpl();
                this.k.setSecurePasswordServicesImpl(new SecurePasswordServicesImpl(this.f));
                this.k.setKeyValueStoreImpl(new KeyValueStoreServicesImpl(this.g));
                this.k.setSignerServicesImpl(new SignerServicesImpl(this.h, this.i));
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        return this.k;
    }

    public void loadModule(@NotNull File file, @NotNull ServerModuleFile serverModuleFile) throws ModuleLoadingException {
        try {
            if (file == null) {
                CustomAssertionsRegistrarImpl.a(15);
            }
        }
        catch (ModuleLoadingException moduleLoadingException) {
            throw CustomAssertionsRegistrarImpl.a((Exception)((Object)moduleLoadingException));
        }
        try {
            if (serverModuleFile == null) {
                CustomAssertionsRegistrarImpl.a(16);
            }
        }
        catch (ModuleLoadingException moduleLoadingException) {
            throw CustomAssertionsRegistrarImpl.a((Exception)((Object)moduleLoadingException));
        }
        this.j.loadServerModuleFile(file, serverModuleFile.getModuleSha256(), serverModuleFile.getName());
    }

    public void updateModule(@NotNull File file, @NotNull ServerModuleFile serverModuleFile) {
        try {
            if (file == null) {
                CustomAssertionsRegistrarImpl.a(17);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        try {
            if (serverModuleFile == null) {
                CustomAssertionsRegistrarImpl.a(18);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        this.j.updateServerModuleFile(file, serverModuleFile.getModuleSha256(), serverModuleFile.getName());
    }

    public void unloadModule(@NotNull File file, @NotNull ServerModuleFile serverModuleFile) throws ModuleLoadingException {
        try {
            if (file == null) {
                CustomAssertionsRegistrarImpl.a(19);
            }
        }
        catch (ModuleLoadingException moduleLoadingException) {
            throw CustomAssertionsRegistrarImpl.a((Exception)((Object)moduleLoadingException));
        }
        try {
            if (serverModuleFile == null) {
                CustomAssertionsRegistrarImpl.a(20);
            }
        }
        catch (ModuleLoadingException moduleLoadingException) {
            throw CustomAssertionsRegistrarImpl.a((Exception)((Object)moduleLoadingException));
        }
        this.j.unloadServerModuleFile(file, serverModuleFile.getModuleSha256(), serverModuleFile.getName());
    }

    public boolean isModuleLoaded(@NotNull File file, @NotNull ServerModuleFile serverModuleFile) {
        try {
            if (file == null) {
                CustomAssertionsRegistrarImpl.a(21);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        try {
            if (serverModuleFile == null) {
                CustomAssertionsRegistrarImpl.a(22);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        return this.j.isServerModuleFileLoaded(file, serverModuleFile.getModuleSha256(), serverModuleFile.getName());
    }

    @Override
    @Nullable
    public CustomAssertionModule getModuleForAssertion(@NotNull String string) {
        try {
            if (string == null) {
                CustomAssertionsRegistrarImpl.a(23);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        for (CustomAssertionModule customAssertionModule : this.j.getModules()) {
            try {
                if (!customAssertionModule.offersClass(string)) continue;
                return customAssertionModule;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
            }
        }
        return null;
    }

    @Override
    @Nullable
    public CustomAssertionModule getModuleByName(@NotNull String string) {
        try {
            if (string == null) {
                CustomAssertionsRegistrarImpl.a(24);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        for (CustomAssertionModule customAssertionModule : this.j.getModules()) {
            try {
                if (!customAssertionModule.getName().equals(string)) continue;
                return customAssertionModule;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
            }
        }
        return null;
    }

    @Override
    @Nullable
    public CustomAssertionModule getModuleForClassLoader(ClassLoader classLoader) {
        try {
            if (classLoader == null) {
                throw new IllegalArgumentException(l[21]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        for (CustomAssertionModule customAssertionModule : this.j.getModules()) {
            try {
                if (classLoader != customAssertionModule.getModuleClassLoader()) continue;
                return customAssertionModule;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
            }
        }
        return null;
    }

    @Override
    @Nullable
    public CustomAssertionModule getModuleForPackage(@NotNull String string) {
        try {
            if (string == null) {
                CustomAssertionsRegistrarImpl.a(25);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        throw new UnsupportedOperationException(l[71]);
    }

    @Override
    public boolean isFirstPartyAssertionPackage(@NotNull String string) {
        try {
            if (string == null) {
                CustomAssertionsRegistrarImpl.a(26);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionsRegistrarImpl.a(illegalArgumentException);
        }
        throw new UnsupportedOperationException(l[41]);
    }

    @Override
    @NotNull
    public Set<CustomAssertionModule> getLoadedModules() {
        return new HashSet<CustomAssertionModule>(this.j.getModules());
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[82];
                var3_1 = 0;
                var2_2 = "\nz*N\r\u0016*\u001dO8U\u0010\u001d\u0019l*D\n\u0010 \u0017q\u000bD\u001f\r:\fm \u0001\u0011\u0017i\nz(T\u0011\u0016,\u001c\u0005\u001di<O\f\b\u001fz-q\u0019\u0010!\u000b\u0007\u001fe0Q,\u0005;\u0006Xk6N\u0013D\t\u001bs8R\u000b*(\u0015z\f\ro=@\f\u0001\u0004\u0017{,M\u001d%\u001fz-\u0001\u0019\u0017:\u001dm-H\u0017\ni\nz*N\r\u0016*\u001d?=@\f\u0005i\u0019lyC\u0001\u0010,\u000b1(\u000bz:T\n\u0001\u0019\u0019l*V\u0017\u0016-5~7@\u001f\u0001;Xv*\u0001\u0016\u000b=Xv7H\f\r(\u0014v#D\u001c\u0012])w\u0013\u001eD:\u001d|yG\u0017\u0016sX:*+\f\u0015p=T\u0014\u0001\f\u0016k0U\u0001\u000e\u001fz-q\u0019\u0007\"\u0019x<q\u0019\u0010!\u0013\b~+R\u001d)&\u001cj5D>\r%\u001dQ8L\u001d\u001d\u001cz?@\r\b=3z \u0001\u0011\u0017i\u0016p-\u0001\u0011\n \fv8M\u0011\u001e,\u001c\u000bW5s\u000eRJ*\u0014~*R%9l*D\n\u0010 \u0017qyS\u001d\u0017&\rm:DX\u0000(\f~yC\u0001\u0010,Xs<O\u001f\u0010!B?\u0004\b~-I\n\u000bk8F\u001d\u0000\u000f\u0011s<(+z+W\u0011\n.X|,R\f\u000b$X~*R\u001d\u0016=\u0011p7\u0001\n\u0001:\u0017j+B\u001dD-\u0019k8\u001bX\n\u001bp4\u000e\u0014S=\u001d|1\u001b\u001bs8R\u000b(&\u0019{<SX\u0007(\u0016q6UX\u0006,Xq,M\u0014E=\u001bp4\u000e\u0014S=\u001d|1\u000e\u000b\u0001;\u000ez+\u000e\b\u000b%\u0011| \u000e\u001b\u0011:\fp4\u000e;\u0011:\fp4`\u000b\u0017,\nk0N\u0016\u0017\u001b\u001dx0R\f\u0016(\nV4Q\u0014\u000b(~-IX\u0017 \u0002zc\u0001\u0017<z?@\r\b=XT<XX\r:Xm<P\r\r;\u001d{\u0003\u0015lw\u000e\u001fz-q\u0019\u0007\"\u0019x<q\u0019\u0010!#+z:T\n\u0001i(~*R\u000f\u000b;\u001c?\u0014@\u0016\u0005.\u001dmyH\u000bD;\u001dn,H\n\u0001-!=m+N\nD*\nz8U\u0011\n.Xm<R\u0017\u0011;\u001bzyf\"-\u0019XK\u0018sV\t;m<@\f\r'\u001f?\u0002_1'=g-D\u0016\u0017 \u0017qyh\u0016\u0010,\ny8B\u001dD\u0004\u0019q8F\u001d\u0016i\u0011lyS\u001d\u0015<\u0011m<E\u0012])w\u0013\u001eD:\u001d|yG\u0017\u0016sX:*+>9m>T\u0015\u0001'\f??N\nD\t6p-o\r\b%Xo8S\u0019\t,\fz+\u0001_A:_?6GXA:V:*\u0001\u0015\u0011:\f?7N\fD+\u001d?7T\u0014\b\u0015\u001fz-l\u0017\u0000<\u0014z\u001fN\n%:\u000bz+U\u0011\u000b'\f\rq5N\u0019\u0000\u0004\u0017{,M\u001d)=m+N\nD%\u0017~=H\u0016\u0003i\u001bj*U\u0017\ti\u0019l*D\n\u0010 \u0017qyS\u001d\u0017&\rm:DBD=\u001bp4\u000e\u0014S=\u001d|1\u000e\u000b\u0001;\u000ez+\u000e\b\u000b%\u0011| \u000e\u001b\u0011:\fp4\u000e;\u0011:\fp4`\u000b\u0017,\nk0N\u0016\u0017\u001b\u001dx0R\f\u0016(\nV4Q\u0014\f\bj;M\u0011\u0017!=i<O\f\u0005\b~-IJ\u000e\u001bp7G\u0011\u0003\u000f\u0011s<o\u0019\t,*5z-I\u0017\u0000i\u0016p-\u0001\u000b\u00119\bp+U\u001d\u0000i\u001ep+\u0001;\u0011:\fp4\u00019\u0017:\u001dm-H\u0017\n:#=m+N\nD%\u0017~=H\u0016\u0003i\nz*N\r\u0016*\u001d??S\u0017\ti\u0015p=T\u0014\u0001i&-q8C\u0014\u0001i\fpyH\u0016\u0017=\u0019q-H\u0019\u0010,X|,R\f\u000b$X~*R\u001d\u0016=\u0011p7\u0018\u001bj*U\u0017\t\b\u000bl<S\f\r&\u0016\\8M\u0014\u0006(\u001bt*\u0006\u0015p=T\u0014\u0001\u0006\u001bp7G\u0011\u0003\n\u0014p8E5\u000b-\rs<%\u000bl>j\u001d\u001d\u001a\fp+D5\u0005'\u0019x<SX\r:Xq6UX\r'\u0011k0@\u0014\r3\u001d{\u0012\u0011l\n@\u0015\u0001\u0006\nL,C(\u0005*\u0013~>D\u0013\u001bm<@\f\u0001\u001a\u001b~7O\u001d\u0016\n\u0017q?H\u001f\n\u001bp4\u000e\u0014S=\u001d|1\u0006V|5@\u000b\u0017%\u001fz-\u0001\u0019\u0017:\u001dm-H\u0017\ni\nz*N\r\u0016*\u001d?=@\f\u0005i\u0019lyC\u0001\u0010,\u000b1\r\u001bm<@\f\u0001\u001a\u001b~7O\u001d\u0016\\=m+N\nD>\u0010v5DX\u0000,\fz+L\u0011\n \u0016xyH\u001eD=\u0010z+DX\r:X~yb\r\u0017=\u0017r\u0018R\u000b\u0001;\fv6OX\u0016,\u001fv*U\u001d\u0016,\u001c?.I\u0011\u0007!Xv*\u0001\u001b\u0016,\u001cz7U\u0011\u0005%Xl6T\n\u0007,V#+z+W\u0011\n.X|,R\f\u000b$X~*R\u001d\u0016=\u0011p7\u0001\n\u0001:\u0017j+B\u001d^i\r\u0015p=T\u0014\u0001:;p7G\u0011\u0003*8Q6U6\u0011%\u0014?4D\f\f&\u001c?|RVA:Xr,R\fD'\u0017kyS\u001d\u0010<\nqyO\r\b%\u0005\b~-II`Xy6SX\u000b9\fv4H\u0002\u0005=\u0011p7\u000fXD\u001e\u0011s5\u0001\n\u0001:\u0017s/DX\b(\fz+\rX\b \u0013z5XX\u0014(\nkyN\u001eD-\u001do<O\u001c\u0001'\f?3@\nD%\u0011}+@\n\u001di\rq=D\nD\b9Mth6\"f\u0014v;\u000eV\u001dX} U\u001dD(\u000bl<S\f\r&\u0016?>[\u0011\u0014i\f~+\u0001\u001e\u000b;X\u00125v*R\u0011\n.Xm<R\u0017\u0011;\u001bzy\u0006\b\u001fz-q\u0019\u0010!\u000b\u000e\u0011l\u0014N\u001c\u0011%\u001dS6@\u001c\u0001-\u001c\u0011l\u001fH\n\u0017=(~+U\u0001%:\u000bz+U\u0011\u000b'(~:J\u0019\u0003,\u000b\b~:J\u0019\u0003,6~4D%-q8C\u0014\u0001i\fpyS\u001d\u0017&\u0014i<\u0001\u0019\u0017:\u001dm-H\u0017\ni\nz*N\r\u0016*\u001d?*;j*U\u0017\ti3z \u0001.\u0005%\rzyr\f\u000b;\u001d?\u0014@\u0016\u0005.\u001dmyH\u000bD;\u001dn,H\n\u0001-\u0019\u001bs8R\u000b*(\u0015zyB\u0019\n'\u0017kyC\u001dD'\rs5\u0000\u0019+z+W\u001d\u0016i;p7G\u0011\u0003i\u0011lyS\u001d\u0015<\u0011m<E*5z-I\u0017\u0000i\u0016p-\u0001\u000b\u00119\bp+U\u001d\u0000i\u001ep+\u0001;\u0011:\fp4\u00019\u0017:\u001dm-H\u0017\n:\u0011\u001bp7G\u0011\u0003\u000f\u0011s<t\n\b\u0019\u0019k1\u0002B?-\u001bj*U\u0017\t\u0002\u001df\u000f@\u0014\u0011,+k6S\u001d)(\u0016~>D\nD \u000b?7N\fD \u0016v-H\u0019\b \u0002z= +L\u001e\u00013\u00010+k6S\u001dD\u0004\u0019q8F\u001d\u0016i\u0011lyS\u001d\u0015<\u0011m<E\u0002B?\n\u0015p=T\u0014\u0001\u0007\u0019r<\u0013\u001fz-`\u000b\u0017,\nk0N\u0016'%\u0019l*D\u000b\u000f\u001fz-l\u0017\u0000<\u0014z\u001bX6\u0005$\u001d";
                var4_3 = "\nz*N\r\u0016*\u001dO8U\u0010\u001d\u0019l*D\n\u0010 \u0017q\u000bD\u001f\r:\fm \u0001\u0011\u0017i\nz(T\u0011\u0016,\u001c\u0005\u001di<O\f\b\u001fz-q\u0019\u0010!\u000b\u0007\u001fe0Q,\u0005;\u0006Xk6N\u0013D\t\u001bs8R\u000b*(\u0015z\f\ro=@\f\u0001\u0004\u0017{,M\u001d%\u001fz-\u0001\u0019\u0017:\u001dm-H\u0017\ni\nz*N\r\u0016*\u001d?=@\f\u0005i\u0019lyC\u0001\u0010,\u000b1(\u000bz:T\n\u0001\u0019\u0019l*V\u0017\u0016-5~7@\u001f\u0001;Xv*\u0001\u0016\u000b=Xv7H\f\r(\u0014v#D\u001c\u0012])w\u0013\u001eD:\u001d|yG\u0017\u0016sX:*+\f\u0015p=T\u0014\u0001\f\u0016k0U\u0001\u000e\u001fz-q\u0019\u0007\"\u0019x<q\u0019\u0010!\u0013\b~+R\u001d)&\u001cj5D>\r%\u001dQ8L\u001d\u001d\u001cz?@\r\b=3z \u0001\u0011\u0017i\u0016p-\u0001\u0011\n \fv8M\u0011\u001e,\u001c\u000bW5s\u000eRJ*\u0014~*R%9l*D\n\u0010 \u0017qyS\u001d\u0017&\rm:DX\u0000(\f~yC\u0001\u0010,Xs<O\u001f\u0010!B?\u0004\b~-I\n\u000bk8F\u001d\u0000\u000f\u0011s<(+z+W\u0011\n.X|,R\f\u000b$X~*R\u001d\u0016=\u0011p7\u0001\n\u0001:\u0017j+B\u001dD-\u0019k8\u001bX\n\u001bp4\u000e\u0014S=\u001d|1\u001b\u001bs8R\u000b(&\u0019{<SX\u0007(\u0016q6UX\u0006,Xq,M\u0014E=\u001bp4\u000e\u0014S=\u001d|1\u000e\u000b\u0001;\u000ez+\u000e\b\u000b%\u0011| \u000e\u001b\u0011:\fp4\u000e;\u0011:\fp4`\u000b\u0017,\nk0N\u0016\u0017\u001b\u001dx0R\f\u0016(\nV4Q\u0014\u000b(~-IX\u0017 \u0002zc\u0001\u0017<z?@\r\b=XT<XX\r:Xm<P\r\r;\u001d{\u0003\u0015lw\u000e\u001fz-q\u0019\u0007\"\u0019x<q\u0019\u0010!#+z:T\n\u0001i(~*R\u000f\u000b;\u001c?\u0014@\u0016\u0005.\u001dmyH\u000bD;\u001dn,H\n\u0001-!=m+N\nD*\nz8U\u0011\n.Xm<R\u0017\u0011;\u001bzyf\"-\u0019XK\u0018sV\t;m<@\f\r'\u001f?\u0002_1'=g-D\u0016\u0017 \u0017qyh\u0016\u0010,\ny8B\u001dD\u0004\u0019q8F\u001d\u0016i\u0011lyS\u001d\u0015<\u0011m<E\u0012])w\u0013\u001eD:\u001d|yG\u0017\u0016sX:*+>9m>T\u0015\u0001'\f??N\nD\t6p-o\r\b%Xo8S\u0019\t,\fz+\u0001_A:_?6GXA:V:*\u0001\u0015\u0011:\f?7N\fD+\u001d?7T\u0014\b\u0015\u001fz-l\u0017\u0000<\u0014z\u001fN\n%:\u000bz+U\u0011\u000b'\f\rq5N\u0019\u0000\u0004\u0017{,M\u001d)=m+N\nD%\u0017~=H\u0016\u0003i\u001bj*U\u0017\ti\u0019l*D\n\u0010 \u0017qyS\u001d\u0017&\rm:DBD=\u001bp4\u000e\u0014S=\u001d|1\u000e\u000b\u0001;\u000ez+\u000e\b\u000b%\u0011| \u000e\u001b\u0011:\fp4\u000e;\u0011:\fp4`\u000b\u0017,\nk0N\u0016\u0017\u001b\u001dx0R\f\u0016(\nV4Q\u0014\f\bj;M\u0011\u0017!=i<O\f\u0005\b~-IJ\u000e\u001bp7G\u0011\u0003\u000f\u0011s<o\u0019\t,*5z-I\u0017\u0000i\u0016p-\u0001\u000b\u00119\bp+U\u001d\u0000i\u001ep+\u0001;\u0011:\fp4\u00019\u0017:\u001dm-H\u0017\n:#=m+N\nD%\u0017~=H\u0016\u0003i\nz*N\r\u0016*\u001d??S\u0017\ti\u0015p=T\u0014\u0001i&-q8C\u0014\u0001i\fpyH\u0016\u0017=\u0019q-H\u0019\u0010,X|,R\f\u000b$X~*R\u001d\u0016=\u0011p7\u0018\u001bj*U\u0017\t\b\u000bl<S\f\r&\u0016\\8M\u0014\u0006(\u001bt*\u0006\u0015p=T\u0014\u0001\u0006\u001bp7G\u0011\u0003\n\u0014p8E5\u000b-\rs<%\u000bl>j\u001d\u001d\u001a\fp+D5\u0005'\u0019x<SX\r:Xq6UX\r'\u0011k0@\u0014\r3\u001d{\u0012\u0011l\n@\u0015\u0001\u0006\nL,C(\u0005*\u0013~>D\u0013\u001bm<@\f\u0001\u001a\u001b~7O\u001d\u0016\n\u0017q?H\u001f\n\u001bp4\u000e\u0014S=\u001d|1\u0006V|5@\u000b\u0017%\u001fz-\u0001\u0019\u0017:\u001dm-H\u0017\ni\nz*N\r\u0016*\u001d?=@\f\u0005i\u0019lyC\u0001\u0010,\u000b1\r\u001bm<@\f\u0001\u001a\u001b~7O\u001d\u0016\\=m+N\nD>\u0010v5DX\u0000,\fz+L\u0011\n \u0016xyH\u001eD=\u0010z+DX\r:X~yb\r\u0017=\u0017r\u0018R\u000b\u0001;\fv6OX\u0016,\u001fv*U\u001d\u0016,\u001c?.I\u0011\u0007!Xv*\u0001\u001b\u0016,\u001cz7U\u0011\u0005%Xl6T\n\u0007,V#+z+W\u0011\n.X|,R\f\u000b$X~*R\u001d\u0016=\u0011p7\u0001\n\u0001:\u0017j+B\u001d^i\r\u0015p=T\u0014\u0001:;p7G\u0011\u0003*8Q6U6\u0011%\u0014?4D\f\f&\u001c?|RVA:Xr,R\fD'\u0017kyS\u001d\u0010<\nqyO\r\b%\u0005\b~-II`Xy6SX\u000b9\fv4H\u0002\u0005=\u0011p7\u000fXD\u001e\u0011s5\u0001\n\u0001:\u0017s/DX\b(\fz+\rX\b \u0013z5XX\u0014(\nkyN\u001eD-\u001do<O\u001c\u0001'\f?3@\nD%\u0011}+@\n\u001di\rq=D\nD\b9Mth6\"f\u0014v;\u000eV\u001dX} U\u001dD(\u000bl<S\f\r&\u0016?>[\u0011\u0014i\f~+\u0001\u001e\u000b;X\u00125v*R\u0011\n.Xm<R\u0017\u0011;\u001bzy\u0006\b\u001fz-q\u0019\u0010!\u000b\u000e\u0011l\u0014N\u001c\u0011%\u001dS6@\u001c\u0001-\u001c\u0011l\u001fH\n\u0017=(~+U\u0001%:\u000bz+U\u0011\u000b'(~:J\u0019\u0003,\u000b\b~:J\u0019\u0003,6~4D%-q8C\u0014\u0001i\fpyS\u001d\u0017&\u0014i<\u0001\u0019\u0017:\u001dm-H\u0017\ni\nz*N\r\u0016*\u001d?*;j*U\u0017\ti3z \u0001.\u0005%\rzyr\f\u000b;\u001d?\u0014@\u0016\u0005.\u001dmyH\u000bD;\u001dn,H\n\u0001-\u0019\u001bs8R\u000b*(\u0015zyB\u0019\n'\u0017kyC\u001dD'\rs5\u0000\u0019+z+W\u001d\u0016i;p7G\u0011\u0003i\u0011lyS\u001d\u0015<\u0011m<E*5z-I\u0017\u0000i\u0016p-\u0001\u000b\u00119\bp+U\u001d\u0000i\u001ep+\u0001;\u0011:\fp4\u00019\u0017:\u001dm-H\u0017\n:\u0011\u001bp7G\u0011\u0003\u000f\u0011s<t\n\b\u0019\u0019k1\u0002B?-\u001bj*U\u0017\t\u0002\u001df\u000f@\u0014\u0011,+k6S\u001d)(\u0016~>D\nD \u000b?7N\fD \u0016v-H\u0019\b \u0002z= +L\u001e\u00013\u00010+k6S\u001dD\u0004\u0019q8F\u001d\u0016i\u0011lyS\u001d\u0015<\u0011m<E\u0002B?\n\u0015p=T\u0014\u0001\u0007\u0019r<\u0013\u001fz-`\u000b\u0017,\nk0N\u0016'%\u0019l*D\u000b\u000f\u001fz-l\u0017\u0000<\u0014z\u001bX6\u0005$\u001d".length();
                var1_4 = 12;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = CustomAssertionsRegistrarImpl.a(v0, CustomAssertionsRegistrarImpl.e(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = ".K\u001c]&1\r%K.\u007f;\u0005\u0019*E\tw,-\f\\\u001a\u007f;u\u000b=\\\rq$<\u0016.\u000e\tc:0\n=G\u0007~i'\u001d:A\u001db*0X(]Hr0!\u001d:\u0014H";
                    var4_3 = ".K\u001c]&1\r%K.\u007f;\u0005\u0019*E\tw,-\f\\\u001a\u007f;u\u000b=\\\rq$<\u0016.\u000e\tc:0\n=G\u0007~i'\u001d:A\u001db*0X(]Hr0!\u001d:\u0014H".length();
                    var1_4 = 19;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 103;
                        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++] = CustomAssertionsRegistrarImpl.a(v0, CustomAssertionsRegistrarImpl.e(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;
            }
        }
        CustomAssertionsRegistrarImpl.l = var5;
        CustomAssertionsRegistrarImpl.a = Logger.getLogger(CustomAssertionsRegistrar.class.getName());
    }

    /*
     * Exception decompiling
     */
    private static /* synthetic */ void a(int var0) {
        /*
         * 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: Tried to end blocks [0[TRYBLOCK]], but top level block is 6[SWITCH]
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.processEndingBlocks(Op04StructuredStatement.java:435)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.buildNestedBlocks(Op04StructuredStatement.java:484)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.createInitialStructuredBlock(Op03SimpleStatement.java:736)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:850)
         *     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:1050)
         *     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");
    }

    private static Exception a(Exception exception) {
        return exception;
    }

    private static char[] e(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x1F);
        }
        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 -> 46;
                    case 1 -> 73;
                    case 2 -> 15;
                    case 3 -> 119;
                    case 4 -> 46;
                    case 5 -> 50;
                    default -> 31;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

