/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.http.CookieUtils
 *  com.l7tech.common.http.HttpCookie
 *  com.l7tech.common.http.HttpCookie$IllegalFormatException
 *  com.l7tech.common.mime.NoSuchPartException
 *  com.l7tech.gateway.common.audit.AssertionMessages
 *  com.l7tech.gateway.common.audit.AuditDetailMessage
 *  com.l7tech.gateway.common.custom.CustomAssertionDescriptor
 *  com.l7tech.gateway.common.custom.CustomAssertionsRegistrar
 *  com.l7tech.gateway.common.service.PublishedService
 *  com.l7tech.identity.AnonymousUserReference
 *  com.l7tech.identity.User
 *  com.l7tech.identity.UserBean
 *  com.l7tech.message.HttpCookiesKnob
 *  com.l7tech.message.HttpRequestKnob
 *  com.l7tech.message.HttpServletRequestKnob
 *  com.l7tech.message.HttpServletResponseKnob
 *  com.l7tech.message.Message
 *  com.l7tech.message.MimeKnob
 *  com.l7tech.objectmodel.PersistentEntity
 *  com.l7tech.policy.assertion.Assertion
 *  com.l7tech.policy.assertion.AssertionStatus
 *  com.l7tech.policy.assertion.CustomAssertionHolder
 *  com.l7tech.policy.assertion.PolicyAssertionException
 *  com.l7tech.policy.assertion.RoutingStatus
 *  com.l7tech.policy.assertion.credential.LoginCredentials
 *  com.l7tech.policy.assertion.ext.CustomAssertion
 *  com.l7tech.policy.assertion.ext.CustomAssertionPrincipal
 *  com.l7tech.policy.assertion.ext.CustomAssertionStatus
 *  com.l7tech.policy.assertion.ext.ServiceInvocation
 *  com.l7tech.policy.assertion.ext.message.CustomPolicyContext
 *  com.l7tech.policy.assertion.ext.message.format.CustomMessageFormatFactory
 *  com.l7tech.policy.assertion.ext.message.knob.CustomHttpHeadersKnob
 *  com.l7tech.policy.assertion.ext.message.knob.CustomPartsKnob
 *  com.l7tech.policy.variable.NoSuchVariableException
 *  com.l7tech.security.cert.TrustedCertManager
 *  com.l7tech.security.token.OpaqueSecurityToken
 *  com.l7tech.security.token.SecurityToken
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.IOUtils
 *  jakarta.servlet.http.Cookie
 *  jakarta.servlet.http.HttpServletResponse
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 *  org.springframework.context.ApplicationContext
 */
package com.l7tech.server.policy.assertion;

import com.l7tech.common.http.CookieUtils;
import com.l7tech.common.http.HttpCookie;
import com.l7tech.common.mime.NoSuchPartException;
import com.l7tech.gateway.common.audit.AssertionMessages;
import com.l7tech.gateway.common.audit.AuditDetailMessage;
import com.l7tech.gateway.common.custom.CustomAssertionDescriptor;
import com.l7tech.gateway.common.custom.CustomAssertionsRegistrar;
import com.l7tech.gateway.common.service.PublishedService;
import com.l7tech.identity.AnonymousUserReference;
import com.l7tech.identity.User;
import com.l7tech.identity.UserBean;
import com.l7tech.message.HttpCookiesKnob;
import com.l7tech.message.HttpRequestKnob;
import com.l7tech.message.HttpServletRequestKnob;
import com.l7tech.message.HttpServletResponseKnob;
import com.l7tech.message.Message;
import com.l7tech.message.MimeKnob;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.policy.assertion.Assertion;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.CustomAssertionHolder;
import com.l7tech.policy.assertion.PolicyAssertionException;
import com.l7tech.policy.assertion.RoutingStatus;
import com.l7tech.policy.assertion.credential.LoginCredentials;
import com.l7tech.policy.assertion.ext.CustomAssertion;
import com.l7tech.policy.assertion.ext.CustomAssertionPrincipal;
import com.l7tech.policy.assertion.ext.CustomAssertionStatus;
import com.l7tech.policy.assertion.ext.ServiceInvocation;
import com.l7tech.policy.assertion.ext.message.CustomPolicyContext;
import com.l7tech.policy.assertion.ext.message.format.CustomMessageFormatFactory;
import com.l7tech.policy.assertion.ext.message.knob.CustomHttpHeadersKnob;
import com.l7tech.policy.assertion.ext.message.knob.CustomPartsKnob;
import com.l7tech.policy.variable.NoSuchVariableException;
import com.l7tech.security.cert.TrustedCertManager;
import com.l7tech.security.token.OpaqueSecurityToken;
import com.l7tech.security.token.SecurityToken;
import com.l7tech.server.DefaultKey;
import com.l7tech.server.custom.CustomMessageImpl;
import com.l7tech.server.custom.format.CustomMessageFormatRegistry;
import com.l7tech.server.custom.knob.CustomHttpHeadersKnobImpl;
import com.l7tech.server.custom.knob.CustomPartsKnobImpl;
import com.l7tech.server.identity.AuthenticationResult;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.CertificateFinderImpl;
import com.l7tech.server.policy.CustomKeyValueStoreManager;
import com.l7tech.server.policy.SecurePasswordServicesImpl;
import com.l7tech.server.policy.ServiceFinderImpl;
import com.l7tech.server.policy.VariableServicesImpl;
import com.l7tech.server.policy.assertion.AbstractServerAssertion;
import com.l7tech.server.policy.assertion.ServerAssertion;
import com.l7tech.server.policy.assertion.c;
import com.l7tech.server.policy.assertion.l;
import com.l7tech.server.policy.assertion.m;
import com.l7tech.server.policy.assertion.o;
import com.l7tech.server.policy.custom.CustomAuditorImpl;
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.ExceptionUtils;
import com.l7tech.util.IOUtils;
import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.security.GeneralSecurityException;
import java.security.Principal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.Vector;
import java.util.concurrent.CompletionException;
import java.util.logging.Level;
import javax.security.auth.Subject;
import javax.security.auth.login.FailedLoginException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.context.ApplicationContext;

