/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.http.CookieUtils
 *  com.l7tech.common.http.HttpConstants
 *  com.l7tech.common.http.HttpCookie
 *  com.l7tech.common.http.HttpCookie$IllegalFormatException
 *  com.l7tech.common.http.HttpHeaderUtil
 *  com.l7tech.common.http.prov.apache.components.AbortedSocketException
 *  com.l7tech.common.io.XmlUtil
 *  com.l7tech.common.mime.ContentTypeHeader
 *  com.l7tech.common.protocol.SecureSpanConstants$HttpHeaders
 *  com.l7tech.gateway.common.LicenseException
 *  com.l7tech.gateway.common.LicenseManager
 *  com.l7tech.gateway.common.audit.AuditDetailMessage
 *  com.l7tech.gateway.common.audit.SystemMessages
 *  com.l7tech.gateway.common.service.PublishedService
 *  com.l7tech.gateway.common.transport.SsgConnector
 *  com.l7tech.gateway.common.transport.SsgConnector$Endpoint
 *  com.l7tech.message.HasServiceId
 *  com.l7tech.message.HasServiceIdImpl
 *  com.l7tech.message.Header
 *  com.l7tech.message.HeadersKnob
 *  com.l7tech.message.HttpRequestKnob
 *  com.l7tech.message.HttpResponseKnob
 *  com.l7tech.message.HttpServletRequestKnob
 *  com.l7tech.message.HttpServletResponseKnob
 *  com.l7tech.message.Message
 *  com.l7tech.message.MessageKnob
 *  com.l7tech.message.MimeKnob
 *  com.l7tech.objectmodel.EntityType
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.PersistentEntity
 *  com.l7tech.policy.assertion.AssertionStatus
 *  com.l7tech.policy.assertion.HttpRoutingAssertion
 *  com.l7tech.policy.assertion.PolicyAssertionException
 *  com.l7tech.policy.variable.NoSuchVariableException
 *  com.l7tech.security.xml.decorator.DecoratorException
 *  com.l7tech.util.Charsets
 *  com.l7tech.util.Config
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.IOUtils
 *  com.l7tech.util.InetAddressUtil
 *  com.l7tech.util.Pair
 *  com.l7tech.xml.SoapFaultLevel
 *  com.l7tech.xml.soap.SoapVersion
 *  jakarta.servlet.ServletConfig
 *  jakarta.servlet.ServletContext
 *  jakarta.servlet.ServletException
 *  jakarta.servlet.ServletOutputStream
 *  jakarta.servlet.ServletRequest
 *  jakarta.servlet.http.HttpServlet
 *  jakarta.servlet.http.HttpServletRequest
 *  jakarta.servlet.http.HttpServletResponse
 *  org.springframework.context.ApplicationContext
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.context.ApplicationEventPublisher
 *  org.springframework.web.context.WebApplicationContext
 *  org.springframework.web.context.support.WebApplicationContextUtils
 */
package com.l7tech.server;

import com.l7tech.common.http.CookieUtils;
import com.l7tech.common.http.HttpConstants;
import com.l7tech.common.http.HttpCookie;
import com.l7tech.common.http.HttpHeaderUtil;
import com.l7tech.common.http.prov.apache.components.AbortedSocketException;
import com.l7tech.common.io.XmlUtil;
import com.l7tech.common.mime.ContentTypeHeader;
import com.l7tech.common.protocol.SecureSpanConstants;
import com.l7tech.gateway.common.LicenseException;
import com.l7tech.gateway.common.LicenseManager;
import com.l7tech.gateway.common.audit.AuditDetailMessage;
import com.l7tech.gateway.common.audit.SystemMessages;
import com.l7tech.gateway.common.service.PublishedService;
import com.l7tech.gateway.common.transport.SsgConnector;
import com.l7tech.message.HasServiceId;
import com.l7tech.message.HasServiceIdImpl;
import com.l7tech.message.Header;
import com.l7tech.message.HeadersKnob;
import com.l7tech.message.HttpRequestKnob;
import com.l7tech.message.HttpResponseKnob;
import com.l7tech.message.HttpServletRequestKnob;
import com.l7tech.message.HttpServletResponseKnob;
import com.l7tech.message.Message;
import com.l7tech.message.MessageKnob;
import com.l7tech.message.MimeKnob;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.HttpRoutingAssertion;
import com.l7tech.policy.assertion.PolicyAssertionException;
import com.l7tech.policy.variable.NoSuchVariableException;
import com.l7tech.security.xml.decorator.DecoratorException;
import com.l7tech.server.MessageProcessingSuspendedException;
import com.l7tech.server.MessageProcessor;
import com.l7tech.server.MessageResponseIOException;
import com.l7tech.server.MethodNotAllowedException;
import com.l7tech.server.StashManagerFactory;
import com.l7tech.server.a6;
import com.l7tech.server.a7;
import com.l7tech.server.a9;
import com.l7tech.server.audit.AuditContextFactory;
import com.l7tech.server.audit.Auditor;
import com.l7tech.server.audit.MessageSummaryAuditFactory;
import com.l7tech.server.d;
import com.l7tech.server.e;
import com.l7tech.server.event.FaultProcessed;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.message.PolicyEnforcementContextFactory;
import com.l7tech.server.policy.PolicyVersionException;
import com.l7tech.server.transport.ListenerException;
import com.l7tech.server.transport.http.HttpTransportModule;
import com.l7tech.server.util.EventChannel;
import com.l7tech.server.util.ServletUtils;
import com.l7tech.server.util.SoapFaultManager;
import com.l7tech.util.Charsets;
import com.l7tech.util.Config;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.IOUtils;
import com.l7tech.util.InetAddressUtil;
import com.l7tech.util.Pair;
import com.l7tech.xml.SoapFaultLevel;
import com.l7tech.xml.soap.SoapVersion;
import jakarta.servlet.ServletConfig;
import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletOutputStream;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PushbackInputStream;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import org.xml.sax.SAXException;

