/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.security.rbac.OperationType
 *  com.l7tech.gateway.common.security.rbac.PermissionDeniedException
 *  com.l7tech.gateway.common.security.rbac.Secured
 *  com.l7tech.identity.User
 *  com.l7tech.objectmodel.Entity
 *  com.l7tech.objectmodel.EntityHeader
 *  com.l7tech.objectmodel.EntityHeaderSet
 *  com.l7tech.objectmodel.EntityType
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.IdentityHeader
 *  com.l7tech.objectmodel.NamedEntity
 *  com.l7tech.objectmodel.ObjectNotFoundException
 *  com.l7tech.objectmodel.PersistentEntity
 *  com.l7tech.util.CollectionUpdate
 *  com.l7tech.util.CollectionUpdateFilterer
 *  com.l7tech.util.ExceptionUtils
 *  org.aopalliance.intercept.MethodInterceptor
 *  org.aopalliance.intercept.MethodInvocation
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 *  org.springframework.context.ApplicationContext
 *  org.springframework.context.ApplicationContextAware
 */
package com.l7tech.server.security.rbac;

import com.l7tech.gateway.common.security.rbac.OperationType;
import com.l7tech.gateway.common.security.rbac.PermissionDeniedException;
import com.l7tech.gateway.common.security.rbac.Secured;
import com.l7tech.identity.User;
import com.l7tech.objectmodel.Entity;
import com.l7tech.objectmodel.EntityHeader;
import com.l7tech.objectmodel.EntityHeaderSet;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.IdentityHeader;
import com.l7tech.objectmodel.NamedEntity;
import com.l7tech.objectmodel.ObjectNotFoundException;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.server.EntityFinder;
import com.l7tech.server.security.rbac.CheckAfter;
import com.l7tech.server.security.rbac.CheckBefore;
import com.l7tech.server.security.rbac.CustomEntityTranslator;
import com.l7tech.server.security.rbac.CustomRbacInterceptor;
import com.l7tech.server.security.rbac.RbacServices;
import com.l7tech.server.security.rbac.SecurityFilter;
import com.l7tech.server.security.rbac.a;
import com.l7tech.server.security.rbac.h;
import com.l7tech.server.util.Injector;
import com.l7tech.util.CollectionUpdate;
import com.l7tech.util.CollectionUpdateFilterer;
import com.l7tech.util.ExceptionUtils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/*
 * Exception performing whole class analysis ignored.
 */
