/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.service.PublishedService
 *  com.l7tech.gateway.common.service.ServiceDocument
 *  com.l7tech.objectmodel.Entity
 *  org.jetbrains.annotations.NotNull
 */
package com.l7tech.server.bundling;

import com.l7tech.gateway.common.service.PublishedService;
import com.l7tech.gateway.common.service.ServiceDocument;
import com.l7tech.objectmodel.Entity;
import com.l7tech.server.bundling.EntityContainer;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.jetbrains.annotations.NotNull;

/*
 * Exception performing whole class analysis ignored.
 */
public class PublishedServiceContainer
extends EntityContainer<PublishedService> {
    @NotNull
    private final Collection<ServiceDocument> c;
    private static final String[] e;

    public PublishedServiceContainer(@NotNull PublishedService publishedService, @NotNull Collection<ServiceDocument> collection) {
        if (publishedService == null) {
            PublishedServiceContainer.b(0);
        }
        if (collection == null) {
            PublishedServiceContainer.b(1);
        }
        super(publishedService);
        this.c = collection;
    }

    @NotNull
    public PublishedService getPublishedService() {
        PublishedService publishedService;
        try {
            publishedService = (PublishedService)this.getEntity();
            if (publishedService == null) {
                PublishedServiceContainer.b(2);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PublishedServiceContainer.b(illegalArgumentException);
        }
        return publishedService;
    }

    @NotNull
    public Collection<ServiceDocument> getServiceDocuments() {
        Collection<ServiceDocument> collection;
        try {
            collection = this.c;
            if (collection == null) {
                PublishedServiceContainer.b(3);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PublishedServiceContainer.b(illegalArgumentException);
        }
        return collection;
    }

    @Override
    @NotNull
    public List<Entity> getEntities() {
        ArrayList<Entity> arrayList;
        ArrayList<Entity> arrayList2 = new ArrayList<Entity>();
        try {
            arrayList2.add((Entity)this.getEntity());
            arrayList2.addAll(this.c);
            arrayList = arrayList2;
            if (arrayList == null) {
                PublishedServiceContainer.b(4);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PublishedServiceContainer.b(illegalArgumentException);
        }
        return arrayList;
    }

    /*
     * Exception decompiling
     */
    private static /* synthetic */ void b(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 IllegalArgumentException b(IllegalArgumentException illegalArgumentException) {
        return illegalArgumentException;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[10];
                var3_1 = 0;
                var2_2 = "ao\u0000 4cvT=\u0001:+&Xnr\u0013\u001b,jt\u0000m\u0006'8k}Tx\u0015u~#k\u0007=\b3y#k\u000e8\u0014u4skT=\t:-&zE=\t 5j\u0010Sx\u0015#0e}dr\u0004 4cvTn4Cr\nz51lE~\u000fz*cjVx\u0015z;svDq\u000e;>)HU\u007f\u000b<*n}DN\u0002'/o{E^\b;-gqNx\u0015*`S\b!\u0017stL=\n0-nwD=B&w#k\u0000p\u0012&-&vOiG'<rmRsG;,jt4Cr\nz51lE~\u000fz*cjVx\u0015z;svDq\u000e;>)HU\u007f\u000b<*n}DN\u0002'/o{E^\b;-gqNx\u0015\u0007Sx\u0015#0e}\u0013Gx\u0013\u0005,dtIn\u000f0=U}Rk\u000e6<\u0006\u001ct\t<-8";
                var4_3 = "ao\u0000 4cvT=\u0001:+&Xnr\u0013\u001b,jt\u0000m\u0006'8k}Tx\u0015u~#k\u0007=\b3y#k\u000e8\u0014u4skT=\t:-&zE=\t 5j\u0010Sx\u0015#0e}dr\u0004 4cvTn4Cr\nz51lE~\u000fz*cjVx\u0015z;svDq\u000e;>)HU\u007f\u000b<*n}DN\u0002'/o{E^\b;-gqNx\u0015*`S\b!\u0017stL=\n0-nwD=B&w#k\u0000p\u0012&-&vOiG'<rmRsG;,jt4Cr\nz51lE~\u000fz*cjVx\u0015z;svDq\u000e;>)HU\u007f\u000b<*n}DN\u0002'/o{E^\b;-gqNx\u0015\u0007Sx\u0015#0e}\u0013Gx\u0013\u0005,dtIn\u000f0=U}Rk\u000e6<\u0006\u001ct\t<-8".length();
                var1_4 = 62;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = PublishedServiceContainer.b(v0, PublishedServiceContainer.b(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "b]6#\u0019QKl['4\u0013@Hh],\u0004\u000f\u000bb]65\u0012WTqQ'\u0003";
                    var4_3 = "b]6#\u0019QKl['4\u0013@Hh],\u0004\u000f\u000bb]65\u0012WTqQ'\u0003".length();
                    var1_4 = 19;
                    var0_5 = -1;
lbl22:
                    // 2 sources

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

    private static char[] b(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x4E);
        }
        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 -> 118;
                    case 1 -> 75;
                    case 2 -> 49;
                    case 3 -> 3;
                    case 4 -> 15;
                    case 5 -> 80;
                    default -> 78;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