/*
 * Exception performing whole class analysis ignored.
 */
public class ServerCustomAssertionHolder
extends AbstractServerAssertion
implements ServerAssertion {
    private final CustomAssertionHolder d;
    protected final CustomAssertion customAssertion;
    private final boolean e;
    private CustomAssertionDescriptor f;
    private ServiceInvocation g;
    private CustomAssertionsRegistrar h;
    private ApplicationContext i;
    private final CustomMessageFormatFactory j;
    private static final String[] k;

    public ServerCustomAssertionHolder(CustomAssertionHolder customAssertionHolder, ApplicationContext applicationContext) {
        super(customAssertionHolder);
        CustomMessageFormatFactory customMessageFormatFactory;
        if (customAssertionHolder == null) {
            throw new IllegalArgumentException();
        }
        this.d = customAssertionHolder;
        this.i = applicationContext;
        this.customAssertion = customAssertionHolder.getCustomAssertion();
        this.e = customAssertionHolder.isCustomCredentialSource();
        CustomMessageFormatRegistry customMessageFormatRegistry = (CustomMessageFormatRegistry)this.i.getBean(k[8], CustomMessageFormatRegistry.class);
        try {
            ServerCustomAssertionHolder serverCustomAssertionHolder = this;
            customMessageFormatFactory = customMessageFormatRegistry != null ? customMessageFormatRegistry.getMessageFormatFactory() : null;
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerCustomAssertionHolder.a(illegalArgumentException);
        }
        serverCustomAssertionHolder.j = customMessageFormatFactory;
    }

    private void a() throws PolicyAssertionException {
        try {
            this.f = this.b().getDescriptor(this.customAssertion.getClass());
            if (!this.a(this.f)) {
                this.logger.warning(k[6] + String.valueOf(this.customAssertion.getClass()) + k[30]);
                throw new PolicyAssertionException((Assertion)this.d, k[10]);
            }
        }
        catch (InstantiationException instantiationException) {
            throw ServerCustomAssertionHolder.a(instantiationException);
        }
        Class clazz = this.f.getServerAssertion();
        try {
            this.g = (ServiceInvocation)clazz.newInstance();
            this.g.setCustomAssertion(this.customAssertion);
            new CustomAuditorImpl(this.getAudit()).register(this.g);
        }
        catch (IllegalAccessException | InstantiationException reflectiveOperationException) {
            throw new PolicyAssertionException((Assertion)this.d, k[0], (Throwable)reflectiveOperationException);
        }
    }

    private static void a(PolicyEnforcementContext policyEnforcementContext, Map map) {
        HttpServletResponse httpServletResponse;
        HttpServletResponseKnob httpServletResponseKnob;
        HttpServletResponseKnob httpServletResponseKnob2;
        HttpServletRequestKnob httpServletRequestKnob = (HttpServletRequestKnob)policyEnforcementContext.getRequest().getKnob(HttpServletRequestKnob.class);
        if (httpServletRequestKnob != null) {
            for (HttpServletResponseKnob httpServletResponseKnob3 : httpServletResponseKnob2 = httpServletRequestKnob.getHeaderNames()) {
                String[] stringArray = k;
                map.put(stringArray[15] + httpServletResponseKnob3.toLowerCase(), httpServletRequestKnob.getHeaderValues((String)httpServletResponseKnob3));
            }
            httpServletResponseKnob = httpServletRequestKnob.getHttpServletRequest();
            try {
                if (httpServletResponseKnob != null) {
                    map.put(k[14], httpServletResponseKnob);
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw ServerCustomAssertionHolder.a(illegalArgumentException);
            }
        }
        httpServletResponseKnob2 = (HttpServletResponseKnob)policyEnforcementContext.getResponse().getKnob(HttpServletResponseKnob.class);
        try {
            httpServletResponse = httpServletResponseKnob2 == null ? null : httpServletResponseKnob2.getHttpServletResponse();
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerCustomAssertionHolder.a(illegalArgumentException);
        }
        httpServletResponseKnob = httpServletResponse;
        try {
            if (httpServletResponseKnob != null) {
                map.put(k[16], ServerCustomAssertionHolder.a((HttpServletResponse)httpServletResponseKnob, policyEnforcementContext));
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerCustomAssertionHolder.a(illegalArgumentException);
        }
    }

    /*
     * Loose catch block
     */
    @Override
    public AssertionStatus checkRequest(PolicyEnforcementContext policyEnforcementContext) throws IOException, PolicyAssertionException {
        String[] stringArray;
        Object object;
        CustomAssertionDescriptor customAssertionDescriptor;
        ClassLoader classLoader;
        boolean bl2;
        block63: {
            String string;
            block62: {
                Class clazz;
                block60: {
                    try {
                        if (this.customAssertion == null) {
                            this.logAndAudit((AuditDetailMessage)AssertionMessages.EXCEPTION_WARNING_WITH_MORE_INFO, k[26]);
                            return AssertionStatus.SERVER_ERROR;
                        }
                    }
                    catch (CompletionException completionException) {
                        throw ServerCustomAssertionHolder.a(completionException);
                    }
                    bl2 = false;
                    classLoader = Thread.currentThread().getContextClassLoader();
                    clazz = this.customAssertion.getClass();
                    try {
                        if (classLoader == null || clazz.getClassLoader().equals(classLoader)) break block60;
                    }
                    catch (CompletionException completionException) {
                        throw ServerCustomAssertionHolder.a(completionException);
                    }
                    bl2 = true;
                    this.getClass().getProtectionDomain().getCodeSource().getLocation();
                    clazz.getProtectionDomain().getCodeSource().getLocation();
                    Thread.currentThread().setContextClassLoader(clazz.getClassLoader());
                }
                try {
                    if (this.g == null) {
                        this.a();
                    }
                }
                catch (CompletionException completionException) {
                    throw ServerCustomAssertionHolder.a(completionException);
                }
                PublishedService publishedService = policyEnforcementContext.getService();
                customAssertionDescriptor = this.b().getDescriptor(clazz);
                try {
                    if (!this.a(customAssertionDescriptor)) {
                        this.logAndAudit((AuditDetailMessage)AssertionMessages.CA_INVALID_CA_DESCRIPTOR, this.customAssertion.getClass().getName());
                        throw new PolicyAssertionException((Assertion)this.d, k[38] + publishedService.getName() + "'");
                    }
                }
                catch (CompletionException completionException) {
                    throw ServerCustomAssertionHolder.a(completionException);
                }
                Subject subject = new Subject();
                LoginCredentials loginCredentials = policyEnforcementContext.getDefaultAuthenticationContext().getLastCredentials();
                if (loginCredentials != null) {
                    string = loginCredentials.getLogin();
                    try {
                        this.logAndAudit((AuditDetailMessage)AssertionMessages.CA_CREDENTIAL_INFO, publishedService.getName(), customAssertionDescriptor.getServerAssertion().getName(), string);
                        if (string != null) {
                            subject.getPrincipals().add((Principal)new CustomAssertionPrincipal(string));
                        }
                    }
                    catch (CompletionException completionException) {
                        throw ServerCustomAssertionHolder.a(completionException);
                    }
                    object = loginCredentials.getCredentials();
                    try {
                        if (object != null) {
                            subject.getPrivateCredentials().add(new String((char[])object));
                        }
                    }
                    catch (CompletionException completionException) {
                        throw ServerCustomAssertionHolder.a(completionException);
                    }
                }
                subject.setReadOnly();
                string = Subject.callAs(subject, () -> {
                    Map<String, Object> map;
                    m m2;
                    o o2;
                    l l2;
                    CustomAssertionStatus customAssertionStatus;
                    block19: {
                        block17: {
                            customAssertionStatus = null;
                            l2 = null;
                            o2 = null;
                            m2 = null;
                            if (!this.a(policyEnforcementContext)) break block17;
                            try {
                                block18: {
                                    if (!policyEnforcementContext.getResponse().isInitialized()) break block17;
                                    break block18;
                                    catch (RuntimeException runtimeException) {
                                        throw ServerCustomAssertionHolder.a(runtimeException);
                                    }
                                }
                                if (policyEnforcementContext.getResponse().getKnob(MimeKnob.class) == null) break block17;
                            }
                            catch (RuntimeException runtimeException) {
                                throw ServerCustomAssertionHolder.a(runtimeException);
                            }
                            map = this.a(policyEnforcementContext, policyEnforcementContext.getResponse());
                            o2 = new o(this, policyEnforcementContext, map);
                            break block19;
                        }
                        map = this.a(policyEnforcementContext, policyEnforcementContext.getRequest());
                        m2 = new m(this, policyEnforcementContext, map);
                    }
                    l2 = new l(this, policyEnforcementContext, map, m2, o2);
                    customAssertionStatus = this.g.checkRequest((CustomPolicyContext)l2);
                    try {
                        if (l2 == null) return customAssertionStatus;
                        l2.onCompletion();
                        return customAssertionStatus;
                    }
                    catch (RuntimeException runtimeException) {
                        throw ServerCustomAssertionHolder.a(runtimeException);
                    }
                    catch (RuntimeException runtimeException) {
                        try {
                            Throwable throwable = runtimeException.getCause();
                            try {
                                if (throwable instanceof IOException) {
                                    throw (IOException)throwable;
                                }
                            }
                            catch (RuntimeException runtimeException2) {
                                throw ServerCustomAssertionHolder.a(runtimeException2);
                            }
                            try {
                                if (!(throwable instanceof GeneralSecurityException)) throw runtimeException;
                                throw (GeneralSecurityException)throwable;
                            }
                            catch (RuntimeException runtimeException3) {
                                throw ServerCustomAssertionHolder.a(runtimeException3);
                            }
                        }
                        catch (Throwable throwable) {
                            try {
                                if (l2 == null) throw throwable;
                                l2.onCompletion();
                                throw throwable;
                            }
                            catch (RuntimeException runtimeException4) {
                                throw ServerCustomAssertionHolder.a(runtimeException4);
                            }
                        }
                    }
                });
                if (this.e) {
                    block61: {
                        object = policyEnforcementContext.getAuthenticationContext(policyEnforcementContext.getRequest());
                        try {
                            if (loginCredentials == null) break block61;
                            object.addAuthenticationResult(new AuthenticationResult((User)new UserBean(loginCredentials.getLogin()), loginCredentials.getSecurityTokens(), null, false));
                            break block62;
                        }
                        catch (CompletionException completionException) {
                            throw ServerCustomAssertionHolder.a(completionException);
                        }
                    }
                    stringArray = k;
                    object.addAuthenticationResult(new AuthenticationResult((User)new AnonymousUserReference("", PersistentEntity.DEFAULT_GOID, stringArray[27]), (SecurityToken)new OpaqueSecurityToken()));
                }
            }
            if (!(string instanceof CustomAssertionStatus)) break block63;
            object = ServerCustomAssertionHolder.a((CustomAssertionStatus)string);
            try {
                if (bl2) {
                    Thread.currentThread().setContextClassLoader(classLoader);
                }
            }
            catch (CompletionException completionException) {
                throw ServerCustomAssertionHolder.a(completionException);
            }
            return object;
        }
        object = AssertionStatus.FAILED;
        try {
            if (bl2) {
                Thread.currentThread().setContextClassLoader(classLoader);
            }
        }
        catch (CompletionException completionException) {
            throw ServerCustomAssertionHolder.a(completionException);
        }
        return object;
        {
            catch (CompletionException completionException) {
                block64: {
                    block68: {
                        block66: {
                            block67: {
                                block65: {
                                    try {
                                        try {
                                            if (!(completionException.getCause() instanceof Exception)) break block64;
                                            if (!ExceptionUtils.causedBy((Throwable)completionException.getCause(), FailedLoginException.class)) break block65;
                                        }
                                        catch (CompletionException completionException2) {
                                            throw ServerCustomAssertionHolder.a(completionException2);
                                        }
                                        String[] stringArray2 = new String[2];
                                        stringArray2[0] = this.customAssertion.getName();
                                        stringArray = k;
                                        stringArray2[1] = stringArray[5] + ExceptionUtils.toStringDeep((Throwable)completionException, (boolean)true);
                                        this.logAndAudit((AuditDetailMessage)AssertionMessages.CUSTOM_ASSERTION_WARN, stringArray2);
                                        customAssertionDescriptor = AssertionStatus.AUTH_FAILED;
                                    }
                                    catch (Throwable throwable) {
                                        try {
                                            if (bl2) {
                                                Thread.currentThread().setContextClassLoader(classLoader);
                                            }
                                        }
                                        catch (CompletionException completionException3) {
                                            throw ServerCustomAssertionHolder.a(completionException3);
                                        }
                                        throw throwable;
                                    }
                                    try {
                                        if (bl2) {
                                            Thread.currentThread().setContextClassLoader(classLoader);
                                        }
                                    }
                                    catch (CompletionException completionException4) {
                                        throw ServerCustomAssertionHolder.a(completionException4);
                                    }
                                    return customAssertionDescriptor;
                                }
                                try {
                                    if (!ExceptionUtils.causedBy((Throwable)completionException.getCause(), GeneralSecurityException.class)) break block66;
                                    if (!this.e) break block67;
                                }
                                catch (CompletionException completionException5) {
                                    throw ServerCustomAssertionHolder.a(completionException5);
                                }
                                String[] stringArray3 = new String[2];
                                stringArray3[0] = this.customAssertion.getName();
                                stringArray = k;
                                stringArray3[1] = stringArray[13] + ExceptionUtils.toStringDeep((Throwable)completionException, (boolean)true);
                                this.logAndAudit((AuditDetailMessage)AssertionMessages.CUSTOM_ASSERTION_WARN, stringArray3);
                                customAssertionDescriptor = AssertionStatus.UNAUTHORIZED;
                                try {
                                    if (bl2) {
                                        Thread.currentThread().setContextClassLoader(classLoader);
                                    }
                                }
                                catch (CompletionException completionException6) {
                                    throw ServerCustomAssertionHolder.a(completionException6);
                                }
                                return customAssertionDescriptor;
                            }
                            String[] stringArray4 = new String[2];
                            stringArray4[0] = this.customAssertion.getName();
                            stringArray = k;
                            stringArray4[1] = stringArray[33] + ExceptionUtils.toStringDeep((Throwable)completionException, (boolean)true);
                            this.logAndAudit((AuditDetailMessage)AssertionMessages.CUSTOM_ASSERTION_WARN, stringArray4);
                            customAssertionDescriptor = AssertionStatus.FALSIFIED;
                            try {
                                if (bl2) {
                                    Thread.currentThread().setContextClassLoader(classLoader);
                                }
                            }
                            catch (CompletionException completionException7) {
                                throw ServerCustomAssertionHolder.a(completionException7);
                            }
                            return customAssertionDescriptor;
                        }
                        if (!ExceptionUtils.causedBy((Throwable)completionException.getCause(), SecurityException.class)) break block68;
                        String[] stringArray5 = new String[2];
                        stringArray5[0] = this.customAssertion.getName();
                        stringArray = k;
                        stringArray5[1] = stringArray[31] + ExceptionUtils.toStringDeep((Throwable)completionException, (boolean)true);
                        this.logAndAudit((AuditDetailMessage)AssertionMessages.CUSTOM_ASSERTION_WARN, stringArray5);
                        customAssertionDescriptor = AssertionStatus.UNAUTHORIZED;
                        try {
                            if (bl2) {
                                Thread.currentThread().setContextClassLoader(classLoader);
                            }
                        }
                        catch (CompletionException completionException8) {
                            throw ServerCustomAssertionHolder.a(completionException8);
                        }
                        return customAssertionDescriptor;
                    }
                    this.logAndAudit((AuditDetailMessage)AssertionMessages.EXCEPTION_WARNING_WITH_MORE_INFO, new String[]{k[9]}, completionException);
                    customAssertionDescriptor = AssertionStatus.FAILED;
                    try {
                        if (bl2) {
                            Thread.currentThread().setContextClassLoader(classLoader);
                        }
                    }
                    catch (CompletionException completionException9) {
                        throw ServerCustomAssertionHolder.a(completionException9);
                    }
                    return customAssertionDescriptor;
                }
                throw completionException;
            }
        }
    }

    /*
     * Exception decompiling
     */
    private static AssertionStatus a(CustomAssertionStatus 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 1[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:1055)
         *     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 boolean a(PolicyEnforcementContext policyEnforcementContext) {
        boolean bl2;
        block5: {
            block4: {
                try {
                    try {
                        if (!RoutingStatus.ROUTED.equals(policyEnforcementContext.getRoutingStatus()) && !RoutingStatus.ATTEMPTED.equals(policyEnforcementContext.getRoutingStatus())) break block4;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw ServerCustomAssertionHolder.a(illegalArgumentException);
                    }
                    bl2 = true;
                    break block5;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw ServerCustomAssertionHolder.a(illegalArgumentException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    private CustomAssertionsRegistrar b() {
        try {
            if (this.h != null) {
                return this.h;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerCustomAssertionHolder.a(illegalArgumentException);
        }
        this.h = (CustomAssertionsRegistrar)this.i.getBean(k[32]);
        return this.h;
    }

    private boolean a(CustomAssertionDescriptor customAssertionDescriptor) {
        boolean bl2;
        block5: {
            block4: {
                try {
                    try {
                        if (customAssertionDescriptor == null || customAssertionDescriptor.getServerAssertion() == null) break block4;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw ServerCustomAssertionHolder.a(illegalArgumentException);
                    }
                    bl2 = true;
                    break block5;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw ServerCustomAssertionHolder.a(illegalArgumentException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    /*
     * Could not resolve type clashes
     * Unable to fully structure code
     */
    private Object[][] a(Message var1_1) throws IOException {
        var2_2 = new ArrayList<Iterator<E>>();
        var3_3 = new ArrayList<byte[]>();
        try {
            var4_4 = var1_1.getMimeKnob().getParts();
            while (var4_4.hasNext()) {
                block14: {
                    block16: {
                        block15: {
                            var5_7 = var4_4.next();
                            var6_10 = var5_7.getContentType().getFullValue();
                            var7_11 /* !! */  = IOUtils.slurpStream((InputStream)var5_7.getInputStream(false));
                            if (var6_10 == null) ** GOTO lbl28
                            if (var6_10.length() < 1) ** GOTO lbl28
                            break block15;
                            catch (NoSuchPartException v0) {
                                throw ServerCustomAssertionHolder.a((Exception)v0);
                            }
                        }
                        if (var7_11 /* !! */  == null) ** GOTO lbl28
                        break block16;
                        catch (NoSuchPartException v1) {
                            throw ServerCustomAssertionHolder.a((Exception)v1);
                        }
                    }
                    try {
                        block17: {
                            if (var7_11 /* !! */ .length >= 1) break block14;
                            break block17;
                            catch (NoSuchPartException v2) {
                                throw ServerCustomAssertionHolder.a((Exception)v2);
                            }
                        }
                        this.logger.fine(ServerCustomAssertionHolder.k[22]);
                    }
                    catch (NoSuchPartException v3) {
                        throw ServerCustomAssertionHolder.a((Exception)v3);
                    }
                }
                var2_2.add(var6_10);
                var3_3.add(var7_11 /* !! */ );
            }
        }
        catch (NoSuchPartException var4_5) {
            var8_12 = ServerCustomAssertionHolder.k;
            var5_8 = var8_12[25];
            this.logger.log(Level.WARNING, var5_8, var4_5);
            throw new RuntimeException(var5_8, var4_5);
        }
        catch (IllegalStateException var4_6) {
            this.logger.log(Level.FINE, ServerCustomAssertionHolder.k[1], var4_6);
        }
        var4_4 = new Object[var2_2.size()][2];
        var5_9 = 0;
        for (byte[] var7_11 : var2_2) {
            var4_4[var5_9][0] = var7_11 /* !! */ ;
            ++var5_9;
        }
        var5_9 = 0;
        for (byte[] var7_11 : var3_3) {
            var4_4[var5_9][1] = var7_11 /* !! */ ;
            ++var5_9;
        }
        return var4_4;
    }

    private Vector a(Collection collection) {
        Vector<Cookie> vector = new Vector<Cookie>();
        for (Object e10 : collection) {
            HttpCookie httpCookie = (HttpCookie)e10;
            vector.add(CookieUtils.toServletCookie((HttpCookie)httpCookie));
        }
        return vector;
    }

    private static HttpServletResponse a(HttpServletResponse httpServletResponse, PolicyEnforcementContext policyEnforcementContext) {
        return new c(httpServletResponse, policyEnforcementContext);
    }

    private Map<String, Object> a(PolicyEnforcementContext policyEnforcementContext, Message message) throws IOException {
        HashMap<String, Object> hashMap;
        block4: {
            hashMap = new HashMap<String, Object>();
            try {
                try {
                    ServerCustomAssertionHolder.a(policyEnforcementContext, hashMap);
                    if (this.g != null && !this.g.loadsMessagePartsIntoMemory()) break block4;
                }
                catch (IOException iOException) {
                    throw ServerCustomAssertionHolder.a(iOException);
                }
                hashMap.put(k[28], this.a(message));
            }
            catch (IOException iOException) {
                throw ServerCustomAssertionHolder.a(iOException);
            }
        }
        ServiceFinderImpl serviceFinderImpl = new ServiceFinderImpl();
        String[] stringArray = k;
        serviceFinderImpl.setCertificateFinderImpl(new CertificateFinderImpl((TrustedCertManager)this.i.getBean(stringArray[24])));
        serviceFinderImpl.setVariableServicesImpl(new VariableServicesImpl(this.getAudit(), (Assertion)this.d));
        serviceFinderImpl.setSecurePasswordServicesImpl(new SecurePasswordServicesImpl((SecurePasswordManager)this.i.getBean(stringArray[23])));
        serviceFinderImpl.setKeyValueStoreImpl(new KeyValueStoreServicesImpl((CustomKeyValueStoreManager)this.i.getBean(stringArray[37])));
        serviceFinderImpl.setSignerServicesImpl(new SignerServicesImpl((SsgKeyStoreManager)this.i.getBean(stringArray[2]), (DefaultKey)this.i.getBean(stringArray[18])));
        hashMap.put(stringArray[7], serviceFinderImpl);
        return hashMap;
    }

    private void a(String[] stringArray, PolicyEnforcementContext policyEnforcementContext) throws HttpCookie.IllegalFormatException {
        Object object;
        HttpCookiesKnob httpCookiesKnob;
        block18: {
            String[] stringArray2;
            block17: {
                try {
                    block16: {
                        try {
                            try {
                                try {
                                    if (stringArray == null || stringArray.length == 0) break block16;
                                }
                                catch (HttpCookie.IllegalFormatException illegalFormatException) {
                                    throw ServerCustomAssertionHolder.a((Exception)((Object)illegalFormatException));
                                }
                                if (policyEnforcementContext == null) break block16;
                            }
                            catch (HttpCookie.IllegalFormatException illegalFormatException) {
                                throw ServerCustomAssertionHolder.a((Exception)((Object)illegalFormatException));
                            }
                            if (policyEnforcementContext.getRequest() != null) break block17;
                        }
                        catch (HttpCookie.IllegalFormatException illegalFormatException) {
                            throw ServerCustomAssertionHolder.a((Exception)((Object)illegalFormatException));
                        }
                    }
                    return;
                }
                catch (HttpCookie.IllegalFormatException illegalFormatException) {
                    throw ServerCustomAssertionHolder.a((Exception)((Object)illegalFormatException));
                }
            }
            Message message = policyEnforcementContext.getRequest();
            httpCookiesKnob = message.getHttpCookiesKnob();
            HttpRequestKnob httpRequestKnob = (HttpRequestKnob)message.getKnob(HttpRequestKnob.class);
            try {
                if (httpRequestKnob == null || !httpCookiesKnob.getCookies().isEmpty()) break block18;
            }
            catch (HttpCookie.IllegalFormatException illegalFormatException) {
                throw ServerCustomAssertionHolder.a((Exception)((Object)illegalFormatException));
            }
            String[] stringArray3 = stringArray2 = httpRequestKnob.getHeaderValues(k[4]);
            int n2 = stringArray3.length;
            for (int i2 = 0; i2 < n2; ++i2) {
                object = stringArray3[i2];
                httpCookiesKnob.addCookie(new HttpCookie((String)object));
            }
        }
        for (String string : stringArray) {
            object = new ArrayList();
            Set set = httpCookiesKnob.getCookies();
            for (HttpCookie httpCookie : set) {
                try {
                    if (!httpCookie.getCookieName().equals(string)) continue;
                    object.add(httpCookie);
                }
                catch (HttpCookie.IllegalFormatException illegalFormatException) {
                    throw ServerCustomAssertionHolder.a((Exception)((Object)illegalFormatException));
                }
            }
            Iterator iterator = object.iterator();
            while (iterator.hasNext()) {
                HttpCookie httpCookie;
                httpCookie = (HttpCookie)iterator.next();
                httpCookiesKnob.deleteCookie(httpCookie);
            }
        }
    }

    private void a(@NotNull PolicyEnforcementContext policyEnforcementContext, @Nullable String string, @Nullable Object object) {
        try {
            if (policyEnforcementContext == null) {
                ServerCustomAssertionHolder.b(0);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerCustomAssertionHolder.a(illegalArgumentException);
        }
        policyEnforcementContext.setVariable(string, object);
    }

    private Object a(@NotNull PolicyEnforcementContext policyEnforcementContext, @Nullable String string) {
        try {
            if (policyEnforcementContext == null) {
                ServerCustomAssertionHolder.b(1);
            }
        }
        catch (NoSuchVariableException noSuchVariableException) {
            throw ServerCustomAssertionHolder.a((Exception)((Object)noSuchVariableException));
        }
        try {
            return policyEnforcementContext.getVariable(string);
        }
        catch (NoSuchVariableException noSuchVariableException) {
            this.logAndAudit((AuditDetailMessage)AssertionMessages.NO_SUCH_VARIABLE, string);
            return null;
        }
    }

    private void b(PolicyEnforcementContext policyEnforcementContext, Map map) {
        String[] stringArray;
        block7: {
            stringArray = k;
            Vector vector = (Vector)map.get(stringArray[19]);
            Collection collection = (Collection)map.get(stringArray[21]);
            try {
                if (vector == null || collection == null) break block7;
            }
            catch (HttpCookie.IllegalFormatException illegalFormatException) {
                throw ServerCustomAssertionHolder.a((Exception)((Object)illegalFormatException));
            }
            for (Object e10 : vector) {
                Cookie cookie = (Cookie)e10;
                try {
                    if (collection.contains(cookie)) continue;
                    policyEnforcementContext.getRequest().getHttpCookiesKnob().addCookie(CookieUtils.fromServletCookie((Cookie)cookie, (boolean)true));
                }
                catch (HttpCookie.IllegalFormatException illegalFormatException) {
                    throw ServerCustomAssertionHolder.a((Exception)((Object)illegalFormatException));
                }
            }
        }
        try {
            stringArray = k;
            String[] stringArray2 = (String[])map.get(stringArray[3]);
            this.a(stringArray2, policyEnforcementContext);
        }
        catch (HttpCookie.IllegalFormatException illegalFormatException) {
            throw new IllegalArgumentException(k[29]);
        }
    }

    public void doAttachKnobs(@NotNull CustomMessageImpl customMessageImpl) {
        try {
            if (customMessageImpl == null) {
                ServerCustomAssertionHolder.b(2);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ServerCustomAssertionHolder.a(illegalArgumentException);
        }
        customMessageImpl.attachKnob(CustomHttpHeadersKnob.class, new CustomHttpHeadersKnobImpl(customMessageImpl.getMessage()));
        customMessageImpl.attachKnob(CustomPartsKnob.class, new CustomPartsKnobImpl(customMessageImpl.getMessage()));
    }

    /*
     * Exception decompiling
     */
    private static /* synthetic */ void b(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 a(Exception exception) {
        return exception;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[39];
                var3_1 = 0;
                var2_2 = "v>ZG\u001d_ST8ZV\u0000F\u001aZ%\tZ\u0001\u0012\u001e\\8J\\\u001cT\u001aR>[V\u0016\u0014V*G]\u001dFSR.]\u0013\u001f[\u001ePkB]\u001dP\u0012F8Nx\u0017K A$[V?S\u001dT,LA\u001dV>ZG\u001d_2F8LA\u0006[\u001c[8j\\\u001dY\u001aP8}\\=_\u001aA\u0006v$FX\u001bW\u001ft>][\u0017\\\u0007\\(HG\u001b]\u001d\u0015cE\\\u0015[\u001d\u001ckOR\u001b^\u0016Qq\t2|%_R\u001e[\u0017\u0015(\\@\u0006]\u001e\u0015*Z@\u0017@\u0007\\$G\u0013\u0016W\u0000V9@C\u0006]\u0001\u0015/LG\u0017Q\u0007P/\tU\u001d@S\u0012\rF.[E\u001bQ\u0016s\"GW\u0017@\u001eF8Np\u0007A\u0007Z&dV\u0001A\u0012R.o\\\u0000_\u0012A\u0019LT\u001bA\u0007G2%s*@_\u0017VSA$\tZ\u001cD\u001c^.\tG\u001aWSV>ZG\u001d_ST8ZV\u0000F\u001aZ%!v>ZG\u001d_ST8ZV\u0000F\u001aZ%\tZ\u0001\u0012\u001e\\8J\\\u001cT\u001aR>[V\u0016\rQ$hG\u0006S\u0010]\u0000G\\\u0010A\u000bF.]e\u0013@\u001aT)EV't>][\u001d@\u001aO*]Z\u001d\\S\u001d*JP\u0017A\u0000\u0015(F]\u0006@\u001cYb\tU\u0013[\u001fP/\u0013\u0013\u000b]?]C W\u0002@.ZG\u001aG.XF\u0017A\u0007\u001b#]G\u0002\u001c\u001bP*MV\u0000d\u0012Y>L@\\\f]?]C W\u0000E$G@\u0017>t9NF\u001fW\u001dAkO\\\u0000\u00123{$]}\u0007^\u001f\u0015;HA\u0013_\u0016A.[\u0013U\u0017\u0000\u0012kFUR\u0017\u0000\u001bnZ\u0013\u001fG\u0000AkG\\\u0006\u0012\u0011PkGF\u001e^\nQ.OR\u0007^\u0007~.P\u000e@;MR\u0006W\u0017v$FX\u001bW\u0000\rV>ZG\u001d_>P8ZR\u0015W\u000fZ9@T\u001b\\\u0012Y\bF\\\u0019[\u0016F\u001aP&YG\u000b\u0012\u0003T9]Z\u001cT\u001c\u0015.GP\u001dG\u001dA.[V\u0016\u0015F.JF\u0000W#T8ZD\u001d@\u0017x*GR\u0015W\u0001\u0012A9\\@\u0006W\u0017v.[G?S\u001dT,LA&V*G]\u001dFS\\?LA\u0013F\u0016\u0015?AA\u001dG\u0014]kDV\u0001A\u0012R.\u000e@RB\u0012G?Z1v>ZG\u001d_2F8LA\u0006[\u001c[\u0003F_\u0016W\u0001\u0015(F]\u0006S\u001a[8\t]\u001d\u00120@8]\\\u001fs\u0000F.[G\u001b]\u001d\t\t>GX\u001c]\u0004[u\fX.Z@\u0013U\u0016e*[G\u0001\u0015|%_R\u001e[\u0017\u0015(F\\\u0019[\u0016\u0015-FA\u001fS\u0007J\u0012A\tG\u001a[\u0000\u0015;F_\u001bQ\n\u0015.EV\u001fW\u001dAk@@R_\u001aF(F]\u0014[\u0014@9LWRS\u001dQk^Z\u001e^SV*\\@\u0017\u0012\u0007].\tC\u001d^\u001aV2\tG\u001d\u0012\u0015T\"E\u001d't>][\u001d@\u001aO*]Z\u001d\\S\u001d*JP\u0017A\u0000\u0015(F]\u0006@\u001cYb\tU\u0013[\u001fP/\u0013\u0013\u0018V>ZG\u001d_2F8LA\u0006[\u001c[\u0019LT\u001bA\u0007G*[\u0012t8ZV\u0000F\u001aZ%\tU\u0013[\u001fP/\u0013\u0013\u000bR.]e\u0013@\u001aT)EV>V$D\u001c\u001e\u0005\u0007P(A\u001c\u0001W\u0001C.[\u001c\u0002]\u001f\\(P\u001c\u0013A\u0000P9]Z\u001d\\\\f.[E\u0017@0@8]\\\u001fs\u0000F.[G\u001b]\u001d}$EW\u0017@\rE$EZ\u0011K0Z%]V\nF";
                var4_3 = "v>ZG\u001d_ST8ZV\u0000F\u001aZ%\tZ\u0001\u0012\u001e\\8J\\\u001cT\u001aR>[V\u0016\u0014V*G]\u001dFSR.]\u0013\u001f[\u001ePkB]\u001dP\u0012F8Nx\u0017K A$[V?S\u001dT,LA\u001dV>ZG\u001d_2F8LA\u0006[\u001c[8j\\\u001dY\u001aP8}\\=_\u001aA\u0006v$FX\u001bW\u001ft>][\u0017\\\u0007\\(HG\u001b]\u001d\u0015cE\\\u0015[\u001d\u001ckOR\u001b^\u0016Qq\t2|%_R\u001e[\u0017\u0015(\\@\u0006]\u001e\u0015*Z@\u0017@\u0007\\$G\u0013\u0016W\u0000V9@C\u0006]\u0001\u0015/LG\u0017Q\u0007P/\tU\u001d@S\u0012\rF.[E\u001bQ\u0016s\"GW\u0017@\u001eF8Np\u0007A\u0007Z&dV\u0001A\u0012R.o\\\u0000_\u0012A\u0019LT\u001bA\u0007G2%s*@_\u0017VSA$\tZ\u001cD\u001c^.\tG\u001aWSV>ZG\u001d_ST8ZV\u0000F\u001aZ%!v>ZG\u001d_ST8ZV\u0000F\u001aZ%\tZ\u0001\u0012\u001e\\8J\\\u001cT\u001aR>[V\u0016\rQ$hG\u0006S\u0010]\u0000G\\\u0010A\u000bF.]e\u0013@\u001aT)EV't>][\u001d@\u001aO*]Z\u001d\\S\u001d*JP\u0017A\u0000\u0015(F]\u0006@\u001cYb\tU\u0013[\u001fP/\u0013\u0013\u000b]?]C W\u0002@.ZG\u001aG.XF\u0017A\u0007\u001b#]G\u0002\u001c\u001bP*MV\u0000d\u0012Y>L@\\\f]?]C W\u0000E$G@\u0017>t9NF\u001fW\u001dAkO\\\u0000\u00123{$]}\u0007^\u001f\u0015;HA\u0013_\u0016A.[\u0013U\u0017\u0000\u0012kFUR\u0017\u0000\u001bnZ\u0013\u001fG\u0000AkG\\\u0006\u0012\u0011PkGF\u001e^\nQ.OR\u0007^\u0007~.P\u000e@;MR\u0006W\u0017v$FX\u001bW\u0000\rV>ZG\u001d_>P8ZR\u0015W\u000fZ9@T\u001b\\\u0012Y\bF\\\u0019[\u0016F\u001aP&YG\u000b\u0012\u0003T9]Z\u001cT\u001c\u0015.GP\u001dG\u001dA.[V\u0016\u0015F.JF\u0000W#T8ZD\u001d@\u0017x*GR\u0015W\u0001\u0012A9\\@\u0006W\u0017v.[G?S\u001dT,LA&V*G]\u001dFS\\?LA\u0013F\u0016\u0015?AA\u001dG\u0014]kDV\u0001A\u0012R.\u000e@RB\u0012G?Z1v>ZG\u001d_2F8LA\u0006[\u001c[\u0003F_\u0016W\u0001\u0015(F]\u0006S\u001a[8\t]\u001d\u00120@8]\\\u001fs\u0000F.[G\u001b]\u001d\t\t>GX\u001c]\u0004[u\fX.Z@\u0013U\u0016e*[G\u0001\u0015|%_R\u001e[\u0017\u0015(F\\\u0019[\u0016\u0015-FA\u001fS\u0007J\u0012A\tG\u001a[\u0000\u0015;F_\u001bQ\n\u0015.EV\u001fW\u001dAk@@R_\u001aF(F]\u0014[\u0014@9LWRS\u001dQk^Z\u001e^SV*\\@\u0017\u0012\u0007].\tC\u001d^\u001aV2\tG\u001d\u0012\u0015T\"E\u001d't>][\u001d@\u001aO*]Z\u001d\\S\u001d*JP\u0017A\u0000\u0015(F]\u0006@\u001cYb\tU\u0013[\u001fP/\u0013\u0013\u0018V>ZG\u001d_2F8LA\u0006[\u001c[\u0019LT\u001bA\u0007G*[\u0012t8ZV\u0000F\u001aZ%\tU\u0013[\u001fP/\u0013\u0013\u000bR.]e\u0013@\u001aT)EV>V$D\u001c\u001e\u0005\u0007P(A\u001c\u0001W\u0001C.[\u001c\u0002]\u001f\\(P\u001c\u0013A\u0000P9]Z\u001d\\\\f.[E\u0017@0@8]\\\u001fs\u0000F.[G\u001b]\u001d}$EW\u0017@\rE$EZ\u0011K0Z%]V\nF".length();
                var1_4 = 33;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = ServerCustomAssertionHolder.b(v0, ServerCustomAssertionHolder.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "D,HU\u000fM*B m@\fU\u0004t-TS\u0005m\u0000I8\\D\u0012,d,HU\u000fMAF*HD\u0012T\bH7\u001bH\u0013\u0000\fN*XN\u000eF\b@,ID\u0004\fAT<IW\tC\u0004\u0007~";
                    var4_3 = "D,HU\u000fM*B m@\fU\u0004t-TS\u0005m\u0000I8\\D\u0012,d,HU\u000fMAF*HD\u0012T\bH7\u001bH\u0013\u0000\fN*XN\u000eF\b@,ID\u0004\fAT<IW\tC\u0004\u0007~".length();
                    var1_4 = 26;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 105;
                        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++] = ServerCustomAssertionHolder.b(v0, ServerCustomAssertionHolder.a(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;
            }
        }
        ServerCustomAssertionHolder.k = var5;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 8);
        }
        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 -> 78;
                    case 1 -> 48;
                    case 2 -> 82;
                    case 3 -> 72;
                    case 4 -> 9;
                    case 5 -> 73;
                    default -> 8;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

