/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.AsyncAdminMethods$JobId
 *  com.l7tech.gateway.common.LicenseManager
 *  com.l7tech.gateway.common.solutionkit.SolutionKit
 *  com.l7tech.gateway.common.solutionkit.SolutionKitAdmin
 *  com.l7tech.gateway.common.solutionkit.SolutionKitHeader
 *  com.l7tech.gateway.common.solutionkit.SolutionKitImportInfo
 *  com.l7tech.identity.IdentityProviderConfigManager
 *  com.l7tech.objectmodel.DeleteException
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.PersistentEntity
 *  com.l7tech.objectmodel.SaveException
 *  com.l7tech.objectmodel.UpdateException
 *  com.l7tech.util.Background
 *  jakarta.inject.Inject
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 */
package com.l7tech.server.solutionkit;

import com.l7tech.gateway.common.AsyncAdminMethods;
import com.l7tech.gateway.common.LicenseManager;
import com.l7tech.gateway.common.solutionkit.SolutionKit;
import com.l7tech.gateway.common.solutionkit.SolutionKitAdmin;
import com.l7tech.gateway.common.solutionkit.SolutionKitHeader;
import com.l7tech.gateway.common.solutionkit.SolutionKitImportInfo;
import com.l7tech.identity.IdentityProviderConfigManager;
import com.l7tech.objectmodel.DeleteException;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.objectmodel.SaveException;
import com.l7tech.objectmodel.UpdateException;
import com.l7tech.server.admin.AsyncAdminMethodsImpl;
import com.l7tech.server.event.AdminInfo;
import com.l7tech.server.solutionkit.SolutionKitAdminHelper;
import com.l7tech.server.solutionkit.SolutionKitManager;
import com.l7tech.server.solutionkit.a;
import com.l7tech.server.solutionkit.b;
import com.l7tech.server.solutionkit.c;
import com.l7tech.server.solutionkit.d;
import com.l7tech.server.solutionkit.e;
import com.l7tech.server.solutionkit.n;
import com.l7tech.server.solutionkit.o;
import com.l7tech.server.solutionkit.p;
import com.l7tech.server.solutionkit.q;
import com.l7tech.server.solutionkit.r;
import com.l7tech.util.Background;
import jakarta.inject.Inject;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.TimerTask;
import java.util.concurrent.FutureTask;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/*
 * Exception performing whole class analysis ignored.
 */
