/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.Entity
 *  com.l7tech.objectmodel.EntityHeader
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.search.Dependency$DependencyType
 *  com.l7tech.search.Dependency$MethodReturnType
 *  com.l7tech.util.Either
 *  com.l7tech.util.Functions
 *  com.l7tech.util.Functions$Unary
 *  com.l7tech.util.Option
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 */
package com.l7tech.server.search.processors;

import com.l7tech.objectmodel.Entity;
import com.l7tech.objectmodel.EntityHeader;
import com.l7tech.objectmodel.FindException;
import com.l7tech.search.Dependency;
import com.l7tech.server.EntityHeaderUtils;
import com.l7tech.server.search.PropertiesUtil;
import com.l7tech.server.search.exceptions.CannotReplaceDependenciesException;
import com.l7tech.server.search.exceptions.CannotRetrieveDependenciesException;
import com.l7tech.server.search.objects.BrokenDependency;
import com.l7tech.server.search.objects.Dependency;
import com.l7tech.server.search.objects.DependencySearchResults;
import com.l7tech.server.search.objects.DependentEntity;
import com.l7tech.server.search.objects.DependentObject;
import com.l7tech.server.search.processors.DependencyProcessorStore;
import com.l7tech.server.search.processors.ab;
import com.l7tech.server.search.processors.v;
import com.l7tech.util.Either;
import com.l7tech.util.Functions;
import com.l7tech.util.Option;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/*
 * Exception performing whole class analysis ignored.
 */
public class DependencyFinder {
    @NotNull
    private final HashSet<Dependency> a;
    @NotNull
    private final Map<String, Object> b;
    private int c;
    @NotNull
    private final DependencyProcessorStore d;
    private static final Logger e;
    private static final String[] f;

    public DependencyFinder(@NotNull Map<String, Object> map, @NotNull DependencyProcessorStore dependencyProcessorStore) {
        if (map == null) {
            DependencyFinder.a(0);
        }
        if (dependencyProcessorStore == null) {
            DependencyFinder.a(1);
        }
        this.b = map;
        this.d = dependencyProcessorStore;
        this.a = new HashSet();
    }

    @NotNull
    public synchronized List<DependencySearchResults> process(@NotNull List<FindResults> list) throws FindException, CannotRetrieveDependenciesException {
        ArrayList<DependencySearchResults> arrayList;
        try {
            if (list == null) {
                DependencyFinder.a(2);
            }
        }
        catch (FindException findException) {
            throw DependencyFinder.a(findException);
        }
        int n2 = this.a(f[3], Integer.class, -1);
        ArrayList<DependencySearchResults> arrayList2 = new ArrayList<DependencySearchResults>(list.size());
        for (FindResults findResults : list) {
            if (!findResults.hasEntity()) continue;
            this.c = n2;
            Dependency dependency = this.a(findResults);
            try {
                if (dependency != null) {
                    arrayList2.add(new DependencySearchResults(dependency.getDependent(), dependency.getDependencies(), this.b));
                    continue;
                }
            }
            catch (FindException findException) {
                throw DependencyFinder.a(findException);
            }
            arrayList2.add(null);
        }
        try {
            arrayList = arrayList2;
            if (arrayList == null) {
                DependencyFinder.a(3);
            }
        }
        catch (FindException findException) {
            throw DependencyFinder.a(findException);
        }
        return arrayList;
    }

    public synchronized <O> void replaceDependencies(@NotNull O o2, @NotNull Map<EntityHeader, EntityHeader> map, boolean bl2) throws CannotReplaceDependenciesException {
        try {
            if (o2 == null) {
                DependencyFinder.a(4);
            }
        }
        catch (CannotReplaceDependenciesException cannotReplaceDependenciesException) {
            throw DependencyFinder.a(cannotReplaceDependenciesException);
        }
        try {
            if (map == null) {
                DependencyFinder.a(5);
            }
        }
        catch (CannotReplaceDependenciesException cannotReplaceDependenciesException) {
            throw DependencyFinder.a(cannotReplaceDependenciesException);
        }
        ab ab2 = this.d.a(o2);
        ab2.replaceDependencies(o2, map, this, bl2);
    }

