/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.audit.AssertionMessages
 *  com.l7tech.gateway.common.audit.AuditDetailMessage
 *  com.l7tech.gateway.common.security.keystore.SsgKeyEntry
 *  com.l7tech.gateway.common.transport.jms.JmsConnection
 *  com.l7tech.gateway.common.transport.jms.JmsEndpoint
 *  com.l7tech.gateway.common.transport.jms.JmsReplyType
 *  com.l7tech.message.Message
 *  com.l7tech.message.MimeKnob
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.policy.JmsDynamicProperties
 *  com.l7tech.policy.assertion.AssertionStatus
 *  com.l7tech.policy.assertion.JmsMessagePropertyRule
 *  com.l7tech.policy.assertion.JmsMessagePropertyRuleSet
 *  com.l7tech.policy.assertion.JmsRoutingAssertion
 *  com.l7tech.policy.assertion.MessageTargetable
 *  com.l7tech.policy.assertion.RoutingAssertionWithSamlSV
 *  com.l7tech.policy.assertion.RoutingStatus
 *  com.l7tech.policy.variable.NoSuchVariableException
 *  com.l7tech.policy.variable.Syntax
 *  com.l7tech.security.xml.SignerInfo
 *  com.l7tech.util.ExceptionUtils
 *  javax.jms.Destination
 *  javax.jms.InvalidDestinationException
 *  javax.jms.JMSException
 *  javax.jms.Message
 *  javax.jms.Session
 *  javax.jms.TemporaryQueue
 *  org.springframework.context.ApplicationContext
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.context.ApplicationListener
 */
package com.l7tech.server.policy.assertion;

import com.l7tech.gateway.common.audit.AssertionMessages;
import com.l7tech.gateway.common.audit.AuditDetailMessage;
import com.l7tech.gateway.common.security.keystore.SsgKeyEntry;
import com.l7tech.gateway.common.transport.jms.JmsConnection;
import com.l7tech.gateway.common.transport.jms.JmsEndpoint;
import com.l7tech.gateway.common.transport.jms.JmsReplyType;
import com.l7tech.message.MimeKnob;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.policy.JmsDynamicProperties;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.JmsMessagePropertyRule;
import com.l7tech.policy.assertion.JmsMessagePropertyRuleSet;
import com.l7tech.policy.assertion.JmsRoutingAssertion;
import com.l7tech.policy.assertion.MessageTargetable;
import com.l7tech.policy.assertion.RoutingAssertionWithSamlSV;
import com.l7tech.policy.assertion.RoutingStatus;
import com.l7tech.policy.variable.NoSuchVariableException;
import com.l7tech.policy.variable.Syntax;
import com.l7tech.security.xml.SignerInfo;
import com.l7tech.server.DefaultKey;
import com.l7tech.server.ServerConfig;
import com.l7tech.server.StashManagerFactory;
import com.l7tech.server.event.EntityInvalidationEvent;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.assertion.AssertionStatusException;
import com.l7tech.server.policy.assertion.ServerRoutingAssertion;
import com.l7tech.server.policy.assertion.ab;
import com.l7tech.server.policy.variable.ExpandVariables;
import com.l7tech.server.transport.jms.JmsConfigException;
import com.l7tech.server.transport.jms.JmsConnectionManager;
import com.l7tech.server.transport.jms.JmsEndpointManager;
import com.l7tech.server.transport.jms.JmsPropertyMapper;
import com.l7tech.server.transport.jms.JmsRuntimeException;
import com.l7tech.server.transport.jms.JmsUtil;
import com.l7tech.server.transport.jms2.JmsConnectionMaxWaitException;
import com.l7tech.server.transport.jms2.JmsEndpointConfig;
import com.l7tech.server.transport.jms2.JmsResourceManager;
import com.l7tech.server.util.ApplicationEventProxy;
import com.l7tech.util.ExceptionUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.jms.Destination;
import javax.jms.InvalidDestinationException;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import javax.jms.TemporaryQueue;
import javax.naming.CommunicationException;
import javax.naming.NamingException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;