public class SolutionKitAdminImpl
extends AsyncAdminMethodsImpl
implements SolutionKitAdmin {
    @Inject
    private SolutionKitManager solutionKitManager;
    @Inject
    private LicenseManager licenseManager;
    @Inject
    private IdentityProviderConfigManager identityProviderConfigManager;
    private static final String[] e;

    public SolutionKitAdminImpl() {
    }

    public SolutionKitAdminImpl(LicenseManager licenseManager, SolutionKitManager solutionKitManager, IdentityProviderConfigManager identityProviderConfigManager) {
        this.licenseManager = licenseManager;
        this.solutionKitManager = solutionKitManager;
        this.identityProviderConfigManager = identityProviderConfigManager;
    }

    @NotNull
    public List<SolutionKit> getSolutionKitsToUpgrade(@Nullable SolutionKit solutionKit) throws FindException {
        List<SolutionKit> list;
        try {
            list = this.b().getSolutionKitsToUpgrade(solutionKit);
            if (list == null) {
                SolutionKitAdminImpl.a(0);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)findException));
        }
        return list;
    }

    @NotNull
    public String testInstall(@NotNull SolutionKit solutionKit, @NotNull String string, boolean bl2) throws Exception {
        String string2;
        try {
            if (solutionKit == null) {
                SolutionKitAdminImpl.a(1);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminImpl.a(exception);
        }
        try {
            if (string == null) {
                SolutionKitAdminImpl.a(2);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminImpl.a(exception);
        }
        try {
            string2 = this.b().testInstall(solutionKit, string, bl2);
            if (string2 == null) {
                SolutionKitAdminImpl.a(3);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminImpl.a(exception);
        }
        return string2;
    }

    public String testUpgrade(@NotNull SolutionKitImportInfo solutionKitImportInfo) throws Exception {
        try {
            if (solutionKitImportInfo == null) {
                SolutionKitAdminImpl.a(4);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminImpl.a(exception);
        }
        return this.b().testUpgrade(solutionKitImportInfo);
    }

    @NotNull
    public AsyncAdminMethods.JobId<String> testInstallAsync(@NotNull SolutionKit solutionKit, @NotNull String string, boolean bl2) {
        AsyncAdminMethods.JobId<String> jobId;
        try {
            if (solutionKit == null) {
                SolutionKitAdminImpl.a(5);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        try {
            if (string == null) {
                SolutionKitAdminImpl.a(6);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        FutureTask<String> futureTask = new FutureTask<String>(AdminInfo.find(false).wrapCallable(new a(this, solutionKit, string, bl2)));
        try {
            Background.scheduleOneShot((TimerTask)new o(this, futureTask), (long)0L);
            jobId = this.registerJob(futureTask, String.class);
            if (jobId == null) {
                SolutionKitAdminImpl.a(7);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        return jobId;
    }

    @NotNull
    public AsyncAdminMethods.JobId<String> testUpgradeAsync(@NotNull SolutionKitImportInfo solutionKitImportInfo) {
        AsyncAdminMethods.JobId<String> jobId;
        try {
            if (solutionKitImportInfo == null) {
                SolutionKitAdminImpl.a(8);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        FutureTask<String> futureTask = new FutureTask<String>(AdminInfo.find(false).wrapCallable(new b(this, solutionKitImportInfo)));
        try {
            Background.scheduleOneShot((TimerTask)new p(this, futureTask), (long)0L);
            jobId = this.registerJob(futureTask, String.class);
            if (jobId == null) {
                SolutionKitAdminImpl.a(9);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        return jobId;
    }

    @NotNull
    public Goid install(@NotNull SolutionKit solutionKit, @NotNull String string, boolean bl2) throws Exception {
        Goid goid;
        try {
            if (solutionKit == null) {
                SolutionKitAdminImpl.a(10);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminImpl.a(exception);
        }
        try {
            if (string == null) {
                SolutionKitAdminImpl.a(11);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminImpl.a(exception);
        }
        try {
            goid = this.b().install(solutionKit, string, bl2);
            if (goid == null) {
                SolutionKitAdminImpl.a(12);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminImpl.a(exception);
        }
        return goid;
    }

    @NotNull
    public ArrayList upgrade(@NotNull SolutionKitImportInfo solutionKitImportInfo) throws Exception {
        ArrayList arrayList;
        try {
            if (solutionKitImportInfo == null) {
                SolutionKitAdminImpl.a(13);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminImpl.a(exception);
        }
        try {
            arrayList = this.b().upgrade(solutionKitImportInfo);
            if (arrayList == null) {
                SolutionKitAdminImpl.a(14);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminImpl.a(exception);
        }
        return arrayList;
    }

    @NotNull
    public AsyncAdminMethods.JobId<Goid> installAsync(@NotNull SolutionKit solutionKit, @NotNull String string, boolean bl2) {
        AsyncAdminMethods.JobId<Goid> jobId;
        try {
            if (solutionKit == null) {
                SolutionKitAdminImpl.a(15);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        try {
            if (string == null) {
                SolutionKitAdminImpl.a(16);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        FutureTask<Goid> futureTask = new FutureTask<Goid>(AdminInfo.find(false).wrapCallable(new c(this, solutionKit, string, bl2)));
        try {
            Background.scheduleOneShot((TimerTask)new q(this, futureTask), (long)0L);
            jobId = this.registerJob(futureTask, Goid.class);
            if (jobId == null) {
                SolutionKitAdminImpl.a(17);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        return jobId;
    }

    @NotNull
    public AsyncAdminMethods.JobId<ArrayList> upgradeAsync(@NotNull SolutionKitImportInfo solutionKitImportInfo) {
        AsyncAdminMethods.JobId<ArrayList> jobId;
        try {
            if (solutionKitImportInfo == null) {
                SolutionKitAdminImpl.a(18);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        FutureTask<ArrayList> futureTask = new FutureTask<ArrayList>(AdminInfo.find(false).wrapCallable(new d(this, solutionKitImportInfo)));
        try {
            Background.scheduleOneShot((TimerTask)new r(this, futureTask), (long)0L);
            jobId = this.registerJob(futureTask, ArrayList.class);
            if (jobId == null) {
                SolutionKitAdminImpl.a(19);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        return jobId;
    }

    @NotNull
    public String uninstall(@NotNull Goid goid) throws Exception {
        String string;
        try {
            if (goid == null) {
                SolutionKitAdminImpl.a(20);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminImpl.a(exception);
        }
        try {
            string = this.b().uninstall(goid);
            if (string == null) {
                SolutionKitAdminImpl.a(21);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminImpl.a(exception);
        }
        return string;
    }

    @NotNull
    public AsyncAdminMethods.JobId<String> uninstallAsync(@NotNull Goid goid) {
        AsyncAdminMethods.JobId<String> jobId;
        try {
            if (goid == null) {
                SolutionKitAdminImpl.a(22);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        FutureTask<String> futureTask = new FutureTask<String>(AdminInfo.find(false).wrapCallable(new e(this, goid)));
        try {
            Background.scheduleOneShot((TimerTask)new n(this, futureTask), (long)0L);
            jobId = this.registerJob(futureTask, String.class);
            if (jobId == null) {
                SolutionKitAdminImpl.a(23);
            }
        }
        catch (IllegalStateException illegalStateException) {
            throw SolutionKitAdminImpl.a(illegalStateException);
        }
        return jobId;
    }

    @NotNull
    public Collection<SolutionKitHeader> findHeaders() throws FindException {
        Collection<SolutionKitHeader> collection;
        try {
            collection = this.b().findHeaders();
            if (collection == null) {
                SolutionKitAdminImpl.a(24);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)findException));
        }
        return collection;
    }

    @NotNull
    public Collection<SolutionKitHeader> findHeaders(@NotNull Goid goid) throws FindException {
        Collection<SolutionKitHeader> collection;
        try {
            if (goid == null) {
                SolutionKitAdminImpl.a(25);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)findException));
        }
        try {
            collection = this.b().findHeaders(goid);
            if (collection == null) {
                SolutionKitAdminImpl.a(26);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)findException));
        }
        return collection;
    }

    @NotNull
    public Collection<SolutionKit> find(@NotNull String string) throws FindException {
        Collection<SolutionKit> collection;
        try {
            if (string == null) {
                SolutionKitAdminImpl.a(27);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)findException));
        }
        try {
            collection = this.b().find(string);
            if (collection == null) {
                SolutionKitAdminImpl.a(28);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)findException));
        }
        return collection;
    }

    @NotNull
    public Collection<SolutionKit> find(@NotNull Goid goid) throws FindException {
        Collection<SolutionKit> collection;
        try {
            if (goid == null) {
                SolutionKitAdminImpl.a(29);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)findException));
        }
        try {
            collection = this.b().find(goid);
            if (collection == null) {
                SolutionKitAdminImpl.a(30);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)findException));
        }
        return collection;
    }

    public SolutionKit get(@NotNull Goid goid) throws FindException {
        try {
            if (goid == null) {
                SolutionKitAdminImpl.a(31);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)findException));
        }
        return this.b().get(goid);
    }

    public SolutionKit get(@NotNull String string, @Nullable String string2) throws FindException {
        try {
            if (string == null) {
                SolutionKitAdminImpl.a(32);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)findException));
        }
        return this.b().get(string, string2);
    }

    @NotNull
    public Goid save(@NotNull SolutionKit solutionKit) throws SaveException {
        Goid goid;
        try {
            if (solutionKit == null) {
                SolutionKitAdminImpl.a(33);
            }
        }
        catch (SaveException saveException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)saveException));
        }
        try {
            goid = this.b().save(solutionKit);
            if (goid == null) {
                SolutionKitAdminImpl.a(34);
            }
        }
        catch (SaveException saveException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)saveException));
        }
        return goid;
    }

    public void update(@NotNull SolutionKit solutionKit) throws UpdateException {
        try {
            if (solutionKit == null) {
                SolutionKitAdminImpl.a(35);
            }
        }
        catch (UpdateException updateException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)updateException));
        }
        this.solutionKitManager.update((PersistentEntity)solutionKit);
    }

    public void delete(@NotNull Goid goid) throws FindException, DeleteException {
        try {
            if (goid == null) {
                SolutionKitAdminImpl.a(36);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminImpl.a((Exception)((Object)findException));
        }
        this.solutionKitManager.delete(goid);
    }

    SolutionKitAdminHelper b() {
        return new SolutionKitAdminHelper(this.licenseManager, this.solutionKitManager, this.identityProviderConfigManager);
    }

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

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

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[40];
                var3_1 = 0;
                var2_2 = " C[,bBn GD4\u000b C[,~\\z&GL=\u00033C\\>\u0015TO-FIs \u0006N7Y\f]\u001aI\\\u0016^@qtVI*JAx CZx\f\tns\u0006G>\u000b\tnz\u0003[xFYn \u0006F7_\f\u007f1\u0006F-G@\u000f'ID-_Er:mA,lYt0\f!VO*JHx\u0015UQ6H\n$GZ=EXZ;OL\u0006!VL9_I27IEwG\u001bi1E@wXIo\"CZwXCq!RA7EGt \t{7GYi=IF\u0013BX\\0KA6bAm8\u0010 C[,bBn GD4j_d:E\u0010 C[,bBn GD4j_d:E\u00042OF<\f=H[,J@q\u0015UQ6H\u00060CD=_I\u0007!VO*JHx\u000b2OF<cI|0CZ+\u0007=H[,J@q\u000b2OF<cI|0CZ+\u0010 C[,~\\z&GL=j_d:E\t!HA6XX|8J*\u0014hG,eYq8\u0006E=_Dr0\u0006\r+\u0005\tntK]+_\fs;R\b*NXh&H\b6^@q\f!VO*JHx\u0015UQ6H\u00042OF<\u00066SF<GI\t!HA6XX|8J\u00043SA<\u0004'G^=\u0004'G^=\u000b C[,bBn GD4\f=H[,J@q\u0015UQ6H\u000e!HA6XX|8Ji+RB~\u000e!HA6XX|8Ji+RB~\u0007=H[,J@q\u0015'ID-_Er:mA,bAm;T\\\u0011EJr\u00183C\\\u000bD@h OG6`Ei'rG\r[Ko5BM\u000b'ID-_Er:mA,\u00043IA<\u0007!VO*JHx";
                var4_3 = " C[,bBn GD4\u000b C[,~\\z&GL=\u00033C\\>\u0015TO-FIs \u0006N7Y\f]\u001aI\\\u0016^@qtVI*JAx CZx\f\tns\u0006G>\u000b\tnz\u0003[xFYn \u0006F7_\f\u007f1\u0006F-G@\u000f'ID-_Er:mA,lYt0\f!VO*JHx\u0015UQ6H\n$GZ=EXZ;OL\u0006!VL9_I27IEwG\u001bi1E@wXIo\"CZwXCq!RA7EGt \t{7GYi=IF\u0013BX\\0KA6bAm8\u0010 C[,bBn GD4j_d:E\u0010 C[,bBn GD4j_d:E\u00042OF<\f=H[,J@q\u0015UQ6H\u00060CD=_I\u0007!VO*JHx\u000b2OF<cI|0CZ+\u0007=H[,J@q\u000b2OF<cI|0CZ+\u0010 C[,~\\z&GL=j_d:E\t!HA6XX|8J*\u0014hG,eYq8\u0006E=_Dr0\u0006\r+\u0005\tntK]+_\fs;R\b*NXh&H\b6^@q\f!VO*JHx\u0015UQ6H\u00042OF<\u00066SF<GI\t!HA6XX|8J\u00043SA<\u0004'G^=\u0004'G^=\u000b C[,bBn GD4\f=H[,J@q\u0015UQ6H\u000e!HA6XX|8Ji+RB~\u000e!HA6XX|8Ji+RB~\u0007=H[,J@q\u0015'ID-_Er:mA,bAm;T\\\u0011EJr\u00183C\\\u000bD@h OG6`Ei'rG\r[Ko5BM\u000b'ID-_Er:mA,\u00043IA<\u0007!VO*JHx".length();
                var1_4 = 11;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = SolutionKitAdminImpl.b(v0, SolutionKitAdminImpl.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "D:6\u00044h\u001aB63\u0004+:\u001cQ0)\u0004+0\u0002R!2D64\u0007Sz\bD4*\u001aN:5`1+/C82E\u00112\u001eK\u0010S0(_\r/\tU4?N\u0019,\u0017I6";
                    var4_3 = "D:6\u00044h\u001aB63\u0004+:\u001cQ0)\u0004+0\u0002R!2D64\u0007Sz\bD4*\u001aN:5`1+/C82E\u00112\u001eK\u0010S0(_\r/\tU4?N\u0019,\u0017I6".length();
                    var1_4 = 50;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 106;
                        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++] = SolutionKitAdminImpl.b(v0, SolutionKitAdminImpl.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;
            }
        }
        SolutionKitAdminImpl.e = var5;
    }

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

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

