/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.io.XmlUtil
 *  com.l7tech.gateway.api.Bundle
 *  com.l7tech.gateway.api.Item
 *  com.l7tech.gateway.api.Mapping
 *  com.l7tech.gateway.api.impl.MarshallingUtils
 *  com.l7tech.gateway.common.solutionkit.BadRequestException
 *  com.l7tech.gateway.common.solutionkit.SolutionKit
 *  com.l7tech.gateway.common.solutionkit.SolutionKitsConfig
 *  com.l7tech.util.IOUtils
 *  com.l7tech.util.Pair
 *  jakarta.ws.rs.core.Response
 *  jakarta.ws.rs.core.Response$Status
 *  org.glassfish.jersey.media.multipart.FormDataBodyPart
 *  org.glassfish.jersey.media.multipart.FormDataMultiPart
 *  org.jetbrains.annotations.NotNull
 */
package com.l7tech.server.solutionkit;

import com.l7tech.common.io.XmlUtil;
import com.l7tech.gateway.api.Bundle;
import com.l7tech.gateway.api.Item;
import com.l7tech.gateway.api.Mapping;
import com.l7tech.gateway.api.impl.MarshallingUtils;
import com.l7tech.gateway.common.solutionkit.BadRequestException;
import com.l7tech.gateway.common.solutionkit.SolutionKit;
import com.l7tech.gateway.common.solutionkit.SolutionKitsConfig;
import com.l7tech.util.IOUtils;
import com.l7tech.util.Pair;
import jakarta.ws.rs.core.Response;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMSource;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
import org.jetbrains.annotations.NotNull;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;

/*
 * Exception performing whole class analysis ignored.
 */
public class AddendumBundleHandler {
    private final FormDataMultiPart a;
    private final SolutionKitsConfig b;
    private final String c;
    private static final String[] d;

    public AddendumBundleHandler(@NotNull FormDataMultiPart formDataMultiPart, @NotNull SolutionKitsConfig solutionKitsConfig, @NotNull String string) {
        if (formDataMultiPart == null) {
            AddendumBundleHandler.a(0);
        }
        if (solutionKitsConfig == null) {
            AddendumBundleHandler.a(1);
        }
        if (string == null) {
            AddendumBundleHandler.a(2);
        }
        this.a = formDataMultiPart;
        this.b = solutionKitsConfig;
        this.c = string;
    }