public class ServerJmsRoutingAssertion
extends ServerRoutingAssertion<JmsRoutingAssertion> {
    private static final Logger e;
    private static final String f;
    private static final String g;
    private static final int h = 5;
    private static final long i = 1000L;
    private static final long j = 0x280000L;
    private static final String k;
    private static final String l;
    private static final String m;
    private static final String n;
    private static final String o;
    private static final String p;
    private static final String q;
    private static final String r;
    private static final String s;
    private final ApplicationContext t;
    private final ApplicationEventProxy u;
    private final ServerConfig v;
    private final JmsEndpointManager w;
    private final JmsConnectionManager x;
    private final StashManagerFactory y;
    private final JmsPropertyMapper z;
    private final JmsResourceManager A;
    private final SignerInfo B;
    private final AtomicBoolean C = new AtomicBoolean(false);
    private final Object D = new Object();
    private JmsConnection E;
    private JmsEndpoint F;
    private JmsEndpointConfig G;
    private final JmsInvalidator H;
    private static final String[] I;

    public ServerJmsRoutingAssertion(JmsRoutingAssertion jmsRoutingAssertion, ApplicationContext applicationContext) {
        super(jmsRoutingAssertion, applicationContext);
        this.t = applicationContext;
        String[] stringArray = I;
        this.u = (ApplicationEventProxy)applicationContext.getBean(stringArray[6], ApplicationEventProxy.class);
        this.v = (ServerConfig)applicationContext.getBean(stringArray[34], ServerConfig.class);
        this.w = (JmsEndpointManager)applicationContext.getBean(stringArray[30]);
        this.x = (JmsConnectionManager)applicationContext.getBean(stringArray[35]);
        this.y = (StashManagerFactory)applicationContext.getBean(stringArray[27], StashManagerFactory.class);
        this.z = (JmsPropertyMapper)applicationContext.getBean(stringArray[21], JmsPropertyMapper.class);
        this.A = (JmsResourceManager)applicationContext.getBean(stringArray[7], JmsResourceManager.class);
        this.H = new JmsInvalidator(this);
        this.u.addApplicationListener(this.H);
        SsgKeyEntry ssgKeyEntry = null;
        try {
            DefaultKey defaultKey = (DefaultKey)applicationContext.getBean(stringArray[10], DefaultKey.class);
            ssgKeyEntry = defaultKey.getClientSslInfo();
        }
        catch (Exception exception) {
            e.log(Level.WARNING, I[32], exception);
        }
        this.B = ssgKeyEntry;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Loose catch block
     */
    @Override
    public AssertionStatus checkRequest(PolicyEnforcementContext policyEnforcementContext) throws IOException {
        com.l7tech.message.Message message;
        policyEnforcementContext.setRoutingStatus(RoutingStatus.ATTEMPTED);
        try {
            message = policyEnforcementContext.getTargetMessage((MessageTargetable)((JmsRoutingAssertion)this.assertion).getRequestTarget());
        }
        catch (NoSuchVariableException noSuchVariableException) {
            this.logAndAudit((AuditDetailMessage)AssertionMessages.MESSAGE_TARGET_ERROR, noSuchVariableException.getVariable(), ExceptionUtils.getMessage((Throwable)noSuchVariableException));
            throw new AssertionStatusException(AssertionStatus.SERVER_ERROR, noSuchVariableException.getMessage(), noSuchVariableException);
        }
        try {
            if (!this.a(message)) {
                return AssertionStatus.BAD_REQUEST;
            }
        }
        catch (NoSuchVariableException noSuchVariableException) {
            throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
        }
        JmsEndpointConfig jmsEndpointConfig = null;
        try {
            String[] stringArray;
            block65: {
                block66: {
                    try {
                        this.handleProcessedSecurityHeader(message);
                        if (!((JmsRoutingAssertion)this.assertion).isAttachSamlSenderVouches()) break block65;
                        if (this.B != null) break block66;
                    }
                    catch (NoSuchVariableException noSuchVariableException) {
                        throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                    }
                    this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_NO_SAML_SIGNER);
                    return AssertionStatus.FAILED;
                }
                this.doAttachSamlSenderVouches((RoutingAssertionWithSamlSV)this.assertion, message, policyEnforcementContext.getDefaultAuthenticationContext().getLastCredentials(), this.B);
            }
            JmsDynamicProperties jmsDynamicProperties = this.a(policyEnforcementContext);
            if (this.a()) {
                try {
                    stringArray = I;
                    e.info(stringArray[44]);
                    this.b();
                }
                finally {
                    this.b(false);
                }
            }
            stringArray = I;
            long l2 = this.v.getTimeUnitProperty(stringArray[23], 1000L);
            int n2 = this.v.getIntProperty(stringArray[8], 5);
            int n3 = 0;
            jmsEndpointConfig = this.a(jmsDynamicProperties);
            Destination[] destinationArray = new Destination[1];
            while (true) {
                ab ab2 = new ab(this, policyEnforcementContext, jmsEndpointConfig, destinationArray);
                try {
                    this.A.doWithJmsResources(jmsEndpointConfig, ab2);
                    ab2.c();
                }
                catch (JmsConnectionMaxWaitException jmsConnectionMaxWaitException) {
                    try {
                        if (ab2.b()) {
                            throw jmsConnectionMaxWaitException;
                        }
                    }
                    catch (NoSuchVariableException noSuchVariableException) {
                        throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                    }
                    try {
                        if (++n3 < n2) {
                            this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_CANT_CONNECT_RETRYING, new String[]{String.valueOf(n3), String.valueOf(l2)}, ExceptionUtils.getDebugException((Throwable)jmsConnectionMaxWaitException));
                            this.a(l2);
                            continue;
                        }
                    }
                    catch (NoSuchVariableException noSuchVariableException) {
                        throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                    }
                    this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_CANT_CONNECT_NOMORETRIES, String.valueOf(n2));
                    return AssertionStatus.FAILED;
                }
                catch (JmsRuntimeException jmsRuntimeException) {
                    Throwable throwable;
                    block68: {
                        Throwable throwable2;
                        block70: {
                            block69: {
                                e.log(Level.FINE, I[37], jmsRuntimeException);
                                if (!ab2.b()) break block68;
                                try {
                                    block76: {
                                        if (jmsRuntimeException.getCause() == null) break block69;
                                        break block76;
                                        catch (NoSuchVariableException noSuchVariableException) {
                                            throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                                        }
                                    }
                                    throwable2 = jmsRuntimeException.getCause();
                                    break block70;
                                }
                                catch (NoSuchVariableException noSuchVariableException) {
                                    throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                                }
                            }
                            throwable2 = jmsRuntimeException;
                        }
                        throw throwable2;
                    }
                    try {
                        if (++n3 < n2) {
                            this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_CANT_CONNECT_RETRYING, new String[]{String.valueOf(n3), String.valueOf(l2)}, ExceptionUtils.getDebugException((Throwable)jmsRuntimeException));
                            this.A.invalidate(jmsEndpointConfig);
                            this.a(l2);
                            continue;
                        }
                    }
                    catch (NoSuchVariableException noSuchVariableException) {
                        throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                    }
                    try {
                        this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_CANT_CONNECT_NOMORETRIES, String.valueOf(n2));
                        throwable = jmsRuntimeException.getCause() != null ? jmsRuntimeException.getCause() : jmsRuntimeException;
                    }
                    catch (NoSuchVariableException noSuchVariableException) {
                        throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                    }
                    throw throwable;
                }
                catch (JMSException jMSException) {
                    block72: {
                        block74: {
                            block73: {
                                block71: {
                                    try {
                                        e.log(Level.FINE, I[24], jMSException);
                                        if (ab2.b()) {
                                            throw jMSException;
                                        }
                                    }
                                    catch (NoSuchVariableException noSuchVariableException) {
                                        throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                                    }
                                    try {
                                        if (jMSException.getLinkedException() == null || !(jMSException.getLinkedException() instanceof ClassCastException)) break block71;
                                    }
                                    catch (NoSuchVariableException noSuchVariableException) {
                                        throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                                    }
                                    return AssertionStatus.FAILED;
                                }
                                if (++n3 >= n2) break block72;
                                try {
                                    block77: {
                                        if (!ExceptionUtils.causedBy((Throwable)jMSException, InvalidDestinationException.class)) break block73;
                                        break block77;
                                        catch (NoSuchVariableException noSuchVariableException) {
                                            throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                                        }
                                    }
                                    this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_CANT_CONNECT_RETRYING, new String[]{String.valueOf(n3), String.valueOf(l2)}, ExceptionUtils.getDebugException((Throwable)jMSException));
                                    break block74;
                                }
                                catch (NoSuchVariableException noSuchVariableException) {
                                    throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                                }
                            }
                            this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_CANT_CONNECT_RETRYING, new String[]{String.valueOf(n3), String.valueOf(l2)}, jMSException);
                        }
                        this.A.invalidate(jmsEndpointConfig);
                        destinationArray[0] = null;
                        this.a(l2);
                        continue;
                    }
                    this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_CANT_CONNECT_NOMORETRIES, String.valueOf(n2));
                    throw jMSException;
                }
                catch (NamingException namingException) {
                    NamingException namingException2;
                    block75: {
                        try {
                            e.log(Level.FINE, I[38], namingException);
                            if (ab2.b()) {
                                throw namingException;
                            }
                        }
                        catch (NoSuchVariableException noSuchVariableException) {
                            throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                        }
                        if (++n3 >= n2) break block75;
                        try {
                            block78: {
                                if (!(namingException instanceof CommunicationException)) break block75;
                                break block78;
                                catch (NoSuchVariableException noSuchVariableException) {
                                    throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                                }
                            }
                            this.A.invalidate(jmsEndpointConfig);
                            destinationArray[0] = null;
                        }
                        catch (NoSuchVariableException noSuchVariableException) {
                            throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                        }
                        continue;
                    }
                    try {
                        if (n3 >= n2) {
                            this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_CANT_CONNECT_NOMORETRIES, String.valueOf(n2));
                        }
                    }
                    catch (NoSuchVariableException noSuchVariableException) {
                        throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                    }
                    try {
                        namingException2 = JmsUtil.isCausedByExpectedNamingException(namingException) ? null : namingException;
                    }
                    catch (NoSuchVariableException noSuchVariableException) {
                        throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
                    }
                    NamingException namingException3 = namingException2;
                    String[] stringArray2 = new String[1];
                    stringArray = I;
                    stringArray2[0] = stringArray[15] + JmsUtil.getJNDIErrorMessage(namingException);
                    this.logAndAudit((AuditDetailMessage)AssertionMessages.EXCEPTION_WARNING_WITH_MORE_INFO, stringArray2, namingException3);
                    return AssertionStatus.FAILED;
                }
                break;
            }
            return AssertionStatus.NONE;
        }
        catch (JMSException jMSException) {
            try {
                this.a(I[4], jMSException);
                if (jmsEndpointConfig != null) {
                    this.A.invalidate(jmsEndpointConfig);
                }
            }
            catch (NoSuchVariableException noSuchVariableException) {
                throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
            }
            return AssertionStatus.FAILED;
        }
        catch (FindException findException) {
            String[] stringArray = I;
            String string = stringArray[56];
            this.logAndAudit((AuditDetailMessage)AssertionMessages.EXCEPTION_SEVERE_WITH_MORE_INFO, new String[]{string + ExceptionUtils.getMessage((Throwable)findException)}, ExceptionUtils.getDebugException((Throwable)findException));
            return AssertionStatus.FAILED;
        }
        catch (JmsConfigException jmsConfigException) {
            this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_CONFIGURATION_ERROR, new String[]{ExceptionUtils.getMessage((Throwable)jmsConfigException)}, ExceptionUtils.getDebugException((Throwable)jmsConfigException));
            return AssertionStatus.FAILED;
        }
        catch (AssertionStatusException assertionStatusException) {
            throw assertionStatusException;
        }
        catch (Throwable throwable) {
            try {
                this.a(I[11], throwable);
                if (jmsEndpointConfig != null) {
                    this.A.invalidate(jmsEndpointConfig);
                }
            }
            catch (NoSuchVariableException noSuchVariableException) {
                throw ServerJmsRoutingAssertion.a((Exception)((Object)noSuchVariableException));
            }
            return AssertionStatus.SERVER_ERROR;
        }
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    private void a(long l2) throws JMSException {
        try {
            if (l2 <= 0L) return;
            try {
                Thread.sleep(l2);
                return;
            }
            catch (InterruptedException interruptedException) {
                throw new JMSException(I[52]);
            }
        }
        catch (JMSException jMSException) {
            throw ServerJmsRoutingAssertion.a((Exception)((Object)jMSException));
        }
    }

    private void a(String string, Throwable throwable) {
        Object object;
        Throwable throwable2;
        try {
            throwable2 = JmsUtil.isCausedByExpectedJMSException(throwable) ? null : throwable;
        }
        catch (AssertionStatusException assertionStatusException) {
            throw ServerJmsRoutingAssertion.a(assertionStatusException);
        }
        Throwable throwable3 = throwable2;
        JMSException jMSException = (JMSException)ExceptionUtils.getCauseIfCausedBy((Throwable)throwable, JMSException.class);
        try {
            Object object2 = object = jMSException == null ? ExceptionUtils.getMessage((Throwable)throwable) : JmsUtil.getJMSErrorMessage(jMSException);
        }
        catch (AssertionStatusException assertionStatusException) {
            throw ServerJmsRoutingAssertion.a(assertionStatusException);
        }
        if (throwable != jMSException) {
            String[] stringArray = I;
            object = ExceptionUtils.getMessage((Throwable)throwable) + stringArray[1] + (String)object;
        }
        this.logAndAudit((AuditDetailMessage)AssertionMessages.EXCEPTION_WARNING_WITH_MORE_INFO, new String[]{string + I[5] + (String)object}, throwable3);
    }

    private boolean a() {
        return this.C.get();
    }

    private boolean b(boolean bl2) {
        boolean bl3;
        AtomicBoolean atomicBoolean;
        try {
            atomicBoolean = this.C;
            bl3 = !bl2;
        }
        catch (AssertionStatusException assertionStatusException) {
            throw ServerJmsRoutingAssertion.a(assertionStatusException);
        }
        return atomicBoolean.compareAndSet(bl3, bl2);
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    private synchronized void b() {
        Object object = this.D;
        synchronized (object) {
            if (this.a()) {
                this.E = null;
                this.F = null;
                this.G = null;
            }
        }
    }

    private boolean a(Destination destination, JmsReplyType jmsReplyType) {
        boolean bl2;
        block4: {
            bl2 = false;
            try {
                if (!(destination instanceof TemporaryQueue) || jmsReplyType != JmsReplyType.AUTOMATIC) break block4;
            }
            catch (JMSException jMSException) {
                throw ServerJmsRoutingAssertion.a((Exception)((Object)jMSException));
            }
            bl2 = true;
            this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_DELETE_TEMPORARY_QUEUE);
            try {
                ((TemporaryQueue)destination).delete();
            }
            catch (JMSException jMSException) {
                e.log(Level.WARNING, I[18], jMSException);
            }
        }
        return bl2;
    }

    private boolean a(com.l7tech.message.Message message) throws IOException {
        boolean bl2;
        block7: {
            MimeKnob mimeKnob;
            long l2;
            block6: {
                bl2 = true;
                String[] stringArray = I;
                l2 = this.v.getLongProperty(stringArray[45], 0x500000L);
                mimeKnob = (MimeKnob)message.getKnob(MimeKnob.class);
                try {
                    try {
                        if (mimeKnob != null && message.isInitialized()) break block6;
                    }
                    catch (IOException iOException) {
                        throw ServerJmsRoutingAssertion.a(iOException);
                    }
                    this.logAndAudit((AuditDetailMessage)AssertionMessages.EXCEPTION_WARNING_WITH_MORE_INFO, I[54]);
                    return false;
                }
                catch (IOException iOException) {
                    throw ServerJmsRoutingAssertion.a(iOException);
                }
            }
            try {
                if (l2 <= 0L || mimeKnob.getContentLength() <= l2) break block7;
            }
            catch (IOException iOException) {
                throw ServerJmsRoutingAssertion.a(iOException);
            }
            this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_REQUEST_TOO_LARGE);
            bl2 = false;
        }
        return bl2;
    }

    /*
     * Exception decompiling
     */
    private Message a(PolicyEnforcementContext var1_1, Session var2_2, JmsResourceManager.JndiContextProvider var3_3, JmsEndpointConfig var4_4) throws IOException, JMSException, NamingException {
        /*
         * 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 [7[TRYBLOCK]], but top level block is 10[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 String a(Message message, JmsEndpoint jmsEndpoint) throws JMSException {
        String string;
        block15: {
            block16: {
                block17: {
                    block13: {
                        block14: {
                            try {
                                try {
                                    if (jmsEndpoint.getReplyType() != JmsReplyType.AUTOMATIC) break block13;
                                    if (!e.isLoggable(Level.FINE)) break block14;
                                }
                                catch (JMSException jMSException) {
                                    throw ServerJmsRoutingAssertion.a((Exception)((Object)jMSException));
                                }
                                e.fine(I[13]);
                            }
                            catch (JMSException jMSException) {
                                throw ServerJmsRoutingAssertion.a((Exception)((Object)jMSException));
                            }
                        }
                        string = null;
                        break block17;
                    }
                    String[] stringArray = I;
                    StringBuilder stringBuilder = new StringBuilder(stringArray[0]);
                    if (jmsEndpoint.isUseMessageIdForCorrelation()) {
                        String string2 = message.getJMSMessageID();
                        try {
                            if (string2 == null) {
                                this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_MISSING_MESSAGE_ID);
                                throw new AssertionStatusException(AssertionStatus.FAILED);
                            }
                        }
                        catch (JMSException jMSException) {
                            throw ServerJmsRoutingAssertion.a((Exception)((Object)jMSException));
                        }
                        stringBuilder.append(string2);
                    } else {
                        stringBuilder.append(message.getJMSCorrelationID());
                    }
                    stringBuilder.append("'");
                    string = stringBuilder.toString();
                }
                try {
                    try {
                        if (!e.isLoggable(Level.FINE)) break block15;
                        if (string == null) break block16;
                    }
                    catch (JMSException jMSException) {
                        throw ServerJmsRoutingAssertion.a((Exception)((Object)jMSException));
                    }
                    e.fine(I[51] + string);
                    break block15;
                }
                catch (JMSException jMSException) {
                    throw ServerJmsRoutingAssertion.a((Exception)((Object)jMSException));
                }
            }
            e.fine(I[49]);
        }
        return string;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    private JmsEndpoint c() throws FindException {
        JmsEndpoint jmsEndpoint;
        Object object = this.D;
        synchronized (object) {
            jmsEndpoint = this.F;
        }
        if (jmsEndpoint == null) {
            jmsEndpoint = this.d();
            object = this.D;
            synchronized (object) {
                this.F = jmsEndpoint;
            }
        }
        return jmsEndpoint;
    }

    private JmsEndpoint d() throws FindException {
        Goid goid;
        try {
            goid = ((JmsRoutingAssertion)this.assertion).getEndpointOid() == null ? null : new Goid(((JmsRoutingAssertion)this.assertion).getEndpointOid());
        }
        catch (FindException findException) {
            throw ServerJmsRoutingAssertion.a((Exception)((Object)findException));
        }
        Goid goid2 = goid;
        return (JmsEndpoint)this.w.findByPrimaryKey(goid2);
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Loose catch block
     */
    private JmsConnection a(JmsEndpoint jmsEndpoint) throws FindException {
        JmsConnection jmsConnection;
        block10: {
            Object object;
            block11: {
                object = this.D;
                synchronized (object) {
                    jmsConnection = this.E;
                }
                if (jmsConnection != null) break block10;
                try {
                    block12: {
                        if (jmsEndpoint != null) break block11;
                        break block12;
                        catch (FindException findException) {
                            throw ServerJmsRoutingAssertion.a((Exception)((Object)findException));
                        }
                    }
                    this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_NON_EXISTENT_ENDPOINT, String.valueOf(((JmsRoutingAssertion)this.assertion).getEndpointOid()) + "/" + ((JmsRoutingAssertion)this.assertion).getEndpointName());
                    break block10;
                }
                catch (FindException findException) {
                    throw ServerJmsRoutingAssertion.a((Exception)((Object)findException));
                }
            }
            jmsConnection = (JmsConnection)this.x.findByPrimaryKey(jmsEndpoint.getConnectionGoid());
            object = this.D;
            synchronized (object) {
                this.E = jmsConnection;
            }
        }
        return jmsConnection;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Unable to fully structure code
     */
    private JmsEndpointConfig a(JmsDynamicProperties var1_1) throws FindException {
        block23: {
            block25: {
                block24: {
                    block27: {
                        block22: {
                            var3_2 = this.D;
                            synchronized (var3_2) {
                                var2_3 = this.G;
                            }
                            if (var2_3 == null) break block22;
                            try {
                                block26: {
                                    if (var2_3.isDynamic()) break block22;
                                    break block26;
                                    catch (FindException v0) {
                                        throw ServerJmsRoutingAssertion.a((Exception)v0);
                                    }
                                }
                                return var2_3;
                            }
                            catch (FindException v1) {
                                throw ServerJmsRoutingAssertion.a((Exception)v1);
                            }
                        }
                        var3_2 = this.c();
                        try {
                            if (var3_2 == null) {
                                throw new FindException(ServerJmsRoutingAssertion.I[55]);
                            }
                        }
                        catch (FindException v2) {
                            throw ServerJmsRoutingAssertion.a((Exception)v2);
                        }
                        var4_5 = this.a((JmsEndpoint)var3_2);
                        try {
                            if (var4_5 == null) {
                                throw new FindException(ServerJmsRoutingAssertion.I[14]);
                            }
                        }
                        catch (FindException v3) {
                            throw ServerJmsRoutingAssertion.a((Exception)v3);
                        }
                        if (var3_2.isTemplate()) ** GOTO lbl41
                        if (!var4_5.isTemplate()) break block23;
                        break block27;
                        catch (FindException v4) {
                            throw ServerJmsRoutingAssertion.a((Exception)v4);
                        }
                    }
                    try {
                        block28: {
                            v5 = v6;
                            v7 = v6;
                            v8 = var4_5;
                            v9 = var3_2;
                            v10 = this.z;
                            v11 = this.t;
                            if (var1_1 == null) break block24;
                            break block28;
                            catch (FindException v12) {
                                throw ServerJmsRoutingAssertion.a((Exception)v12);
                            }
                        }
                        v13 = var1_1;
                        break block25;
                    }
                    catch (FindException v14) {
                        throw ServerJmsRoutingAssertion.a((Exception)v14);
                    }
                }
                v13 = new JmsDynamicProperties();
            }
            v5(v8, (JmsEndpoint)v9, v10, v11, v13);
            var5_6 = v7;
            this.a(var5_6);
            return var5_6;
        }
        var5_7 = this.D;
        synchronized (var5_7) {
            this.G = new JmsEndpointConfig(var4_5, (JmsEndpoint)var3_2, this.z, this.t);
            return this.G;
        }
    }

    private void a(JmsEndpointConfig jmsEndpointConfig) {
        try {
            jmsEndpointConfig.validate();
        }
        catch (JmsConfigException jmsConfigException) {
            this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_TEMPLATE_ERROR, I[3] + jmsConfigException.getMessage());
            throw new AssertionStatusException(AssertionStatus.FAILED);
        }
    }

    private JmsDynamicProperties a(PolicyEnforcementContext policyEnforcementContext) {
        JmsDynamicProperties jmsDynamicProperties = ((JmsRoutingAssertion)this.assertion).getDynamicJmsRoutingProperties();
        if (jmsDynamicProperties != null) {
            jmsDynamicProperties = this.a(policyEnforcementContext, jmsDynamicProperties);
        }
        return jmsDynamicProperties;
    }

    private JmsDynamicProperties a(PolicyEnforcementContext policyEnforcementContext, JmsDynamicProperties jmsDynamicProperties) {
        JmsDynamicProperties jmsDynamicProperties2 = new JmsDynamicProperties();
        Map<String, Object> map = policyEnforcementContext.getVariableMap(((JmsRoutingAssertion)this.assertion).getVariablesUsed(), this.getAudit());
        try {
            jmsDynamicProperties2.setDestQName(this.a(jmsDynamicProperties.getDestQName(), map));
            jmsDynamicProperties2.setDestUserName(this.a(jmsDynamicProperties.getDestUserName(), map));
            jmsDynamicProperties2.setDestPassword(this.a(jmsDynamicProperties.getDestPassword(), map));
            jmsDynamicProperties2.setReplytoQName(this.a(jmsDynamicProperties.getReplytoQName(), map));
            jmsDynamicProperties2.setJndiUrl(this.a(jmsDynamicProperties.getJndiUrl(), map));
            jmsDynamicProperties2.setJndiUserName(this.a(jmsDynamicProperties.getJndiUserName(), map));
            jmsDynamicProperties2.setJndiPassword(this.a(jmsDynamicProperties.getJndiPassword(), map));
            jmsDynamicProperties2.setIcfName(this.a(jmsDynamicProperties.getIcfName(), map));
            jmsDynamicProperties2.setQcfName(this.a(jmsDynamicProperties.getQcfName(), map));
        }
        catch (IllegalArgumentException illegalArgumentException) {
            this.logAndAudit((AuditDetailMessage)AssertionMessages.JMS_ROUTING_TEMPLATE_ERROR, I[31] + illegalArgumentException.getMessage());
            throw new AssertionStatusException(AssertionStatus.FAILED);
        }
        return jmsDynamicProperties2;
    }

    private String a(String string, Map<String, Object> map) {
        String string2;
        block2: {
            string2 = string;
            try {
                if (string2 == null || !string2.contains(Syntax.SYNTAX_PREFIX)) break block2;
            }
            catch (AssertionStatusException assertionStatusException) {
                throw ServerJmsRoutingAssertion.a(assertionStatusException);
            }
            string2 = ExpandVariables.process(string, map, this.getAudit(), true);
        }
        return string2;
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    private void a(PolicyEnforcementContext policyEnforcementContext, JmsMessagePropertyRuleSet jmsMessagePropertyRuleSet, Map<String, Object> map, Map<String, Object> map2) {
        if (jmsMessagePropertyRuleSet.isPassThruAll()) {
            for (String string : map.keySet()) {
                try {
                    try {
                        if (string.startsWith(I[26]) || string.startsWith(I[36])) continue;
                    }
                    catch (AssertionStatusException assertionStatusException) {
                        throw ServerJmsRoutingAssertion.a(assertionStatusException);
                    }
                    map2.put(string, map.get(string));
                }
                catch (AssertionStatusException assertionStatusException) {
                    throw ServerJmsRoutingAssertion.a(assertionStatusException);
                }
            }
            try {
                if (!e.isLoggable(Level.FINEST)) return;
                e.finest(I[41]);
                return;
            }
            catch (AssertionStatusException assertionStatusException) {
                throw ServerJmsRoutingAssertion.a(assertionStatusException);
            }
        }
        StringBuilder stringBuilder = new StringBuilder();
        for (JmsMessagePropertyRule jmsMessagePropertyRule : jmsMessagePropertyRuleSet.getRules()) {
            try {
                if (jmsMessagePropertyRule.isPassThru()) continue;
                stringBuilder.append(jmsMessagePropertyRule.getCustomPattern());
            }
            catch (AssertionStatusException assertionStatusException) {
                throw ServerJmsRoutingAssertion.a(assertionStatusException);
            }
        }
        String[] stringArray = Syntax.getReferencedNames((String)stringBuilder.toString());
        Map<String, Object> map3 = policyEnforcementContext.getVariableMap(stringArray, this.getAudit());
        for (JmsMessagePropertyRule jmsMessagePropertyRule : jmsMessagePropertyRuleSet.getRules()) {
            String string;
            block18: {
                string = jmsMessagePropertyRule.getName();
                try {
                    try {
                        try {
                            if (!jmsMessagePropertyRule.isPassThru()) break block18;
                            if (!map.containsKey(string)) continue;
                        }
                        catch (AssertionStatusException assertionStatusException) {
                            throw ServerJmsRoutingAssertion.a(assertionStatusException);
                        }
                        map2.put(string, map.get(string));
                        if (!e.isLoggable(Level.FINEST)) continue;
                    }
                    catch (AssertionStatusException assertionStatusException) {
                        throw ServerJmsRoutingAssertion.a(assertionStatusException);
                    }
                    e.finest(I[19] + string + I[20] + String.valueOf(map.get(string)) + ")");
                    continue;
                }
                catch (AssertionStatusException assertionStatusException) {
                    throw ServerJmsRoutingAssertion.a(assertionStatusException);
                }
            }
            String string2 = jmsMessagePropertyRule.getCustomPattern();
            String string3 = ExpandVariables.process(string2, map3, this.getAudit());
            map2.put(string, string3);
            if (!e.isLoggable(Level.FINEST)) continue;
            String string4 = string3;
            String string5 = string2;
            String string6 = string;
            String[] stringArray2 = I;
            e.finest(stringArray2[39] + string6 + stringArray2[33] + string5 + stringArray2[47] + string4 + ")");
        }
    }

    @Override
    public void close() {
        super.close();
        this.u.removeApplicationListener(this.H);
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[57];
                var3_1 = 0;
                var2_2 = "3\u0013jOj\u001d=\u001c2Xxl\u0000!0\u001a\u00191%H\u0002B~\u0013\n*X\u007fm\".\u0017?^iw).\u001a*V~|\u0017\u00100Omi\u0006+Y=Vbc\u0006(\f,Xxl\u0000!B~(<,KcwO&\u0017~Vyq\r \f0],O\"\u001cY,\\}p\n<\r~I~j\f*\n-Pbb\u0002C~\u0015\u0018.I`l\f.\r7Vb@\u0019*\u0017*i~j\u00176\u0012\u00133J^`\u001c \f,ZiH\u000e!\u00189\\~7\u001a1T\"iX;\u001c=Q\"v\n=\u000f;K\"u\u0000#\u0010=@\"d\u001c<\u001c,Mej\u0001a\u00133J^j\u001a;\u00100^Ad\u0017\u001d\u001c*Ke`\u001c7\u001a1T\"iX;\u001c=Q\"v\n=\u000f;K\"u\u0000#\u0010=@\"d\u001c<\u001c,Mej\u0001a\u00133J^j\u001a;\u00100^Ad\u0017\u001d\u001c*Ke`\u001c\n\u001d;_mp\u0003;2;@>:?Lkm\u001bo\f0\\tu\n,\r;],Q\u0007=\u0016)Xni\no\u00100\u0019cp\u001b-\u0016+Wh%%\u0002*~Kit\u001a*\n*\u0019|w\u0000,\u001c-Jek\b\u0014\u00101sav\"*\n-Xk`\".\u0001\u001c@x`\u001c8+;J|j\u0001<\u001c~\\tu\n,\r;],j\u0001o\r;T|j\u001d.\u000b'\u0019}p\n:\u001ce\u0019bj\u001bo\f-PbbO<\u001c2\\oq\u0000=<33JOj\u0001!\u001c=Mej\u0001o\u001a1L`aO!\u0016*\u0019n`O#\u0016=Xx`\u000bnY\u0017M,h\u000e6Y6Xz`O-\u001c;W,a\n#\u001c*\\h*<,KcwO&\u0017~Vyq\r \f0],O\"\u001cY,\\}p\n<\r~I~j\f*\n-PbbUo\u0012\u00133JIk\u000b?\u00167WxH\u000e!\u00189\\~\n\u001d;_mp\u0003;2;@\u001d<,KcwO,\u00151Jek\bo\r;T|j\u001d.\u000b'\u0019}p\n:\u001c<),V|d\b.\r7Wk%\u000eo3\u0013j,h\n<\n?^i%\u001f=\u0016.\\~q\u0016o\u000e7Md%\u001f.\n-\u0019xm\u001d \f9Q\"%G!\u00183\\1\bU~Omi\u001a*D\u0011\u00133J\\w\u0000?\u001c,MuH\u000e?\t;KE+\u001bi@\\0\u001b6\u0001vXM*\u001dY)X\u007f%\u001c*\u0015;Zx`\u000bcY<Lx%\u0001 Y,\\|i\u0016b\r1\u0019}p\n:\u001c~Wmh\no\u000e?J,v\u001f*\u001a7_e`\u000b7\u001a1T\"iX;\u001c=Q\"v\n=\u000f;K\"u\u0000#\u0010=@\"d\u001c<\u001c,Mej\u0001a\u00133J^j\u001a;\u00100^^`\u001b=\u0000\u001a\\`d\u0016\u00133\u0013jI}\f*\t*PckO;\u0011,V{k\u001e:1L`a\u0001h\r~Kid\u000bo\u001f,Va%%\u0002*~Kit\u001a*\n*\u00043\u0013jS\u0013\n*X\u007fm\".\u0017?^iw).\u001a*V~|7\u001a1T\"iX;\u001c=Q\"v\n=\u000f;K\"u\u0000#\u0010=@\"d\u001c<\u001c,Mej\u0001a\u00133J^j\u001a;\u00100^^`\u001b=\u0000\u001a\\`d\u0016\u0011\u00133J\\w\u0000?\u001c,MuH\u000e?\t;K\u0012\u00133JIk\u000b?\u00167WxH\u000e!\u00189\\~\u001b\u000f?Ked\r#\u001c~I~j\f*\n-PbbO*\u000b,V~>O&<,KcwO(\u001c*Mek\bo*\u001ft@%\u001c&\u001e0\\~%\u0006!\u001f1Kad\u001b&\u00160\u0017\nU~Imq\u001b*\u000b0\u0004\f\n;Kz`\u001d\f\u00160_eb\u0014\u00133JOj\u0001!\u001c=Mej\u0001\u0002\u00180Xk`\u001d\u00043\u0013jT\u001a33J^p\u0001;\u00103\\I}\f*\t*PckO;\u0011,V{k\u00167?Tek\b\n\u0001=\\|q\u0006 \u0017~Mdw\u00008\u0017=),V|d\b.\r7Wk%\u000eo3\u0013j,h\n<\n?^i%\u001f=\u0016.\\~q\u0016o\u000e7Md%\f:\n*Va%\u001f.\r*\\~kOg\u0017?Ti8\u0015,0Rbj\u0018!Y\u0014T\u007fW\n?\u0015'muu\no9),V|d\b.\r7Wk%\u000e#\u0015~sAVO\"\u001c-Jmb\no\t,V|`\u001d;\u0010;J,r\u0006;\u0011~Imv\u001co\r6Kcp\b'W\f\n;Kz`\u001d\f\u00160_eb\u0012\u00133J^`\u001c \f,ZiH\u000e!\u00189\\~83\u0013j,l\u0001)\u0016,Tmq\u0006 \u0017~Wi`\u000b<Y+Ihd\u001b*U~Z`j\u001c&\u00179\u0019\u007f`\u001c<\u00101W,-\u0006)Y1IikFa\u0014\u00101sav\"*\n-Xk`\".\u0001\u001c@x`\u001c\u0005,\n\u007f!=\bU~Omi\u001a*D\u0015\u0018.I`l\f.\r7Vb@\u0019*\u0017*i~j\u00176\u001471M,p\u001c&\u00179\u0019m%\u001c*\u0015;Zxj\u001d\u0014\u00133JOj\u0001!\u001c=Mej\u0001\u0002\u00180Xk`\u001d\u001c?7Ux`\u001d&\u00179\u0019ckO,\u0016,Kii\u000e;\u00101W,l\u000bo\u001e00Miw\u001d:\t*\\h%\u000b:\u000b7Wk%\u001d*\r,@,a\n#\u0018'\n5if^@>\u00100\u001a\u0003,+;Hy`\u001c;Y7J,k\u0000;Y7Weq\u0006.\u00157CiaTo\u00171Mdl\u0001(Y*V,w\u0000:\r;";
                var4_3 = "3\u0013jOj\u001d=\u001c2Xxl\u0000!0\u001a\u00191%H\u0002B~\u0013\n*X\u007fm\".\u0017?^iw).\u001a*V~|\u0017\u00100Omi\u0006+Y=Vbc\u0006(\f,Xxl\u0000!B~(<,KcwO&\u0017~Vyq\r \f0],O\"\u001cY,\\}p\n<\r~I~j\f*\n-Pbb\u0002C~\u0015\u0018.I`l\f.\r7Vb@\u0019*\u0017*i~j\u00176\u0012\u00133J^`\u001c \f,ZiH\u000e!\u00189\\~7\u001a1T\"iX;\u001c=Q\"v\n=\u000f;K\"u\u0000#\u0010=@\"d\u001c<\u001c,Mej\u0001a\u00133J^j\u001a;\u00100^Ad\u0017\u001d\u001c*Ke`\u001c7\u001a1T\"iX;\u001c=Q\"v\n=\u000f;K\"u\u0000#\u0010=@\"d\u001c<\u001c,Mej\u0001a\u00133J^j\u001a;\u00100^Ad\u0017\u001d\u001c*Ke`\u001c\n\u001d;_mp\u0003;2;@>:?Lkm\u001bo\f0\\tu\n,\r;],Q\u0007=\u0016)Xni\no\u00100\u0019cp\u001b-\u0016+Wh%%\u0002*~Kit\u001a*\n*\u0019|w\u0000,\u001c-Jek\b\u0014\u00101sav\"*\n-Xk`\".\u0001\u001c@x`\u001c8+;J|j\u0001<\u001c~\\tu\n,\r;],j\u0001o\r;T|j\u001d.\u000b'\u0019}p\n:\u001ce\u0019bj\u001bo\f-PbbO<\u001c2\\oq\u0000=<33JOj\u0001!\u001c=Mej\u0001o\u001a1L`aO!\u0016*\u0019n`O#\u0016=Xx`\u000bnY\u0017M,h\u000e6Y6Xz`O-\u001c;W,a\n#\u001c*\\h*<,KcwO&\u0017~Vyq\r \f0],O\"\u001cY,\\}p\n<\r~I~j\f*\n-PbbUo\u0012\u00133JIk\u000b?\u00167WxH\u000e!\u00189\\~\n\u001d;_mp\u0003;2;@\u001d<,KcwO,\u00151Jek\bo\r;T|j\u001d.\u000b'\u0019}p\n:\u001c<),V|d\b.\r7Wk%\u000eo3\u0013j,h\n<\n?^i%\u001f=\u0016.\\~q\u0016o\u000e7Md%\u001f.\n-\u0019xm\u001d \f9Q\"%G!\u00183\\1\bU~Omi\u001a*D\u0011\u00133J\\w\u0000?\u001c,MuH\u000e?\t;KE+\u001bi@\\0\u001b6\u0001vXM*\u001dY)X\u007f%\u001c*\u0015;Zx`\u000bcY<Lx%\u0001 Y,\\|i\u0016b\r1\u0019}p\n:\u001c~Wmh\no\u000e?J,v\u001f*\u001a7_e`\u000b7\u001a1T\"iX;\u001c=Q\"v\n=\u000f;K\"u\u0000#\u0010=@\"d\u001c<\u001c,Mej\u0001a\u00133J^j\u001a;\u00100^^`\u001b=\u0000\u001a\\`d\u0016\u00133\u0013jI}\f*\t*PckO;\u0011,V{k\u001e:1L`a\u0001h\r~Kid\u000bo\u001f,Va%%\u0002*~Kit\u001a*\n*\u00043\u0013jS\u0013\n*X\u007fm\".\u0017?^iw).\u001a*V~|7\u001a1T\"iX;\u001c=Q\"v\n=\u000f;K\"u\u0000#\u0010=@\"d\u001c<\u001c,Mej\u0001a\u00133J^j\u001a;\u00100^^`\u001b=\u0000\u001a\\`d\u0016\u0011\u00133J\\w\u0000?\u001c,MuH\u000e?\t;K\u0012\u00133JIk\u000b?\u00167WxH\u000e!\u00189\\~\u001b\u000f?Ked\r#\u001c~I~j\f*\n-PbbO*\u000b,V~>O&<,KcwO(\u001c*Mek\bo*\u001ft@%\u001c&\u001e0\\~%\u0006!\u001f1Kad\u001b&\u00160\u0017\nU~Imq\u001b*\u000b0\u0004\f\n;Kz`\u001d\f\u00160_eb\u0014\u00133JOj\u0001!\u001c=Mej\u0001\u0002\u00180Xk`\u001d\u00043\u0013jT\u001a33J^p\u0001;\u00103\\I}\f*\t*PckO;\u0011,V{k\u00167?Tek\b\n\u0001=\\|q\u0006 \u0017~Mdw\u00008\u0017=),V|d\b.\r7Wk%\u000eo3\u0013j,h\n<\n?^i%\u001f=\u0016.\\~q\u0016o\u000e7Md%\f:\n*Va%\u001f.\r*\\~kOg\u0017?Ti8\u0015,0Rbj\u0018!Y\u0014T\u007fW\n?\u0015'muu\no9),V|d\b.\r7Wk%\u000e#\u0015~sAVO\"\u001c-Jmb\no\t,V|`\u001d;\u0010;J,r\u0006;\u0011~Imv\u001co\r6Kcp\b'W\f\n;Kz`\u001d\f\u00160_eb\u0012\u00133J^`\u001c \f,ZiH\u000e!\u00189\\~83\u0013j,l\u0001)\u0016,Tmq\u0006 \u0017~Wi`\u000b<Y+Ihd\u001b*U~Z`j\u001c&\u00179\u0019\u007f`\u001c<\u00101W,-\u0006)Y1IikFa\u0014\u00101sav\"*\n-Xk`\".\u0001\u001c@x`\u001c\u0005,\n\u007f!=\bU~Omi\u001a*D\u0015\u0018.I`l\f.\r7Vb@\u0019*\u0017*i~j\u00176\u001471M,p\u001c&\u00179\u0019m%\u001c*\u0015;Zxj\u001d\u0014\u00133JOj\u0001!\u001c=Mej\u0001\u0002\u00180Xk`\u001d\u001c?7Ux`\u001d&\u00179\u0019ckO,\u0016,Kii\u000e;\u00101W,l\u000bo\u001e00Miw\u001d:\t*\\h%\u000b:\u000b7Wk%\u001d*\r,@,a\n#\u0018'\n5if^@>\u00100\u001a\u0003,+;Hy`\u001c;Y7J,k\u0000;Y7Weq\u0006.\u00157CiaTo\u00171Mdl\u0001(Y*V,w\u0000:\r;".length();
                var1_4 = 20;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = ServerJmsRoutingAssertion.c(v0, ServerJmsRoutingAssertion.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "gg\u001e\u001d?_kBc\u0003,qXtXf\tx?To\rh\bx=TxL~\b<p\u001bRY*\u00009(\u001bsL|\bx3^~C*\t==^oHn\u0016nk\u0018?9O;kc\u0003<\u0014CxHz\u00191>U!\r";
                    var4_3 = "gg\u001e\u001d?_kBc\u0003,qXtXf\tx?To\rh\bx=TxL~\b<p\u001bRY*\u00009(\u001bsL|\bx3^~C*\t==^oHn\u0016nk\u0018?9O;kc\u0003<\u0014CxHz\u00191>U!\r".length();
                    var1_4 = 58;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 127;
                        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++] = ServerJmsRoutingAssertion.c(v0, ServerJmsRoutingAssertion.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;
            }
        }
        ServerJmsRoutingAssertion.I = var5;
        ServerJmsRoutingAssertion.l = ServerJmsRoutingAssertion.I[17];
        ServerJmsRoutingAssertion.m = ServerJmsRoutingAssertion.I[42];
        ServerJmsRoutingAssertion.o = ServerJmsRoutingAssertion.I[16];
        ServerJmsRoutingAssertion.s = ServerJmsRoutingAssertion.I[43];
        ServerJmsRoutingAssertion.p = ServerJmsRoutingAssertion.I[50];
        ServerJmsRoutingAssertion.g = ServerJmsRoutingAssertion.I[9];
        ServerJmsRoutingAssertion.k = ServerJmsRoutingAssertion.I[48];
        ServerJmsRoutingAssertion.r = ServerJmsRoutingAssertion.I[29];
        ServerJmsRoutingAssertion.n = ServerJmsRoutingAssertion.I[12];
        ServerJmsRoutingAssertion.f = ServerJmsRoutingAssertion.I[28];
        ServerJmsRoutingAssertion.q = ServerJmsRoutingAssertion.I[2];
        ServerJmsRoutingAssertion.e = Logger.getLogger(ServerJmsRoutingAssertion.class.getName());
    }

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

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

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String c(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 -> 82;
                    case 1 -> 117;
                    case 2 -> 18;
                    case 3 -> 39;
                    case 4 -> 46;
                    case 5 -> 68;
                    default -> 100;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }

    public static final class JmsInvalidator
    implements ApplicationListener {
        private static final Logger a;
        private final ServerJmsRoutingAssertion b;
        private static final String[] c;

        public JmsInvalidator(ServerJmsRoutingAssertion serverJmsRoutingAssertion) {
            if (serverJmsRoutingAssertion == null) {
                throw new IllegalArgumentException(c[0]);
            }
            this.b = serverJmsRoutingAssertion;
        }

        /*
         * WARNING - Removed try catching itself - possible behaviour change.
         */
        public void onApplicationEvent(ApplicationEvent applicationEvent) {
            block16: {
                if (applicationEvent instanceof EntityInvalidationEvent) {
                    JmsEndpoint jmsEndpoint;
                    JmsConnection jmsConnection;
                    EntityInvalidationEvent entityInvalidationEvent = (EntityInvalidationEvent)applicationEvent;
                    Object object = this.b.D;
                    synchronized (object) {
                        jmsConnection = this.b.E;
                        jmsEndpoint = this.b.F;
                    }
                    try {
                        if (jmsConnection == null || jmsEndpoint == null) break block16;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw JmsInvalidator.a(illegalArgumentException);
                    }
                    boolean bl2 = false;
                    if (JmsConnection.class.isAssignableFrom(entityInvalidationEvent.getEntityClass())) {
                        for (Goid goid : entityInvalidationEvent.getEntityIds()) {
                            if (!jmsConnection.getGoid().equals((Object)goid)) continue;
                            bl2 = true;
                        }
                    }
                    if (JmsEndpoint.class.isAssignableFrom(entityInvalidationEvent.getEntityClass())) {
                        for (Goid goid : entityInvalidationEvent.getEntityIds()) {
                            if (!jmsEndpoint.getGoid().equals((Object)goid)) continue;
                            bl2 = true;
                        }
                    }
                    try {
                        try {
                            try {
                                if (!bl2 || !this.b.b(true)) break block16;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw JmsInvalidator.a(illegalArgumentException);
                            }
                            if (!a.isLoggable(Level.INFO)) break block16;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw JmsInvalidator.a(illegalArgumentException);
                        }
                        a.log(Level.CONFIG, c[1], new Object[]{jmsConnection.getGoid(), jmsEndpoint.getGoid()});
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw JmsInvalidator.a(illegalArgumentException);
                    }
                }
            }
        }

        /*
         * Enabled aggressive block sorting
         */
        static {
            String[] stringArray = new String[2];
            int n2 = 0;
            String string = "lzN\u0007)qWrln\u001e9wtqx}\u0002?fokvS\u001flnhlk\u001c\u001f#w=}z\u001c\u001f9oq9Ys]\u0016+jsx?v<\u001f#tqyS\u0003!bivpRQ*lo?jL\u0015-wx?D_\u001e\"m'd/AJlfmqk\u0006\n}~@1";
            int n3 = "lzN\u0007)qWrln\u001e9wtqx}\u0002?fokvS\u001flnhlk\u001c\u001f#w=}z\u001c\u001f9oq9Ys]\u0016+jsx?v<\u001f#tqyS\u0003!bivpRQ*lo?jL\u0015-wx?D_\u001e\"m'd/AJlfmqk\u0006\n}~@1".length();
            int n4 = 42;
            int n5 = -1;
            while (true) {
                int n6 = ++n5;
                stringArray[n2++] = JmsInvalidator.a(68, JmsInvalidator.a(string.substring(n6, n6 + n4)));
                if ((n5 += n4) >= n3) {
                    c = stringArray;
                    a = Logger.getLogger(JmsInvalidator.class.getName());
                    return;
                }
                n4 = string.charAt(n5);
            }
        }

        private static IllegalArgumentException a(IllegalArgumentException illegalArgumentException) {
            return illegalArgumentException;
        }

        private static char[] a(String string) {
            char[] cArray = string.toCharArray();
            if (cArray.length < 2) {
                cArray = cArray;
                cArray[0] = (char)(cArray[0] ^ 0x59);
            }
            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 -> 91;
                        case 1 -> 91;
                        case 2 -> 120;
                        case 3 -> 53;
                        case 4 -> 8;
                        case 5 -> 71;
                        default -> 89;
                    })));
                    ++n3;
                    n4 = n4;
                } while (n4 > n3);
            }
            return new String(cArray2).intern();
        }
    }
}

