/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.transport.SsgConnector
 *  com.l7tech.objectmodel.FindException
 *  jakarta.servlet.ServletConfig
 *  jakarta.servlet.ServletContext
 *  jakarta.servlet.ServletException
 *  jakarta.servlet.http.HttpServletRequest
 *  jakarta.servlet.http.HttpServletResponse
 *  org.apache.catalina.LifecycleState
 *  org.apache.catalina.connector.Connector
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 *  org.springframework.web.context.WebApplicationContext
 *  org.springframework.web.context.support.WebApplicationContextUtils
 */
package com.l7tech.server;

import com.l7tech.gateway.common.transport.SsgConnector;
import com.l7tech.objectmodel.FindException;
import com.l7tech.server.PingServlet;
import com.l7tech.server.transport.ListenerException;
import com.l7tech.server.transport.SsgConnectorManager;
import com.l7tech.server.transport.http.HttpTransportModule;
import jakarta.servlet.ServletConfig;
import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.apache.catalina.LifecycleState;
import org.apache.catalina.connector.Connector;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

public class HealthServlet
extends PingServlet {
    private static final Logger logger;
    private static final String MAIN_REQUEST_URI;
    private static final String HEAP_URI;
    private static final String LISTENPORTS_URI;
    private static final String HEALTHZ;
    private static final String HEALTH_SERVLET_ENABLED_PROP;
    private static final String HEALTH_SERVLET_VERBOSE_ENABLED_PROP;
    private static final String HEALTH_SERVLET_BIND_PORT_PROP;
    private static final String HEALTH_SERVLET_PORT_EXCLUDE_LIST_PROP;
    private static final String HEALTH_SERVLET_HEAP_THRESHOLD_PROP;
    private static final String APPLICATION_JSON_CONTENT_TYPE;
    private static final Set<String> SUPPORTED_SCHEMES;
    private SsgConnectorManager ssgConnectorManager;
    private HttpTransportModule httpTransportModule;
    String portJson;
    String heapJson;
    String healthzJson;
    String errorMsg;
    static final long serialVersionUID = 3235576196284079748L;
    private static final String[] c;

    public HealthServlet() {
        String[] stringArray = c;
        this.portJson = stringArray[53];
        this.heapJson = stringArray[26];
        this.healthzJson = stringArray[22];
        this.errorMsg = stringArray[42];
    }

    @Override
    public void init(ServletConfig servletConfig) throws ServletException {
        super.init(servletConfig);
        WebApplicationContext webApplicationContext = WebApplicationContextUtils.getWebApplicationContext((ServletContext)servletConfig.getServletContext());
        try {
            if (webApplicationContext == null) {
                logger.severe(c[8]);
                throw new ServletException(c[55]);
            }
        }
        catch (ServletException servletException) {
            throw HealthServlet.a(servletException);
        }
        this.ssgConnectorManager = (SsgConnectorManager)webApplicationContext.getBean(SsgConnectorManager.class);
        this.httpTransportModule = (HttpTransportModule)webApplicationContext.getBean(HttpTransportModule.class);
    }

    /*
     * Exception decompiling
     */
    @Override
    public void doGet(HttpServletRequest var1_1, HttpServletResponse var2_2) throws ServletException, IOException {
        /*
         * This method has failed to decompile.  When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
         * 
         * org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [4[TRYBLOCK]], but top level block is 11[SWITCH]
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.processEndingBlocks(Op04StructuredStatement.java:435)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.buildNestedBlocks(Op04StructuredStatement.java:484)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.createInitialStructuredBlock(Op03SimpleStatement.java:736)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:850)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
         *     at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
         *     at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1055)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
         *     at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
         *     at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
         *     at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
         *     at org.benf.cfr.reader.Main.main(Main.java:54)
         */
        throw new IllegalStateException("Decompilation failed");
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    private void doHealthzPage(HttpServletResponse httpServletResponse) throws FindException, IOException {
        PrintWriter printWriter;
        block8: {
            String[] stringArray = c;
            String string = this.config.getProperty(stringArray[56]);
            boolean bl2 = this.config.getBooleanProperty(stringArray[23], false);
            String string2 = this.config.getProperty(stringArray[1], "");
            String string3 = "";
            Double d10 = this.getHeapUsage(httpServletResponse, string);
            if (d10 != null) {
                string3 = this.heapJson.replace(stringArray[13], String.valueOf(d10));
            } else {
                stringArray = c;
                logger.warning(stringArray[6]);
            }
            String string4 = this.generatePortsResult(httpServletResponse, string2);
            printWriter = httpServletResponse.getWriter();
            try {
                if (!bl2) break block8;
                stringArray = c;
                httpServletResponse.setContentType(stringArray[41]);
                String string5 = this.healthzJson.replace(stringArray[37], string3).replace(stringArray[14], string4);
                printWriter.println(string5);
            }
            catch (Throwable throwable) {
                if (printWriter == null) throw throwable;
                try {
                    printWriter.close();
                    throw throwable;
                }
                catch (Throwable throwable2) {
                    throwable.addSuppressed(throwable2);
                }
                throw throwable;
            }
        }
        try {
            if (printWriter == null) return;
            printWriter.close();
            return;
        }
        catch (Throwable throwable) {
            throw HealthServlet.a(throwable);
        }
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    private void doListenPortsHealthCheckPage(HttpServletResponse httpServletResponse) throws IOException, FindException {
        PrintWriter printWriter;
        block6: {
            String[] stringArray = c;
            String string = this.config.getProperty(stringArray[57], "");
            boolean bl2 = this.config.getBooleanProperty(stringArray[12], false);
            String string2 = this.generatePortsResult(httpServletResponse, string);
            printWriter = httpServletResponse.getWriter();
            try {
                if (!bl2) break block6;
                httpServletResponse.setContentType(stringArray[51]);
                printWriter.println(string2);
            }
            catch (Throwable throwable) {
                if (printWriter == null) throw throwable;
                try {
                    printWriter.close();
                    throw throwable;
                }
                catch (Throwable throwable2) {
                    throwable.addSuppressed(throwable2);
                }
                throw throwable;
            }
        }
        try {
            if (printWriter == null) return;
            printWriter.close();
            return;
        }
        catch (Throwable throwable) {
            throw HealthServlet.a(throwable);
        }
    }

    @NotNull
    private String generatePortsResult(HttpServletResponse httpServletResponse, String string2) throws FindException {
        String string3;
        String string4;
        String string5;
        String string6;
        String string7;
        String string8;
        String string9;
        String string10 = "";
        Set set = Arrays.stream(string2.split(",")).map(String::trim).collect(Collectors.toSet());
        HashMap<String, SsgConnector> hashMap = new HashMap<String, SsgConnector>();
        this.ssgConnectorManager.findAll().forEach(ssgConnector -> {
            block4: {
                try {
                    try {
                        if (!ssgConnector.isEnabled() || !SUPPORTED_SCHEMES.contains(ssgConnector.getScheme().toLowerCase())) break block4;
                    }
                    catch (NumberFormatException numberFormatException) {
                        throw HealthServlet.a(numberFormatException);
                    }
                    hashMap.put(String.valueOf(ssgConnector.getPort()), (SsgConnector)ssgConnector);
                }
                catch (NumberFormatException numberFormatException) {
                    throw HealthServlet.a(numberFormatException);
                }
            }
        });
        HashSet hashSet = new HashSet();
        HashSet hashSet2 = new HashSet();
        try {
            hashMap.forEach((string, ssgConnector) -> {
                block8: {
                    try {
                        if (set.contains(string)) {
                            logger.fine(String.format(c[47], string));
                            return;
                        }
                    }
                    catch (ListenerException listenerException) {
                        throw HealthServlet.a(listenerException);
                    }
                    try {
                        block7: {
                            Connector connector = this.httpTransportModule.getActiveConnectorByGoid(ssgConnector.getGoid());
                            try {
                                if (connector.getState() == LifecycleState.STARTED) break block7;
                                logger.warning(String.format(c[48], string, connector.getState()));
                                httpServletResponse.setStatus(503);
                                hashSet2.add(string);
                                break block8;
                            }
                            catch (ListenerException listenerException) {
                                throw HealthServlet.a(listenerException);
                            }
                        }
                        hashSet.add(string);
                    }
                    catch (ListenerException listenerException) {
                        logger.log(Level.WARNING, String.format(c[44], string), listenerException);
                        httpServletResponse.setStatus(500);
                        hashSet2.add(string);
                    }
                }
            });
            string9 = this.portJson;
            string8 = c[5];
            string7 = hashSet2.isEmpty() ? "" : String.join((CharSequence)",", hashSet2);
        }
        catch (FindException findException) {
            throw HealthServlet.a(findException);
        }
        try {
            string6 = string9.replace(string8, string7);
            string5 = c[33];
            string4 = hashSet.isEmpty() ? "" : String.join((CharSequence)",", hashSet);
        }
        catch (FindException findException) {
            throw HealthServlet.a(findException);
        }
        string10 = string6.replace(string5, string4);
        try {
            string3 = string10;
            if (string3 == null) {
                HealthServlet.$$$reportNull$$$0(0);
            }
        }
        catch (FindException findException) {
            throw HealthServlet.a(findException);
        }
        return string3;
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    private void doHeapHealthCheckPage(HttpServletResponse httpServletResponse) throws IOException {
        PrintWriter printWriter;
        block9: {
            String[] stringArray = c;
            String string = this.config.getProperty(stringArray[20]);
            boolean bl2 = this.config.getBooleanProperty(stringArray[23], false);
            Double d10 = this.getHeapUsage(httpServletResponse, string);
            try {
                if (d10 == null) {
                    logger.warning(stringArray[16]);
                    return;
                }
            }
            catch (Throwable throwable) {
                throw HealthServlet.a(throwable);
            }
            httpServletResponse.setStatus(200);
            printWriter = httpServletResponse.getWriter();
            try {
                if (!bl2) break block9;
                stringArray = c;
                httpServletResponse.setContentType(stringArray[41]);
                String string2 = this.heapJson.replace(stringArray[45], String.valueOf(d10));
                printWriter.print(string2);
            }
            catch (Throwable throwable) {
                if (printWriter == null) throw throwable;
                try {
                    printWriter.close();
                    throw throwable;
                }
                catch (Throwable throwable2) {
                    throwable.addSuppressed(throwable2);
                }
                throw throwable;
            }
        }
        try {
            if (printWriter == null) return;
            printWriter.close();
            return;
        }
        catch (Throwable throwable) {
            throw HealthServlet.a(throwable);
        }
    }

    @Nullable
    private Double getHeapUsage(HttpServletResponse httpServletResponse, String string) throws IOException {
        double d10;
        int n2;
        block20: {
            String string2;
            block22: {
                block21: {
                    boolean bl2;
                    block17: {
                        String string3;
                        block19: {
                            block18: {
                                String[] stringArray = c;
                                logger.fine(stringArray[0]);
                                bl2 = this.config.getBooleanProperty(stringArray[23], false);
                                try {
                                    n2 = Integer.parseInt(string);
                                }
                                catch (NumberFormatException numberFormatException) {
                                    String string4;
                                    try {
                                        logger.warning(String.format(c[46], string));
                                        string4 = bl2 ? this.errorMsg.replace(c[7], String.format(c[38], string)) : "";
                                    }
                                    catch (NumberFormatException numberFormatException2) {
                                        throw HealthServlet.a(numberFormatException2);
                                    }
                                    String string5 = string4;
                                    this.respondError(httpServletResponse, 500, string5);
                                    return null;
                                }
                                try {
                                    try {
                                        try {
                                            if (n2 > 0 && n2 <= 100) break block17;
                                        }
                                        catch (NumberFormatException numberFormatException) {
                                            throw HealthServlet.a(numberFormatException);
                                        }
                                        logger.warning(String.format(c[21], n2));
                                        if (!bl2) break block18;
                                    }
                                    catch (NumberFormatException numberFormatException) {
                                        throw HealthServlet.a(numberFormatException);
                                    }
                                    string3 = this.errorMsg.replace(c[36], String.format(c[27], string));
                                    break block19;
                                }
                                catch (NumberFormatException numberFormatException) {
                                    throw HealthServlet.a(numberFormatException);
                                }
                            }
                            string3 = "";
                        }
                        String string6 = string3;
                        this.respondError(httpServletResponse, 500, string6);
                        return null;
                    }
                    Runtime runtime = Runtime.getRuntime();
                    long l2 = runtime.totalMemory();
                    long l3 = runtime.freeMemory();
                    long l4 = runtime.maxMemory();
                    long l5 = l2 - l3;
                    d10 = (double)l5 * 1.0 / (double)l4 * 100.0;
                    try {
                        if (logger.isLoggable(Level.FINEST)) {
                            logger.finest(String.format(c[58], l5 / 0x100000L, l2 / 0x100000L, l4 / 0x100000L, d10));
                        }
                    }
                    catch (NumberFormatException numberFormatException) {
                        throw HealthServlet.a(numberFormatException);
                    }
                    try {
                        try {
                            if (!(d10 > (double)n2)) break block20;
                            logger.warning(String.format(c[17], d10, n2));
                            if (!bl2) break block21;
                        }
                        catch (NumberFormatException numberFormatException) {
                            throw HealthServlet.a(numberFormatException);
                        }
                        string2 = this.errorMsg.replace(c[36], String.format(c[32], d10));
                        break block22;
                    }
                    catch (NumberFormatException numberFormatException) {
                        throw HealthServlet.a(numberFormatException);
                    }
                }
                string2 = "";
            }
            String string7 = string2;
            this.respondError(httpServletResponse, 503, string7);
            return null;
        }
        logger.fine(String.format(c[9], d10, n2));
        return d10;
    }

    private void respondError(HttpServletResponse httpServletResponse, int n2, String string) throws IOException {
        try (PrintWriter printWriter = httpServletResponse.getWriter();){
            httpServletResponse.setStatus(n2);
            httpServletResponse.setContentType(c[41]);
            printWriter.print(string);
        }
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[62];
                var3_1 = 0;
                var2_2 = "WsJ?%\u001b5`{H;p\u001f1ub\u0006)#\u00163q\u001c|wG0$\u001f\u0007q`P05\u0003\u0004{`R\u0019(\u00148avC\u00109\u0004 \u0014|wG0$\u001f\u0007q`P05\u0003\u0011zsD05\u0013\u000b;aU;\u007f\u001f1u~R4\u0014|wG0$\u001f\u0007q`P05\u0003\u0011zsD05\u0013\t0[h\u001d\u0013#\u001dBW-\\wG,p\u0002'uuC|3\u001f1wy\u0006:1\u001e8qv\u00063\"W1lqC94\u001204fN.5\u0004<{~B\u00040_u\u001bACwD\u001d \u00078}qG(9\u0018:W}H(5\u000f 4{U|>\u00028x2B)\"\u001e:s2n91\u001b |AC.&\u001b1`2O29\u0003=u~O&1\u0003={|*\\wG,p\u0002'uuC|uYfr7\u0003|9\u0004tc{R49\u0019t`zT9#\u001f;xv\u0006y4Rq\u0015|wG0$\u001f\u0007q`P05\u0003\u0016}|B\f?\u0005 \u001a\\wG0$\u001ftgwT*<\u0012 4{U|4\u001e'upJ94\u001b|wG0$\u001f\u0007q`P05\u0003\u0002q`D3#\u0012\u0011zsD05\u0013\u000b0Zc\u001d\u0000(\u0001GSa\u0019\u00060Bi\u000e\u0004$&Q`T3\"W0a`O27W8}aR9>W${`R/p\u001f1u~R4p\u0014<qqM\u0018\\wG,p\u001f1u~R4p\u0014<qqM|6\u0016=xwB)\\wG,p\u0002'uuC|uYfr7\u0003|5\u000f7qwB94W |`C/8\u00188p2\u00038uR&A|M2?\u0000:4zC=<\u0003<4qN93\u001ctA@o|\"\u0012%awU(5\u0013n47U\"A|M2?\u0000:4zC=<\u0003<4qN93\u001ctA@o|\"\u0012%awU(5\u0013\u001a|wG0$\u001f\u0007q`P05\u0003\u001cqsV\b8\u00051gzI04-\\wG,p\u0003<fwU4?\u001b04}S(p\u001824dG09\u0013tfsH;5W|%?\u0017l`^n47B)o\u0018\u0006|pWv|wG,rMp\\Wg\f|}t42\u0006~ \u0018&`a\u0004ft'\u001bFFuV-}\u001b|wG0$\u001f\u0007q`P05\u0003\u0002q`D3#\u0012\u0011zsD05\u0013\u0010;aU;\u007f\u001f1u~R4\u007f\u001f1ub*T\\I(\u001e\u00028x2K9$\u001f;p2\u0003/~R'4\u007fS/$W:{f\u0006.5\u0003!f|\u00062%\u001b8 o\u0018\u0006|pWv|wG,\u0005\u00045sw\u0004ft?\u0011UBy\t\u00036\u0013Q\u0018[V+\\wG,p\u0003<fwU4?\u001b04bG.1\u001a1`wT|u\u0004t}a\u00062?\u0003tu|\u0006*1\u001b=p<\\wG0$\u001ftgwT*<\u0012 4`C-%\u0012'`2I2p\u0000&{|A| \u0018&`(\u00069(\u00071wfC8mR082G?$\u00025x/\u00038\u0017;aU;\u007f\u001f1u~R4\u007f\u001b=gfC2\u0000\u0018&`a\u0004|fR,\u0017;aU;\u007f\u001f1u~R4\u007f\u001b=gfC2\u0000\u0018&`a\"\\wG,p\u0002'uuC|5\u000f7qwB94W |`C/8\u00188p2\u000b|u\u0004\u00070Se\b\u0019!\u0011\u0013;aU;\u007f\u001f1u~R4\u007f\u001f1u~R4*\u0005|fR,#\u00040_u\u001b\u00050Zc\u001d\u0000-\\wG,p\u0003<fwU4?\u001b04bG.1\u001a1`wT|u\u0004t}a\u00062?\u0003tu|\u00065>\u00031swT\u001c\\Wg\u0010\u0004?tGWt\n\u001c2\u00004\\i\bp6\u0002U[j\u001d\u0012;\u0011\u0017\\Wg\u0010\u0004?tGWt\n\u001c2\u00004Vo\u000f\u00115\u0018QV\u0010ubV09\u00145`{I2\u007f\u001d'{|\u0017o\u0018\u0006|pWvq`T3\"Un66k\u000f\u0017U^i\u0018\u001fw}Ks<@ qqNs#\u0012&bwTs\u0018\u00125xfN\u000f5\u0005\"xwR\u0016Q`T3\"W7|wE79\u001934bI.$Wqg\u000b0Zc\u001d\u0000(\u0001GSa\u0019!]|P=<\u001e04zC= W |`C/8\u00188p2@3\"\u001a5`(\u0006y#\u001aGyO, \u001e:s2C$3\u001b!pwB| \u0018&`(\u0006y##D}T(pR'4{U|>\u0018 4{H|\u0003#\u0015FFc\u0018p\u0004 ufCfpR'\u0019Q`T3\"W0a`O27W<qsJ(8W7|wE7\u0015|wG0$\u001f\u0007q`P05\u0003\u0016}|B\f?\u0005 \u0010ubV09\u00145`{I2\u007f\u001d'{|&Q`T3\"W0a`O27W8}aR9>W${`R/p\u001f1u~R4p\u0014<qqMAo\u0018\u0006|pWvuqR5&\u0012\u0004{`R/rM\u000f0Se\b\u0019!\u0011I>,|pWt6{H=3\u0003=bwv3\"\u0003'6(}x\u00199\u0015WFo\n\u0015*^i\u0018\u0013;aU;\u007f\u001f1u~R4\u007f\u001f1u~R4*\u001dCwD\u001d \u00078}qG(9\u0018:W}H(5\u000f 4{U|>\u00028x\u001a|wG0$\u001f\u0007q`P05\u0003\u001cqsV\b8\u00051gzI04\u001c|wG0$\u001f\u0007q`P05\u0003\u0004{`R\u0019(\u00148avC\u00109\u0004 >YwK3\"\u000etgfG(#MtaaC8mR04_dpp\u0003;`sJau\u0013tYP\n|=\u0016,)7B|\u001d5x4gU=7\u0012i1<\u0014:uR\u0013swH9\"\u0016 qBI.$\u0004\u0006qaS0$";
                var4_3 = "WsJ?%\u001b5`{H;p\u001f1ub\u0006)#\u00163q\u001c|wG0$\u001f\u0007q`P05\u0003\u0004{`R\u0019(\u00148avC\u00109\u0004 \u0014|wG0$\u001f\u0007q`P05\u0003\u0011zsD05\u0013\u000b;aU;\u007f\u001f1u~R4\u0014|wG0$\u001f\u0007q`P05\u0003\u0011zsD05\u0013\t0[h\u001d\u0013#\u001dBW-\\wG,p\u0002'uuC|3\u001f1wy\u0006:1\u001e8qv\u00063\"W1lqC94\u001204fN.5\u0004<{~B\u00040_u\u001bACwD\u001d \u00078}qG(9\u0018:W}H(5\u000f 4{U|>\u00028x2B)\"\u001e:s2n91\u001b |AC.&\u001b1`2O29\u0003=u~O&1\u0003={|*\\wG,p\u0002'uuC|uYfr7\u0003|9\u0004tc{R49\u0019t`zT9#\u001f;xv\u0006y4Rq\u0015|wG0$\u001f\u0007q`P05\u0003\u0016}|B\f?\u0005 \u001a\\wG0$\u001ftgwT*<\u0012 4{U|4\u001e'upJ94\u001b|wG0$\u001f\u0007q`P05\u0003\u0002q`D3#\u0012\u0011zsD05\u0013\u000b0Zc\u001d\u0000(\u0001GSa\u0019\u00060Bi\u000e\u0004$&Q`T3\"W0a`O27W8}aR9>W${`R/p\u001f1u~R4p\u0014<qqM\u0018\\wG,p\u001f1u~R4p\u0014<qqM|6\u0016=xwB)\\wG,p\u0002'uuC|uYfr7\u0003|5\u000f7qwB94W |`C/8\u00188p2\u00038uR&A|M2?\u0000:4zC=<\u0003<4qN93\u001ctA@o|\"\u0012%awU(5\u0013n47U\"A|M2?\u0000:4zC=<\u0003<4qN93\u001ctA@o|\"\u0012%awU(5\u0013\u001a|wG0$\u001f\u0007q`P05\u0003\u001cqsV\b8\u00051gzI04-\\wG,p\u0003<fwU4?\u001b04}S(p\u001824dG09\u0013tfsH;5W|%?\u0017l`^n47B)o\u0018\u0006|pWv|wG,rMp\\Wg\f|}t42\u0006~ \u0018&`a\u0004ft'\u001bFFuV-}\u001b|wG0$\u001f\u0007q`P05\u0003\u0002q`D3#\u0012\u0011zsD05\u0013\u0010;aU;\u007f\u001f1u~R4\u007f\u001f1ub*T\\I(\u001e\u00028x2K9$\u001f;p2\u0003/~R'4\u007fS/$W:{f\u0006.5\u0003!f|\u00062%\u001b8 o\u0018\u0006|pWv|wG,\u0005\u00045sw\u0004ft?\u0011UBy\t\u00036\u0013Q\u0018[V+\\wG,p\u0003<fwU4?\u001b04bG.1\u001a1`wT|u\u0004t}a\u00062?\u0003tu|\u0006*1\u001b=p<\\wG0$\u001ftgwT*<\u0012 4`C-%\u0012'`2I2p\u0000&{|A| \u0018&`(\u00069(\u00071wfC8mR082G?$\u00025x/\u00038\u0017;aU;\u007f\u001f1u~R4\u007f\u001b=gfC2\u0000\u0018&`a\u0004|fR,\u0017;aU;\u007f\u001f1u~R4\u007f\u001b=gfC2\u0000\u0018&`a\"\\wG,p\u0002'uuC|5\u000f7qwB94W |`C/8\u00188p2\u000b|u\u0004\u00070Se\b\u0019!\u0011\u0013;aU;\u007f\u001f1u~R4\u007f\u001f1u~R4*\u0005|fR,#\u00040_u\u001b\u00050Zc\u001d\u0000-\\wG,p\u0003<fwU4?\u001b04bG.1\u001a1`wT|u\u0004t}a\u00062?\u0003tu|\u00065>\u00031swT\u001c\\Wg\u0010\u0004?tGWt\n\u001c2\u00004\\i\bp6\u0002U[j\u001d\u0012;\u0011\u0017\\Wg\u0010\u0004?tGWt\n\u001c2\u00004Vo\u000f\u00115\u0018QV\u0010ubV09\u00145`{I2\u007f\u001d'{|\u0017o\u0018\u0006|pWvq`T3\"Un66k\u000f\u0017U^i\u0018\u001fw}Ks<@ qqNs#\u0012&bwTs\u0018\u00125xfN\u000f5\u0005\"xwR\u0016Q`T3\"W7|wE79\u001934bI.$Wqg\u000b0Zc\u001d\u0000(\u0001GSa\u0019!]|P=<\u001e04zC= W |`C/8\u00188p2@3\"\u001a5`(\u0006y#\u001aGyO, \u001e:s2C$3\u001b!pwB| \u0018&`(\u0006y##D}T(pR'4{U|>\u0018 4{H|\u0003#\u0015FFc\u0018p\u0004 ufCfpR'\u0019Q`T3\"W0a`O27W<qsJ(8W7|wE7\u0015|wG0$\u001f\u0007q`P05\u0003\u0016}|B\f?\u0005 \u0010ubV09\u00145`{I2\u007f\u001d'{|&Q`T3\"W0a`O27W8}aR9>W${`R/p\u001f1u~R4p\u0014<qqMAo\u0018\u0006|pWvuqR5&\u0012\u0004{`R/rM\u000f0Se\b\u0019!\u0011I>,|pWt6{H=3\u0003=bwv3\"\u0003'6(}x\u00199\u0015WFo\n\u0015*^i\u0018\u0013;aU;\u007f\u001f1u~R4\u007f\u001f1u~R4*\u001dCwD\u001d \u00078}qG(9\u0018:W}H(5\u000f 4{U|>\u00028x\u001a|wG0$\u001f\u0007q`P05\u0003\u001cqsV\b8\u00051gzI04\u001c|wG0$\u001f\u0007q`P05\u0003\u0004{`R\u0019(\u00148avC\u00109\u0004 >YwK3\"\u000etgfG(#MtaaC8mR04_dpp\u0003;`sJau\u0013tYP\n|=\u0016,)7B|\u001d5x4gU=7\u0012i1<\u0014:uR\u0013swH9\"\u0016 qBI.$\u0004\u0006qaS0$".length();
                var1_4 = 22;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = HealthServlet.c(v0, HealthServlet.c(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "\u000f>\nm|\tn?>\u0011li\ti%!\u001ak`Lnj$\u001dcb]bj/\u0010gmB\u0010e?\u000be!Ao+ \fj!Ao+<";
                    var4_3 = "\u000f>\nm|\tn?>\u0011li\ti%!\u001ak`Lnj$\u001dcb]bj/\u0010gmB\u0010e?\u000be!Ao+ \fj!Ao+<".length();
                    var1_4 = 34;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 63;
                        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++] = HealthServlet.c(v0, HealthServlet.c(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;
            }
        }
        HealthServlet.c = var5;
        HealthServlet.APPLICATION_JSON_CONTENT_TYPE = HealthServlet.c[41];
        HealthServlet.HEALTH_SERVLET_VERBOSE_ENABLED_PROP = HealthServlet.c[23];
        HealthServlet.LISTENPORTS_URI = HealthServlet.c[31];
        HealthServlet.HEAP_URI = HealthServlet.c[24];
        HealthServlet.HEALTH_SERVLET_PORT_EXCLUDE_LIST_PROP = HealthServlet.c[1];
        HealthServlet.HEALTHZ = HealthServlet.c[34];
        HealthServlet.HEALTH_SERVLET_ENABLED_PROP = HealthServlet.c[4];
        HealthServlet.MAIN_REQUEST_URI = HealthServlet.c[3];
        HealthServlet.HEALTH_SERVLET_BIND_PORT_PROP = HealthServlet.c[50];
        HealthServlet.HEALTH_SERVLET_HEAP_THRESHOLD_PROP = HealthServlet.c[20];
        HealthServlet.logger = Logger.getLogger(HealthServlet.class.getName());
        var0_6 = HealthServlet.c;
        HealthServlet.SUPPORTED_SCHEMES = Set.of(var0_6[30], var0_6[35]);
    }

    private static /* synthetic */ void $$$reportNull$$$0(int n2) {
        String[] stringArray = c;
        throw new IllegalStateException(String.format(stringArray[25], stringArray[43], stringArray[59]));
    }

    private static Throwable a(Throwable throwable) {
        return throwable;
    }

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

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String c(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 117;
                    case 1 -> 115;
                    case 2 -> 71;
                    case 3 -> 61;
                    case 4 -> 49;
                    case 5 -> 22;
                    default -> 53;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

