/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.LicenseManager
 *  com.l7tech.gateway.common.cluster.ClusterProperty
 *  com.l7tech.gateway.common.module.ModuleLoadingException
 *  com.l7tech.gateway.common.module.ServerModuleFile
 *  com.l7tech.gateway.common.module.ServerModuleFileLoader
 *  com.l7tech.objectmodel.EntityManager
 *  com.l7tech.policy.AllAssertions
 *  com.l7tech.policy.AssertionRegistry
 *  com.l7tech.policy.assertion.Assertion
 *  com.l7tech.policy.assertion.AssertionMetadata
 *  com.l7tech.policy.assertion.DefaultAssertionMetadata
 *  com.l7tech.policy.assertion.ExtensionInterfaceBinding
 *  com.l7tech.policy.assertion.MetadataFinder
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.Functions$Unary
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 *  org.springframework.beans.factory.DisposableBean
 *  org.springframework.context.ApplicationContext
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.context.ApplicationListener
 *  org.springframework.context.event.ApplicationEventMulticaster
 */
package com.l7tech.server.policy;

import com.l7tech.gateway.common.LicenseManager;
import com.l7tech.gateway.common.cluster.ClusterProperty;
import com.l7tech.gateway.common.module.ModuleLoadingException;
import com.l7tech.gateway.common.module.ServerModuleFile;
import com.l7tech.gateway.common.module.ServerModuleFileLoader;
import com.l7tech.objectmodel.EntityManager;
import com.l7tech.policy.AllAssertions;
import com.l7tech.policy.AssertionRegistry;
import com.l7tech.policy.assertion.Assertion;
import com.l7tech.policy.assertion.AssertionMetadata;
import com.l7tech.policy.assertion.DefaultAssertionMetadata;
import com.l7tech.policy.assertion.ExtensionInterfaceBinding;
import com.l7tech.policy.assertion.MetadataFinder;
import com.l7tech.server.GatewayURLStreamHandlerFactory;
import com.l7tech.server.ServerConfig;
import com.l7tech.server.admin.ExtensionInterfaceManager;
import com.l7tech.server.event.system.LicenseChangeEvent;
import com.l7tech.server.event.system.Starting;
import com.l7tech.server.module.AssertionModuleFinder;
import com.l7tech.server.policy.EncapsulatedAssertionConfigManager;
import com.l7tech.server.policy.PolicyManager;
import com.l7tech.server.policy.a;
import com.l7tech.server.policy.ah;
import com.l7tech.server.policy.ai;
import com.l7tech.server.policy.aj;
import com.l7tech.server.policy.ak;
import com.l7tech.server.policy.al;
import com.l7tech.server.policy.aq;
import com.l7tech.server.policy.b;
import com.l7tech.server.policy.module.ModularAssertionModule;
import com.l7tech.server.policy.module.ModularAssertionModulesConfig;
import com.l7tech.server.policy.module.ModularAssertionsScanner;
import com.l7tech.server.util.ApplicationEventProxy;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.Functions;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ApplicationEventMulticaster;

/*
 * Exception performing whole class analysis ignored.
 */
