/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.util.Either
 *  org.jetbrains.annotations.NotNull
 *  org.springframework.context.ApplicationEvent
 */
package com.l7tech.server.policy.module;

import com.l7tech.server.policy.module.BaseAssertionModule;
import com.l7tech.server.policy.module.CustomAssertionModule;
import com.l7tech.server.policy.module.ModularAssertionModule;
import com.l7tech.util.Either;
import org.jetbrains.annotations.NotNull;
import org.springframework.context.ApplicationEvent;

/*
 * Exception performing whole class analysis ignored.
 */
public class AssertionModuleRegistrationEvent
extends ApplicationEvent {
    @NotNull
    private final BaseAssertionModule module;
    static final long serialVersionUID = -88667938436932332L;
    private static final String[] a;

    public AssertionModuleRegistrationEvent(Object object, @NotNull BaseAssertionModule baseAssertionModule) {
        if (baseAssertionModule == null) {
            AssertionModuleRegistrationEvent.$$$reportNull$$$0(0);
        }
        super(object);
        this.module = baseAssertionModule;
    }

    @NotNull
    public Either<ModularAssertionModule, CustomAssertionModule> getModule() {
        block10: {
            Either either;
            block11: {
                block8: {
                    Either either2;
                    block9: {
                        try {
                            try {
                                if (!(this.module instanceof ModularAssertionModule)) break block8;
                                either2 = Either.left((Object)((ModularAssertionModule)this.module));
                                if (either2 != null) break block9;
                            }
                            catch (IllegalStateException illegalStateException) {
                                throw AssertionModuleRegistrationEvent.a(illegalStateException);
                            }
                            AssertionModuleRegistrationEvent.$$$reportNull$$$0(1);
                        }
                        catch (IllegalStateException illegalStateException) {
                            throw AssertionModuleRegistrationEvent.a(illegalStateException);
                        }
                    }
                    return either2;
                }
                try {
                    try {
                        if (!(this.module instanceof CustomAssertionModule)) break block10;
                        either = Either.right((Object)((CustomAssertionModule)this.module));
                        if (either != null) break block11;
                    }
                    catch (IllegalStateException illegalStateException) {
                        throw AssertionModuleRegistrationEvent.a(illegalStateException);
                    }
                    AssertionModuleRegistrationEvent.$$$reportNull$$$0(2);
                }
                catch (IllegalStateException illegalStateException) {
                    throw AssertionModuleRegistrationEvent.a(illegalStateException);
                }
            }
            return either;
        }
        String[] stringArray = a;
        throw new IllegalStateException(stringArray[0] + this.module.getClass().getSimpleName() + stringArray[7]);
    }

    public ClassLoader getModuleClassLoader() {
        return this.module.getModuleClassLoader();
    }

    /*
     * 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.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 IllegalStateException a(IllegalStateException illegalStateException) {
        return illegalStateException;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[9];
                var3_1 = 0;
                var2_2 = "\b2D'}\"(/(R6-?(9)[7-&>-9\u0019rY+78|^!-p@>3Z}ae38?_}~75+9E}}=+4?N}`=#(0R}L!48.C;b<\n28B>h\u0000\":5D&\u007f3343Y\u0017{7))\u000603S'a7@>3Z}ae38?_}~75+9E}}=+4?N}`=#(0R}L!48.C;b<\n28B>h\u0000\":5D&\u007f3343Y\u0017{7))>\u001c.P'`7))|Q=\u007fr\u0007\u00133C\u001cx>+},V l?\")9Er*w4z|X4-w4syDr`'4)|Y=yr%8|Y'a>\t:9C\u001fb6219*\u001d\u0012X&C'+1|Z7y:(9|\u0012!#w4}1B!yr)2(\u0017 h&2/2\u0017<x>+";
                var4_3 = "\b2D'}\"(/(R6-?(9)[7-&>-9\u0019rY+78|^!-p@>3Z}ae38?_}~75+9E}}=+4?N}`=#(0R}L!48.C;b<\n28B>h\u0000\":5D&\u007f3343Y\u0017{7))\u000603S'a7@>3Z}ae38?_}~75+9E}}=+4?N}`=#(0R}L!48.C;b<\n28B>h\u0000\":5D&\u007f3343Y\u0017{7))>\u001c.P'`7))|Q=\u007fr\u0007\u00133C\u001cx>+},V l?\")9Er*w4z|X4-w4syDr`'4)|Y=yr%8|Y'a>\t:9C\u001fb6219*\u001d\u0012X&C'+1|Z7y:(9|\u0012!#w4}1B!yr)2(\u0017 h&2/2\u0017<x>+".length();
                var1_4 = 34;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = AssertionModuleRegistrationEvent.a(v0, AssertionModuleRegistrationEvent.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "\u000e\u0001fF\u0004SSOY#G\\WO\\HfP\u0014LC@IfF\u0015W^I_fA\u0019\u0003{CI3O\u001dQw_^#Q\bJYB`)G\tOS\fB4\u0003?VEXB+b\u000fPS^Y/L\u0012nYHX*F\u0006\u0010D(J\b\u001d";
                    var4_3 = "\u000e\u0001fF\u0004SSOY#G\\WO\\HfP\u0014LC@IfF\u0015W^I_fA\u0019\u0003{CI3O\u001dQw_^#Q\bJYB`)G\tOS\fB4\u0003?VEXB+b\u000fPS^Y/L\u0012nYHX*F\u0006\u0010D(J\b\u001d".length();
                    var1_4 = 81;
                    var0_5 = -1;
lbl22:
                    // 2 sources

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

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x16);
        }
        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 -> 12;
                    case 1 -> 13;
                    case 2 -> 102;
                    case 3 -> 3;
                    case 4 -> 92;
                    case 5 -> 3;
                    default -> 22;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