    @Nullable
    Dependency a(@NotNull FindResults findResults) throws FindException, CannotRetrieveDependenciesException {
        Dependency dependency;
        block32: {
            List list;
            block31: {
                block30: {
                    boolean bl2;
                    block29: {
                        String[] stringArray;
                        block28: {
                            try {
                                if (findResults == null) {
                                    DependencyFinder.a(6);
                                }
                            }
                            catch (FindException findException) {
                                throw DependencyFinder.a(findException);
                            }
                            try {
                                if (!findResults.isSome()) {
                                    return null;
                                }
                            }
                            catch (FindException findException) {
                                throw DependencyFinder.a(findException);
                            }
                            try {
                                if (findResults.hasEntityHeader()) {
                                    return new BrokenDependency(findResults.getEntityHeader());
                                }
                            }
                            catch (FindException findException) {
                                throw DependencyFinder.a(findException);
                            }
                            Dependency dependency2 = this.e(findResults.getEntity());
                            try {
                                if (dependency2 != null) {
                                    return dependency2;
                                }
                            }
                            catch (FindException findException) {
                                throw DependencyFinder.a(findException);
                            }
                            dependency = new Dependency(this.createDependentObject(findResults.getEntity()));
                            stringArray = f;
                            List list2 = this.a(stringArray[40], List.class, Collections.emptyList());
                            try {
                                try {
                                    if (!(dependency.getDependent() instanceof DependentEntity) || !list2.contains(((DependentEntity)dependency.getDependent()).getEntityHeader().getStrId())) break block28;
                                }
                                catch (FindException findException) {
                                    throw DependencyFinder.a(findException);
                                }
                                return null;
                            }
                            catch (FindException findException) {
                                throw DependencyFinder.a(findException);
                            }
                        }
                        stringArray = f;
                        list = this.a(stringArray[41], List.class, Collections.emptyList());
                        bl2 = true;
                        boolean bl3 = PropertiesUtil.getOption(stringArray[14], Boolean.class, false, this.b);
                        try {
                            try {
                                try {
                                    if (!bl3 || dependency.getDependent().getDependencyType().toString().equals(stringArray[5])) break block29;
                                }
                                catch (FindException findException) {
                                    throw DependencyFinder.a(findException);
                                }
                                if (dependency.getDependent().getDependencyType().toString().equals(f[19])) break block29;
                            }
                            catch (FindException findException) {
                                throw DependencyFinder.a(findException);
                            }
                            if (dependency.getDependent().getDependencyType().toString().equals(f[23])) break block29;
                        }
                        catch (FindException findException) {
                            throw DependencyFinder.a(findException);
                        }
                        bl2 = false;
                    }
                    try {
                        if (!bl2) break block30;
                        this.a.add(dependency);
                        break block31;
                    }
                    catch (FindException findException) {
                        throw DependencyFinder.a(findException);
                    }
                }
                return null;
            }
            try {
                try {
                    if (this.c == 0 || list.contains(this.b(findResults))) break block32;
                }
                catch (FindException findException) {
                    throw DependencyFinder.a(findException);
                }
                --this.c;
                dependency.setDependencies(this.c(findResults.getEntity()));
            }
            catch (FindException findException) {
                throw DependencyFinder.a(findException);
            }
        }
        return dependency;
    }

    @Nullable
    private EntityHeader b(@NotNull FindResults findResults) {
        Object object;
        block8: {
            block7: {
                try {
                    if (findResults == null) {
                        DependencyFinder.a(7);
                    }
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw DependencyFinder.a(illegalArgumentException);
                }
                try {
                    if (!findResults.hasEntityHeader()) break block7;
                    object = findResults.getEntityHeader();
                    break block8;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw DependencyFinder.a(illegalArgumentException);
                }
            }
            try {
                object = findResults.getEntity() instanceof Entity ? EntityHeaderUtils.fromEntity((Entity)findResults.getEntity()) : null;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw DependencyFinder.a(illegalArgumentException);
            }
        }
        return object;
    }

