/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.Component
 *  com.l7tech.gateway.common.audit.AuditDetailMessage
 *  com.l7tech.gateway.common.audit.BootMessages
 *  com.l7tech.identity.cert.ClientCertManager
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.security.cert.TrustedCertManager
 *  com.l7tech.security.prov.JceProvider
 *  com.l7tech.util.BuildInfo
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.InetAddressUtil
 *  com.l7tech.util.ResourceUtils
 *  com.l7tech.util.Service
 *  com.l7tech.util.ShutdownExceptionHandler
 *  com.l7tech.util.SyspropUtil
 *  org.springframework.context.ApplicationContext
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.context.support.ApplicationObjectSupport
 */
package com.l7tech.server;

import com.l7tech.gateway.common.Component;
import com.l7tech.gateway.common.audit.AuditDetailMessage;
import com.l7tech.gateway.common.audit.BootMessages;
import com.l7tech.identity.cert.ClientCertManager;
import com.l7tech.objectmodel.FindException;
import com.l7tech.security.cert.TrustedCertManager;
import com.l7tech.security.prov.JceProvider;
import com.l7tech.server.LifecycleException;
import com.l7tech.server.ServerComponentLifecycle;
import com.l7tech.server.ServerConfig;
import com.l7tech.server.SystemProperties;
import com.l7tech.server.audit.Auditor;
import com.l7tech.server.event.system.Closed;
import com.l7tech.server.event.system.Closing;
import com.l7tech.server.event.system.Initialized;
import com.l7tech.server.event.system.Initializing;
import com.l7tech.server.event.system.Started;
import com.l7tech.server.event.system.Starting;
import com.l7tech.server.event.system.Stopped;
import com.l7tech.server.event.system.Stopping;
import com.l7tech.server.h;
import com.l7tech.util.BuildInfo;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.InetAddressUtil;
import com.l7tech.util.ResourceUtils;
import com.l7tech.util.Service;
import com.l7tech.util.ShutdownExceptionHandler;
import com.l7tech.util.SyspropUtil;
import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.TransformerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.support.ApplicationObjectSupport;