public class ServerAssertionRegistry
extends AssertionRegistry
implements DisposableBean,
ServerModuleFileLoader,
AssertionModuleFinder<ModularAssertionModule> {
    protected static final Logger logger;
    private static final AtomicBoolean a;
    private final ServerConfig b;
    private final LicenseManager c;
    private final ExtensionInterfaceManager d;
    private final Map<String, String[]> e = new ConcurrentHashMap<String, String[]>();
    private ModularAssertionsScanner f;
    private static final String[] h;

    public ServerAssertionRegistry(ServerConfig serverConfig, LicenseManager licenseManager, ExtensionInterfaceManager extensionInterfaceManager) {
        if (serverConfig == null) {
            String[] stringArray = h;
            throw new IllegalArgumentException(stringArray[16]);
        }
        try {
            if (licenseManager == null) {
                throw new IllegalArgumentException(h[29]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        this.b = serverConfig;
        this.c = licenseManager;
        this.d = extensionInterfaceManager;
        ServerAssertionRegistry.c();
        GatewayURLStreamHandlerFactory.registerHandlerFactory(h[23], new ah(this));
    }

    protected void onApplicationContextSet() {
        for (Assertion assertion : AllAssertions.GATEWAY_EVERYTHING) {
            try {
                if (this.isAssertionRegistered(assertion.getClass().getName())) continue;
                this.registerAssertion(assertion.getClass());
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw ServerAssertionRegistry.b(illegalArgumentException);
            }
        }
        ApplicationEventMulticaster applicationEventMulticaster = (ApplicationEventMulticaster)this.getApplicationContext().getBean(h[7], ApplicationEventMulticaster.class);
        applicationEventMulticaster.addApplicationListener((ApplicationListener)new ai(this));
    }

    public synchronized Assertion registerAssertion(Class<? extends Assertion> clazz) {
        Assertion assertion = super.registerAssertion(clazz);
        AssertionMetadata assertionMetadata = assertion.meta();
        this.a(assertionMetadata);
        this.b(assertionMetadata);
        return assertion;
    }

    private synchronized void a(AssertionMetadata assertionMetadata) {
        Map map = (Map)assertionMetadata.get(h[14]);
        if (map != null) {
            for (Map.Entry entry : map.entrySet()) {
                String string;
                String string2;
                String string3;
                String string4;
                block19: {
                    block18: {
                        String string5;
                        String[] stringArray;
                        block17: {
                            block16: {
                                String string6;
                                block15: {
                                    block14: {
                                        string4 = (String)entry.getKey();
                                        stringArray = (String[])entry.getValue();
                                        try {
                                            try {
                                                if (stringArray == null || stringArray.length <= 0) break block14;
                                            }
                                            catch (IllegalArgumentException illegalArgumentException) {
                                                throw ServerAssertionRegistry.b(illegalArgumentException);
                                            }
                                            string6 = stringArray[0];
                                            break block15;
                                        }
                                        catch (IllegalArgumentException illegalArgumentException) {
                                            throw ServerAssertionRegistry.b(illegalArgumentException);
                                        }
                                    }
                                    string6 = null;
                                }
                                string3 = string6;
                                try {
                                    try {
                                        if (stringArray == null || stringArray.length <= 1) break block16;
                                    }
                                    catch (IllegalArgumentException illegalArgumentException) {
                                        throw ServerAssertionRegistry.b(illegalArgumentException);
                                    }
                                    string5 = stringArray[1];
                                    break block17;
                                }
                                catch (IllegalArgumentException illegalArgumentException) {
                                    throw ServerAssertionRegistry.b(illegalArgumentException);
                                }
                            }
                            string5 = null;
                        }
                        string2 = string5;
                        try {
                            try {
                                if (stringArray == null || stringArray.length <= 2) break block18;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw ServerAssertionRegistry.b(illegalArgumentException);
                            }
                            string = stringArray[2];
                            break block19;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw ServerAssertionRegistry.b(illegalArgumentException);
                        }
                    }
                    string = null;
                }
                String string7 = string;
                this.e.put(string4, new String[]{string3, string2, string7});
            }
        }
    }

    private void b(AssertionMetadata assertionMetadata) {
        Collection collection;
        String[] stringArray = h;
        Functions.Unary unary = (Functions.Unary)assertionMetadata.get(stringArray[13]);
        if (unary != null && (collection = (Collection)unary.call((Object)this.getApplicationContext())) != null) {
            for (ExtensionInterfaceBinding extensionInterfaceBinding : collection) {
                try {
                    stringArray = h;
                    logger.log(Level.INFO, stringArray[2] + String.valueOf(extensionInterfaceBinding.getInterfaceClass()));
                    this.d.registerInterface(extensionInterfaceBinding);
                }
                catch (Exception exception) {
                    String string = ExceptionUtils.getMessage((Throwable)exception);
                    String string2 = String.valueOf(assertionMetadata.getAssertionClass());
                    String string3 = String.valueOf(extensionInterfaceBinding.getInterfaceClass());
                    stringArray = h;
                    logger.log(Level.SEVERE, stringArray[24] + string3 + stringArray[17] + string2 + stringArray[10] + string, ExceptionUtils.getDebugException((Throwable)exception));
                }
            }
        }
    }

    private synchronized void a() {
        Map<String, String> map = this.b.getClusterPropertyNames();
        Set<String> set = map.keySet();
        ArrayList<String[]> arrayList = new ArrayList<String[]>();
        try {
            if (this.e == null) {
                return;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        for (Map.Entry<String, String[]> entry : this.e.entrySet()) {
            String string;
            String string2 = entry.getKey();
            String[] stringArray = entry.getValue();
            if (set.contains(string2)) continue;
            String string3 = stringArray[0];
            String string4 = stringArray[1];
            try {
                string = stringArray.length > 2 ? stringArray[2] : null;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw ServerAssertionRegistry.b(illegalArgumentException);
            }
            String string5 = string;
            String string6 = ClusterProperty.asServerConfigPropertyName((String)string2);
            arrayList.add(new String[]{string6, string2, string3, string4, string5});
            logger.log(Level.INFO, h[26], string2);
        }
        try {
            if (!arrayList.isEmpty()) {
                this.b.registerServerConfigProperties((String[][])arrayList.toArray((T[])new String[arrayList.size()][]));
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
    }

    private synchronized boolean b() {
        return this.f.scanModules();
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    public void runNeededScan() {
        ServerAssertionRegistry serverAssertionRegistry = this;
        synchronized (serverAssertionRegistry) {
            if (!this.f.isScanNeeded()) {
                return;
            }
            try {
                if (this.b()) {
                    this.a();
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw ServerAssertionRegistry.b(illegalArgumentException);
            }
        }
    }

    @Override
    @Nullable
    public ModularAssertionModule getModuleForAssertion(@NotNull String string) {
        try {
            if (string == null) {
                ServerAssertionRegistry.a(0);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        for (ModularAssertionModule modularAssertionModule : this.f.getModules()) {
            try {
                if (!modularAssertionModule.offersClass(string)) continue;
                return modularAssertionModule;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw ServerAssertionRegistry.b(illegalArgumentException);
            }
        }
        return null;
    }

    @Override
    @Nullable
    public ModularAssertionModule getModuleByName(@NotNull String string) {
        try {
            if (string == null) {
                ServerAssertionRegistry.a(1);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        for (ModularAssertionModule modularAssertionModule : this.f.getModules()) {
            try {
                if (!modularAssertionModule.getName().equals(string)) continue;
                return modularAssertionModule;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw ServerAssertionRegistry.b(illegalArgumentException);
            }
        }
        return null;
    }

    @Override
    @Nullable
    public ModularAssertionModule getModuleForClassLoader(ClassLoader classLoader) {
        for (ModularAssertionModule modularAssertionModule : this.f.getModules()) {
            try {
                if (classLoader != modularAssertionModule.getModuleClassLoader()) continue;
                return modularAssertionModule;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw ServerAssertionRegistry.b(illegalArgumentException);
            }
        }
        return null;
    }

    @Override
    @Nullable
    public ModularAssertionModule getModuleForPackage(@NotNull String string) {
        try {
            if (string == null) {
                ServerAssertionRegistry.a(2);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        return this.f.getModuleForPackage(string);
    }

    @Override
    public boolean isFirstPartyAssertionPackage(@NotNull String string) {
        try {
            if (string == null) {
                ServerAssertionRegistry.a(3);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        return this.f.isFirstPartyAssertionPackage(string);
    }

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

    public void afterPropertiesSet() throws Exception {
        super.afterPropertiesSet();
        this.a(this.getApplicationContext());
        this.b(this.getApplicationContext());
        ModularAssertionModulesConfig modularAssertionModulesConfig = new ModularAssertionModulesConfig(this.b, this.c);
        aj aj2 = new aj(this);
        this.f = new aq(this, modularAssertionModulesConfig, aj2);
        this.b();
        this.a();
        this.f.startTimer(modularAssertionModulesConfig.getRescanPeriodMillis(), new ak(this));
    }

    private static void c() {
        try {
            if (a.get()) {
                return;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        DefaultAssertionMetadata.putDefaultGetter((String)h[0], (MetadataFinder)new al());
        a.set(true);
    }

    public void onApplicationEvent(ApplicationEvent applicationEvent) {
        try {
            if (this.isShuttingDown()) {
                return;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        try {
            if (applicationEvent instanceof LicenseChangeEvent) {
                this.f.onLicenseChange();
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        try {
            if (applicationEvent instanceof Starting) {
                this.runNeededScan();
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
    }

    public synchronized void destroy() throws Exception {
        super.destroy();
        this.f.destroy();
    }

    public void loadModule(@NotNull File file, @NotNull ServerModuleFile serverModuleFile) throws ModuleLoadingException {
        try {
            if (file == null) {
                ServerAssertionRegistry.a(4);
            }
        }
        catch (ModuleLoadingException moduleLoadingException) {
            throw ServerAssertionRegistry.b((Exception)((Object)moduleLoadingException));
        }
        try {
            if (serverModuleFile == null) {
                ServerAssertionRegistry.a(5);
            }
        }
        catch (ModuleLoadingException moduleLoadingException) {
            throw ServerAssertionRegistry.b((Exception)((Object)moduleLoadingException));
        }
        this.f.loadServerModuleFile(file, serverModuleFile.getModuleSha256(), serverModuleFile.getName());
    }

    public void updateModule(@NotNull File file, @NotNull ServerModuleFile serverModuleFile) {
        try {
            if (file == null) {
                ServerAssertionRegistry.a(6);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        try {
            if (serverModuleFile == null) {
                ServerAssertionRegistry.a(7);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        this.f.updateServerModuleFile(file, serverModuleFile.getModuleSha256(), serverModuleFile.getName());
    }

    public void unloadModule(@NotNull File file, @NotNull ServerModuleFile serverModuleFile) throws ModuleLoadingException {
        try {
            if (file == null) {
                ServerAssertionRegistry.a(8);
            }
        }
        catch (ModuleLoadingException moduleLoadingException) {
            throw ServerAssertionRegistry.b((Exception)((Object)moduleLoadingException));
        }
        try {
            if (serverModuleFile == null) {
                ServerAssertionRegistry.a(9);
            }
        }
        catch (ModuleLoadingException moduleLoadingException) {
            throw ServerAssertionRegistry.b((Exception)((Object)moduleLoadingException));
        }
        this.f.unloadServerModuleFile(file, serverModuleFile.getModuleSha256(), serverModuleFile.getName());
    }

    public boolean isModuleLoaded(@NotNull File file, @NotNull ServerModuleFile serverModuleFile) {
        try {
            if (file == null) {
                ServerAssertionRegistry.a(10);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        try {
            if (serverModuleFile == null) {
                ServerAssertionRegistry.a(11);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerAssertionRegistry.b(illegalArgumentException);
        }
        return this.f.isServerModuleFileLoaded(file, serverModuleFile.getModuleSha256(), serverModuleFile.getName());
    }

    private void a(ApplicationContext applicationContext) {
        if (applicationContext != null) {
            String[] stringArray = h;
            PolicyManager policyManager = (PolicyManager)applicationContext.getBean(stringArray[5], PolicyManager.class);
            ApplicationEventProxy applicationEventProxy = (ApplicationEventProxy)applicationContext.getBean(stringArray[19], ApplicationEventProxy.class);
            this.addAssertionMappingProperty(POLICY_GUID_RESOLVER_MAPPING_PROPERTY, (Object)new a(this, (EntityManager)policyManager, applicationEventProxy, this.b));
        }
    }

    private void b(ApplicationContext applicationContext) {
        if (applicationContext != null) {
            String[] stringArray = h;
            EncapsulatedAssertionConfigManager encapsulatedAssertionConfigManager = (EncapsulatedAssertionConfigManager)applicationContext.getBean(stringArray[1], EncapsulatedAssertionConfigManager.class);
            ApplicationEventProxy applicationEventProxy = (ApplicationEventProxy)applicationContext.getBean(stringArray[8], ApplicationEventProxy.class);
            this.addAssertionMappingProperty(ENCASS_GUID_RESOLVER_MAPPING_PROPERTY, (Object)new b(this, encapsulatedAssertionConfigManager, applicationEventProxy, this.b));
        }
    }

    static /* synthetic */ boolean access$000(ServerAssertionRegistry serverAssertionRegistry) {
        return serverAssertionRegistry.isShuttingDown();
    }

    static /* synthetic */ void access$100(ServerAssertionRegistry serverAssertionRegistry, ApplicationEvent applicationEvent) {
        serverAssertionRegistry.publishEvent(applicationEvent);
    }

    static /* synthetic */ boolean access$200(ServerAssertionRegistry serverAssertionRegistry, Assertion assertion) {
        return serverAssertionRegistry.unregisterAssertion(assertion);
    }

    static /* synthetic */ void access$300(ServerAssertionRegistry serverAssertionRegistry, ApplicationEvent applicationEvent) {
        serverAssertionRegistry.publishEvent(applicationEvent);
    }

    static /* synthetic */ boolean access$400(ServerAssertionRegistry serverAssertionRegistry) {
        return serverAssertionRegistry.isShuttingDown();
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[31];
                var3_1 = 0;
                var2_2 = "_'{\u001b\u0001j<l9a\u0018\u0010}:U.}\"Y%m\t\u0005|;P*z\r\u0011N=O.|\u001c\u001c` \u007f$`\u000e\u001ch\u0003]%o\u000f\u0010}'n.i\u0001\u0006{+N\"`\u000fUn*Q\"`H\u0010w:Y%}\u0001\u001aanU%z\r\u0007i/_.4H\t_'o\u001b\u0006A/Q.\nO?o\u000f\u0010k\bU'k\rL$b\u0001\u0016v\u0003]%o\u000f\u0010}\u0015[.z%\u001ak;P.H\u0007\u0007N=O.|\u001c\u001c` \u001b];~\u0004\u001cl/H\"a\u00060y+R?C\u001d\u0019{'_*}\u001c\u0010}\u0015];~\u0004\u001cl/H\"a\u00060y+R?^\u001a\u001aw7\u000eU8C\u0007\u0011z\"Y\u0007a\t\u0011j*\u0002\u0006k\fI;j\t\u0001j\u0003S/{\u0004\u0010\u000f[.z%\u001ak;P.L\u0011;n#Y\u001aY3z\r\u001b|'S%G\u0006\u0001j<Z*m\r\u0006I/_?a\u001a\f\u0011_'{\u001b\u0001j<l9a\u0018\u0010}:U.}\fI%b\u0007\u0014k\u0003S/{\u0004\u0010#}k`\u0007\u001b\" I'bH\u0006j<J.|+\u001aa(U,.\u0001\u0006/<Y:{\u0001\u0007j*\u0017\u001c-a\u001aUb!X>b\t\u0007//O8k\u001a\u0001f!Rk\nQ$j\u001d\u0019j\u0000]&k\u0015];~\u0004\u001cl/H\"a\u00060y+R?^\u001a\u001aw7\u001cU8H\u0001\u0007|:l*|\u001c\fN=O.|\u001c\u001c` l*m\u0003\u0014h+>}9i\u001d\u0018j Hkh\u0007\u0007/\u000er$z&\u0000c\"\u001c;o\u001a\u0014b+H.|HR*=\u001bka\u000eU*=\u0012n}H\u0018z=Hk`\u0007\u0001/,Yk`\u001d\u0019c\fQ$j\u001d\u0019j\u000bR?g\u001c\f\u0007]8}\u0006\u0018`*-i%o\n\u0019jnH$.\u001a\u0010h'O?k\u001aUn*Q\"`H\u0010w:Y%}\u0001\u001aanU%z\r\u0007i/_..\u0013[.z%\u001ak;P.H\u0007\u0007_/_ o\u000f\u0010,x2`\t\u0018f-]'b\u0011U}+[\"}\u001c\u0010}'R,.\u000b\u0019z=H.|H\u0005}!L.|\u001c\f/5\f6\u000bL*m\u0003\u0014h+r*c\r0_$cG\u00198:Y(fG\u0006j<J.|G\u0005`\"U(wG&j<J.|)\u0006|+N?g\u0007\u001b]+[\"}\u001c\u0007v";
                var4_3 = "_'{\u001b\u0001j<l9a\u0018\u0010}:U.}\"Y%m\t\u0005|;P*z\r\u0011N=O.|\u001c\u001c` \u007f$`\u000e\u001ch\u0003]%o\u000f\u0010}'n.i\u0001\u0006{+N\"`\u000fUn*Q\"`H\u0010w:Y%}\u0001\u001aanU%z\r\u0007i/_.4H\t_'o\u001b\u0006A/Q.\nO?o\u000f\u0010k\bU'k\rL$b\u0001\u0016v\u0003]%o\u000f\u0010}\u0015[.z%\u001ak;P.H\u0007\u0007N=O.|\u001c\u001c` \u001b];~\u0004\u001cl/H\"a\u00060y+R?C\u001d\u0019{'_*}\u001c\u0010}\u0015];~\u0004\u001cl/H\"a\u00060y+R?^\u001a\u001aw7\u000eU8C\u0007\u0011z\"Y\u0007a\t\u0011j*\u0002\u0006k\fI;j\t\u0001j\u0003S/{\u0004\u0010\u000f[.z%\u001ak;P.L\u0011;n#Y\u001aY3z\r\u001b|'S%G\u0006\u0001j<Z*m\r\u0006I/_?a\u001a\f\u0011_'{\u001b\u0001j<l9a\u0018\u0010}:U.}\fI%b\u0007\u0014k\u0003S/{\u0004\u0010#}k`\u0007\u001b\" I'bH\u0006j<J.|+\u001aa(U,.\u0001\u0006/<Y:{\u0001\u0007j*\u0017\u001c-a\u001aUb!X>b\t\u0007//O8k\u001a\u0001f!Rk\nQ$j\u001d\u0019j\u0000]&k\u0015];~\u0004\u001cl/H\"a\u00060y+R?^\u001a\u001aw7\u001cU8H\u0001\u0007|:l*|\u001c\fN=O.|\u001c\u001c` l*m\u0003\u0014h+>}9i\u001d\u0018j Hkh\u0007\u0007/\u000er$z&\u0000c\"\u001c;o\u001a\u0014b+H.|HR*=\u001bka\u000eU*=\u0012n}H\u0018z=Hk`\u0007\u0001/,Yk`\u001d\u0019c\fQ$j\u001d\u0019j\u000bR?g\u001c\f\u0007]8}\u0006\u0018`*-i%o\n\u0019jnH$.\u001a\u0010h'O?k\u001aUn*Q\"`H\u0010w:Y%}\u0001\u001aanU%z\r\u0007i/_..\u0013[.z%\u001ak;P.H\u0007\u0007_/_ o\u000f\u0010,x2`\t\u0018f-]'b\u0011U}+[\"}\u001c\u0010}'R,.\u000b\u0019z=H.|H\u0005}!L.|\u001c\f/5\f6\u000bL*m\u0003\u0014h+r*c\r0_$cG\u00198:Y(fG\u0006j<J.|G\u0005`\"U(wG&j<J.|)\u0006|+N?g\u0007\u001b]+[\"}\u001c\u0007v".length();
                var1_4 = 17;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = ServerAssertionRegistry.b(v0, ServerAssertionRegistry.b(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "~hc\u0004\u0018!#J$aK\u001ae.Z&~\u000e;m#^/h\u0019Ve>\u001f:h\u001a\u0003e?Z,\nS'l\u000f;c)J$h";
                    var4_3 = "~hc\u0004\u0018!#J$aK\u001ae.Z&~\u000e;m#^/h\u0019Ve>\u001f:h\u001a\u0003e?Z,\nS'l\u000f;c)J$h".length();
                    var1_4 = 37;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 53;
                        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++] = ServerAssertionRegistry.b(v0, ServerAssertionRegistry.b(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;
            }
        }
        ServerAssertionRegistry.h = var5;
        ServerAssertionRegistry.logger = Logger.getLogger(ServerAssertionRegistry.class.getName());
        ServerAssertionRegistry.a = new AtomicBoolean(false);
        ServerAssertionRegistry.c();
    }

    /*
     * 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 2[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 b(Exception exception) {
        return exception;
    }

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

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