public class SoapMessageProcessingServlet
extends HttpServlet {
    private static final String DEFAULT_CONTENT_TYPE;
    private static final Charset DEFAULT_CONTENT_ENCODING;
    private static final String SOAP_1_2_CONTENT_TYPE;
    private static final Charset SOAP_1_2_CONTENT_ENCODING;
    private static final String PARAM_POLICYSERVLET_URI;
    private static final String DEFAULT_POLICYSERVLET_URI;
    public static final String ALLOW_GZIP_COMPRESSED_REQUEST;
    public static final String ALLOW_EMPTY_GZIP_BODY_REQUEST;
    public static final String ALLOW_GZIP_COMPRESSED_RESPONSE;
    private final Logger logger = Logger.getLogger(((Object)((Object)this)).getClass().getName());
    private final Set<String> prePopulatedHeaders = Set.of(HttpConstants.HSTS_HEADER);
    private Config config;
    private MessageProcessor messageProcessor;
    private SoapFaultManager soapFaultManager;
    private LicenseManager licenseManager;
    private StashManagerFactory stashManagerFactory;
    private ApplicationEventPublisher messageProcessingEventChannel;
    private Auditor auditor;
    AuditContextFactory auditContextFactory;
    MessageSummaryAuditFactory messageSummaryAuditFactory;
    static final long serialVersionUID = 6627736600455549264L;
    private static final String[] a;

    public void init(ServletConfig servletConfig) throws ServletException {
        super.init(servletConfig);
        WebApplicationContext webApplicationContext = WebApplicationContextUtils.getWebApplicationContext((ServletContext)this.getServletContext());
        try {
            if (webApplicationContext == null) {
                throw new ServletException(a[16]);
            }
        }
        catch (ServletException servletException) {
            throw SoapMessageProcessingServlet.a((Exception)((Object)servletException));
        }
        String[] stringArray = a;
        this.config = (Config)webApplicationContext.getBean(stringArray[11], Config.class);
        this.messageProcessor = (MessageProcessor)((Object)webApplicationContext.getBean(stringArray[1], MessageProcessor.class));
        this.soapFaultManager = (SoapFaultManager)webApplicationContext.getBean(stringArray[6], SoapFaultManager.class);
        this.licenseManager = (LicenseManager)webApplicationContext.getBean(stringArray[49], LicenseManager.class);
        this.stashManagerFactory = (StashManagerFactory)webApplicationContext.getBean(stringArray[39], StashManagerFactory.class);
        this.messageProcessingEventChannel = (ApplicationEventPublisher)webApplicationContext.getBean(stringArray[34], EventChannel.class);
        this.auditContextFactory = (AuditContextFactory)webApplicationContext.getBean(stringArray[50], AuditContextFactory.class);
        this.messageSummaryAuditFactory = (MessageSummaryAuditFactory)webApplicationContext.getBean(stringArray[54], MessageSummaryAuditFactory.class);
        this.auditor = new Auditor((Object)this, (ApplicationContext)webApplicationContext, this.logger);
    }

    public void doPost(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException {
        this.service(httpServletRequest, httpServletResponse);
    }

    protected void service(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException {
        Message message = new Message();
        Message message2 = new Message();
        try (PolicyEnforcementContext policyEnforcementContext = PolicyEnforcementContextFactory.createPolicyEnforcementContext(message2, message, true);){
            AssertionStatus[] assertionStatusArray = new AssertionStatus[]{null};
            this.auditContextFactory.doWithNewAuditContext(new a6(this, assertionStatusArray, httpServletRequest, httpServletResponse, policyEnforcementContext), new a7(this, assertionStatusArray, policyEnforcementContext));
        }
        catch (ServletException | IOException throwable) {
            throw throwable;
        }
        catch (Exception exception) {
            throw new ServletException((Throwable)exception);
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Unable to fully structure code
     * Could not resolve type clashes
     */
    private AssertionStatus serviceNoAudit(HttpServletRequest var1_1, HttpServletResponse var2_2, PolicyEnforcementContext var3_3) throws ServletException, IOException {
        block145: {
            block125: {
                block124: {
                    block166: {
                        block165: {
                            block121: {
                                block122: {
                                    block123: {
                                        block163: {
                                            var4_4 = this.getConnector(var1_1);
                                            try {
                                                var34_5 = SoapMessageProcessingServlet.a;
                                                this.licenseManager.requireFeature(var34_5[65]);
                                                HttpTransportModule.requireEndpoint(var4_4, SsgConnector.Endpoint.MESSAGE_INPUT);
                                            }
                                            catch (LicenseException var5_8) {
                                                HttpTransportModule.addHstsResponseHeaderIfRequired(var1_1, var2_2, var4_4, this.config);
                                                var34_6 = SoapMessageProcessingServlet.a;
                                                this.logger.log(Level.WARNING, var34_6[7] + ExceptionUtils.getMessage((Throwable)var5_8) + var34_6[5]);
                                                var2_2.sendError(503);
                                                return null;
                                            }
                                            catch (ListenerException var5_9) {
                                                HttpTransportModule.addHstsResponseHeaderIfRequired(var1_1, var2_2, var4_4, this.config);
                                                var34_7 = SoapMessageProcessingServlet.a;
                                                this.logger.log(Level.WARNING, var34_7[19] + var1_1.getServerPort());
                                                var2_2.sendError(500);
                                                return null;
                                            }
                                            var5_10 = HttpTransportModule.addHstsHeaderIfRequired(var2_2, var4_4, this.config);
                                            try {
                                                v0 = var6_11 = var5_10 != false ? this.prePopulatedHeaders : Collections.emptySet();
                                            }
                                            catch (LicenseException v1) {
                                                throw SoapMessageProcessingServlet.a((Exception)v1);
                                            }
                                            if (this.logger.isLoggable(Level.FINE)) {
                                                var34_5 = SoapMessageProcessingServlet.a;
                                                this.logger.log(Level.FINE, var34_5[0], new Object[]{var1_1.getRequestURI()});
                                                for (String var8_13 : this.safeList(var1_1.getHeaderNames())) {
                                                    var34_5 = SoapMessageProcessingServlet.a;
                                                    this.logger.log(Level.FINE, var34_5[36], new Object[]{var8_13, this.safeList(var1_1.getHeaders(var8_13))});
                                                }
                                            }
                                            var7_12 = null;
                                            var8_13 = var1_1.getHeader(HttpConstants.HEADER_CONTENT_ENCODING);
                                            var9_14 = false;
                                            var10_15 = false;
                                            var34_5 = SoapMessageProcessingServlet.a;
                                            var11_16 = this.config.getBooleanProperty(var34_5[67], true);
                                            if (var8_13 == null) break block121;
                                            if (!var8_13.toLowerCase().contains(var34_5[20])) break block122;
                                            break block163;
                                            catch (LicenseException v2) {
                                                throw SoapMessageProcessingServlet.a((Exception)v2);
                                            }
                                        }
                                        try {
                                            block164: {
                                                if (this.config.getBooleanProperty(SoapMessageProcessingServlet.a[26], true)) break block123;
                                                break block164;
                                                catch (LicenseException v3) {
                                                    throw SoapMessageProcessingServlet.a((Exception)v3);
                                                }
                                            }
                                            this.logger.log(Level.INFO, SoapMessageProcessingServlet.a[56]);
                                            this.rejectGzipRequest(var1_1, var2_2, 415, SoapMessageProcessingServlet.a[59]);
                                            return null;
                                        }
                                        catch (LicenseException v4) {
                                            throw SoapMessageProcessingServlet.a((Exception)v4);
                                        }
                                    }
                                    var9_14 = true;
                                    var10_15 = var11_16;
                                    try {
                                        if (this.logger.isLoggable(Level.FINE)) {
                                            this.logger.fine(SoapMessageProcessingServlet.a[47] + var1_1.getContentLength());
                                        }
                                    }
                                    catch (LicenseException v5) {
                                        throw SoapMessageProcessingServlet.a((Exception)v5);
                                    }
                                    try {
                                        var12_17 = var1_1.getInputStream();
                                        var34_5 = SoapMessageProcessingServlet.a;
                                        if (this.config.getBooleanProperty(var34_5[8], false)) {
                                            var13_19 = new PushbackInputStream((InputStream)var12_17);
                                            var14_21 /* !! */  = (ContentTypeHeader)new byte[1];
                                            var15_22 = var13_19.read((byte[])var14_21 /* !! */ );
                                            if (var15_22 <= 0) ** GOTO lbl93
                                            var13_19.unread((byte[])var14_21 /* !! */ , 0, var15_22);
                                            var7_12 = new GZIPInputStream((InputStream)var13_19);
                                        }
                                        var7_12 = new GZIPInputStream((InputStream)var12_17);
                                    }
                                    catch (Exception var12_18) {
                                        var13_20 = ExceptionUtils.getMessage((Throwable)var12_18);
                                        var34_5 = SoapMessageProcessingServlet.a;
                                        this.logger.log(Level.INFO, var34_5[27] + var13_20, ExceptionUtils.getDebugException((Throwable)var12_18));
                                        this.rejectGzipRequest(var1_1, var2_2, 400, var34_5[46]);
                                        return null;
                                    }
                                }
                                var34_5 = SoapMessageProcessingServlet.a;
                                this.logger.fine(var34_5[24] + var8_13);
                                break block165;
                            }
                            var34_5 = SoapMessageProcessingServlet.a;
                            this.logger.fine(var34_5[48]);
                        }
                        if (var10_15) ** GOTO lbl107
                        if (!var11_16) break block124;
                        break block166;
                        catch (LicenseException v6) {
                            throw SoapMessageProcessingServlet.a((Exception)v6);
                        }
                    }
                    try {
                        block167: {
                            if (!HttpHeaderUtil.acceptsGzipResponse((String)var1_1.getHeader(HttpConstants.HEADER_ACCEPT_ENCODING))) break block124;
                            break block167;
                            catch (LicenseException v7) {
                                throw SoapMessageProcessingServlet.a((Exception)v7);
                            }
                        }
                        v8 = true;
                        break block125;
                    }
                    catch (LicenseException v9) {
                        throw SoapMessageProcessingServlet.a((Exception)v9);
                    }
                }
                v8 = false;
            }
            var10_15 = v8;
            var12_17 = var3_3.getResponse();
            var13_19 = var3_3.getRequest();
            var14_21 /* !! */  = this.getRequestContentType(var1_1);
            var15_23 = var4_4.getProperty(SsgConnector.PROP_OVERRIDE_CONTENT_TYPE);
            if (var15_23 != null) {
                var14_21 /* !! */  = ContentTypeHeader.create((String)var15_23);
            }
            var3_3.setRequestWasCompressed(var9_14);
            var16_24 = this.stashManagerFactory.createStashManager();
            var17_25 = null;
            try {
                block147: {
                    block148: {
                        block177: {
                            block146: {
                                block136: {
                                    block144: {
                                        block143: {
                                            block142: {
                                                block141: {
                                                    block140: {
                                                        block137: {
                                                            block139: {
                                                                block138: {
                                                                    block173: {
                                                                        block172: {
                                                                            block171: {
                                                                                block134: {
                                                                                    block135: {
                                                                                        block133: {
                                                                                            block132: {
                                                                                                block130: {
                                                                                                    block131: {
                                                                                                        block129: {
                                                                                                            block128: {
                                                                                                                block127: {
                                                                                                                    block126: {
                                                                                                                        var18_26 = var4_4.getLongProperty(SsgConnector.PROP_REQUEST_SIZE_LIMIT, Message.getMaxBytes());
                                                                                                                        if (!var9_14) break block126;
                                                                                                                        try {
                                                                                                                            block168: {
                                                                                                                                if (var7_12 == null) break block126;
                                                                                                                                break block168;
                                                                                                                                catch (LicenseException v10) {
                                                                                                                                    throw SoapMessageProcessingServlet.a((Exception)v10);
                                                                                                                                }
                                                                                                                            }
                                                                                                                            v11 /* !! */  = var7_12;
                                                                                                                            break block127;
                                                                                                                        }
                                                                                                                        catch (LicenseException v12) {
                                                                                                                            throw SoapMessageProcessingServlet.a((Exception)v12);
                                                                                                                        }
                                                                                                                    }
                                                                                                                    v11 /* !! */  = var1_1.getInputStream();
                                                                                                                }
                                                                                                                var20_28 = v11 /* !! */ ;
                                                                                                                var13_19.initialize(var16_24, var14_21 /* !! */ , (InputStream)var20_28, var18_26);
                                                                                                                var21_30 = var4_4.getGoidProperty(EntityType.SERVICE, SsgConnector.PROP_HARDWIRED_SERVICE_ID, PersistentEntity.DEFAULT_GOID);
                                                                                                                try {
                                                                                                                    if (!Goid.isDefault((Goid)var21_30)) {
                                                                                                                        var13_19.attachKnob(HasServiceId.class, (MessageKnob)new HasServiceIdImpl(var21_30));
                                                                                                                    }
                                                                                                                }
                                                                                                                catch (LicenseException v13) {
                                                                                                                    throw SoapMessageProcessingServlet.a((Exception)v13);
                                                                                                                }
                                                                                                                var22_31 = var13_19.getMimeKnob();
                                                                                                                var23_32 = new HttpServletRequestKnob((HttpServletRequest)new d(var1_1, new a9(var22_31)));
                                                                                                                try {
                                                                                                                    var13_19.attachHttpRequestKnob((HttpRequestKnob)var23_32);
                                                                                                                    ServletUtils.loadHeaders(var1_1, (Message)var13_19);
                                                                                                                    v14 = this.logger.isLoggable(Level.FINE) != false ? new HttpServletResponseKnob((HttpServletResponse)new e(var2_2, this.logger)) : new HttpServletResponseKnob(var2_2);
                                                                                                                }
                                                                                                                catch (LicenseException v15) {
                                                                                                                    throw SoapMessageProcessingServlet.a((Exception)v15);
                                                                                                                }
                                                                                                                var24_33 = v14;
                                                                                                                var12_17.attachHttpResponseKnob((HttpResponseKnob)var24_33);
                                                                                                                var17_25 = this.messageProcessor.processMessageNoAudit(var3_3);
                                                                                                                if (!var3_3.isAuditSaveRequest()) break block128;
                                                                                                                try {
                                                                                                                    block169: {
                                                                                                                        if (var13_19.getMimeKnob().isBufferingDisallowed()) break block128;
                                                                                                                        break block169;
                                                                                                                        catch (LicenseException v16) {
                                                                                                                            throw SoapMessageProcessingServlet.a((Exception)v16);
                                                                                                                        }
                                                                                                                    }
                                                                                                                    var13_19.getMimeKnob().getFirstPart().getInputStream(false);
                                                                                                                }
                                                                                                                catch (LicenseException v17) {
                                                                                                                    throw SoapMessageProcessingServlet.a((Exception)v17);
                                                                                                                }
                                                                                                            }
                                                                                                            if (var17_25 == AssertionStatus.NONE) break block129;
                                                                                                            var25_34 = this.getSoapFaultLevel(var3_3);
                                                                                                            var34_5 = SoapMessageProcessingServlet.a;
                                                                                                            this.logger.finest(var34_5[51] + var17_25.getMessage());
                                                                                                            if (var25_34.getLevel() == 0) {
                                                                                                                this.logger.info(var34_5[28] + String.valueOf(var25_34));
                                                                                                                var1_1.setAttribute(var34_5[14], (Object)var34_5[33]);
                                                                                                                return var17_25;
                                                                                                            }
                                                                                                        }
                                                                                                        if (!var2_2.isCommitted()) break block130;
                                                                                                        try {
                                                                                                            block170: {
                                                                                                                if (!this.logger.isLoggable(Level.FINE)) break block131;
                                                                                                                break block170;
                                                                                                                catch (LicenseException v18) {
                                                                                                                    throw SoapMessageProcessingServlet.a((Exception)v18);
                                                                                                                }
                                                                                                            }
                                                                                                            this.logger.log(Level.FINE, SoapMessageProcessingServlet.a[37]);
                                                                                                        }
                                                                                                        catch (LicenseException v19) {
                                                                                                            throw SoapMessageProcessingServlet.a((Exception)v19);
                                                                                                        }
                                                                                                    }
                                                                                                    return var17_25;
                                                                                                }
                                                                                                var25_34 = var3_3.getResponse().getHeadersKnob();
                                                                                                var26_35 = this.getPassThroughHeaders(var3_3, (HttpRequestKnob)var23_32, (HeadersKnob)var25_34);
                                                                                                try {
                                                                                                    if (!var6_11.isEmpty()) break block132;
                                                                                                    var24_33.beginResponse(var26_35, Collections.emptyList());
                                                                                                    break block133;
                                                                                                }
                                                                                                catch (LicenseException v20) {
                                                                                                    throw SoapMessageProcessingServlet.a((Exception)v20);
                                                                                                }
                                                                                            }
                                                                                            var24_33.beginResponse(var6_11, var26_35, Collections.emptyList());
                                                                                        }
                                                                                        var27_36 = var24_33.getStatus();
                                                                                        try {
                                                                                            if (var27_36 >= 1) break block134;
                                                                                            if (var17_25 != AssertionStatus.NONE) break block135;
                                                                                        }
                                                                                        catch (LicenseException v21) {
                                                                                            throw SoapMessageProcessingServlet.a((Exception)v21);
                                                                                        }
                                                                                        var27_36 = 200;
                                                                                        break block134;
                                                                                    }
                                                                                    var27_36 = 503;
                                                                                }
                                                                                if (var17_25 != AssertionStatus.NONE) break block136;
                                                                                if (var12_17.getKnob(MimeKnob.class) == null) ** GOTO lbl236
                                                                                break block171;
                                                                                catch (LicenseException v22) {
                                                                                    throw SoapMessageProcessingServlet.a((Exception)v22);
                                                                                }
                                                                            }
                                                                            if (var12_17.isInitialized()) break block137;
                                                                            break block172;
                                                                            catch (LicenseException v23) {
                                                                                throw SoapMessageProcessingServlet.a((Exception)v23);
                                                                            }
                                                                        }
                                                                        if (var27_36 < 200) break block138;
                                                                        break block173;
                                                                        catch (LicenseException v24) {
                                                                            throw SoapMessageProcessingServlet.a((Exception)v24);
                                                                        }
                                                                    }
                                                                    try {
                                                                        block174: {
                                                                            if (var27_36 >= 400) break block138;
                                                                            break block174;
                                                                            catch (LicenseException v25) {
                                                                                throw SoapMessageProcessingServlet.a((Exception)v25);
                                                                            }
                                                                        }
                                                                        this.logger.fine(SoapMessageProcessingServlet.a[63] + var27_36);
                                                                        var2_2.setStatus(var27_36);
                                                                        break block139;
                                                                    }
                                                                    catch (LicenseException v26) {
                                                                        throw SoapMessageProcessingServlet.a((Exception)v26);
                                                                    }
                                                                }
                                                                var34_5 = SoapMessageProcessingServlet.a;
                                                                this.logger.fine(var34_5[45]);
                                                                var2_2.setStatus(200);
                                                            }
                                                            var2_2.setContentType(null);
                                                            var2_2.setContentLength(0);
                                                            var2_2.getOutputStream().close();
                                                            return var17_25;
                                                        }
                                                        var28_37 = var12_17.getMimeKnob();
                                                        var2_2.setStatus(var27_36);
                                                        var34_5 = SoapMessageProcessingServlet.a;
                                                        var29_39 = var25_34.getHeaders(HttpConstants.HEADER_CONTENT_TYPE, var34_5[44], false);
                                                        try {
                                                            if (var29_39 != null && !var29_39.isEmpty()) break block140;
                                                        }
                                                        catch (LicenseException v27) {
                                                            throw SoapMessageProcessingServlet.a((Exception)v27);
                                                        }
                                                        var30_42 /* !! */  = var28_37.getOuterContentType();
                                                        try {
                                                            v28 = var30_42 /* !! */  == ContentTypeHeader.NONE ? null : var30_42 /* !! */ .getFullValue();
                                                        }
                                                        catch (LicenseException v29) {
                                                            throw SoapMessageProcessingServlet.a((Exception)v29);
                                                        }
                                                        var31_44 = v28;
                                                        try {
                                                            var2_2.setContentType(var31_44);
                                                            if (var31_44 == null) {
                                                                var2_2.setHeader(HttpConstants.HEADER_CONTENT_LENGTH, null);
                                                            }
                                                        }
                                                        catch (LicenseException v30) {
                                                            throw SoapMessageProcessingServlet.a((Exception)v30);
                                                        }
                                                    }
                                                    var30_42 /* !! */  = var2_2.getOutputStream();
                                                    try {
                                                        if (!var10_15 || var2_2.containsHeader(HttpConstants.HEADER_CONTENT_ENCODING)) break block141;
                                                    }
                                                    catch (LicenseException v31) {
                                                        throw SoapMessageProcessingServlet.a((Exception)v31);
                                                    }
                                                    var34_5 = SoapMessageProcessingServlet.a;
                                                    this.logger.fine(var34_5[41]);
                                                    var2_2.setHeader(HttpConstants.HEADER_CONTENT_ENCODING, var34_5[55]);
                                                    var30_42 /* !! */  = new GZIPOutputStream((OutputStream)var30_42 /* !! */ , true);
                                                    var2_2.setHeader(HttpConstants.HEADER_CONTENT_LENGTH, null);
                                                }
                                                var31_45 = this.canStreamResponse(var3_3);
                                                if (!var31_45) break block142;
                                                try {
                                                    block175: {
                                                        if (!this.config.getBooleanProperty(SoapMessageProcessingServlet.a[29], true)) break block142;
                                                        break block175;
                                                        catch (LicenseException v32) {
                                                            throw SoapMessageProcessingServlet.a((Exception)v32);
                                                        }
                                                    }
                                                    var28_37.setContentLengthLimit(0L);
                                                }
                                                catch (LicenseException v33) {
                                                    throw SoapMessageProcessingServlet.a((Exception)v33);
                                                }
                                            }
                                            if (!var31_45) break block143;
                                            try {
                                                block176: {
                                                    if (!var12_17.getMimeKnob().isBufferingDisallowed()) break block143;
                                                    break block176;
                                                    catch (LicenseException v34) {
                                                        throw SoapMessageProcessingServlet.a((Exception)v34);
                                                    }
                                                }
                                                v35 = true;
                                                break block144;
                                            }
                                            catch (LicenseException v36) {
                                                throw SoapMessageProcessingServlet.a((Exception)v36);
                                            }
                                        }
                                        v35 = false;
                                    }
                                    var32_46 = v35;
                                    IOUtils.copyStream((InputStream)var28_37.getEntireMessageBodyAsInputStream(var31_45), (OutputStream)var30_42 /* !! */ , (boolean)var32_46);
                                    var30_42 /* !! */ .close();
                                    var34_5 = SoapMessageProcessingServlet.a;
                                    this.logger.fine(var34_5[61] + var27_36 + var34_5[15] + var28_37.getOuterContentType().getFullValue());
                                    break block145;
                                }
                                try {
                                    if (!var24_33.hasChallenge()) break block146;
                                    this.logger.fine(SoapMessageProcessingServlet.a[9]);
                                    var24_33.beginChallenge();
                                    this.sendChallenge(var3_3, var1_1, var2_2);
                                    break block145;
                                }
                                catch (LicenseException v37) {
                                    throw SoapMessageProcessingServlet.a((Exception)v37);
                                }
                            }
                            if (!var3_3.isMalformedRequest()) break block147;
                            this.logger.fine(SoapMessageProcessingServlet.a[35]);
                            if (var3_3.getFaultlevel() == null) break block148;
                            break block177;
                            catch (LicenseException v38) {
                                throw SoapMessageProcessingServlet.a((Exception)v38);
                            }
                        }
                        try {
                            block178: {
                                if (!var3_3.getFaultlevel().isAlwaysReturnSoapFault()) break block148;
                                break block178;
                                catch (LicenseException v39) {
                                    throw SoapMessageProcessingServlet.a((Exception)v39);
                                }
                            }
                            this.returnFault(var3_3, var1_1, var2_2);
                            break block145;
                        }
                        catch (LicenseException v40) {
                            throw SoapMessageProcessingServlet.a((Exception)v40);
                        }
                    }
                    var2_2.sendError(400);
                    break block145;
                }
                var28_38 = 500;
                try {
                    var29_40 = (Integer)var3_3.getVariable(HttpRoutingAssertion.VAR_HTTP_ROUTING_REASON_CODE);
                    if (-6 == var29_40) {
                        var30_43 = this.soapFaultManager.constructReturningFault(var3_3.getFaultlevel(), var3_3);
                        this.sendExceptionFault(var3_3, var30_43.getContent(), var30_43.getContentType().getEncoding(), var30_43.getContentType().getFullValue(), 504, var1_1, var2_2);
                        var28_38 = 504;
                    }
                    var34_5 = SoapMessageProcessingServlet.a;
                    this.logger.fine(var34_5[42] + var28_38);
                }
                catch (NoSuchVariableException var29_41) {
                    var34_5 = SoapMessageProcessingServlet.a;
                    this.logger.fine(var34_5[57] + var28_38);
                    this.returnFault(var3_3, var1_1, var2_2);
                    break block145;
                    catch (Throwable var33_47) {
                        var34_5 = SoapMessageProcessingServlet.a;
                        this.logger.fine(var34_5[57] + var28_38);
                        this.returnFault(var3_3, var1_1, var2_2);
                        throw var33_47;
                    }
                }
                this.returnFault(var3_3, var1_1, var2_2);
            }
            catch (Throwable var18_27) {
                block151: {
                    block159: {
                        block157: {
                            block158: {
                                block156: {
                                    block155: {
                                        block154: {
                                            block153: {
                                                block152: {
                                                    block149: {
                                                        block150: {
                                                            if (!(var18_27 instanceof PolicyAssertionException)) break block149;
                                                            try {
                                                                block179: {
                                                                    if (!ExceptionUtils.causedBy((Throwable)var18_27, LicenseException.class)) break block150;
                                                                    break block179;
                                                                    catch (LicenseException v41) {
                                                                        throw SoapMessageProcessingServlet.a((Exception)v41);
                                                                    }
                                                                }
                                                                this.logger.log(Level.SEVERE, ExceptionUtils.getMessage((Throwable)var18_27));
                                                                break block151;
                                                            }
                                                            catch (LicenseException v42) {
                                                                throw SoapMessageProcessingServlet.a((Exception)v42);
                                                            }
                                                        }
                                                        if (ExceptionUtils.causedBy((Throwable)var18_27, DecoratorException.class)) {
                                                            var19_48 = (DecoratorException)ExceptionUtils.getCauseIfCausedBy((Throwable)var18_27, DecoratorException.class);
                                                            var34_5 = SoapMessageProcessingServlet.a;
                                                            this.logger.log(Level.WARNING, ExceptionUtils.getMessage((Throwable)var18_27) + var34_5[31] + ExceptionUtils.getMessage((Throwable)var19_48), ExceptionUtils.getDebugException((Throwable)var18_27));
                                                        } else {
                                                            this.logger.log(Level.SEVERE, ExceptionUtils.getMessage((Throwable)var18_27), ExceptionUtils.getDebugException((Throwable)var18_27));
                                                        }
                                                        break block151;
                                                    }
                                                    try {
                                                        if (!(var18_27 instanceof PolicyVersionException)) break block152;
                                                        this.logger.log(Level.INFO, SoapMessageProcessingServlet.a[18]);
                                                        break block151;
                                                    }
                                                    catch (LicenseException v43) {
                                                        throw SoapMessageProcessingServlet.a((Exception)v43);
                                                    }
                                                }
                                                try {
                                                    if (!(var18_27 instanceof MethodNotAllowedException)) break block153;
                                                    this.logger.warning(ExceptionUtils.getMessage((Throwable)var18_27));
                                                    break block151;
                                                }
                                                catch (LicenseException v44) {
                                                    throw SoapMessageProcessingServlet.a((Exception)v44);
                                                }
                                            }
                                            try {
                                                if (!(var18_27 instanceof MessageProcessingSuspendedException)) break block154;
                                                this.logger.warning(SoapMessageProcessingServlet.a[66]);
                                                this.auditor.logAndAudit((AuditDetailMessage)SystemMessages.AUDIT_ARCHIVER_MESSAGE_PROCESSING_SUSPENDED, new String[]{ExceptionUtils.getMessage((Throwable)var18_27)});
                                                break block151;
                                            }
                                            catch (LicenseException v45) {
                                                throw SoapMessageProcessingServlet.a((Exception)v45);
                                            }
                                        }
                                        if (!(var18_27 instanceof IOException)) break block155;
                                        try {
                                            block180: {
                                                if (!var18_27.getClass().getName().equals(SoapMessageProcessingServlet.a[62])) break block155;
                                                break block180;
                                                catch (LicenseException v46) {
                                                    throw SoapMessageProcessingServlet.a((Exception)v46);
                                                }
                                            }
                                            this.logger.warning(SoapMessageProcessingServlet.a[3]);
                                            return var17_25;
                                        }
                                        catch (LicenseException v47) {
                                            throw SoapMessageProcessingServlet.a((Exception)v47);
                                        }
                                    }
                                    try {
                                        if (!(var18_27 instanceof MessageResponseIOException)) break block156;
                                        break block151;
                                    }
                                    catch (LicenseException v48) {
                                        throw SoapMessageProcessingServlet.a((Exception)v48);
                                    }
                                }
                                try {
                                    if (!(var18_27 instanceof IOException)) break block157;
                                    if (!ExceptionUtils.causedBy((Throwable)var18_27, AbortedSocketException.class)) break block158;
                                }
                                catch (LicenseException v49) {
                                    throw SoapMessageProcessingServlet.a((Exception)v49);
                                }
                                var19_48 = (AbortedSocketException)ExceptionUtils.getCauseIfCausedBy((Throwable)var18_27, AbortedSocketException.class);
                                var34_5 = SoapMessageProcessingServlet.a;
                                this.logger.log(Level.WARNING, AbortedSocketException.class.getName() + var34_5[21] + ExceptionUtils.getMessage((Throwable)var19_48), ExceptionUtils.getDebugException((Throwable)var18_27));
                                var17_25 = AssertionStatus.FALSIFIED;
                                break block151;
                            }
                            var34_5 = SoapMessageProcessingServlet.a;
                            this.logger.log(Level.WARNING, var34_5[10] + ExceptionUtils.getMessage((Throwable)var18_27), ExceptionUtils.getDebugException((Throwable)var18_27));
                            break block151;
                        }
                        try {
                            if (!ExceptionUtils.causedBy((Throwable)var18_27, SocketTimeoutException.class)) break block159;
                            this.auditor.logAndAudit((AuditDetailMessage)SystemMessages.SOCKET_TIMEOUT);
                            break block151;
                        }
                        catch (LicenseException v50) {
                            throw SoapMessageProcessingServlet.a((Exception)v50);
                        }
                    }
                    this.logger.log(Level.SEVERE, ExceptionUtils.getMessage((Throwable)var18_27), var18_27);
                }
                var19_48 = this.getSoapFaultLevel(var3_3);
                try {
                    if (var19_48.getLevel() == 0) {
                        this.logger.log(Level.INFO, SoapMessageProcessingServlet.a[12]);
                        var1_1.setAttribute(SoapMessageProcessingServlet.a[33], (Object)SoapMessageProcessingServlet.a[33]);
                        return var17_25;
                    }
                }
                catch (LicenseException v51) {
                    throw SoapMessageProcessingServlet.a((Exception)v51);
                }
                try {
                    block162: {
                        block161: {
                            block160: {
                                try {
                                    if (var2_2.isCommitted()) break block160;
                                    var2_2.reset();
                                    break block161;
                                }
                                catch (LicenseException v52) {
                                    throw SoapMessageProcessingServlet.a((Exception)v52);
                                }
                            }
                            var34_5 = SoapMessageProcessingServlet.a;
                            var1_1.setAttribute(var34_5[33], (Object)var34_5[33]);
                        }
                        try {
                            if (!(var18_27 instanceof MessageResponseIOException)) break block162;
                            this.sendExceptionFault(var3_3, var18_27.getMessage(), null, null, 500, var1_1, var2_2);
                        }
                        catch (LicenseException v53) {
                            throw SoapMessageProcessingServlet.a((Exception)v53);
                        }
                    }
                    this.sendExceptionFault(var3_3, var18_27, var1_1, var2_2);
                }
                catch (SAXException var20_29) {
                    throw new ServletException((Throwable)var20_29);
                }
            }
        }
        return var17_25;
    }

    private Collection<Pair<String, Object>> getPassThroughHeaders(PolicyEnforcementContext policyEnforcementContext, HttpRequestKnob httpRequestKnob, HeadersKnob headersKnob) {
        String string;
        String string2;
        ArrayList<Pair<String, Object>> arrayList = new ArrayList<Pair<String, Object>>();
        URL uRL = httpRequestKnob.getRequestURL();
        try {
            string2 = policyEnforcementContext.isOverwriteResponseCookieDomain() ? uRL.getHost() : null;
        }
        catch (IllegalStateException illegalStateException) {
            throw SoapMessageProcessingServlet.a(illegalStateException);
        }
        String string3 = string2;
        try {
            string = policyEnforcementContext.isOverwriteResponseCookiePath() ? CookieUtils.trimLastSubPath((String)uRL.getPath()) : null;
        }
        catch (IllegalStateException illegalStateException) {
            throw SoapMessageProcessingServlet.a(illegalStateException);
        }
        String string4 = string;
        for (Header header : headersKnob.getHeaders(a[30], false)) {
            try {
                if (!((String)header.getKey()).equalsIgnoreCase(HttpConstants.HEADER_SET_COOKIE)) {
                    arrayList.add((Pair<String, Object>)new Pair(header.getKey(), header.getValue()));
                    continue;
                }
            }
            catch (IllegalStateException illegalStateException) {
                throw SoapMessageProcessingServlet.a(illegalStateException);
            }
            if (!(header.getValue() instanceof String)) continue;
            StringBuffer stringBuffer = new StringBuffer();
            List list = CookieUtils.splitCookieHeader((String)((String)header.getValue()));
            int n2 = 0;
            while (true) {
                block13: {
                    try {
                        try {
                            if (n2 >= list.size()) break;
                            if (n2 <= 0) break block13;
                        }
                        catch (IllegalStateException illegalStateException) {
                            throw SoapMessageProcessingServlet.a(illegalStateException);
                        }
                        stringBuffer.append(CookieUtils.ATTRIBUTE_DELIMITER);
                    }
                    catch (IllegalStateException illegalStateException) {
                        throw SoapMessageProcessingServlet.a(illegalStateException);
                    }
                }
                stringBuffer.append(CookieUtils.replaceCookieDomainAndPath((String)((String)list.get(n2)), (String)string3, (String)string4));
                ++n2;
            }
            arrayList.add((Pair<String, Object>)new Pair(header.getKey(), (Object)stringBuffer.toString()));
        }
        return arrayList;
    }

    private HttpCookie getHttpCookieFromHeader(String string) {
        HttpCookie httpCookie = null;
        try {
            httpCookie = new HttpCookie(string);
        }
        catch (HttpCookie.IllegalFormatException illegalFormatException) {
            this.logger.log(Level.FINE, a[23], ExceptionUtils.getDebugException((Throwable)illegalFormatException));
        }
        return httpCookie;
    }

    SsgConnector getConnector(HttpServletRequest httpServletRequest) {
        return HttpTransportModule.getConnector((ServletRequest)httpServletRequest);
    }

    void setLicenseManager(LicenseManager licenseManager) {
        this.licenseManager = licenseManager;
    }

    void setConfig(Config config) {
        this.config = config;
    }

    void setStashManagerFactory(StashManagerFactory stashManagerFactory) {
        this.stashManagerFactory = stashManagerFactory;
    }

    void setMessageProcessor(MessageProcessor messageProcessor) {
        this.messageProcessor = messageProcessor;
    }

    private boolean canStreamResponse(PolicyEnforcementContext policyEnforcementContext) {
        boolean bl2;
        block7: {
            block6: {
                try {
                    try {
                        try {
                            if (policyEnforcementContext.isAuditSaveResponse() || !this.config.getBooleanProperty(a[17], true)) break block6;
                        }
                        catch (IllegalStateException illegalStateException) {
                            throw SoapMessageProcessingServlet.a(illegalStateException);
                        }
                        if (this.config.getBooleanProperty(a[4], false)) break block6;
                    }
                    catch (IllegalStateException illegalStateException) {
                        throw SoapMessageProcessingServlet.a(illegalStateException);
                    }
                    bl2 = true;
                    break block7;
                }
                catch (IllegalStateException illegalStateException) {
                    throw SoapMessageProcessingServlet.a(illegalStateException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    private ContentTypeHeader getRequestContentType(HttpServletRequest httpServletRequest) {
        ContentTypeHeader contentTypeHeader;
        block5: {
            block4: {
                String string = httpServletRequest.getContentType();
                try {
                    try {
                        if (string == null || string.length() <= 0) break block4;
                    }
                    catch (IllegalStateException illegalStateException) {
                        throw SoapMessageProcessingServlet.a(illegalStateException);
                    }
                    contentTypeHeader = ContentTypeHeader.create((String)string);
                    break block5;
                }
                catch (IllegalStateException illegalStateException) {
                    throw SoapMessageProcessingServlet.a(illegalStateException);
                }
            }
            contentTypeHeader = ContentTypeHeader.XML_DEFAULT;
        }
        return contentTypeHeader;
    }

    private void rejectGzipRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, int n2, String string) throws IOException {
        block9: {
            block6: {
                boolean bl2;
                SoapFaultManager soapFaultManager;
                Object object;
                String string2;
                String string3;
                block8: {
                    block7: {
                        try {
                            try {
                                if (!this.config.getBooleanProperty(a[58], true)) break block6;
                                string3 = httpServletRequest.getScheme();
                                string2 = InetAddressUtil.getHostForUrl((String)httpServletRequest.getServerName());
                                if (httpServletRequest.getServerPort() != 80) break block7;
                            }
                            catch (IOException iOException) {
                                throw SoapMessageProcessingServlet.a(iOException);
                            }
                            object = "";
                            break block8;
                        }
                        catch (IOException iOException) {
                            throw SoapMessageProcessingServlet.a(iOException);
                        }
                    }
                    object = ":" + httpServletRequest.getServerPort();
                }
                String string4 = httpServletRequest.getRequestURI();
                Object object2 = object;
                String string5 = string2;
                String string6 = string3 + a[38] + string5 + (String)object2 + string4;
                ContentTypeHeader contentTypeHeader = this.getRequestContentType(httpServletRequest);
                SoapVersion soapVersion = SoapVersion.contentTypeToSoapVersion((String)contentTypeHeader.getMainValue());
                try {
                    soapFaultManager = this.soapFaultManager;
                    bl2 = soapVersion == SoapVersion.SOAP_1_2;
                }
                catch (IOException iOException) {
                    throw SoapMessageProcessingServlet.a(iOException);
                }
                SoapFaultManager.FaultResponse faultResponse = soapFaultManager.constructFault(bl2, string6, false, string);
                this.writeFault(faultResponse, httpServletResponse);
                break block9;
            }
            httpServletResponse.sendError(n2);
        }
    }

    private SoapFaultLevel getSoapFaultLevel(PolicyEnforcementContext policyEnforcementContext) {
        SoapFaultLevel soapFaultLevel = policyEnforcementContext.getFaultlevel();
        if (soapFaultLevel == null) {
            soapFaultLevel = this.soapFaultManager.getDefaultBehaviorSettings();
        }
        return soapFaultLevel;
    }

    private String makePolicyUrl(HttpServletRequest httpServletRequest, Goid goid) {
        String string;
        StringBuilder stringBuilder;
        block2: {
            stringBuilder = new StringBuilder(httpServletRequest.getScheme());
            String[] stringArray = a;
            stringBuilder.append(stringArray[40]);
            stringBuilder.append(InetAddressUtil.getHostForUrl((String)httpServletRequest.getServerName()));
            stringBuilder.append(":");
            stringBuilder.append(httpServletRequest.getServerPort());
            stringBuilder.append(httpServletRequest.getContextPath());
            string = this.getServletConfig().getInitParameter(stringArray[2]);
            try {
                if (string != null && string.length() != 0) break block2;
            }
            catch (IllegalStateException illegalStateException) {
                throw SoapMessageProcessingServlet.a(illegalStateException);
            }
            string = a[53];
        }
        stringBuilder.append(string);
        stringBuilder.append(goid);
        return stringBuilder.toString();
    }

    private void returnFault(PolicyEnforcementContext policyEnforcementContext, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, SAXException {
        String string;
        SoapFaultManager.FaultResponse faultResponse;
        SoapFaultLevel soapFaultLevel;
        block3: {
            soapFaultLevel = this.getSoapFaultLevel(policyEnforcementContext);
            try {
                if (!soapFaultLevel.isIncludePolicyDownloadURL() || !this.shouldSendBackPolicyUrl(policyEnforcementContext)) break block3;
            }
            catch (IOException iOException) {
                throw SoapMessageProcessingServlet.a(iOException);
            }
            faultResponse = policyEnforcementContext.getService();
            if (faultResponse != null) {
                string = this.makePolicyUrl(httpServletRequest, faultResponse.getGoid());
                httpServletResponse.setHeader(SecureSpanConstants.HttpHeaders.POLICYURL_HEADER, string);
            }
        }
        faultResponse = this.soapFaultManager.constructReturningFault(soapFaultLevel, policyEnforcementContext);
        string = this.writeFault(faultResponse, httpServletResponse);
        this.messageProcessingEventChannel.publishEvent((ApplicationEvent)new FaultProcessed(policyEnforcementContext, string, this.messageProcessor));
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    private String writeFault(SoapFaultManager.FaultResponse faultResponse, HttpServletResponse httpServletResponse) throws IOException {
        String string;
        ServletOutputStream servletOutputStream;
        block9: {
            servletOutputStream = null;
            string = null;
            try {
                servletOutputStream = httpServletResponse.getOutputStream();
                httpServletResponse.setStatus(faultResponse.getHttpStatus());
                if (faultResponse.getContentBytes() == null) break block9;
                string = faultResponse.getContent();
                try {
                    if (!httpServletResponse.isCommitted()) {
                        this.soapFaultManager.sendExtraHeaders(faultResponse, httpServletResponse);
                        httpServletResponse.setContentType(faultResponse.getContentType().getFullValue());
                        servletOutputStream.write(faultResponse.getContentBytes());
                    }
                }
                catch (IOException iOException) {
                    throw SoapMessageProcessingServlet.a(iOException);
                }
            }
            catch (Throwable throwable) {
                try {
                    if (servletOutputStream == null) throw throwable;
                    servletOutputStream.close();
                    throw throwable;
                }
                catch (IOException iOException) {
                    throw SoapMessageProcessingServlet.a(iOException);
                }
            }
        }
        try {
            if (servletOutputStream == null) return string;
            servletOutputStream.close();
            return string;
        }
        catch (IOException iOException) {
            throw SoapMessageProcessingServlet.a(iOException);
        }
    }

    private void sendExceptionFault(PolicyEnforcementContext policyEnforcementContext, Throwable throwable, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, SAXException {
        SoapFaultManager.FaultResponse faultResponse = this.soapFaultManager.constructExceptionFault(throwable, policyEnforcementContext.getFaultlevel(), policyEnforcementContext);
        try {
            if (!httpServletResponse.isCommitted()) {
                this.soapFaultManager.sendExtraHeaders(faultResponse, httpServletResponse);
            }
        }
        catch (IOException iOException) {
            throw SoapMessageProcessingServlet.a(iOException);
        }
        this.sendExceptionFault(policyEnforcementContext, faultResponse.getContent(), faultResponse.getContentType().getEncoding(), faultResponse.getContentType().getFullValue(), faultResponse.getHttpStatus(), httpServletRequest, httpServletResponse);
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    private void sendExceptionFault(PolicyEnforcementContext policyEnforcementContext, String string, Charset charset, String string2, int n2, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, SAXException {
        ServletOutputStream servletOutputStream = null;
        try {
            block21: {
                block19: {
                    block20: {
                        block18: {
                            servletOutputStream = httpServletResponse.getOutputStream();
                            try {
                                if (string2 == null) break block18;
                                httpServletResponse.setContentType(string2);
                                break block19;
                            }
                            catch (IOException iOException) {
                                throw SoapMessageProcessingServlet.a(iOException);
                            }
                        }
                        try {
                            if (policyEnforcementContext.getService() == null || policyEnforcementContext.getService().getSoapVersion() != SoapVersion.SOAP_1_2) break block20;
                        }
                        catch (IOException iOException) {
                            throw SoapMessageProcessingServlet.a(iOException);
                        }
                        httpServletResponse.setContentType(a[68]);
                        charset = SOAP_1_2_CONTENT_ENCODING;
                        break block19;
                    }
                    httpServletResponse.setContentType(DEFAULT_CONTENT_TYPE);
                    charset = DEFAULT_CONTENT_ENCODING;
                }
                httpServletResponse.setStatus(n2);
                SoapFaultLevel soapFaultLevel = this.getSoapFaultLevel(policyEnforcementContext);
                try {
                    if (!soapFaultLevel.isIncludePolicyDownloadURL() || !this.shouldSendBackPolicyUrl(policyEnforcementContext)) break block21;
                }
                catch (IOException iOException) {
                    throw SoapMessageProcessingServlet.a(iOException);
                }
                PublishedService publishedService = policyEnforcementContext.getService();
                if (publishedService != null) {
                    String string3 = this.makePolicyUrl(httpServletRequest, publishedService.getGoid());
                    httpServletResponse.setHeader(SecureSpanConstants.HttpHeaders.POLICYURL_HEADER, string3);
                }
            }
            if (!charset.canEncode()) {
                charset = Charsets.UTF8;
            }
            try {
                if (!httpServletResponse.isCommitted()) {
                    servletOutputStream.write(string.getBytes(charset));
                }
            }
            catch (IOException iOException) {
                throw SoapMessageProcessingServlet.a(iOException);
            }
        }
        catch (Throwable throwable) {
            try {
                if (servletOutputStream == null) throw throwable;
                servletOutputStream.close();
                throw throwable;
            }
            catch (IOException iOException) {
                throw SoapMessageProcessingServlet.a(iOException);
            }
        }
        try {
            if (servletOutputStream != null) {
                servletOutputStream.close();
            }
        }
        catch (IOException iOException) {
            throw SoapMessageProcessingServlet.a(iOException);
        }
        this.messageProcessingEventChannel.publishEvent((ApplicationEvent)new FaultProcessed(policyEnforcementContext, string, this.messageProcessor));
    }

    private boolean shouldSendBackPolicyUrl(PolicyEnforcementContext policyEnforcementContext) throws IOException {
        block6: {
            String string = null;
            try {
                string = policyEnforcementContext.getRequest().getHttpRequestKnob().getHeaderFirstValue(SecureSpanConstants.HttpHeaders.POLICY_VERSION);
            }
            catch (IllegalStateException illegalStateException) {
                // empty catch block
            }
            try {
                try {
                    if (string != null && string.length() >= 1) break block6;
                }
                catch (IllegalStateException illegalStateException) {
                    throw SoapMessageProcessingServlet.a(illegalStateException);
                }
                return policyEnforcementContext.isRequestPolicyViolated();
            }
            catch (IllegalStateException illegalStateException) {
                throw SoapMessageProcessingServlet.a(illegalStateException);
            }
        }
        return policyEnforcementContext.isRequestClaimingWrongPolicyVersion();
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    private void sendChallenge(PolicyEnforcementContext policyEnforcementContext, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException {
        ServletOutputStream servletOutputStream = null;
        try {
            block6: {
                httpServletResponse.setStatus(401);
                PublishedService publishedService = policyEnforcementContext.getService();
                try {
                    if (publishedService == null || !this.shouldSendBackPolicyUrl(policyEnforcementContext)) break block6;
                }
                catch (IOException iOException) {
                    throw SoapMessageProcessingServlet.a(iOException);
                }
                String string = this.makePolicyUrl(httpServletRequest, publishedService.getGoid());
                httpServletResponse.setHeader(SecureSpanConstants.HttpHeaders.POLICYURL_HEADER, string);
            }
            servletOutputStream = httpServletResponse.getOutputStream();
            servletOutputStream.print(a[13]);
            if (servletOutputStream == null) return;
        }
        catch (Throwable throwable) {
            try {
                if (servletOutputStream == null) throw throwable;
                servletOutputStream.close();
                throw throwable;
            }
            catch (IOException iOException) {
                throw SoapMessageProcessingServlet.a(iOException);
            }
        }
        servletOutputStream.close();
    }

    private Iterable<String> safeList(Enumeration enumeration) {
        List<String> list;
        try {
            list = enumeration == null ? Collections.emptyList() : Collections.list(enumeration);
        }
        catch (IllegalStateException illegalStateException) {
            throw SoapMessageProcessingServlet.a(illegalStateException);
        }
        return list;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[69];
                var3_1 = 0;
                var2_2 = "`\u001c\u0007tAISY=6W\u0015\u001bcz\u0001s\u007f\u001a\u000bKu\u0010E- W\u0000\\Sx:<G\u0004HEG:\u0010x'?M\u0002BeM:%H\u0004OcZ!\u0019k$:A\u000fO\u0016K$<W\u0004_\u0016K'=J\u0004XBA'=\n\u001dI=7M\u0015\u0015YZ!4M\u000fZZe):J1ZD\\f6J\u0000YZM\u0002\u000ff\u0010['2T'ZCD<\u001eE\u000fZQM:1x=1H\bH^M,sW\u0004I@A+6\u0004\f^E[)4AARXX='\u0004\bH\u0016F''\u0004\rRUM& A\u0005\u001b\u0011$Z-\"Q\u0004HB\u0006+<I\u0011IS[;}C\u001bRF\u0006)?H\u000eLsE8']#TRQ%[-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=M\u000f\\\u0016K 2H\r^XO-$ag\u001c\u0004\u0004IDG:sS\tRZMh#V\u000eXS[;:J\u0006\u001b[M; E\u0006^\f\b\f[-!R\u0004IuG&5M\u0006\\x'?M\u0002B\u0016\\ !A\u0016\u001bSZ:<VAZXLh P\u0004ZZ\\ sI\u000e_S\b! \u0004\u0012^B\u0006h\u001aJ\u0012OD]+'M\u000f\\\u0016^)?R\u0004\u001bBGh7V\u000eK\u0016K'=J\u0004XBA'=\u0004\u0002T[X$6P\u0004WO\u0006\u0017i='L\u0004UBA+2P\bTX\b\u001a6U\u0014RDM,\tC!?H\f^XG?\u000f\u0006h0K\u000fOSF<~P\u0018KS\b6k'=B\b\\CZ)'M\u000eU\u0016M:!K\u0013\u0000\u0016K'&H\u0005\u001bXG<sC\u0004O\u0016I8#H\bXW\\!<JAXYF<6\\\u0015\u0017A'\u001bP\u0015KdM;#K\u000fHS{<!A\u0000V_F/1z-\"Q\u0004HB\b:6B\u0004IDM,sP\u000e\u001bWFh<Q\u0015_W\\-7\u0004\u0017^D[!<JATP\b8<H\bXO=x=1H\bH^M,sW\u0004I@A+6\u0004\f^E[)4AARXX='\u0004\bH\u0016F''\u0004\u0004UWJ$6@ATX\b<;M\u0012\u001bFG:'\bA\u0004O2:T\u0002\u0012h\u001bZ-\"Q\u0004HB\u0006+<I\u0011IS[;}C\u001bRF\u0006)?H\u000eL\u0017}&2F\r^\u0016\\'sT\u0000IEMh0K\u000eP_Mh\u001aK'=P\u0004UB\u0005-=G\u000e__F/sJ\u000eO\u0016O2:TA\u001cZ- T\u000eUEMf0K\fKDM; \n\u0006A_Xf2H\rTA\u001bZ-\"Q\u0004HB\u0006+<I\u0011IS[;}C\u001bRF\u0006)?H\u000eL(k)=J\u000eO\u0016L-0K\fKDM; \u0004\u0015SS\b!=G\u000eV_F/sV\u0004JCM;'\u001eAqf'sT\u000eW_K1sB\u000eNXLh2J\u0005\u001bQD'1E\r\u001bEM<'M\u000f\\\u0016A;sP\u000e\u001bQGh P\u0004ZZ\\ sM\u000f\u001bB@! \u0004\u0002ZEMfsm\u000fHBZ=0P\bUQ\b>2H\u0017^\u0016\\'s@\u0013TF\b+<J\u000f^U\\!<JAXYE8?A\u0015WO\u0006\u001dA'\u001bP\u0015KdM;#K\u000fHS{<!A\u0000VcF$:I\bOSL\u000b`\u001c\u0007tAsSI,6V\u0002\u0012h#I8#H\bXW\\!<JNHYI8x\\\fW\r\b+;E\u0013HS\\u&P\u0007\u0016\u000e\tC!?H\f^XG?\u001dE- W\u0000\\Sx:<G\u0004HEA&4a\u0017^X\\\u000b;E\u000fUSD:{-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=M\u000f\\\u0016\u001cxc\u0004\u0005NS\b<<\u0004\u0004ZDD1sT\u0000IEMh5E\bWCZ-\u001d`\u001c\u0007tAISY=6W\u0015\u001b^M)7A\u0013\u001bmSx.y\\@\u0007U1z- T\u000eUEMh2H\u0013^WL1sG\u000eV[A<'A\u0005\u0017\u0016F''\u0004\u0012^XL!=CAIS[8<J\u0012^\u0018\u0003\u0012g|\u0013[<2W\tvWF)4A\u0013}WK<<V\u0018\u0003\u0012g|\"R!#T\bUQ\b:6W\u0011TX[-sF\u0000X]\b<<\u0004\u0013^G]- P\u0004I\u001c[-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=M\u000f\\\u0016$Z-\"Q\u0004HB\u0006+<I\u0011IS[;}C\u001bRF\u0006)?H\u000eLsE8']#TRQ\u000b`\u001c\u0007tAsSI,6VX[-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=M\u000f\\\u0016Ih#H\u0000XS@'?@\u0004I\u0016M%#P\u0018\u001bDM;#K\u000fHS\b<<\u0004\u0000\u001bE]+0A\u0012HP]$sK\u000f^\u001b_)*\u0004\f^E[)4A\u001fa&%E\rRR\b\u000f\tm1\u001bUG%#V\u0004HEM,sV\u0004JCM;',Z-\"Q\u0004HB\b?:P\t\u001bQR!#\u0004\u0002TX\\-=PL^XK'7M\u000f\\\u0016L-'A\u0002OSLh\u001dF'sG\u000eUBM&'\t\u0004UUG,:J\u0006\u001bEX-0M\u0007RSL\u000eD!0A\u000fHSe)=E\u0006^D\u0013I=7M\u0015xYF<6\\\u0015}WK<<V\u00189K 6G\nRXOh5K\u0013\u001bFG<6J\u0015RWDh0K\u000fUSK<:K\u000f\u001bRZ'#\u0004\u0003^UI= AAHBI<&WARE\b\u0010x'?M\u0002BeM:%H\u0004OcZ!\u0019\u00078<H\bXO\u0007,:W\u0002T\t[-!R\bXSG!7\u0019\u001aE- W\u0000\\S{=>I\u0000IOi=7M\u0015}WK<<V\u0018\u0004O2:T\"z-9A\u0002O_F/sc;rf\b+<I\u0011IS[;6@AISY=6W\u0015\u0015\u001c[-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=M\u000f\\\u0016(Z-\"Q\u0004HB\u0006+<I\u0011IS[;}C\u001bRF\u0006;<E\u0011}W]$'v\u0004QSK<:K\u000f!z-9A\u0002O_F/sc;rf\b+<I\u0011IS[;6@AISY=6W\u0015\u000f\u0013h0L\u0000IEM<nQ\u0015]\u001b\u0010\"[-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=A\u0005\u001bE\\)'Q\u0012\u001b2G:4\n\u0000KWK 6\n\u0002ZBI$:J\u0000\u0015UG&=A\u0002OYZf\u0010H\b^X\\\t1K\u0013OsP+6T\u0015RYF$Z-'Q\u0013U_F/sA\fKBQh#E\u0018WYI,sS\bO^\b;'E\u0015NE\b\u0019\u00078<H\bXO\u0007,:W\u0002T\t[-!R\bXSG!7\u0019\u0018[-!R\bXS\u0012\u0000'P\u0011vS[;2C\u0004rXX='2e- W\u0000\\S\b8!K\u0002^E[!=CAHC[86J\u0005^R\b**\u0004\u0015SS\b\t&@\bO\u0016i:0L\bMSZ";
                var4_3 = "`\u001c\u0007tAISY=6W\u0015\u001bcz\u0001s\u007f\u001a\u000bKu\u0010E- W\u0000\\Sx:<G\u0004HEG:\u0010x'?M\u0002BeM:%H\u0004OcZ!\u0019k$:A\u000fO\u0016K$<W\u0004_\u0016K'=J\u0004XBA'=\n\u001dI=7M\u0015\u0015YZ!4M\u000fZZe):J1ZD\\f6J\u0000YZM\u0002\u000ff\u0010['2T'ZCD<\u001eE\u000fZQM:1x=1H\bH^M,sW\u0004I@A+6\u0004\f^E[)4AARXX='\u0004\bH\u0016F''\u0004\rRUM& A\u0005\u001b\u0011$Z-\"Q\u0004HB\u0006+<I\u0011IS[;}C\u001bRF\u0006)?H\u000eLsE8']#TRQ%[-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=M\u000f\\\u0016K 2H\r^XO-$ag\u001c\u0004\u0004IDG:sS\tRZMh#V\u000eXS[;:J\u0006\u001b[M; E\u0006^\f\b\f[-!R\u0004IuG&5M\u0006\\x'?M\u0002B\u0016\\ !A\u0016\u001bSZ:<VAZXLh P\u0004ZZ\\ sI\u000e_S\b! \u0004\u0012^B\u0006h\u001aJ\u0012OD]+'M\u000f\\\u0016^)?R\u0004\u001bBGh7V\u000eK\u0016K'=J\u0004XBA'=\u0004\u0002T[X$6P\u0004WO\u0006\u0017i='L\u0004UBA+2P\bTX\b\u001a6U\u0014RDM,\tC!?H\f^XG?\u000f\u0006h0K\u000fOSF<~P\u0018KS\b6k'=B\b\\CZ)'M\u000eU\u0016M:!K\u0013\u0000\u0016K'&H\u0005\u001bXG<sC\u0004O\u0016I8#H\bXW\\!<JAXYF<6\\\u0015\u0017A'\u001bP\u0015KdM;#K\u000fHS{<!A\u0000V_F/1z-\"Q\u0004HB\b:6B\u0004IDM,sP\u000e\u001bWFh<Q\u0015_W\\-7\u0004\u0017^D[!<JATP\b8<H\bXO=x=1H\bH^M,sW\u0004I@A+6\u0004\f^E[)4AARXX='\u0004\bH\u0016F''\u0004\u0004UWJ$6@ATX\b<;M\u0012\u001bFG:'\bA\u0004O2:T\u0002\u0012h\u001bZ-\"Q\u0004HB\u0006+<I\u0011IS[;}C\u001bRF\u0006)?H\u000eL\u0017}&2F\r^\u0016\\'sT\u0000IEMh0K\u000eP_Mh\u001aK'=P\u0004UB\u0005-=G\u000e__F/sJ\u000eO\u0016O2:TA\u001cZ- T\u000eUEMf0K\fKDM; \n\u0006A_Xf2H\rTA\u001bZ-\"Q\u0004HB\u0006+<I\u0011IS[;}C\u001bRF\u0006)?H\u000eL(k)=J\u000eO\u0016L-0K\fKDM; \u0004\u0015SS\b!=G\u000eV_F/sV\u0004JCM;'\u001eAqf'sT\u000eW_K1sB\u000eNXLh2J\u0005\u001bQD'1E\r\u001bEM<'M\u000f\\\u0016A;sP\u000e\u001bQGh P\u0004ZZ\\ sM\u000f\u001bB@! \u0004\u0002ZEMfsm\u000fHBZ=0P\bUQ\b>2H\u0017^\u0016\\'s@\u0013TF\b+<J\u000f^U\\!<JAXYE8?A\u0015WO\u0006\u001dA'\u001bP\u0015KdM;#K\u000fHS{<!A\u0000VcF$:I\bOSL\u000b`\u001c\u0007tAsSI,6V\u0002\u0012h#I8#H\bXW\\!<JNHYI8x\\\fW\r\b+;E\u0013HS\\u&P\u0007\u0016\u000e\tC!?H\f^XG?\u001dE- W\u0000\\Sx:<G\u0004HEA&4a\u0017^X\\\u000b;E\u000fUSD:{-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=M\u000f\\\u0016\u001cxc\u0004\u0005NS\b<<\u0004\u0004ZDD1sT\u0000IEMh5E\bWCZ-\u001d`\u001c\u0007tAISY=6W\u0015\u001b^M)7A\u0013\u001bmSx.y\\@\u0007U1z- T\u000eUEMh2H\u0013^WL1sG\u000eV[A<'A\u0005\u0017\u0016F''\u0004\u0012^XL!=CAIS[8<J\u0012^\u0018\u0003\u0012g|\u0013[<2W\tvWF)4A\u0013}WK<<V\u0018\u0003\u0012g|\"R!#T\bUQ\b:6W\u0011TX[-sF\u0000X]\b<<\u0004\u0013^G]- P\u0004I\u001c[-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=M\u000f\\\u0016$Z-\"Q\u0004HB\u0006+<I\u0011IS[;}C\u001bRF\u0006)?H\u000eLsE8']#TRQ\u000b`\u001c\u0007tAsSI,6VX[-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=M\u000f\\\u0016Ih#H\u0000XS@'?@\u0004I\u0016M%#P\u0018\u001bDM;#K\u000fHS\b<<\u0004\u0000\u001bE]+0A\u0012HP]$sK\u000f^\u001b_)*\u0004\f^E[)4A\u001fa&%E\rRR\b\u000f\tm1\u001bUG%#V\u0004HEM,sV\u0004JCM;',Z-\"Q\u0004HB\b?:P\t\u001bQR!#\u0004\u0002TX\\-=PL^XK'7M\u000f\\\u0016L-'A\u0002OSLh\u001dF'sG\u000eUBM&'\t\u0004UUG,:J\u0006\u001bEX-0M\u0007RSL\u000eD!0A\u000fHSe)=E\u0006^D\u0013I=7M\u0015xYF<6\\\u0015}WK<<V\u00189K 6G\nRXOh5K\u0013\u001bFG<6J\u0015RWDh0K\u000fUSK<:K\u000f\u001bRZ'#\u0004\u0003^UI= AAHBI<&WARE\b\u0010x'?M\u0002BeM:%H\u0004OcZ!\u0019\u00078<H\bXO\u0007,:W\u0002T\t[-!R\bXSG!7\u0019\u001aE- W\u0000\\S{=>I\u0000IOi=7M\u0015}WK<<V\u0018\u0004O2:T\"z-9A\u0002O_F/sc;rf\b+<I\u0011IS[;6@AISY=6W\u0015\u0015\u001c[-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=M\u000f\\\u0016(Z-\"Q\u0004HB\u0006+<I\u0011IS[;}C\u001bRF\u0006;<E\u0011}W]$'v\u0004QSK<:K\u000f!z-9A\u0002O_F/sc;rf\b+<I\u0011IS[;6@AISY=6W\u0015\u000f\u0013h0L\u0000IEM<nQ\u0015]\u001b\u0010\"[-!R\r^B\b<!E\u000fHFG:'\u0004\u0013^B]:=A\u0005\u001bE\\)'Q\u0012\u001b2G:4\n\u0000KWK 6\n\u0002ZBI$:J\u0000\u0015UG&=A\u0002OYZf\u0010H\b^X\\\t1K\u0013OsP+6T\u0015RYF$Z-'Q\u0013U_F/sA\fKBQh#E\u0018WYI,sS\bO^\b;'E\u0015NE\b\u0019\u00078<H\bXO\u0007,:W\u0002T\t[-!R\bXSG!7\u0019\u0018[-!R\bXS\u0012\u0000'P\u0011vS[;2C\u0004rXX='2e- W\u0000\\S\b8!K\u0002^E[!=CAHC[86J\u0005^R\b**\u0004\u0015SS\b\t&@\bO\u0016i:0L\bMSZ".length();
                var1_4 = 22;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = SoapMessageProcessingServlet.a(v0, SoapMessageProcessingServlet.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "<KF2h3#+\u0000V-j-\"+]Fl`'9>\u0000T.k2'#/^E.n>1:GZ,(.?/^\u001e:j1knM]#u.5:\u0013@6aph";
                    var4_3 = "<KF2h3#+\u0000V-j-\"+]Fl`'9>\u0000T.k2'#/^E.n>1:GZ,(.?/^\u001e:j1knM]#u.5:\u0013@6aph".length();
                    var1_4 = 28;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 31;
                        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++] = SoapMessageProcessingServlet.a(v0, SoapMessageProcessingServlet.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;
            }
        }
        SoapMessageProcessingServlet.a = var5;
        SoapMessageProcessingServlet.DEFAULT_POLICYSERVLET_URI = SoapMessageProcessingServlet.a[64];
        SoapMessageProcessingServlet.PARAM_POLICYSERVLET_URI = SoapMessageProcessingServlet.a[52];
        SoapMessageProcessingServlet.SOAP_1_2_CONTENT_TYPE = SoapMessageProcessingServlet.a[32];
        SoapMessageProcessingServlet.ALLOW_GZIP_COMPRESSED_REQUEST = SoapMessageProcessingServlet.a[22];
        SoapMessageProcessingServlet.ALLOW_EMPTY_GZIP_BODY_REQUEST = SoapMessageProcessingServlet.a[43];
        SoapMessageProcessingServlet.ALLOW_GZIP_COMPRESSED_RESPONSE = SoapMessageProcessingServlet.a[25];
        SoapMessageProcessingServlet.DEFAULT_CONTENT_TYPE = XmlUtil.TEXT_XML + SoapMessageProcessingServlet.a[60];
        SoapMessageProcessingServlet.DEFAULT_CONTENT_ENCODING = Charsets.UTF8;
        SoapMessageProcessingServlet.SOAP_1_2_CONTENT_ENCODING = Charsets.UTF8;
    }

    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] ^ 0x4F);
        }
        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 -> 81;
                    case 1 -> 49;
                    case 2 -> 42;
                    case 3 -> 93;
                    case 4 -> 24;
                    case 5 -> 66;
                    default -> 79;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