public class SecuredMethodInterceptor
implements MethodInterceptor,
ApplicationContextAware {
    private static final Logger a;
    private static final String b;
    private final RbacServices c;
    private final EntityFinder d;
    private static final String e;
    private static final String f;
    private ApplicationContext g;
    private static final String[] h;

    public SecuredMethodInterceptor(RbacServices rbacServices, EntityFinder entityFinder) {
        this.c = rbacServices;
        this.d = entityFinder;
    }

    public SecurityFilter getSecurityFilter() {
        return new h(this);
    }

    public void setApplicationContext(ApplicationContext applicationContext) {
        this.g = applicationContext;
    }

    /*
     * Unable to fully structure code
     */
    private <CT extends Iterable<T>, T> CT a(CT var1_1, User var2_2, OperationType var3_3, @Nullable String var4_4, String var5_5, @Nullable CustomEntityTranslator var6_6) throws FindException {
        var7_7 = new ArrayList<T>();
        for (T var9_9 : var1_1) {
            block18: {
                block17: {
                    if (var9_9 instanceof Entity) {
                        var10_10 = (Entity)var9_9;
                    } else if (var9_9 instanceof EntityHeader) {
                        var11_11 = (EntityHeader)var9_9;
                        var10_10 = this.d.find(var11_11);
                    } else {
                        try {
                            if (var6_6 == null || this.d == null) break block17;
                        }
                        catch (FindException v0) {
                            throw SecuredMethodInterceptor.a(v0);
                        }
                        var10_10 = var6_6.locateEntity(var9_9, this.d);
                        try {
                            try {
                                if (var10_10 != null || var9_9 == null) ** GOTO lbl31
                            }
                            catch (FindException v1) {
                                throw SecuredMethodInterceptor.a(v1);
                            }
                            var7_7.add(var9_9);
                        }
                        catch (FindException v2) {
                            throw SecuredMethodInterceptor.a(v2);
                        }
                    }
                    break block18;
                }
                var12_12 = SecuredMethodInterceptor.h;
                throw new IllegalArgumentException(var12_12[40]);
            }
            try {
                try {
                    try {
                        if (var10_10 == null || this.c.isPermittedForEntity(var2_2, var10_10, var3_3, var4_4)) continue;
                    }
                    catch (FindException v3) {
                        throw SecuredMethodInterceptor.a(v3);
                    }
                    var7_7.add(var9_9);
                    if (!SecuredMethodInterceptor.a.isLoggable(Level.FINEST)) continue;
                }
                catch (FindException v4) {
                    throw SecuredMethodInterceptor.a(v4);
                }
                SecuredMethodInterceptor.a.log(Level.FINEST, SecuredMethodInterceptor.h[58], new Object[]{var10_10.getClass().getSimpleName(), var10_10.getId(), var5_5});
            }
            catch (FindException v5) {
                throw SecuredMethodInterceptor.a(v5);
            }
        }
        return this.a(var1_1, var7_7);
    }

    private <CT extends Iterable<T>, T> CT a(CT CT, List<T> list) {
        block4: {
            Object object;
            block6: {
                block5: {
                    try {
                        if (!(CT instanceof Collection)) break block4;
                        if (!(CT instanceof EntityHeaderSet)) break block5;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw SecuredMethodInterceptor.a(illegalArgumentException);
                    }
                    object = new EntityHeaderSet((Set)CT);
                    break block6;
                }
                object = CT instanceof Set ? new HashSet((Collection)CT) : new ArrayList((Collection)CT);
            }
            for (T t2 : list) {
                object.remove(t2);
            }
            return (CT)object;
        }
        if (CT instanceof CollectionUpdate) {
            CollectionUpdate collectionUpdate = (CollectionUpdate)CT;
            return (CT)CollectionUpdateFilterer.filter((CollectionUpdate)collectionUpdate, list);
        }
        throw new IllegalStateException(h[64] + String.valueOf(CT.getClass()));
    }

    private static void a(Class clazz, List<Secured> list) {
        Secured secured = clazz.getAnnotation(Secured.class);
        try {
            if (secured != null) {
                list.add(secured);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SecuredMethodInterceptor.a(illegalArgumentException);
        }
        for (Class<?> clazz2 : clazz.getInterfaces()) {
            SecuredMethodInterceptor.a(clazz2, list);
        }
    }

    /*
     * Exception decompiling
     */
    public Object invoke(MethodInvocation var1_1) throws Throwable {
        /*
         * 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 [43[TRYBLOCK]], but top level block is 94[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:1055)
         *     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");
    }

    @NotNull
    private OperationType a(Iterable<Entity> iterable) {
        OperationType operationType;
        OperationType operationType2 = null;
        for (Entity entity : iterable) {
            String string = entity.getId();
            OperationType operationType3 = this.a(string);
            if (operationType2 == null) {
                operationType2 = operationType3;
                continue;
            }
            try {
                if (operationType3 == operationType2) continue;
                throw new IllegalStateException(h[25]);
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw SecuredMethodInterceptor.a(illegalArgumentException);
            }
        }
        try {
            if (operationType2 == null) {
                throw new IllegalStateException(h[49]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SecuredMethodInterceptor.a(illegalArgumentException);
        }
        try {
            operationType = operationType2;
            if (operationType == null) {
                SecuredMethodInterceptor.a(0);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SecuredMethodInterceptor.a(illegalArgumentException);
        }
        return operationType;
    }

    private OperationType a(@Nullable String string) {
        OperationType operationType;
        block8: {
            block7: {
                try {
                    block6: {
                        try {
                            try {
                                if (string == null || e.equals(string)) break block6;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw SecuredMethodInterceptor.a(illegalArgumentException);
                            }
                            if (!f.equals(string)) break block7;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw SecuredMethodInterceptor.a(illegalArgumentException);
                        }
                    }
                    operationType = OperationType.CREATE;
                    break block8;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw SecuredMethodInterceptor.a(illegalArgumentException);
                }
            }
            operationType = OperationType.UPDATE;
        }
        return operationType;
    }

    private Object a(@NotNull MethodInvocation methodInvocation, @NotNull User user, @NotNull String string, @NotNull ClassLoader classLoader) throws Throwable {
        CustomRbacInterceptor customRbacInterceptor;
        try {
            if (methodInvocation == null) {
                SecuredMethodInterceptor.a(1);
            }
        }
        catch (Exception exception) {
            throw SecuredMethodInterceptor.a(exception);
        }
        try {
            if (user == null) {
                SecuredMethodInterceptor.a(2);
            }
        }
        catch (Exception exception) {
            throw SecuredMethodInterceptor.a(exception);
        }
        try {
            if (string == null) {
                SecuredMethodInterceptor.a(3);
            }
        }
        catch (Exception exception) {
            throw SecuredMethodInterceptor.a(exception);
        }
        try {
            if (classLoader == null) {
                SecuredMethodInterceptor.a(4);
            }
        }
        catch (Exception exception) {
            throw SecuredMethodInterceptor.a(exception);
        }
        try {
            customRbacInterceptor = this.a(string, classLoader);
            this.a().inject(customRbacInterceptor);
            customRbacInterceptor.setUser(user);
        }
        catch (Exception exception) {
            String[] stringArray = h;
            String string2 = stringArray[35] + string + stringArray[11] + ExceptionUtils.getMessage((Throwable)exception);
            a.log(Level.WARNING, string2, ExceptionUtils.getDebugException((Throwable)exception));
            throw new IllegalStateException(string2);
        }
        return customRbacInterceptor.invoke(methodInvocation);
    }

    private CustomRbacInterceptor a(String string, ClassLoader classLoader) {
        try {
            Class<?> clazz = classLoader.loadClass(string);
            try {
                if (!CustomRbacInterceptor.class.isAssignableFrom(clazz)) {
                    throw new ClassCastException(h[61]);
                }
            }
            catch (ClassNotFoundException classNotFoundException) {
                throw SecuredMethodInterceptor.a(classNotFoundException);
            }
            return (CustomRbacInterceptor)clazz.newInstance();
        }
        catch (ClassNotFoundException classNotFoundException) {
            String[] stringArray = h;
            throw new IllegalStateException(stringArray[51] + ExceptionUtils.getMessage((Throwable)classNotFoundException), classNotFoundException);
        }
        catch (InstantiationException instantiationException) {
            String[] stringArray = h;
            throw new IllegalStateException(stringArray[13] + ExceptionUtils.getMessage((Throwable)instantiationException), instantiationException);
        }
        catch (IllegalAccessException illegalAccessException) {
            throw new IllegalStateException(h[68] + ExceptionUtils.getMessage((Throwable)illegalAccessException), illegalAccessException);
        }
    }

    private CustomEntityTranslator b(String string, ClassLoader classLoader) {
        try {
            Class<?> clazz = classLoader.loadClass(string);
            try {
                if (!CustomEntityTranslator.class.isAssignableFrom(clazz)) {
                    throw new ClassCastException(h[63]);
                }
            }
            catch (ClassNotFoundException classNotFoundException) {
                throw SecuredMethodInterceptor.a(classNotFoundException);
            }
            return (CustomEntityTranslator)clazz.newInstance();
        }
        catch (ClassNotFoundException classNotFoundException) {
            String[] stringArray = h;
            throw new IllegalStateException(stringArray[28] + ExceptionUtils.getMessage((Throwable)classNotFoundException), classNotFoundException);
        }
        catch (InstantiationException instantiationException) {
            String[] stringArray = h;
            throw new IllegalStateException(stringArray[34] + ExceptionUtils.getMessage((Throwable)instantiationException), instantiationException);
        }
        catch (IllegalAccessException illegalAccessException) {
            throw new IllegalStateException(h[45] + ExceptionUtils.getMessage((Throwable)illegalAccessException), illegalAccessException);
        }
    }

    private Injector a() {
        return (Injector)this.g.getBean(h[39], Injector.class);
    }

    private Object a(Object object, Object object2, a a10) {
        Object object3;
        block10: {
            object3 = object;
            try {
                try {
                    if (CheckAfter.HEADER != a10.b() || !(object instanceof EntityHeader[])) break block10;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw SecuredMethodInterceptor.a(illegalArgumentException);
                }
                if (!(object2 instanceof EntityHeader[])) break block10;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw SecuredMethodInterceptor.a(illegalArgumentException);
            }
            EntityHeader[] entityHeaderArray = (EntityHeader[])object;
            EntityHeader[] entityHeaderArray2 = (EntityHeader[])object2;
            if (entityHeaderArray.length == 1) {
                object3 = entityHeaderArray[0];
            } else {
                block11: {
                    try {
                        try {
                            if (entityHeaderArray.length != 0 || entityHeaderArray2.length != 1) break block11;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw SecuredMethodInterceptor.a(illegalArgumentException);
                        }
                        throw new PermissionDeniedException(a10.f, entityHeaderArray2[0].getType());
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw SecuredMethodInterceptor.a(illegalArgumentException);
                    }
                }
                throw new IllegalStateException(h[23]);
            }
        }
        return object3;
    }

    private void a(a a10) {
        a10.a(CheckBefore.NONE);
        a10.f = OperationType.READ;
        a10.a(CheckAfter.ENTITY);
    }

    private void a(Object[] objectArray, a a10, OperationType operationType) throws FindException {
        block3: {
            block2: {
                try {
                    if (!(objectArray[0] instanceof Goid) || !(objectArray[1] instanceof String)) break block2;
                }
                catch (FindException findException) {
                    throw SecuredMethodInterceptor.a(findException);
                }
                IdentityHeader identityHeader = new IdentityHeader((Goid)objectArray[0], (String)objectArray[1], a10.b[0], null, null, null, null);
                Entity entity = this.d.find((EntityHeader)identityHeader);
                a10.a(CheckBefore.ENTITY);
                a10.f = operationType;
                a10.j = entity;
                a10.a(CheckAfter.NONE);
                break block3;
            }
            this.b(a10);
        }
    }

    private void a(a a10, Object[] objectArray, OperationType operationType) throws FindException {
        block11: {
            block12: {
                Serializable serializable = this.d(a10, objectArray);
                try {
                    if (serializable == null) {
                        this.b(a10);
                    }
                }
                catch (FindException findException) {
                    throw SecuredMethodInterceptor.a(findException);
                }
                a10.a(CheckBefore.ENTITY);
                a10.f = operationType;
                FindException findException = null;
                for (EntityType entityType : a10.b) {
                    try {
                        a10.j = this.d.find(entityType.getEntityClass(), serializable);
                        if (a10.j == null) continue;
                        break;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw SecuredMethodInterceptor.a(illegalArgumentException);
                    }
                    catch (FindException findException2) {
                        findException = findException2;
                    }
                }
                try {
                    try {
                        if (a10.j != null) break block11;
                        if (findException == null) break block12;
                    }
                    catch (FindException findException3) {
                        throw SecuredMethodInterceptor.a(findException3);
                    }
                    throw findException;
                }
                catch (FindException findException4) {
                    throw SecuredMethodInterceptor.a(findException4);
                }
            }
            throw new ObjectNotFoundException(h[65]);
        }
        a10.a(CheckAfter.NONE);
    }

    private String a(Entity entity) {
        try {
            if (entity instanceof NamedEntity) {
                return ((NamedEntity)entity).getName();
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SecuredMethodInterceptor.a(illegalArgumentException);
        }
        try {
            if (entity != null) {
                return entity.getClass().getSimpleName() + h[60] + entity.getId();
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SecuredMethodInterceptor.a(illegalArgumentException);
        }
        return h[62];
    }

    private void b(a a10, Object[] objectArray, OperationType operationType) {
        this.a(a10, objectArray);
        a.log(Level.FINER, h[71]);
        a10.a(CheckBefore.ENTITY);
        a10.f = operationType;
        a10.a(CheckAfter.NONE);
    }

    private Entity a(a a10, Object[] objectArray) {
        Entity entity = this.b(a10, objectArray);
        try {
            if (entity != null) {
                return entity;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SecuredMethodInterceptor.a(illegalArgumentException);
        }
        String[] stringArray = h;
        throw new IllegalStateException(stringArray[5] + a10.a + stringArray[36] + String.valueOf(a10.c) + stringArray[9]);
    }

    private Entity b(a a10, Object[] objectArray) {
        Object object = this.a(objectArray, a10.d);
        try {
            if (object == null) {
                return null;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SecuredMethodInterceptor.a(illegalArgumentException);
        }
        try {
            if (object instanceof Entity) {
                a10.j = (Entity)object;
                return a10.j;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SecuredMethodInterceptor.a(illegalArgumentException);
        }
        return null;
    }

    private Iterable<Entity> c(a a10, Object[] objectArray) {
        Object object = this.a(objectArray, a10.d);
        try {
            if (object == null) {
                return null;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SecuredMethodInterceptor.a(illegalArgumentException);
        }
        if (object instanceof Iterable) {
            Iterable iterable = (Iterable)object;
            for (Object t2 : iterable) {
                try {
                    if (t2 instanceof Entity) continue;
                    a.log(Level.FINEST, h[17]);
                    return null;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw SecuredMethodInterceptor.a(illegalArgumentException);
                }
            }
            a10.k = (Iterable)object;
            return a10.k;
        }
        return null;
    }

    private void b(a a10) {
        String[] stringArray = h;
        throw new IllegalStateException(stringArray[2] + a10.a + stringArray[55] + String.valueOf(a10.c) + stringArray[29]);
    }

    private Serializable d(a a10, Object[] objectArray) {
        block10: {
            Object object = this.a(objectArray, a10.d);
            try {
                if (object == null) {
                    return null;
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw SecuredMethodInterceptor.a(illegalArgumentException);
            }
            try {
                block9: {
                    try {
                        try {
                            if (object instanceof Long || object instanceof String) break block9;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw SecuredMethodInterceptor.a(illegalArgumentException);
                        }
                        if (!(object instanceof Goid)) break block10;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw SecuredMethodInterceptor.a(illegalArgumentException);
                    }
                }
                a10.i = object.toString();
                return object.toString();
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw SecuredMethodInterceptor.a(illegalArgumentException);
            }
        }
        return null;
    }

    private Object a(Object[] objectArray, int n2) {
        block9: {
            try {
                if (objectArray.length == 1) {
                    return objectArray[0];
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw SecuredMethodInterceptor.a(illegalArgumentException);
            }
            try {
                try {
                    try {
                        if (objectArray.length <= 1 || n2 < 0) break block9;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw SecuredMethodInterceptor.a(illegalArgumentException);
                    }
                    if (n2 >= objectArray.length) break block9;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw SecuredMethodInterceptor.a(illegalArgumentException);
                }
                return objectArray[n2];
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw SecuredMethodInterceptor.a(illegalArgumentException);
            }
        }
        return null;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[72];
                var3_1 = 0;
                var2_2 = "\u00182fB75{\u001e2kD=9i\u001e>%F\u0017\r2?n55h\u000b#\"N+\u0016u\u0018\u001e?D71x\u00062 92(T79n\u0013w/D&<{\u00186?H*>:\f89\u0001(5n\u00028/\u0001\u000b\t?.B.~{\f#.S\u001082?T7>:\u001c6'T pu\fw 92(T79n\u0013w/D&<{\u00186?H*>:\f89\u0001(5n\u00028/\u0001\u0011?9*C)5:\u001e8kM*3{\u001e2k8\t8&\u000e)gn\u000f4#\u000e65h\u001c29\u000e65y\u001f%\"U<\u007fh\b6(\u000e\u00165y\u001f%.E\b5n\u00028/h+$\u007f\u00184.Q1?h\u0004\u001f$.S Fw)T1py\u000b9lUe6s\u00043kd+$s\u001e.k@77o\u00072%U\u0002Jt\u0002Pw5J3$D6pt\u0005#kR55y\u000312\u0001 9n\u000229\u0001$>:\u0005'.S$$s\u00059kN7p{J$?D75u\u001e.;D0)\"8U*=:8\u0015\nbe9t\u001e29B  n\u0005%kB)1i\u0019w%N1ps\u0004$?@+$s\u000b5'D\u007fpSJ *Re>u\u001ew\u000eO19n\u0013\f\u0016\re\u0015t\u001e>?X\r5{\u000e29z\u0018pu\u0018w\u0002U \"{\b;.\u0001$>~J9$\u0001&%i\u001e8&\u00011\"{\u0004$'@1?hJ>8\u00016 \u007f\t>-H 4\u0011\u001e28U\u0006?t\f>,T71n\u00038%\u0010\u00072?I*4S\u0004!$B$$s\u00059C##.S$2v\u000fw*S\"ps\u0019w\"O31v\u00033kC 3{\u001f$.\u0001,$:\t8%U$9t\u0019w*Ue<\u007f\u000b$?\u0001*>\u007fJ9$Oh\u0015t\u001e>?X\u001082?T7>:\u001c6'T pu\fw\u001d#9?D73\u007f\u001a#.Ee9t\u001c8(@19u\u0004w$Ge+*\u0017e)?.B.\u0012\u007f\f89Dk\u0003U'\u0012kB0\"h\u000f9?M<pu\u0004;2\u00016%j\u001a89U6pU\u001a29@19u\u0004\u00032Q ~U>\u001f\u000ese1t\u000ew$U-5h%'.S$$s\u00059\u0005@(5:\u001e28U\u0006?t\f>,T71n\u00038%\u0012J *Re>u\u001ew*Oe\u0015t\u001e>?XR)?.B.py\u0005;'D&$s\u00059kC 6u\u00182kB$>t\u0005#kC pj\u000f%-N7=\u007f\u000ew)D&1o\u00192kU-5:\u000f9?H19\u007f\u0019w?Ne3r\u000f4 \u0001$\"\u007fJ9>M)\u001f?9*C)5:\u001e8kT+'h\u000b'kI 1~\u000f%kS #o\u0006#e2J>%W*;\u007f\u000ew<H18:9\")K 3nJ4$O11s\u0004>%Fe>uJ\u00028D7pj\u0018>%B, {\u0006F##.S$2v\u000fw(@+>u\u001ew(N+${\u00039k@e=s\u0012w$Ge \u007f\u0018$\"R15~J6%Ee>u\u0004w;D7#s\u0019#.Ee5t\u001e>?H #4\u001b\u00039=N.5M\u0003##b0#n\u0005:\u0002O15h\t2;U*\"R?$.Se9iJ'.S(9n\u001e2/\u00011?:\u0011g6\u0001$>cJ,z\\~pw\u000b.kC p{\b;.\u00011?:\u0019<\"Qe9t\u000e>=H!%{\u0006w;D7=s\u0019$\"N+py\u00022(J6*)\"8U*=:\u000f9?H1):\u001e%*O6<{\u001e89\u0001&<{\u0019$kO*$:\f8>O!j:(Fw)T1py\u000b9lUe6s\u00043k@5 h\u0005'9H$$\u007fJ69F0=\u007f\u0004#cRl\u001c:29L,$n\u000f3kZu-:\u00059kZt-:\f89\u0001>bg3'\"'U, v\u000fw(N+6v\u00034?H+7:\u00072?I*4:\u0019#.S ?n\u0013'.Re6u\u0018w&D18u\u000ew>+%,T(5t\u001ew-N7pZ$8?o0<vJ'*S$=\u007f\u001e29\u0001buiMw$GeuiDr8\u0001(%i\u001ew%N1px\u000fw%T)<\u000f\t?.B.~u\u001a29@19u\u00041)\"8U*=:\u000f9?H1):\u001e%*O6<{\u001e89\u0001&<{\u0019$kO*$:\u000398U$>n\u00036)M j:)?9*C)5:\u001e8kB75{\u001e2kB0#n\u0005:ks\u0007\u0011YJ>%U \"y\u000f'?N7p\u000bJ$;D&9|\u000328\u0001\u0011\u001e28U\u0006?t\f>,T71n\u00038%**\u0019$U\u000b%v\u0006w&D18u\u000ewnRkuiJ:>R1pt\u0005#kS $o\u00189kO0<v\b\u00039!D&$u\u0018u/;.L >nJ8-\u0001&?v\u00062(U,?tJ *Re>\u007f\u0003##D7p_\u0004#\"U<pt\u0005%kd+$s\u001e.\u0003D$4\u007f\u0018wc@+4:\u00048kD+$s\u001e.\u001fS$>i\u00066?N7p{\u00043dN7p\u007f\u0004#\"U<\u0016s\u00043.Se'{\u0019w*W$9v\u000b5'Dl1)8>M!pt\u0005#kG,>~J23H6$s\u00040kD+$s\u001e.kG*\":\u001f'/@15:\t?.B.j:\u001a\t\"8U*=S\u0004#.S&5j\u001e89b)1i\u0019\u0019*L \u000f92(T75~J:.U-?~J\f\t?.B.~x\u000f1$S /)\"8U*=:\u000f9?H1):\u001e%*O6<{\u001e89\u0001&<{\u0019$kO*$:\u000b4(D6#s\b;.\u001be6J9.D!#:\u001e8kB-5y\u0001w\u0002eipx\u001f#kL0<n\u0003''De\u0015t\u001e>?X\u0011)j\u000f$kR55y\u00031\"D!M'89De$r\u000b9kN+5:\u000e2(M$\"\u007f\u000ew\u000br 3o\u00182/\u0001&%i\u001e8&h+$\u007f\u00184.Q1?h);*R6\u001e{\u00072k@5 v\u000328\u00011?:\u00072?I*4:R'89De$r\u000b9kN+5:\u000e2(M$\"\u007f\u000ew\u000br 3o\u00182/\u0001&%i\u001e8&d+$s\u001e.\u001fS$>i\u00066?N7\u0013v\u000b$8o$=\u007fJ6;Q)9\u007f\u0019w?Ne=\u007f\u001e?$EeM?9*C)5:\u001e8kE $\u007f\u0018:\"O pi\u000b!.\u0001*\":\u001f'/@15:\u0005'.S$$s\u00059kG*\":\u0003#.S$2v\u000fw)D&1o\u00192kH1ps\u0019w.L5$c8\t8&\u000e)gn\u000f4#\u000e65h\u001c29\u000e65y\u001f%\"U<\u007fh\b6(\u000e\u00165y\u001f%.E\b5n\u00028/h+$\u007f\u00184.Q1?h))\"8U*=:8\u0015\nbe9t\u001e29B  n\u0005%kB)1i\u0019w%N1p|\u0005\"%E\u007fp\f\t?.B.~\u007f\u0004#\"U<\"J$;D&9|\u000328\u00010>i\u001f';N7$\u007f\u000ew8U \"\u007f\u0005#2Q p>\t?.B.~{\f#.Se'{\u0019w\u0003d\u0004\u0014_8w)T1ph\u000f#>S+pl\u000b;>De9iJ9$Ue1tJ\u0012%U,$c\"2*E \"\u000bJ$;D&9|\u000328\u0001\u001992(T79n\u0013w/D&<{\u00186?H*>:\f89\u0001\b\t?.B.~s\u000e*%:\"U19t\rw0\u00118p9\u0011f6\u0001#\"u\u0007w9D1%h\u0004w=@)%\u007fJ8-\u0001>bgM?$.Se4u\u000f$kO*$:\u00026=De \u007f\u0018:\"R69u\u0004w?Ne3h\u000f6?Diph\u000f6/\re%j\u000e6?Dipu\u0018w/D)5n\u000fw*O<pu\fw?X55:\u0002JtC)\"8U*=:8\u0015\nbe9t\u001e29B  n\u0005%kH6pt\u0005#k@+ps\u0004$?@+3\u007fJ8-\u0001\u0006%i\u001e8&s'1y#9?D73\u007f\u001a#$S\tV\"%J+?m\u0004iE)\"8U*=:\u000f9?H1):\u001e%*O6<{\u001e89\u0001,#:\u00048?\u0001$>:\u000398U$>y\u000fw$Ge\u0013o\u0019#$L\u0000>n\u0003#2u71t\u0019;*U*\"\u0011?9*C)5:\u001e8kG,<n\u000f%k&/9?H1):\u00048?\u0001#?o\u00043kG*\":\u000b92\u0001!5y\u000669D!pn\u0013'.\u000b\t;*R6\u001cu\u000b3.S\u001992(T79n\u0013w/D&<{\u00186?H*>:\f89\u0001.)\"8U*=:8\u0015\nbe9t\u001e29B  n\u0005%kB)1i\u0019w%N1p{\t4.R69x\u00062q\u0001\u001c:29L,$n\u000f3kZu-:\u00059kZt-:\f89\u0001>bg";
                var4_3 = "\u00182fB75{\u001e2kD=9i\u001e>%F\u0017\r2?n55h\u000b#\"N+\u0016u\u0018\u001e?D71x\u00062 92(T79n\u0013w/D&<{\u00186?H*>:\f89\u0001(5n\u00028/\u0001\u000b\t?.B.~{\f#.S\u001082?T7>:\u001c6'T pu\fw 92(T79n\u0013w/D&<{\u00186?H*>:\f89\u0001(5n\u00028/\u0001\u0011?9*C)5:\u001e8kM*3{\u001e2k8\t8&\u000e)gn\u000f4#\u000e65h\u001c29\u000e65y\u001f%\"U<\u007fh\b6(\u000e\u00165y\u001f%.E\b5n\u00028/h+$\u007f\u00184.Q1?h\u0004\u001f$.S Fw)T1py\u000b9lUe6s\u00043kd+$s\u001e.k@77o\u00072%U\u0002Jt\u0002Pw5J3$D6pt\u0005#kR55y\u000312\u0001 9n\u000229\u0001$>:\u0005'.S$$s\u00059kN7p{J$?D75u\u001e.;D0)\"8U*=:8\u0015\nbe9t\u001e29B  n\u0005%kB)1i\u0019w%N1ps\u0004$?@+$s\u000b5'D\u007fpSJ *Re>u\u001ew\u000eO19n\u0013\f\u0016\re\u0015t\u001e>?X\r5{\u000e29z\u0018pu\u0018w\u0002U \"{\b;.\u0001$>~J9$\u0001&%i\u001e8&\u00011\"{\u0004$'@1?hJ>8\u00016 \u007f\t>-H 4\u0011\u001e28U\u0006?t\f>,T71n\u00038%\u0010\u00072?I*4S\u0004!$B$$s\u00059C##.S$2v\u000fw*S\"ps\u0019w\"O31v\u00033kC 3{\u001f$.\u0001,$:\t8%U$9t\u0019w*Ue<\u007f\u000b$?\u0001*>\u007fJ9$Oh\u0015t\u001e>?X\u001082?T7>:\u001c6'T pu\fw\u001d#9?D73\u007f\u001a#.Ee9t\u001c8(@19u\u0004w$Ge+*\u0017e)?.B.\u0012\u007f\f89Dk\u0003U'\u0012kB0\"h\u000f9?M<pu\u0004;2\u00016%j\u001a89U6pU\u001a29@19u\u0004\u00032Q ~U>\u001f\u000ese1t\u000ew$U-5h%'.S$$s\u00059\u0005@(5:\u001e28U\u0006?t\f>,T71n\u00038%\u0012J *Re>u\u001ew*Oe\u0015t\u001e>?XR)?.B.py\u0005;'D&$s\u00059kC 6u\u00182kB$>t\u0005#kC pj\u000f%-N7=\u007f\u000ew)D&1o\u00192kU-5:\u000f9?H19\u007f\u0019w?Ne3r\u000f4 \u0001$\"\u007fJ9>M)\u001f?9*C)5:\u001e8kT+'h\u000b'kI 1~\u000f%kS #o\u0006#e2J>%W*;\u007f\u000ew<H18:9\")K 3nJ4$O11s\u0004>%Fe>uJ\u00028D7pj\u0018>%B, {\u0006F##.S$2v\u000fw(@+>u\u001ew(N+${\u00039k@e=s\u0012w$Ge \u007f\u0018$\"R15~J6%Ee>u\u0004w;D7#s\u0019#.Ee5t\u001e>?H #4\u001b\u00039=N.5M\u0003##b0#n\u0005:\u0002O15h\t2;U*\"R?$.Se9iJ'.S(9n\u001e2/\u00011?:\u0011g6\u0001$>cJ,z\\~pw\u000b.kC p{\b;.\u00011?:\u0019<\"Qe9t\u000e>=H!%{\u0006w;D7=s\u0019$\"N+py\u00022(J6*)\"8U*=:\u000f9?H1):\u001e%*O6<{\u001e89\u0001&<{\u0019$kO*$:\f8>O!j:(Fw)T1py\u000b9lUe6s\u00043k@5 h\u0005'9H$$\u007fJ69F0=\u007f\u0004#cRl\u001c:29L,$n\u000f3kZu-:\u00059kZt-:\f89\u0001>bg3'\"'U, v\u000fw(N+6v\u00034?H+7:\u00072?I*4:\u0019#.S ?n\u0013'.Re6u\u0018w&D18u\u000ew>+%,T(5t\u001ew-N7pZ$8?o0<vJ'*S$=\u007f\u001e29\u0001buiMw$GeuiDr8\u0001(%i\u001ew%N1px\u000fw%T)<\u000f\t?.B.~u\u001a29@19u\u00041)\"8U*=:\u000f9?H1):\u001e%*O6<{\u001e89\u0001&<{\u0019$kO*$:\u000398U$>n\u00036)M j:)?9*C)5:\u001e8kB75{\u001e2kB0#n\u0005:ks\u0007\u0011YJ>%U \"y\u000f'?N7p\u000bJ$;D&9|\u000328\u0001\u0011\u001e28U\u0006?t\f>,T71n\u00038%**\u0019$U\u000b%v\u0006w&D18u\u000ewnRkuiJ:>R1pt\u0005#kS $o\u00189kO0<v\b\u00039!D&$u\u0018u/;.L >nJ8-\u0001&?v\u00062(U,?tJ *Re>\u007f\u0003##D7p_\u0004#\"U<pt\u0005%kd+$s\u001e.\u0003D$4\u007f\u0018wc@+4:\u00048kD+$s\u001e.\u001fS$>i\u00066?N7p{\u00043dN7p\u007f\u0004#\"U<\u0016s\u00043.Se'{\u0019w*W$9v\u000b5'Dl1)8>M!pt\u0005#kG,>~J23H6$s\u00040kD+$s\u001e.kG*\":\u001f'/@15:\t?.B.j:\u001a\t\"8U*=S\u0004#.S&5j\u001e89b)1i\u0019\u0019*L \u000f92(T75~J:.U-?~J\f\t?.B.~x\u000f1$S /)\"8U*=:\u000f9?H1):\u001e%*O6<{\u001e89\u0001&<{\u0019$kO*$:\u000b4(D6#s\b;.\u001be6J9.D!#:\u001e8kB-5y\u0001w\u0002eipx\u001f#kL0<n\u0003''De\u0015t\u001e>?X\u0011)j\u000f$kR55y\u00031\"D!M'89De$r\u000b9kN+5:\u000e2(M$\"\u007f\u000ew\u000br 3o\u00182/\u0001&%i\u001e8&h+$\u007f\u00184.Q1?h);*R6\u001e{\u00072k@5 v\u000328\u00011?:\u00072?I*4:R'89De$r\u000b9kN+5:\u000e2(M$\"\u007f\u000ew\u000br 3o\u00182/\u0001&%i\u001e8&d+$s\u001e.\u001fS$>i\u00066?N7\u0013v\u000b$8o$=\u007fJ6;Q)9\u007f\u0019w?Ne=\u007f\u001e?$EeM?9*C)5:\u001e8kE $\u007f\u0018:\"O pi\u000b!.\u0001*\":\u001f'/@15:\u0005'.S$$s\u00059kG*\":\u0003#.S$2v\u000fw)D&1o\u00192kH1ps\u0019w.L5$c8\t8&\u000e)gn\u000f4#\u000e65h\u001c29\u000e65y\u001f%\"U<\u007fh\b6(\u000e\u00165y\u001f%.E\b5n\u00028/h+$\u007f\u00184.Q1?h))\"8U*=:8\u0015\nbe9t\u001e29B  n\u0005%kB)1i\u0019w%N1p|\u0005\"%E\u007fp\f\t?.B.~\u007f\u0004#\"U<\"J$;D&9|\u000328\u00010>i\u001f';N7$\u007f\u000ew8U \"\u007f\u0005#2Q p>\t?.B.~{\f#.Se'{\u0019w\u0003d\u0004\u0014_8w)T1ph\u000f#>S+pl\u000b;>De9iJ9$Ue1tJ\u0012%U,$c\"2*E \"\u000bJ$;D&9|\u000328\u0001\u001992(T79n\u0013w/D&<{\u00186?H*>:\f89\u0001\b\t?.B.~s\u000e*%:\"U19t\rw0\u00118p9\u0011f6\u0001#\"u\u0007w9D1%h\u0004w=@)%\u007fJ8-\u0001>bgM?$.Se4u\u000f$kO*$:\u00026=De \u007f\u0018:\"R69u\u0004w?Ne3h\u000f6?Diph\u000f6/\re%j\u000e6?Dipu\u0018w/D)5n\u000fw*O<pu\fw?X55:\u0002JtC)\"8U*=:8\u0015\nbe9t\u001e29B  n\u0005%kH6pt\u0005#k@+ps\u0004$?@+3\u007fJ8-\u0001\u0006%i\u001e8&s'1y#9?D73\u007f\u001a#$S\tV\"%J+?m\u0004iE)\"8U*=:\u000f9?H1):\u001e%*O6<{\u001e89\u0001,#:\u00048?\u0001$>:\u000398U$>y\u000fw$Ge\u0013o\u0019#$L\u0000>n\u0003#2u71t\u0019;*U*\"\u0011?9*C)5:\u001e8kG,<n\u000f%k&/9?H1):\u00048?\u0001#?o\u00043kG*\":\u000b92\u0001!5y\u000669D!pn\u0013'.\u000b\t;*R6\u001cu\u000b3.S\u001992(T79n\u0013w/D&<{\u00186?H*>:\f89\u0001.)\"8U*=:8\u0015\nbe9t\u001e29B  n\u0005%kB)1i\u0019w%N1p{\t4.R69x\u00062q\u0001\u001c:29L,$n\u000f3kZu-:\u00059kZt-:\f89\u0001>bg".length();
                var1_4 = 18;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = SecuredMethodInterceptor.a(v0, SecuredMethodInterceptor.b(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "\u001act\u0014f $Us;\u0002ee)SabQtnj_io\u0018ayjN~k\u0014#mnw\u001d5c\"_dpQPn>SsbQwe,Uu~Q|n<Udz\u0005|o$";
                    var4_3 = "\u001act\u0014f $Us;\u0002ee)SabQtnj_io\u0018ayjN~k\u0014#mnw\u001d5c\"_dpQPn>SsbQwe,Uu~Q|n<Udz\u0005|o$".length();
                    var1_4 = 32;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 111;
                        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++] = SecuredMethodInterceptor.a(v0, SecuredMethodInterceptor.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;
            }
        }
        SecuredMethodInterceptor.h = var5;
        SecuredMethodInterceptor.b = SecuredMethodInterceptor.h[37];
        SecuredMethodInterceptor.a = Logger.getLogger(SecuredMethodInterceptor.class.getName());
        SecuredMethodInterceptor.e = Long.toString(-1L);
        SecuredMethodInterceptor.f = PersistentEntity.DEFAULT_GOID.toString();
    }

    /*
     * 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 Throwable a(Throwable throwable) {
        return throwable;
    }

    private static char[] b(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x25);
        }
        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 -> 85;
                    case 1 -> 104;
                    case 2 -> 116;
                    case 3 -> 30;
                    case 4 -> 122;
                    case 5 -> 111;
                    default -> 37;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