    @NotNull
    List<Dependency> a(@Nullable Object object) throws FindException, CannotRetrieveDependenciesException {
        List<Dependency> list;
        block13: {
            List<Dependency> list2;
            block14: {
                block11: {
                    List<Dependency> list3;
                    block12: {
                        try {
                            try {
                                if (object != null) break block11;
                                list3 = Collections.emptyList();
                                if (list3 != null) break block12;
                            }
                            catch (FindException findException) {
                                throw DependencyFinder.a(findException);
                            }
                            DependencyFinder.a(8);
                        }
                        catch (FindException findException) {
                            throw DependencyFinder.a(findException);
                        }
                    }
                    return list3;
                }
                try {
                    try {
                        if (this.d(object)) break block13;
                        list2 = Collections.emptyList();
                        if (list2 != null) break block14;
                    }
                    catch (FindException findException) {
                        throw DependencyFinder.a(findException);
                    }
                    DependencyFinder.a(9);
                }
                catch (FindException findException) {
                    throw DependencyFinder.a(findException);
                }
            }
            return list2;
        }
        ab ab2 = this.d.a(object);
        try {
            e.log(Level.FINE, () -> f[45] + this.b(object) + ")");
            list = ab2.findDependencies(object, this);
            if (list == null) {
                DependencyFinder.a(10);
            }
        }
        catch (FindException findException) {
            throw DependencyFinder.a(findException);
        }
        return list;
    }

    private String b(Object object) {
        String[] stringArray = f;
        String string = stringArray[0] + object.toString();
        if (object instanceof Entity) {
            string = string + stringArray[4] + ((Entity)object).getId();
        }
        return string;
    }

    @NotNull
    List<Dependency> c(@Nullable Object object) throws CannotRetrieveDependenciesException, FindException {
        List<Dependency> list;
        List<Dependency> list2 = this.a(object);
        if (list2.size() > 1) {
            List<Dependency> list3;
            List<Dependency> list4;
            Stream stream = list2.stream();
            try {
                list4 = stream.distinct().collect(Collectors.toList());
            }
            catch (Throwable throwable) {
                if (stream != null) {
                    try {
                        stream.close();
                    }
                    catch (Throwable throwable2) {
                        throwable.addSuppressed(throwable2);
                    }
                }
                throw throwable;
            }
            try {
                if (stream != null) {
                    stream.close();
                }
            }
            catch (Throwable throwable) {
                throw DependencyFinder.a(throwable);
            }
            try {
                list3 = list4;
                if (list3 == null) {
                    DependencyFinder.a(11);
                }
            }
            catch (Throwable throwable) {
                throw DependencyFinder.a(throwable);
            }
            return list3;
        }
        try {
            list = list2;
            if (list == null) {
                DependencyFinder.a(12);
            }
        }
        catch (Throwable throwable) {
            throw DependencyFinder.a(throwable);
        }
        return list;
    }