    /*
     * Loose catch block
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    public void apply() throws IOException, BadRequestException, AddendumBundleException {
        Object object2;
        Document document;
        FormDataBodyPart formDataBodyPart;
        Set set;
        block34: {
            set = this.b.getSelectedSolutionKits();
            formDataBodyPart = this.a.getField(this.c);
            if (formDataBodyPart == null) return;
            try {
                if (set.size() <= 1) break block34;
                throw new AddendumBundleException(Response.status((Response.Status)Response.Status.BAD_REQUEST).entity((Object)(d[2] + this.c + d[12] + System.lineSeparator())).build());
                catch (SAXException sAXException) {
                    throw AddendumBundleHandler.a(sAXException);
                }
            }
            catch (SAXException sAXException) {
                throw AddendumBundleHandler.a(sAXException);
            }
        }
        SolutionKit solutionKit = (SolutionKit)set.iterator().next();
        Boolean bl2 = Boolean.valueOf(solutionKit.getProperty(SolutionKit.SK_PROP_ALLOW_ADDENDUM_KEY));
        if (!bl2.booleanValue()) {
            String string = System.lineSeparator();
            String string2 = SolutionKit.SK_PROP_ALLOW_ADDENDUM_KEY;
            String string3 = this.c;
            String[] stringArray = d;
            throw new AddendumBundleException(Response.status((Response.Status)Response.Status.FORBIDDEN).entity((Object)(stringArray[1] + string3 + stringArray[16] + string2 + stringArray[7] + string)).build());
        }
        InputStream inputStream = (InputStream)formDataBodyPart.getValueAs(InputStream.class);
        DOMSource dOMSource = new DOMSource();
        try {
            document = XmlUtil.parse((InputStream)new ByteArrayInputStream(IOUtils.slurpStream((InputStream)inputStream)));
        }
        catch (SAXException sAXException) {
            String[] stringArray = d;
            throw new BadRequestException(stringArray[17] + sAXException.getMessage(), (Throwable)sAXException);
        }
        Element element = document.getDocumentElement();
        dOMSource.setNode(element);
        Bundle bundle = (Bundle)MarshallingUtils.unmarshal(Bundle.class, (Source)dOMSource, (boolean)true);
        try {
            try {
                if (bundle == null || bundle.getMappings() == null) {
                    throw new AddendumBundleException(Response.status((Response.Status)Response.Status.BAD_REQUEST).entity((Object)(d[0] + this.c + d[18] + System.lineSeparator())).build());
                }
            }
            catch (SAXException sAXException) {
                throw AddendumBundleHandler.a(sAXException);
            }
        }
        catch (SAXException sAXException) {
            throw AddendumBundleHandler.a(sAXException);
        }
        Bundle bundle2 = this.b.getBundle(solutionKit);
        try {
            try {
                try {
                    if (bundle2 == null || bundle2.getReferences() == null) throw new AddendumBundleException(Response.status((Response.Status)Response.Status.BAD_REQUEST).entity((Object)(d[5] + this.c + d[10] + System.lineSeparator())).build());
                }
                catch (SAXException sAXException) {
                    throw AddendumBundleHandler.a(sAXException);
                }
                if (bundle2.getMappings() == null) {
                    throw new AddendumBundleException(Response.status((Response.Status)Response.Status.BAD_REQUEST).entity((Object)(d[5] + this.c + d[10] + System.lineSeparator())).build());
                }
            }
            catch (SAXException sAXException) {
                throw AddendumBundleHandler.a(sAXException);
            }
        }
        catch (SAXException sAXException) {
            throw AddendumBundleHandler.a(sAXException);
        }
        List list = bundle2.getReferences();
        HashMap<String, Item> hashMap = new HashMap<String, Item>(list.size());
        for (Object object2 : list) {
            hashMap.put(object2.getId(), (Item)object2);
        }
        List list2 = bundle2.getMappings();
        object2 = new HashMap(list2.size());
        HashMap<String, Mapping> hashMap2 = list2.iterator();
        while (hashMap2.hasNext()) {
            Mapping mapping = (Mapping)hashMap2.next();
            object2.put(mapping.getSrcId(), mapping);
        }
        if (bundle.getReferences() == null) {
            hashMap2 = new HashMap(0);
        } else {
            hashMap2 = new HashMap<String, Mapping>(bundle.getReferences().size());
            for (Mapping mapping : bundle.getReferences()) {
                hashMap2.put(mapping.getId(), mapping);
            }
        }
        for (Mapping mapping : bundle.getMappings()) {
            Item item;
            Mapping mapping2;
            block37: {
                mapping2 = (Mapping)object2.get(mapping.getSrcId());
                try {
                    if (mapping2 == null) continue;
                    if (SolutionKitsConfig.allowOverride((Mapping)mapping2)) break block37;
                }
                catch (SAXException sAXException) {
                    throw AddendumBundleHandler.a(sAXException);
                }
                String string = System.lineSeparator();
                String string4 = SolutionKitsConfig.MAPPING_PROPERTY_NAME_SK_ALLOW_MAPPING_OVERRIDE;
                String string5 = mapping.getSrcId();
                String[] stringArray = d;
                throw new AddendumBundleException(Response.status((Response.Status)Response.Status.FORBIDDEN).entity((Object)(stringArray[3] + string5 + stringArray[14] + string4 + stringArray[15] + string)).build());
            }
            list2.set(list2.indexOf(mapping2), mapping);
            Pair pair = (Pair)this.b.getPreviouslyResolvedEntityIds().get(solutionKit.getSolutionKitGuid());
            if (pair != null) {
                String string = (String)((Map)pair.right).get(mapping.getSrcId());
                try {
                    if (string != null) {
                        mapping.setTargetId(string);
                    }
                }
                catch (SAXException sAXException) {
                    throw AddendumBundleHandler.a(sAXException);
                }
            }
            if ((item = (Item)hashMap2.get(mapping.getSrcId())) == null) continue;
            Item item2 = (Item)hashMap.get(item.getId());
            try {
                if (item2 != null) {
                    list.set(list.indexOf(item2), item);
                    continue;
                }
            }
            catch (SAXException sAXException) {
                throw AddendumBundleHandler.a(sAXException);
            }
            list.add(item);
        }
    }

    /*
     * 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 1[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[19];
                var3_1 = 0;
                var2_2 = "e\u001baEM\u0014+T\u001d`\u0010AP-D\u001d`\tIP<A\u0016g\fJ\u0019*USq\u0016E\u001e(\u0011\u0015k\u0017AP)X\u0016h\u0001\f\u001e.\\\u0016`E\u000bKe\u001baE_\u0015#T\u0010p\u0000HPaB\u0018e\u0017\f\u0016&]\u0016$\u0001C\u0015<\u0011\u001dk\u0011\f\u0011#]\u001csEM\u0014+T\u001d`\u0010AP-D\u001d`\tI^o\u00115k\u0017AP)X\u0016h\u0001\f\u001e.\\\u0016`E\u000bLr\u0012jBXP'P\u0005aEA\u001f=TSp\rM\u001eo^\u001daE\u007f\u001f#D\u0007m\nBP\u0004X\u0007$\fBP<R\u001ct\u0000\f\u0007'T\u001d$\u0010_\u0019!VSb\n^\u001doW\u001aa\tHP!P\u001ea\u0001\fW9d\u001de\u0007@\u0015oE\u001c$\u0015^\u001f,T\u0000wEM\u0014+T\u001d`\u0010AP-D\u001d`\tIP)^\u0001$\bM\u0000?X\u001dcE[\u0019;YSw\u0006^9+\f\u0012B\u001ch\u0010X\u0019 _8m\u0011_3 _\u0015m\u0002\u0092e\u001baE\u0002\u0003$P\u0001$\u0003E\u001c*\u0011\u0011q\u000bH\u001c*\u0011\u0010e\u000b\u000b\u0004oS\u0016$\u000bY\u001c#\u0011[j\n^P'P\u0005aEB\u0005#]Sv\u0000J\u0015=T\u001dg\u0000_\\o_\u001cvEB\u0005#]Si\u0004\\\u0000&_\u0014wL\f\u0007'T\u001d$\u0004H\u0014*_\u0017q\b\f\u0012:_\u0017h\u0000\f\u0018.BSf\u0000I\u001eoB\u0003a\u0006E\u0016&T\u0017$ME^*\u001fSb\n^\u001doW\u001aa\tHP!P\u001ea\u0001\fW>p\u0001c\u0010A\u0015!ESb\n^P\u000f\u007f\u001cp+Y\u001c#\u0011\u0003e\u0017M\u001d*E\u0016vE\u000bU<\u0016Sk\u0003\fU<\u001fVwEA\u0005<ESj\nXP-TSj\u0010@\u001c\n\u0016Sp\n\f\u0004=D\u0016*\u0006\r\u001aj\fXN\u0011W\u001cv\bh\u0011;P>q\tX\u0019\u001fP\u0001p\u0010\u0016Ss\u0004_P?C\u001cr\fH\u0015+\u0018]\u0013S\u0006j\u0001@\u0015\t^\u0001i#E\u0015#U=e\bI^\u0016]$,JP:B\u001aj\u0002\f\u0011oR\u001ch\tI\u0013;X\u001cjEC\u0016ob\u001ch\u0010X\u0019 _SO\fX\u0003c\u0011\u0000a\tI\u0013;\u0011\u001cj\tUP _\u0016$\u0006D\u0019#USW\n@\u0005;X\u001cjEg\u0019;\u0011\u0015k\u0017\f\u0004'TSv\u0000]\u0005*B\u0007*3R\u001ciJ@G;T\u0010lJ_\u0015=G\u0016vJ_\u001f#D\u0007m\nB\u001b&E\\E\u0001H\u0015!U\u0006i'Y\u001e+]\u0016L\u0004B\u0014#T\u0001@\u001fS$1D\u0019<\u0011\u0001a\u0014Y\u0019=T\u0000$\u0011D\u0015o\u001f\u0000o\u0004^P)X\u001faEM\u0005;Y\u001cvEX\u001foB\u0016pEA\u0011?A\u001aj\u0002\f\u0000=^\u0003a\u0017X\to\u0016\n\u0016Sp\n\f\u0004=D\u0016*?\u0016Sj\nXP.]\u001fk\u0012\f\u0005!]\u0016w\u0016\f\u0004'TS*\u0016G\u0011=\u0011\u0015m\tIP.D\u0007l\n^P'P\u0000$\bI\u0004.U\u0012p\u0004\f\u0015#T\u001ea\u000bXPh";
                var4_3 = "e\u001baEM\u0014+T\u001d`\u0010AP-D\u001d`\tIP<A\u0016g\fJ\u0019*USq\u0016E\u001e(\u0011\u0015k\u0017AP)X\u0016h\u0001\f\u001e.\\\u0016`E\u000bKe\u001baE_\u0015#T\u0010p\u0000HPaB\u0018e\u0017\f\u0016&]\u0016$\u0001C\u0015<\u0011\u001dk\u0011\f\u0011#]\u001csEM\u0014+T\u001d`\u0010AP-D\u001d`\tI^o\u00115k\u0017AP)X\u0016h\u0001\f\u001e.\\\u0016`E\u000bLr\u0012jBXP'P\u0005aEA\u001f=TSp\rM\u001eo^\u001daE\u007f\u001f#D\u0007m\nBP\u0004X\u0007$\fBP<R\u001ct\u0000\f\u0007'T\u001d$\u0010_\u0019!VSb\n^\u001doW\u001aa\tHP!P\u001ea\u0001\fW9d\u001de\u0007@\u0015oE\u001c$\u0015^\u001f,T\u0000wEM\u0014+T\u001d`\u0010AP-D\u001d`\tIP)^\u0001$\bM\u0000?X\u001dcE[\u0019;YSw\u0006^9+\f\u0012B\u001ch\u0010X\u0019 _8m\u0011_3 _\u0015m\u0002\u0092e\u001baE\u0002\u0003$P\u0001$\u0003E\u001c*\u0011\u0011q\u000bH\u001c*\u0011\u0010e\u000b\u000b\u0004oS\u0016$\u000bY\u001c#\u0011[j\n^P'P\u0005aEB\u0005#]Sv\u0000J\u0015=T\u001dg\u0000_\\o_\u001cvEB\u0005#]Si\u0004\\\u0000&_\u0014wL\f\u0007'T\u001d$\u0004H\u0014*_\u0017q\b\f\u0012:_\u0017h\u0000\f\u0018.BSf\u0000I\u001eoB\u0003a\u0006E\u0016&T\u0017$ME^*\u001fSb\n^\u001doW\u001aa\tHP!P\u001ea\u0001\fW>p\u0001c\u0010A\u0015!ESb\n^P\u000f\u007f\u001cp+Y\u001c#\u0011\u0003e\u0017M\u001d*E\u0016vE\u000bU<\u0016Sk\u0003\fU<\u001fVwEA\u0005<ESj\nXP-TSj\u0010@\u001c\n\u0016Sp\n\f\u0004=D\u0016*\u0006\r\u001aj\fXN\u0011W\u001cv\bh\u0011;P>q\tX\u0019\u001fP\u0001p\u0010\u0016Ss\u0004_P?C\u001cr\fH\u0015+\u0018]\u0013S\u0006j\u0001@\u0015\t^\u0001i#E\u0015#U=e\bI^\u0016]$,JP:B\u001aj\u0002\f\u0011oR\u001ch\tI\u0013;X\u001cjEC\u0016ob\u001ch\u0010X\u0019 _SO\fX\u0003c\u0011\u0000a\tI\u0013;\u0011\u001cj\tUP _\u0016$\u0006D\u0019#USW\n@\u0005;X\u001cjEg\u0019;\u0011\u0015k\u0017\f\u0004'TSv\u0000]\u0005*B\u0007*3R\u001ciJ@G;T\u0010lJ_\u0015=G\u0016vJ_\u001f#D\u0007m\nB\u001b&E\\E\u0001H\u0015!U\u0006i'Y\u001e+]\u0016L\u0004B\u0014#T\u0001@\u001fS$1D\u0019<\u0011\u0001a\u0014Y\u0019=T\u0000$\u0011D\u0015o\u001f\u0000o\u0004^P)X\u001faEM\u0005;Y\u001cvEX\u001foB\u0016pEA\u0011?A\u001aj\u0002\f\u0000=^\u0003a\u0017X\to\u0016\n\u0016Sp\n\f\u0004=D\u0016*?\u0016Sj\nXP.]\u001fk\u0012\f\u0005!]\u0016w\u0016\f\u0004'TS*\u0016G\u0011=\u0011\u0015m\tIP.D\u0007l\n^P'P\u0000$\bI\u0004.U\u0012p\u0004\f\u0015#T\u001ea\u000bXPh".length();
                var1_4 = 54;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = AddendumBundleHandler.a(v0, AddendumBundleHandler.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "x\rz\u0006R\\3\\\r{\u0000N\u001bc\\\u001bl\fN\u00186P_j\u001cN\u0018/X_P$lFc)\u001a_k\bN[7\u001d\u001dmIN\t/Q_ \u0007O\u000ecU\u001e~\f\u0000\u00126Q\u0013(\u0004A\f3T\u0011o\u001a\tR";
                    var4_3 = "x\rz\u0006R\\3\\\r{\u0000N\u001bc\\\u001bl\fN\u00186P_j\u001cN\u0018/X_P$lFc)\u001a_k\bN[7\u001d\u001dmIN\t/Q_ \u0007O\u000ecU\u001e~\f\u0000\u00126Q\u0013(\u0004A\f3T\u0011o\u001a\tR".length();
                    var1_4 = 35;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 100;
                        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++] = AddendumBundleHandler.a(v0, AddendumBundleHandler.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;
            }
        }
        AddendumBundleHandler.d = var5;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x27);
        }
        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 -> 89;
                    case 1 -> 27;
                    case 2 -> 108;
                    case 3 -> 13;
                    case 4 -> 68;
                    case 5 -> 24;
                    default -> 39;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }

    /*
     * Exception performing whole class analysis ignored.
     */
    public class AddendumBundleException
    extends Exception {
        @NotNull
        private Response response;
        static final long serialVersionUID = 5639894252251942787L;
        private static final String[] a;

        public AddendumBundleException(Response response) {
            if (response == null) {
                AddendumBundleException.$$$reportNull$$$0(0);
            }
            this.response = response;
        }

        @NotNull
        public Response getResponse() {
            Response response;
            try {
                response = this.response;
                if (response == null) {
                    AddendumBundleException.$$$reportNull$$$0(1);
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw AddendumBundleException.a(illegalArgumentException);
            }
            return response;
        }

        /*
         * Exception decompiling
         */
        private static /* synthetic */ void $$$reportNull$$$0(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.analyseInnerClassesPass1(ClassFile.java:923)
             *     at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1035)
             *     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 IllegalArgumentException a(IllegalArgumentException illegalArgumentException) {
            return illegalArgumentException;
        }

        /*
         * Unable to fully structure code
         */
        static {
            block10: {
                block9: {
                    var5 = new String[7];
                    var3_1 = 0;
                    var2_2 = "b8;G5;\u0015d4>G*i\u0013w2$G*c\rt#?\u00077g\bux\u0017\f=i\u000fe\";*,b\u0005m2\u001e\t7h\rd%r)=h\u0004o3#\u0005\u001by\u000fe;3-!o\u0004q#?\u00077Kb8;G5;\u0015d4>G*i\u0013w2$G*c\rt#?\u00077g\bux\u0017\f=i\u000fe\";*,b\u0005m2\u001e\t7h\rd%r)=h\u0004o3#\u0005\u001by\u000fe;3-!o\u0004q#?\u00077\u000bf2\":<\u007f\u0011n9%\r*A\u00199\u001c\u0017y\rmw;\r-d\u000eews\u001bw)\u0012!:#\u001b-,\u000fn#v\u001a<x\u0014s9v\u0006,`\r>@%1\u001d4i\u000fuw0\u0007+,!O8\"&,`\r!'7\u001a8a\u0004u2$H~)\u0012&w9\u000ey)\u0012/r%H4y\u0012uw8\u0007-,\u0003dw8\u001d5`";
                    var4_3 = "b8;G5;\u0015d4>G*i\u0013w2$G*c\rt#?\u00077g\bux\u0017\f=i\u000fe\";*,b\u0005m2\u001e\t7h\rd%r)=h\u0004o3#\u0005\u001by\u000fe;3-!o\u0004q#?\u00077Kb8;G5;\u0015d4>G*i\u0013w2$G*c\rt#?\u00077g\bux\u0017\f=i\u000fe\";*,b\u0005m2\u001e\t7h\rd%r)=h\u0004o3#\u0005\u001by\u000fe;3-!o\u0004q#?\u00077\u000bf2\":<\u007f\u0011n9%\r*A\u00199\u001c\u0017y\rmw;\r-d\u000eews\u001bw)\u0012!:#\u001b-,\u000fn#v\u001a<x\u0014s9v\u0006,`\r>@%1\u001d4i\u000fuw0\u0007+,!O8\"&,`\r!'7\u001a8a\u0004u2$H~)\u0012&w9\u000ey)\u0012/r%H4y\u0012uw8\u0007-,\u0003dw8\u001d5`".length();
                    var1_4 = 75;
                    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++] = AddendumBundleException.a(v0, AddendumBundleException.a(v2));
                        if ((var0_5 += var1_4) < var4_3) {
                            var1_4 = var2_2.charAt(var0_5);
                            ** continue;
                        }
                        var2_2 = "%& \u00195*\bk*=\u0000.z\n|";
                        var4_3 = "%& \u00195*\bk*=\u0000.z\n|".length();
                        var1_4 = 6;
                        var0_5 = -1;
lbl22:
                        // 2 sources

                        while (true) {
                            v0 = 97;
                            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++] = AddendumBundleException.a(v0, AddendumBundleException.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;
                }
            }
            AddendumBundleException.a = var5;
        }

        private static char[] a(String string) {
            char[] cArray = string.toCharArray();
            if (cArray.length < 2) {
                cArray = cArray;
                cArray[0] = (char)(cArray[0] ^ 0x18);
            }
            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 -> 120;
                        case 1 -> 46;
                        case 2 -> 47;
                        case 3 -> 17;
                        case 4 -> 32;
                        case 5 -> 117;
                        default -> 24;
                    })));
                    ++n3;
                    n4 = n4;
                } while (n4 > n3);
            }
            return new String(cArray2).intern();
        }
    }
}