public class BootProcess
extends ApplicationObjectSupport {
    private static final Logger a;
    private boolean b = false;
    private final AtomicBoolean c = new AtomicBoolean(false);
    public static final String LOCALHOST_IP;
    private Collection<ServerComponentLifecycle> d;
    private Map<String, String> e;
    private SystemProperties f;
    private Properties g;
    private ServerConfig h;
    private Auditor i;
    private String j;
    private static final String[] k;

    private void a(File file) {
        File[] fileArray;
        for (File file2 : fileArray = file.listFiles(new h(this))) {
            String string = file2.toString();
            this.i.logAndAudit((AuditDetailMessage)BootMessages.DELETING_ATTACHMENT, string);
            file2.delete();
        }
    }

    public void setServerConfig(ServerConfig serverConfig) throws LifecycleException {
        this.h = serverConfig;
    }

    public void setOtherPropertiesFiles(Map<String, String> map) {
        this.e = map;
    }

    public void setSystemProperties(SystemProperties systemProperties) {
        this.f = systemProperties;
    }

    public void setNodeProperties(Properties properties) {
        this.g = properties;
    }

    public void start() throws LifecycleException {
        try {
            this.a();
        }
        catch (LifecycleException lifecycleException) {
            throw lifecycleException;
        }
        catch (Exception exception) {
            throw new LifecycleException(exception);
        }
        this.b();
        this.b = true;
        this.getApplicationContext().publishEvent((ApplicationEvent)new Starting((Object)this, Component.GW_SERVER, this.j));
        String[] stringArray = k;
        a.info(stringArray[32]);
        a.info(stringArray[11]);
        for (ServerComponentLifecycle serverComponentLifecycle : this.d()) {
            stringArray = k;
            a.info(stringArray[5] + String.valueOf(serverComponentLifecycle));
            serverComponentLifecycle.start();
        }
        this.c.set(true);
        this.getApplicationContext().publishEvent((ApplicationEvent)new Started((Object)this, Component.GW_SERVER, this.j));
        a.info(k[7]);
    }

    public void stop() throws LifecycleException {
        if (this.c.get()) {
            this.getApplicationContext().publishEvent((ApplicationEvent)new Stopping((Object)this, Component.GW_SERVER, this.j));
            String[] stringArray = k;
            a.info(stringArray[13]);
            ArrayList<ServerComponentLifecycle> arrayList = new ArrayList<ServerComponentLifecycle>();
            arrayList.addAll(this.d());
            Collections.reverse(arrayList);
            for (ServerComponentLifecycle serverComponentLifecycle : arrayList) {
                stringArray = k;
                a.info(stringArray[24] + String.valueOf(serverComponentLifecycle));
                serverComponentLifecycle.stop();
            }
            this.c.set(false);
            this.getApplicationContext().publishEvent((ApplicationEvent)new Stopped((Object)this, Component.GW_SERVER, this.j));
            stringArray = k;
            a.info(stringArray[33]);
        } else {
            a.info(k[25]);
        }
    }

    public void close() throws LifecycleException {
        this.getApplicationContext().publishEvent((ApplicationEvent)new Closing((Object)this, Component.GW_SERVER, this.j));
        String[] stringArray = k;
        a.info(stringArray[6]);
        ArrayList<ServerComponentLifecycle> arrayList = new ArrayList<ServerComponentLifecycle>();
        arrayList.addAll(this.d());
        Collections.reverse(arrayList);
        for (ServerComponentLifecycle serverComponentLifecycle : arrayList) {
            stringArray = k;
            a.info(stringArray[27] + String.valueOf(serverComponentLifecycle));
            try {
                serverComponentLifecycle.close();
            }
            catch (Exception exception) {
                stringArray = k;
                a.log(Level.SEVERE, stringArray[22] + ExceptionUtils.getMessage((Throwable)exception), exception);
            }
        }
        ShutdownExceptionHandler.getInstance().shutdownNotify();
        this.getApplicationContext().publishEvent((ApplicationEvent)new Closed((Object)this, Component.GW_SERVER, this.j));
        a.info(k[0]);
    }

    /*
     * Loose catch block
     */
    public void destroy() {
        block10: {
            this.stop();
            try {
                this.close();
            }
            catch (Exception exception) {
                String[] stringArray = k;
                a.log(Level.SEVERE, stringArray[9] + ExceptionUtils.getMessage((Throwable)exception), exception);
            }
            break block10;
            catch (Exception exception) {
                String[] stringArray;
                try {
                    stringArray = k;
                    a.log(Level.SEVERE, stringArray[3] + ExceptionUtils.getMessage((Throwable)exception), exception);
                }
                catch (Throwable throwable) {
                    try {
                        this.close();
                    }
                    catch (Exception exception2) {
                        a.log(Level.SEVERE, k[30] + ExceptionUtils.getMessage((Throwable)exception2), exception2);
                    }
                    throw throwable;
                }
                try {
                    this.close();
                }
                catch (Exception exception3) {
                    stringArray = k;
                    a.log(Level.SEVERE, stringArray[30] + ExceptionUtils.getMessage((Throwable)exception3), exception3);
                }
            }
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    private void a() throws Exception {
        String[] stringArray;
        ApplicationContext applicationContext;
        block9: {
            applicationContext = this.getApplicationContext();
            try {
                this.i = new Auditor((Object)this, applicationContext, a);
                this.f.setSystemProperties(this.g, k[19], false);
                if (this.e == null || this.e.isEmpty()) break block9;
            }
            catch (IOException iOException) {
                throw BootProcess.a(iOException);
            }
            for (String string : this.e.keySet()) {
                String string2 = this.e.get(string);
                Properties properties = new Properties();
                FileInputStream fileInputStream = null;
                try {
                    fileInputStream = new FileInputStream(new File(string2));
                    properties.load(fileInputStream);
                    this.f.setSystemProperties(properties, string, false);
                }
                catch (IOException iOException) {
                    try {
                        stringArray = k;
                        a.log(Level.WARNING, stringArray[12] + string2 + stringArray[14], iOException);
                    }
                    catch (Throwable throwable) {
                        ResourceUtils.closeQuietly(fileInputStream);
                        throw throwable;
                    }
                    ResourceUtils.closeQuietly((Closeable)fileInputStream);
                    continue;
                }
                ResourceUtils.closeQuietly((Closeable)fileInputStream);
            }
        }
        a.info(BuildInfo.getLongBuildString());
        this.c();
        try {
            this.j = InetAddress.getLocalHost().getHostAddress();
        }
        catch (UnknownHostException unknownHostException) {
            this.i.logAndAudit((AuditDetailMessage)BootMessages.NO_DETECTED_LOCAL_IP, new String[]{InetAddressUtil.getLocalHostAddress()}, unknownHostException);
            this.j = LOCALHOST_IP;
        }
        this.a(this.h.getAttachmentDirectory());
        applicationContext.publishEvent((ApplicationEvent)new Initializing((Object)this, Component.GW_SERVER, this.j));
        stringArray = k;
        a.info(stringArray[16]);
        this.i.logAndAudit((AuditDetailMessage)BootMessages.CRYPTO_INIT);
        JceProvider.init();
        this.i.logAndAudit((AuditDetailMessage)BootMessages.CRYPTO_ASYMMETRIC, String.valueOf(JceProvider.getInstance().getDisplayName()));
        this.i.logAndAudit((AuditDetailMessage)BootMessages.CRYPTO_SYMMETRIC, String.valueOf(JceProvider.getInstance().getDisplayName()));
        applicationContext.publishEvent((ApplicationEvent)new Initialized((Object)this, Component.GW_SERVER, this.j));
        a.info(stringArray[17]);
    }

    private void b() throws LifecycleException {
        if (!this.b) {
            String[] stringArray = k;
            a.info(stringArray[15]);
            ApplicationContext applicationContext = this.getApplicationContext();
            try {
                TrustedCertManager trustedCertManager = (TrustedCertManager)applicationContext.getBean(stringArray[23]);
                trustedCertManager.findByThumbprint(null);
                trustedCertManager.findByThumbprint("");
                trustedCertManager.findBySki(null);
                trustedCertManager.findBySki("");
                ClientCertManager clientCertManager = (ClientCertManager)applicationContext.getBean(stringArray[31]);
                clientCertManager.findByThumbprint(null);
                clientCertManager.findByThumbprint("");
                clientCertManager.findBySki(null);
                clientCertManager.findBySki("");
            }
            catch (FindException findException) {
                a.log(Level.WARNING, k[21], findException);
            }
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    private void c() {
        Object object;
        String string;
        Class[] classArray = new Class[]{DocumentBuilderFactory.class, SAXParserFactory.class, TransformerFactory.class};
        Properties properties = new Properties();
        String[] stringArray = k;
        File file = new File(SyspropUtil.getProperty((String)stringArray[26]));
        file = new File(file, stringArray[18]);
        file = new File(file, stringArray[8]);
        FileInputStream fileInputStream = null;
        try {
            fileInputStream = new FileInputStream(file);
            properties.load(fileInputStream);
        }
        catch (IOException iOException) {
            try {
                stringArray = k;
                a.log(Level.FINE, stringArray[34] + ExceptionUtils.getMessage((Throwable)iOException) + stringArray[29], ExceptionUtils.getDebugException((Throwable)iOException));
            }
            catch (Throwable throwable) {
                ResourceUtils.closeQuietly(fileInputStream);
                throw throwable;
            }
            ResourceUtils.closeQuietly((Closeable)fileInputStream);
        }
        ResourceUtils.closeQuietly((Closeable)fileInputStream);
        HashMap<String, Object> hashMap = new HashMap<String, Object>();
        for (Class clazz : classArray) {
            string = clazz.getName();
            stringArray = k;
            hashMap.put(string, stringArray[1]);
        }
        for (Class clazz : classArray) {
            string = clazz.getName();
            object = Service.providerClassNames((Class)clazz);
            try {
                if (!object.hasNext()) continue;
                hashMap.put(string, String.valueOf(object.next()) + k[4]);
            }
            catch (IOException iOException) {
                throw BootProcess.a(iOException);
            }
        }
        for (Class clazz : classArray) {
            string = clazz.getName();
            object = properties.getProperty(string);
            try {
                if (object == null) continue;
                hashMap.put(string, (String)object + k[20]);
            }
            catch (IOException iOException) {
                throw BootProcess.a(iOException);
            }
        }
        for (Class clazz : classArray) {
            string = clazz.getName();
            object = SyspropUtil.getProperty((String)string);
            try {
                if (object == null) continue;
                hashMap.put(string, (String)object + k[10]);
            }
            catch (IOException iOException) {
                throw BootProcess.a(iOException);
            }
        }
        for (Class clazz : classArray) {
            string = clazz.getName();
            stringArray = k;
            a.config(stringArray[35] + string + stringArray[2] + (String)hashMap.get(string) + stringArray[28]);
        }
    }

    private Collection<ServerComponentLifecycle> d() {
        Collection<ServerComponentLifecycle> collection = this.d;
        if (collection == null) {
            this.d = collection = this.getApplicationContext().getBeansOfType(ServerComponentLifecycle.class, false, false).values();
        }
        return collection;
    }

    public String getIpAddress() {
        return this.j;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[36];
                var3_1 = 0;
                var2_2 = "&[\u0001Op\u0011{\u0007!r(}@9\u0001\u0006B\u0017\u0007O5R( O\rYe\u0001<\nYNK}\u001c9\u0000\u0017\nYf\u0001'\nN\u0007RrU\u0017\nX\u001alg\u001a6\u0000D\u001d\u00065\u0011E\u001aNgF\u0010'\u0013^\rYfU\u00145~3\u00136C\u000fNa\u001c;\u0002\u0017\rSx\u0005:\u000bR\u0000H5\u0019&[\u0001O|\u001b2ED\u000bNc\u0010'ET\u0001Qe\u001a;\u0000Y\u001aO\u0016'X\u0001H5\u0005'\nT\u000bOfU6\nZ\u001ePp\u00010K\u000f\u000fV\u0016L;\u0005'\nG\u000bNa\u001c0\u0016% O\rYe\u0001<\nYNK}\u001c9\u0000\u0017\rPz\u0006<\u000bPN~z\u001a!5E\u0001_p\u0006&_\u0017\u0014E\u001aNgF\f&\u0011R\u0003\u001ce\u0007:\u0015R\u001cHl(\u001d6C\u000fNa\u001c;\u0002\u0017\u001dYg\u00030\u0017\u0017\rSx\u0005:\u000bR\u0000Hf[{K\u0013&X\u001bPq\u001br\u0011\u0017\u001cYt\u0011u\u0003E\u0001Q5\u001a6C\u0001Le\u001c;\u0002\u0017\u001dYg\u00030\u0017\u0017\rSx\u0005:\u000bR\u0000Hf\n^\u0017\u0007[{\u001a'\fY\t\u0019,Y\u0007H|\u00149\fM\u0007RrU&\u0000E\u0018YgU6\u0004T\u0006Y\u0013,Y\u0007H|\u00149\fM\u0007RrU&\u0000E\u0018Yg\u0012,Y\u0007H|\u00149\fM\u000bX5\u00060\u0017A\u000bN\u0003\t^\f\u0011\u0006X\u0003\u0012yB!\u0000T\u0006\u0012f\u0010'\u0013R\u001c\u0014E\u001aNg\u007f\u0014-\u0015\u0019\u001eNz\u00050\u0017C\u0007Yf(U&X\u001bPqU;\nCNH}\u00008\u0007G\u001cU{\u0001u\u0006R\u001cHf[u6X\u0003Ya\u001d<\u000bPN_z\u0007'\u0010G\u001aYqU<\u000b\u0017\u001aN`\u0006!\u0000S1_p\u0007!EX\u001c\u001cv\u0019<\u0000Y\u001acv\u0010'\u0011\u0017\u001a]w\u00190K# O\rYe\u0001<\nYNK}\u001c9\u0000\u0017\rPz\u0006<\u000bPN_z\u0018%\nY\u000bRaOu\u0012\u0011E\u001bOa\u00101&R\u001cHX\u0014;\u0004P\u000bN\u001e6C\u0001Le\u001c;\u0002\u0017\nUf\u0016:\u0013R\u001cYqU6\nZ\u001eS{\u0010;\u0011\u0017\b6C\u0001Le\u00101K\t\u000fV\u0018];\u001d:\bR\u001d&[\u0001O|\u001b2ES\u0007Ov\u001a#\u0000E\u000bX5\u0016:\bG\u0001Rp\u001b!E\u0002B\u0019\u0002B\u0019% O\rYe\u0001<\nYNK}\u001c9\u0000\u0017\rPz\u0006<\u000bPN~z\u001a!5E\u0001_p\u0006&_\u0017\u0011\u0006[\u0007Y{\u0001\u0016\u0000E\u001aqt\u001b4\u0002R\u001c\u000f6C\u000fNa\u001c;\u0002\u0017\u001dYg\u00030\u0017\b6C\u0001Le\u00101K";
                var4_3 = "&[\u0001Op\u0011{\u0007!r(}@9\u0001\u0006B\u0017\u0007O5R( O\rYe\u0001<\nYNK}\u001c9\u0000\u0017\nYf\u0001'\nN\u0007RrU\u0017\nX\u001alg\u001a6\u0000D\u001d\u00065\u0011E\u001aNgF\u0010'\u0013^\rYfU\u00145~3\u00136C\u000fNa\u001c;\u0002\u0017\rSx\u0005:\u000bR\u0000H5\u0019&[\u0001O|\u001b2ED\u000bNc\u0010'ET\u0001Qe\u001a;\u0000Y\u001aO\u0016'X\u0001H5\u0005'\nT\u000bOfU6\nZ\u001ePp\u00010K\u000f\u000fV\u0016L;\u0005'\nG\u000bNa\u001c0\u0016% O\rYe\u0001<\nYNK}\u001c9\u0000\u0017\rPz\u0006<\u000bPN~z\u001a!5E\u0001_p\u0006&_\u0017\u0014E\u001aNgF\f&\u0011R\u0003\u001ce\u0007:\u0015R\u001cHl(\u001d6C\u000fNa\u001c;\u0002\u0017\u001dYg\u00030\u0017\u0017\rSx\u0005:\u000bR\u0000Hf[{K\u0013&X\u001bPq\u001br\u0011\u0017\u001cYt\u0011u\u0003E\u0001Q5\u001a6C\u0001Le\u001c;\u0002\u0017\u001dYg\u00030\u0017\u0017\rSx\u0005:\u000bR\u0000Hf\n^\u0017\u0007[{\u001a'\fY\t\u0019,Y\u0007H|\u00149\fM\u0007RrU&\u0000E\u0018YgU6\u0004T\u0006Y\u0013,Y\u0007H|\u00149\fM\u0007RrU&\u0000E\u0018Yg\u0012,Y\u0007H|\u00149\fM\u000bX5\u00060\u0017A\u000bN\u0003\t^\f\u0011\u0006X\u0003\u0012yB!\u0000T\u0006\u0012f\u0010'\u0013R\u001c\u0014E\u001aNg\u007f\u0014-\u0015\u0019\u001eNz\u00050\u0017C\u0007Yf(U&X\u001bPqU;\nCNH}\u00008\u0007G\u001cU{\u0001u\u0006R\u001cHf[u6X\u0003Ya\u001d<\u000bPN_z\u0007'\u0010G\u001aYqU<\u000b\u0017\u001aN`\u0006!\u0000S1_p\u0007!EX\u001c\u001cv\u0019<\u0000Y\u001acv\u0010'\u0011\u0017\u001a]w\u00190K# O\rYe\u0001<\nYNK}\u001c9\u0000\u0017\rPz\u0006<\u000bPN_z\u0018%\nY\u000bRaOu\u0012\u0011E\u001bOa\u00101&R\u001cHX\u0014;\u0004P\u000bN\u001e6C\u0001Le\u001c;\u0002\u0017\nUf\u0016:\u0013R\u001cYqU6\nZ\u001eS{\u0010;\u0011\u0017\b6C\u0001Le\u00101K\t\u000fV\u0018];\u001d:\bR\u001d&[\u0001O|\u001b2ES\u0007Ov\u001a#\u0000E\u000bX5\u0016:\bG\u0001Rp\u001b!E\u0002B\u0019\u0002B\u0019% O\rYe\u0001<\nYNK}\u001c9\u0000\u0017\rPz\u0006<\u000bPN~z\u001a!5E\u0001_p\u0006&_\u0017\u0011\u0006[\u0007Y{\u0001\u0016\u0000E\u001aqt\u001b4\u0002R\u001c\u000f6C\u000fNa\u001c;\u0002\u0017\u001dYg\u00030\u0017\b6C\u0001Le\u00101K".length();
                var1_4 = 7;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = BootProcess.a(v0, BootProcess.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "F#z5\u00013Af0l3\u001dt\u0013s#g*\u0016aGj4{z\u0015z_fq/\u000eS#g,\u001awVqqn5\u00013\u0014";
                    var4_3 = "F#z5\u00013Af0l3\u001dt\u0013s#g*\u0016aGj4{z\u0015z_fq/\u000eS#g,\u001awVqqn5\u00013\u0014".length();
                    var1_4 = 31;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 27;
                        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++] = BootProcess.a(v0, BootProcess.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;
            }
        }
        BootProcess.k = var5;
        BootProcess.a = Logger.getLogger(BootProcess.class.getName());
        BootProcess.LOCALHOST_IP = InetAddressUtil.getLocalHostAddress();
    }

    private static IOException a(IOException iOException) {
        return iOException;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x28);
        }
        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 -> 24;
                    case 1 -> 74;
                    case 2 -> 19;
                    case 3 -> 65;
                    case 4 -> 104;
                    case 5 -> 8;
                    default -> 40;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