    private boolean d(Object object) {
        List list = this.a(f[26], List.class, Collections.emptyList());
        try {
            if (list.isEmpty()) {
                return true;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DependencyFinder.a(illegalArgumentException);
        }
        try {
            if (object instanceof Entity) {
                return list.contains(EntityHeaderUtils.fromEntity((Entity)object).getType());
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DependencyFinder.a(illegalArgumentException);
        }
        return false;
    }

    @NotNull
    <C, T extends Class<C>> C a(@NotNull String string, @NotNull T t2, @NotNull C c10) {
        C c11;
        try {
            if (string == null) {
                DependencyFinder.a(13);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DependencyFinder.a(illegalArgumentException);
        }
        try {
            if (t2 == null) {
                DependencyFinder.a(14);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DependencyFinder.a(illegalArgumentException);
        }
        try {
            if (c10 == null) {
                DependencyFinder.a(15);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DependencyFinder.a(illegalArgumentException);
        }
        try {
            c11 = PropertiesUtil.getOption(string, t2, c10, this.b);
            if (c11 == null) {
                DependencyFinder.a(16);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DependencyFinder.a(illegalArgumentException);
        }
        return c11;
    }

    @NotNull
    public List<FindResults> retrieveObjects(@NotNull Object object, @NotNull Dependency.DependencyType dependencyType, @NotNull Dependency.MethodReturnType methodReturnType) throws FindException {
        List<FindResults> list;
        try {
            if (object == null) {
                DependencyFinder.a(17);
            }
        }
        catch (FindException findException) {
            throw DependencyFinder.a(findException);
        }
        try {
            if (dependencyType == null) {
                DependencyFinder.a(18);
            }
        }
        catch (FindException findException) {
            throw DependencyFinder.a(findException);
        }
        try {
            if (methodReturnType == null) {
                DependencyFinder.a(19);
            }
        }
        catch (FindException findException) {
            throw DependencyFinder.a(findException);
        }
        ab ab2 = Dependency.MethodReturnType.ENTITY.equals((Object)methodReturnType) ? this.d.a(object) : this.d.a(dependencyType);
        try {
            list = ab2.find(object, dependencyType, methodReturnType);
            if (list == null) {
                DependencyFinder.a(20);
            }
        }
        catch (FindException findException) {
            throw DependencyFinder.a(findException);
        }
        return list;
    }

    @NotNull
    public DependentObject createDependentObject(@NotNull Object object) {
        DependentObject dependentObject;
        try {
            if (object == null) {
                DependencyFinder.a(21);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DependencyFinder.a(illegalArgumentException);
        }
        ab ab2 = this.d.a(object);
        try {
            dependentObject = ab2.createDependentObject(object);
            if (dependentObject == null) {
                DependencyFinder.a(22);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DependencyFinder.a(illegalArgumentException);
        }
        return dependentObject;
    }

    @Nullable
    private Dependency e(@NotNull Object object) {
        try {
            if (object == null) {
                DependencyFinder.a(23);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DependencyFinder.a(illegalArgumentException);
        }
        DependentObject dependentObject = this.createDependentObject(object);
        return (Dependency)Functions.grepFirst(this.a, (Functions.Unary)new v(this, dependentObject));
    }

    @NotNull
    public List<Dependency> getDependenciesFromObjects(@NotNull Object object, @NotNull DependencyFinder dependencyFinder, @NotNull List<FindResults> list) throws FindException, CannotRetrieveDependenciesException {
        ArrayList<Dependency> arrayList;
        try {
            if (object == null) {
                DependencyFinder.a(24);
            }
        }
        catch (FindException findException) {
            throw DependencyFinder.a(findException);
        }
        try {
            if (dependencyFinder == null) {
                DependencyFinder.a(25);
            }
        }
        catch (FindException findException) {
            throw DependencyFinder.a(findException);
        }
        try {
            if (list == null) {
                DependencyFinder.a(26);
            }
        }
        catch (FindException findException) {
            throw DependencyFinder.a(findException);
        }
        ArrayList<Dependency> arrayList2 = new ArrayList<Dependency>();
        for (FindResults findResults : list) {
            if (object.equals((Object)findResults)) continue;
            Dependency dependency = dependencyFinder.a(findResults);
            try {
                if (dependency == null) continue;
                arrayList2.add(dependency);
            }
            catch (FindException findException) {
                throw DependencyFinder.a(findException);
            }
        }
        try {
            arrayList = arrayList2;
            if (arrayList == null) {
                DependencyFinder.a(27);
            }
        }
        catch (FindException findException) {
            throw DependencyFinder.a(findException);
        }
        return arrayList;
    }

    @NotNull
    List<DependentObject> a(@NotNull Object object, @NotNull Dependency.DependencyType dependencyType, @NotNull Dependency.MethodReturnType methodReturnType) throws CannotRetrieveDependenciesException {
        List<DependentObject> list;
        try {
            if (object == null) {
                DependencyFinder.a(28);
            }
        }
        catch (CannotRetrieveDependenciesException cannotRetrieveDependenciesException) {
            throw DependencyFinder.a(cannotRetrieveDependenciesException);
        }
        try {
            if (dependencyType == null) {
                DependencyFinder.a(29);
            }
        }
        catch (CannotRetrieveDependenciesException cannotRetrieveDependenciesException) {
            throw DependencyFinder.a(cannotRetrieveDependenciesException);
        }
        try {
            if (methodReturnType == null) {
                DependencyFinder.a(30);
            }
        }
        catch (CannotRetrieveDependenciesException cannotRetrieveDependenciesException) {
            throw DependencyFinder.a(cannotRetrieveDependenciesException);
        }
        ab ab2 = Dependency.MethodReturnType.ENTITY.equals((Object)methodReturnType) ? this.d.a(object) : this.d.a(dependencyType);
        try {
            list = ab2.createDependentObjects(object, dependencyType, methodReturnType);
            if (list == null) {
                DependencyFinder.a(31);
            }
        }
        catch (CannotRetrieveDependenciesException cannotRetrieveDependenciesException) {
            throw DependencyFinder.a(cannotRetrieveDependenciesException);
        }
        return list;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[46];
                var3_1 = 0;
                var2_2 = "\u0015i$<Q>:z.,\u0001r^\u000f(/6\u001e7p5g=\u0017\u0019{\\[x(+\rzU\u000fm;yK2C\\(&?L2CU-:y\u0001bC\u000f('6\u00187R\u001e(',\u0000{4\u0018g$v\u0000 D\u001ek!v\u001frB\rm;v\u001frQ\tk!v\u001ce_\u0018m:*\u0003eCTL,)\tyT\u001ef* *~^\u001fm;\u000b\bm(+\u000f\u007ft\u001ex=1\u0006[O&0\b*\u0007(M\u001b\u000f%Tu\r\bm(+\u000f\u007f\u007f\u000b| 6\u0002d\u000e\u001fm9<\u0002sU\u0015k0\r\u0015gU\u000f\tm=+\u0005rF\u001eG+3\ttD\b\u0015\u001cm=\f\u0002~A\u000em\r<\u001cr^\u001fm':\u0005rC\u001a\u001cm=\u001d\tgU\u0015l,7\u000f~U\bN;6\u0001XR\u0011m*-\u001f\b\u001ef=0\u0018~U\b\u0015\u0018z,8\u0018rt\u001ex,7\br^\u000fG+3\ttD\u000e\u000bz&:\tdC\u0014z\u001a-\u0003eU\u001e2f*5\u0019sU4f% ?rB\ra*<<x\\\u0012k0\u0016\u001ccY\u0014f\u000f\tm=+\u0005rF\u001eG+3\ttD\b\t\u0014x=0\u0003y{\u001eq\u000e\tm95\rtU\u0016m'-!v@\t\u001cm=\u0016\u001ccY\u0014f\u0006+G\u0005\u0010/N*;F&-\"b\\\u0017($<\u0018\u007f_\u001f(l*B2C[e<*\u00187^\u0014|i+\tcE\tfi7\u0019{\\\u0006\u001da'=\te\u0006Ga'0\u0018)\u0006=G\u0005\u001d)E\t\u001fm9<\u0002sU\u0015|\u000b\bm(+\u000f\u007ff\u001ad<<\u0010\bm(+\u000f\u007fu\u0015| -\u0015CI\u000bm\u0004\u000fq9<\u000f\bm(+\u000f\u007ff\u001ad<<8n@\u001e\t\u001cm=\u0016\u001ccY\u0014f4\u0018g$v\u0000 D\u001ek!v\u001frB\rm;v\u001frQ\tk!v\u001ce_\u0018m:*\u0003eCTL,)\tyT\u001ef* *~^\u001fm;\u001a\u001cm=\u001d\tgU\u0015l,7\u000f~U\bN;6\u0001XR\u0011m*-\u001f\t\u001cm=\u0011\tvT\u001ez\u0010\u001fm9<\u0002sU\u0015|\u0006;\u0006rS\u000f{\f\u001fm/8\u0019{D-i%,\t\u000f\u001cm=\u001d\tgU\u0015l,7\u000f~U\b\u0007\u000bz&:\tdC\u0007\u000bz&:\tdC\u001d\u001cm=\u001f\u0003b^\u001fL,)\tyT\u001ef*0\tdv\u0014z\u0006;\u0006rS\u000f\u0006\u0014j#<\u000fc\u00062o'6\u001er\u00122o'6\u001ert\u001ex,7\br^\u0018a,*\u0013\tm95\rtU?m9<\u0002sU\u0015k <\u001f\u0015\u0018z,8\u0018rt\u001ex,7\br^\u000fG+3\ttD";
                var4_3 = "\u0015i$<Q>:z.,\u0001r^\u000f(/6\u001e7p5g=\u0017\u0019{\\[x(+\rzU\u000fm;yK2C\\(&?L2CU-:y\u0001bC\u000f('6\u00187R\u001e(',\u0000{4\u0018g$v\u0000 D\u001ek!v\u001frB\rm;v\u001frQ\tk!v\u001ce_\u0018m:*\u0003eCTL,)\tyT\u001ef* *~^\u001fm;\u000b\bm(+\u000f\u007ft\u001ex=1\u0006[O&0\b*\u0007(M\u001b\u000f%Tu\r\bm(+\u000f\u007f\u007f\u000b| 6\u0002d\u000e\u001fm9<\u0002sU\u0015k0\r\u0015gU\u000f\tm=+\u0005rF\u001eG+3\ttD\b\u0015\u001cm=\f\u0002~A\u000em\r<\u001cr^\u001fm':\u0005rC\u001a\u001cm=\u001d\tgU\u0015l,7\u000f~U\bN;6\u0001XR\u0011m*-\u001f\b\u001ef=0\u0018~U\b\u0015\u0018z,8\u0018rt\u001ex,7\br^\u000fG+3\ttD\u000e\u000bz&:\tdC\u0014z\u001a-\u0003eU\u001e2f*5\u0019sU4f% ?rB\ra*<<x\\\u0012k0\u0016\u001ccY\u0014f\u000f\tm=+\u0005rF\u001eG+3\ttD\b\t\u0014x=0\u0003y{\u001eq\u000e\tm95\rtU\u0016m'-!v@\t\u001cm=\u0016\u001ccY\u0014f\u0006+G\u0005\u0010/N*;F&-\"b\\\u0017($<\u0018\u007f_\u001f(l*B2C[e<*\u00187^\u0014|i+\tcE\tfi7\u0019{\\\u0006\u001da'=\te\u0006Ga'0\u0018)\u0006=G\u0005\u001d)E\t\u001fm9<\u0002sU\u0015|\u000b\bm(+\u000f\u007ff\u001ad<<\u0010\bm(+\u000f\u007fu\u0015| -\u0015CI\u000bm\u0004\u000fq9<\u000f\bm(+\u000f\u007ff\u001ad<<8n@\u001e\t\u001cm=\u0016\u001ccY\u0014f4\u0018g$v\u0000 D\u001ek!v\u001frB\rm;v\u001frQ\tk!v\u001ce_\u0018m:*\u0003eCTL,)\tyT\u001ef* *~^\u001fm;\u001a\u001cm=\u001d\tgU\u0015l,7\u000f~U\bN;6\u0001XR\u0011m*-\u001f\t\u001cm=\u0011\tvT\u001ez\u0010\u001fm9<\u0002sU\u0015|\u0006;\u0006rS\u000f{\f\u001fm/8\u0019{D-i%,\t\u000f\u001cm=\u001d\tgU\u0015l,7\u000f~U\b\u0007\u000bz&:\tdC\u0007\u000bz&:\tdC\u001d\u001cm=\u001f\u0003b^\u001fL,)\tyT\u001ef*0\tdv\u0014z\u0006;\u0006rS\u000f\u0006\u0014j#<\u000fc\u00062o'6\u001er\u00122o'6\u001ert\u001ex,7\br^\u0018a,*\u0013\tm95\rtU?m9<\u0002sU\u0015k <\u001f\u0015\u0018z,8\u0018rt\u001ex,7\br^\u000fG+3\ttD".length();
                var1_4 = 5;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = DependencyFinder.a(v0, DependencyFinder.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "F7gGS=\u000fO6vmU4+u jjX*JU=3e_#\u000e\u00016vsS#\u000eD<pjS>JG=a#B%\u000f\u0001=qiS.\u001e\t";
                    var4_3 = "F7gGS=\u000fO6vmU4+u jjX*JU=3e_#\u000e\u00016vsS#\u000eD<pjS>JG=a#B%\u000f\u0001=qiS.\u001e\t".length();
                    var1_4 = 13;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 85;
                        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++] = DependencyFinder.a(v0, DependencyFinder.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;
            }
        }
        DependencyFinder.f = var5;
        DependencyFinder.e = Logger.getLogger(DependencyFinder.class.getName());
    }

    /*
     * 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[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x3F);
        }
        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 -> 116;
                    case 1 -> 7;
                    case 2 -> 70;
                    case 3 -> 86;
                    case 4 -> 99;
                    case 5 -> 24;
                    default -> 63;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }

    public static class FindResults<O>
    extends Option<Either<O, EntityHeader>> {
        static final long serialVersionUID = 1086576149989172693L;

        public static <O> FindResults create(O o2, EntityHeader entityHeader) {
            if (o2 != null) {
                return new FindResults<O>(Either.left(o2));
            }
            if (entityHeader != null) {
                return new FindResults<O>(Either.right((Object)entityHeader));
            }
            return new FindResults<O>(null);
        }

        FindResults(Either<O, EntityHeader> either) {
            super(either);
        }

        public boolean isSome() {
            return super.isSome();
        }

        public boolean hasEntity() {
            return this.isSome() && ((Either)this.some()).isLeft();
        }

        public O getEntity() {
            return (O)(this.isSome() ? ((Either)this.some()).left() : null);
        }

        public boolean hasEntityHeader() {
            return this.isSome() && ((Either)this.some()).isRight();
        }

        public EntityHeader getEntityHeader() {
            return this.isSome() ? (EntityHeader)((Either)this.some()).right() : null;
        }
    }
}

