/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.io.XmlUtil
 *  com.l7tech.gateway.common.AsyncAdminMethods$JobId
 *  com.l7tech.gateway.common.admin.PolicyBundleInstallerAdmin
 *  com.l7tech.gateway.common.admin.PolicyBundleInstallerAdmin$PolicyBundleInstallerException
 *  com.l7tech.gateway.common.audit.AssertionMessages
 *  com.l7tech.gateway.common.audit.AuditDetail
 *  com.l7tech.gateway.common.audit.AuditDetailMessage
 *  com.l7tech.gateway.common.audit.Messages$M
 *  com.l7tech.identity.UserBean
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.folder.Folder
 *  com.l7tech.policy.bundle.BundleInfo
 *  com.l7tech.policy.bundle.BundleMapping
 *  com.l7tech.policy.bundle.MigrationDryRunResult
 *  com.l7tech.policy.bundle.PolicyBundleDryRunResult
 *  com.l7tech.policy.bundle.PolicyBundleDryRunResult$DryRunItem
 *  com.l7tech.util.DomUtils
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.IOUtils
 *  com.l7tech.util.Pair
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 *  org.springframework.context.ApplicationContext
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.context.ApplicationEventPublisher
 */
package com.l7tech.server.policy.bundle;

import com.l7tech.common.io.XmlUtil;
import com.l7tech.gateway.common.AsyncAdminMethods;
import com.l7tech.gateway.common.admin.PolicyBundleInstallerAdmin;
import com.l7tech.gateway.common.audit.AssertionMessages;
import com.l7tech.gateway.common.audit.AuditDetail;
import com.l7tech.gateway.common.audit.AuditDetailMessage;
import com.l7tech.gateway.common.audit.Messages;
import com.l7tech.identity.UserBean;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.folder.Folder;
import com.l7tech.policy.bundle.BundleInfo;
import com.l7tech.policy.bundle.BundleMapping;
import com.l7tech.policy.bundle.MigrationDryRunResult;
import com.l7tech.policy.bundle.PolicyBundleDryRunResult;
import com.l7tech.server.admin.AsyncAdminMethodsImpl;
import com.l7tech.server.event.AdminInfo;
import com.l7tech.server.event.admin.DetailedAdminEvent;
import com.l7tech.server.event.bundle.DryRunInstallPolicyBundleEvent;
import com.l7tech.server.event.bundle.InstallPolicyBundleEvent;
import com.l7tech.server.event.bundle.PolicyBundleInstallerEvent;
import com.l7tech.server.policy.bundle.BundleResolver;
import com.l7tech.server.policy.bundle.BundleResolverImpl;
import com.l7tech.server.policy.bundle.BundleUtils;
import com.l7tech.server.policy.bundle.GatewayManagementDocumentUtilities;
import com.l7tech.server.policy.bundle.PolicyBundleInstallerCallback;
import com.l7tech.server.policy.bundle.PolicyBundleInstallerContext;
import com.l7tech.server.policy.bundle.e;
import com.l7tech.server.policy.bundle.f;
import com.l7tech.server.policy.bundle.g;
import com.l7tech.util.DomUtils;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.IOUtils;
import com.l7tech.util.Pair;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;

/*
 * Exception performing whole class analysis ignored.
 */
public abstract class PolicyBundleInstallerAdminAbstractImpl
extends AsyncAdminMethodsImpl
implements PolicyBundleInstallerAdmin {
    private static final Logger e;
    private static final String f;
    private static final String g;
    private final AtomicBoolean h;
    private final String i;
    private final List<Pair<BundleInfo, String>> j;
    private final ApplicationEventPublisher k;
    private final Map<String, g> l;
    private final BundleResolver m;
    @Nullable
    private UserBean n;
    protected final ExecutorService executorService;
    protected boolean checkingAssertionExistenceRequired;
    private static final String[] o;

    public static synchronized void onModuleLoaded(ApplicationContext applicationContext) {
    }

    public PolicyBundleInstallerAdminAbstractImpl(@NotNull String string, @NotNull String string2, @NotNull String string3, @NotNull Class clazz, @NotNull JarFile jarFile, @NotNull ApplicationEventPublisher applicationEventPublisher) throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException {
        if (string == null) {
            PolicyBundleInstallerAdminAbstractImpl.a(0);
        }
        if (string2 == null) {
            PolicyBundleInstallerAdminAbstractImpl.a(1);
        }
        if (string3 == null) {
            PolicyBundleInstallerAdminAbstractImpl.a(2);
        }
        if (clazz == null) {
            PolicyBundleInstallerAdminAbstractImpl.a(3);
        }
        if (jarFile == null) {
            PolicyBundleInstallerAdminAbstractImpl.a(4);
        }
        if (applicationEventPublisher == null) {
            PolicyBundleInstallerAdminAbstractImpl.a(5);
        }
        this.h = new AtomicBoolean(false);
        this.l = new ConcurrentHashMap<String, g>();
        this.checkingAssertionExistenceRequired = true;
        this.k = applicationEventPublisher;
        this.executorService = Executors.newCachedThreadPool();
        this.i = this.a(string, string2, string3, clazz);
        try {
            this.j = BundleUtils.getBundleInfos(clazz, string, jarFile);
            this.m = this.a(this.j, clazz);
        }
        catch (BundleResolver.BundleResolverException | BundleResolver.InvalidBundleException | BundleResolver.UnknownBundleException exception) {
            throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException((Throwable)exception);
        }
    }

    public PolicyBundleInstallerAdminAbstractImpl(@NotNull String string, @NotNull String string2, @NotNull String string3, @NotNull ApplicationEventPublisher applicationEventPublisher) throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException {
        if (string == null) {
            PolicyBundleInstallerAdminAbstractImpl.a(6);
        }
        if (string2 == null) {
            PolicyBundleInstallerAdminAbstractImpl.a(7);
        }
        if (string3 == null) {
            PolicyBundleInstallerAdminAbstractImpl.a(8);
        }
        if (applicationEventPublisher == null) {
            PolicyBundleInstallerAdminAbstractImpl.a(9);
        }
        this.h = new AtomicBoolean(false);
        this.l = new ConcurrentHashMap<String, g>();
        this.checkingAssertionExistenceRequired = true;
        this.k = applicationEventPublisher;
        this.executorService = Executors.newCachedThreadPool();
        Class<?> clazz = this.getClass();
        this.i = this.a(string, string2, string3, clazz);
        try {
            this.j = BundleUtils.getBundleInfos(clazz, string);
            this.m = this.a(this.j, clazz);
        }
        catch (BundleResolver.BundleResolverException | BundleResolver.InvalidBundleException | BundleResolver.UnknownBundleException exception) {
            throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException((Throwable)exception);
        }
    }

    private BundleResolver a(@NotNull List<Pair<BundleInfo, String>> list, @NotNull Class clazz) throws BundleResolver.BundleResolverException, BundleResolver.UnknownBundleException, BundleResolver.InvalidBundleException {
        try {
            if (list == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(10);
            }
        }
        catch (BundleResolver.BundleResolverException bundleResolverException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(bundleResolverException);
        }
        try {
            if (clazz == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(11);
            }
        }
        catch (BundleResolver.BundleResolverException bundleResolverException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(bundleResolverException);
        }
        BundleResolverImpl bundleResolverImpl = new BundleResolverImpl(list, clazz);
        List<BundleInfo> list2 = bundleResolverImpl.getResultList();
        for (BundleInfo bundleInfo : list2) {
            BundleUtils.findReferences(bundleInfo, bundleResolverImpl);
            bundleInfo.setHasActiveVersionMigrationBundleFile(BundleUtils.hasActiveVersionMigrationBundleFile(bundleInfo, bundleResolverImpl));
            bundleInfo.setHasWsmanFile(BundleUtils.hasWsmanFile(bundleInfo, bundleResolverImpl));
        }
        return bundleResolverImpl;
    }

    private String a(@NotNull String string, @NotNull String string2, @NotNull String string3, @NotNull Class clazz) throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException {
        String string4;
        Document document;
        byte[] byArray;
        try {
            if (string == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(12);
            }
        }
        catch (IOException iOException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(iOException);
        }
        try {
            if (string2 == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(13);
            }
        }
        catch (IOException iOException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(iOException);
        }
        try {
            if (string3 == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(14);
            }
        }
        catch (IOException iOException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(iOException);
        }
        try {
            if (clazz == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(15);
            }
        }
        catch (IOException iOException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(iOException);
        }
        String string5 = string + string2;
        URL uRL = clazz.getResource(string5);
        try {
            if (uRL == null) {
                throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException(o[47] + string5 + o[27] + clazz.getName());
            }
        }
        catch (IOException iOException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(iOException);
        }
        try {
            byArray = IOUtils.slurpUrl((URL)uRL);
        }
        catch (IOException iOException) {
            throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException((Throwable)iOException);
        }
        try {
            document = XmlUtil.parse((InputStream)new ByteArrayInputStream(byArray));
        }
        catch (IOException | SAXException exception) {
            String[] stringArray = o;
            throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException(stringArray[45] + string5, (Throwable)exception);
        }
        try {
            String[] stringArray = o;
            Element element = XmlUtil.findExactlyOneChildElementByName((Element)document.getDocumentElement(), (String)string3, (String)stringArray[19]);
            string4 = DomUtils.getTextValue((Element)element, (boolean)true);
            try {
                if (string4.isEmpty()) {
                    throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException(stringArray[0] + this.getInstallerName());
                }
            }
            catch (IOException iOException) {
                throw PolicyBundleInstallerAdminAbstractImpl.a(iOException);
            }
        }
        catch (Exception exception) {
            throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException(o[26] + string5, (Throwable)exception);
        }
        return string4;
    }

    @NotNull
    public String getVersion() {
        String string;
        try {
            string = this.i;
            if (string == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(16);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(illegalArgumentException);
        }
        return string;
    }

    @NotNull
    public List<BundleInfo> getAllComponents() throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException {
        List<BundleInfo> list;
        try {
            list = this.m.getResultList();
            if (list == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(17);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        return list;
    }

    public void setAuthenticatedUser(@Nullable UserBean userBean) {
        this.n = userBean;
    }

    @NotNull
    public AsyncAdminMethods.JobId<PolicyBundleDryRunResult> dryRunInstall(@NotNull Collection<String> collection, @NotNull Map<String, BundleMapping> map, @Nullable String string) {
        AsyncAdminMethods.JobId<PolicyBundleDryRunResult> jobId;
        try {
            if (collection == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(18);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(illegalArgumentException);
        }
        try {
            if (map == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(19);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(illegalArgumentException);
        }
        try {
            jobId = this.dryRunInstall(collection, map, Folder.ROOT_FOLDER_ID, string);
            if (jobId == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(20);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(illegalArgumentException);
        }
        return jobId;
    }

    @NotNull
    public AsyncAdminMethods.JobId<PolicyBundleDryRunResult> dryRunInstall(@NotNull Collection<String> collection, @NotNull Map<String, BundleMapping> map, @NotNull Goid goid, @Nullable String string) {
        AsyncAdminMethods.JobId<PolicyBundleDryRunResult> jobId;
        try {
            if (collection == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(21);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(illegalArgumentException);
        }
        try {
            if (map == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(22);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(illegalArgumentException);
        }
        try {
            if (goid == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(23);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(illegalArgumentException);
        }
        String string2 = UUID.randomUUID().toString();
        g g2 = new g(string2);
        this.l.put(string2, g2);
        Future<PolicyBundleDryRunResult> future = this.executorService.submit(AdminInfo.find(false).wrapCallable(new e(this, string2, collection, map, goid, string)));
        AsyncAdminMethods.JobId<PolicyBundleDryRunResult> jobId2 = this.registerJob(future, PolicyBundleDryRunResult.class);
        try {
            g2.c = jobId2;
            jobId = jobId2;
            if (jobId == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(24);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(illegalArgumentException);
        }
        return jobId;
    }

    @NotNull
    public AsyncAdminMethods.JobId<ArrayList> install(@NotNull Collection<String> collection, @NotNull Goid goid, @NotNull Map<String, BundleMapping> map) throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException {
        AsyncAdminMethods.JobId<ArrayList> jobId;
        try {
            if (collection == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(25);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        try {
            if (goid == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(26);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        try {
            if (map == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(27);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        try {
            jobId = this.install(collection, goid, map, null, null);
            if (jobId == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(28);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        return jobId;
    }

    @NotNull
    public AsyncAdminMethods.JobId<ArrayList> install(@NotNull Collection<String> collection, @NotNull Goid goid, @NotNull Map<String, BundleMapping> map, @Nullable String string, @Nullable Map<String, Map<String, Pair<String, Properties>>> map2) throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException {
        AsyncAdminMethods.JobId<ArrayList> jobId;
        try {
            if (collection == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(29);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        try {
            if (goid == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(30);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        try {
            if (map == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(31);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        String string2 = UUID.randomUUID().toString();
        g g2 = new g(string2);
        this.l.put(string2, g2);
        Future<ArrayList> future = this.executorService.submit(AdminInfo.find(false).wrapCallable(new f(this, string2, collection, goid, map, string, map2)));
        AsyncAdminMethods.JobId<ArrayList> jobId2 = this.registerJob(future, ArrayList.class);
        try {
            g2.c = jobId2;
            jobId = jobId2;
            if (jobId == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(32);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        return jobId;
    }

    protected PolicyBundleDryRunResult doDryRunInstall(@NotNull String string, @NotNull Collection<String> collection, @NotNull Map<String, BundleMapping> map, @NotNull Goid goid, @Nullable String string2) throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException {
        HashMap<String, List<Object>> hashMap;
        HashMap hashMap2;
        PolicyBundleDryRunResult policyBundleDryRunResult;
        PolicyBundleDryRunResult policyBundleDryRunResult2;
        try {
            if (string == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(33);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        try {
            if (collection == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(34);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        try {
            if (map == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(35);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        try {
            if (goid == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(36);
            }
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        String[] stringArray = o;
        DetailedAdminEvent detailedAdminEvent = new DetailedAdminEvent(this, MessageFormat.format(stringArray[13], this.getInstallerName(), stringArray[4]), Level.INFO);
        this.k.publishEvent((ApplicationEvent)detailedAdminEvent);
        HashMap hashMap3 = new HashMap();
        HashMap<String, List<MigrationDryRunResult>> hashMap4 = new HashMap<String, List<MigrationDryRunResult>>();
        HashMap<String, String> hashMap5 = new HashMap<String, String>();
        HashSet<String> hashSet = new HashSet<String>();
        block32: for (String string3 : collection) {
            List<BundleInfo> list = this.m.getResultList();
            for (BundleInfo bundleInfo : list) {
                String string4;
                block51: {
                    block50: {
                        if (!bundleInfo.getId().equals(string3)) continue;
                        g g2 = this.l.get(string);
                        try {
                            if (g2.b) {
                                break block32;
                            }
                        }
                        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                        }
                        try {
                            try {
                                if (string2 == null || string2.isEmpty()) break block50;
                            }
                            catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                            }
                            string4 = string2;
                            break block51;
                        }
                        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                        }
                    }
                    string4 = null;
                }
                String string5 = string4;
                PolicyBundleInstallerContext policyBundleInstallerContext = new PolicyBundleInstallerContext(bundleInfo, goid, map.get(string3), string5, this.m, this.checkingAssertionExistenceRequired, null, null);
                DryRunInstallPolicyBundleEvent dryRunInstallPolicyBundleEvent = new DryRunInstallPolicyBundleEvent(map, policyBundleInstallerContext);
                try {
                    dryRunInstallPolicyBundleEvent.setPolicyBundleInstallerCallback(this.getPolicyBundleInstallerCallback(string5));
                    dryRunInstallPolicyBundleEvent.setAuthenticatedUser(this.n);
                    g2.d = dryRunInstallPolicyBundleEvent;
                    this.k.publishEvent((ApplicationEvent)dryRunInstallPolicyBundleEvent);
                    if (PolicyBundleInstallerAdminAbstractImpl.validateEventProcessed(dryRunInstallPolicyBundleEvent)) {
                        break block32;
                    }
                }
                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                }
                ArrayList<AuditDetail> arrayList = new ArrayList<AuditDetail>();
                List<String> list2 = dryRunInstallPolicyBundleEvent.getServiceConflict();
                try {
                    if (!list2.isEmpty()) {
                        arrayList.add(new AuditDetail(this.getAssertionMessageDryRunConflict(), new String[]{bundleInfo.getName(), o[35], list2.toString()}));
                    }
                }
                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                }
                List<String> list3 = dryRunInstallPolicyBundleEvent.getPolicyConflict();
                try {
                    if (!list3.isEmpty()) {
                        arrayList.add(new AuditDetail(this.getAssertionMessageDryRunConflict(), new String[]{bundleInfo.getName(), o[50], list3.toString()}));
                    }
                }
                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                }
                List<String> list4 = dryRunInstallPolicyBundleEvent.getCertificateConflict();
                try {
                    if (!list4.isEmpty()) {
                        arrayList.add(new AuditDetail(this.getAssertionMessageDryRunConflict(), new String[]{bundleInfo.getName(), o[24], list4.toString()}));
                    }
                }
                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                }
                List<String> list5 = dryRunInstallPolicyBundleEvent.getEncapsulatedAssertionConflict();
                try {
                    if (!list5.isEmpty()) {
                        arrayList.add(new AuditDetail((AuditDetailMessage)AssertionMessages.POLICY_BUNDLE_INSTALLER_DRY_RUN_CONFLICT, new String[]{bundleInfo.getName(), o[28], list5.toString()}));
                    }
                }
                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                }
                List<String> list6 = dryRunInstallPolicyBundleEvent.getJdbcConnsThatDontExist();
                try {
                    if (!list6.isEmpty()) {
                        arrayList.add(new AuditDetail((AuditDetailMessage)AssertionMessages.OTK_DRY_RUN_CONFLICT, new String[]{bundleInfo.getName(), o[3], list6.toString()}));
                    }
                }
                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                }
                List<String> list7 = dryRunInstallPolicyBundleEvent.getMissingAssertions();
                try {
                    if (!list7.isEmpty()) {
                        arrayList.add(new AuditDetail(this.getAssertionMessageDryRunConflict(), new String[]{bundleInfo.getName(), o[51], list7.toString()}));
                    }
                }
                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                }
                List<MigrationDryRunResult> list8 = dryRunInstallPolicyBundleEvent.getMigrationErrorMappings();
                try {
                    if (!list8.isEmpty()) {
                        arrayList.add(new AuditDetail(this.getAssertionMessageDryRunConflict(), new String[]{bundleInfo.getName(), o[5], list8.toString()}));
                    }
                }
                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                }
                HashMap<PolicyBundleDryRunResult.DryRunItem, List<String>> hashMap6 = new HashMap<PolicyBundleDryRunResult.DryRunItem, List<String>>();
                hashMap6.put(PolicyBundleDryRunResult.DryRunItem.SERVICES, list2);
                hashMap6.put(PolicyBundleDryRunResult.DryRunItem.POLICIES, list3);
                hashMap6.put(PolicyBundleDryRunResult.DryRunItem.CERTIFICATES, list4);
                hashMap6.put(PolicyBundleDryRunResult.DryRunItem.ENCAPSULATED_ASSERTION, list5);
                hashMap6.put(PolicyBundleDryRunResult.DryRunItem.JDBC_CONNECTIONS, list6);
                hashMap6.put(PolicyBundleDryRunResult.DryRunItem.ASSERTIONS, list7);
                hashMap3.put(string3, hashMap6);
                hashMap4.put(string3, list8);
                if (!arrayList.isEmpty()) {
                    stringArray = o;
                    DetailedAdminEvent detailedAdminEvent2 = new DetailedAdminEvent(this, MessageFormat.format(stringArray[7], bundleInfo.getName()), Level.INFO);
                    detailedAdminEvent2.setAuditDetails(arrayList);
                    this.k.publishEvent((ApplicationEvent)detailedAdminEvent2);
                }
                hashSet.add(string3);
                hashMap5.putAll(dryRunInstallPolicyBundleEvent.getComponentIdToBundleXmlMap());
            }
        }
        if (hashSet.containsAll(collection)) {
            stringArray = o;
            var11_12 = new DetailedAdminEvent(this, MessageFormat.format(stringArray[23], this.getInstallerName(), stringArray[12]), Level.INFO);
            this.k.publishEvent((ApplicationEvent)var11_12);
        } else {
            stringArray = o;
            var11_12 = new DetailedAdminEvent(this, MessageFormat.format(stringArray[23], this.getInstallerName(), stringArray[52]), Level.INFO);
            this.k.publishEvent((ApplicationEvent)var11_12);
        }
        try {
            PolicyBundleDryRunResult policyBundleDryRunResult3;
            policyBundleDryRunResult2 = policyBundleDryRunResult3;
            policyBundleDryRunResult = policyBundleDryRunResult3;
            hashMap2 = hashMap3;
            hashMap = hashMap4.size() > 0 ? hashMap4 : null;
        }
        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
        }
        policyBundleDryRunResult2(hashMap2, hashMap, hashMap5);
        return policyBundleDryRunResult;
    }

    public static boolean validateEventProcessed(PolicyBundleInstallerEvent policyBundleInstallerEvent) throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException {
        boolean bl2;
        block19: {
            block18: {
                block15: {
                    Exception exception;
                    block16: {
                        block17: {
                            if (!policyBundleInstallerEvent.isProcessed()) {
                                String string = policyBundleInstallerEvent.getReasonNotProcessed();
                                try {
                                    if (string != null) {
                                        throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException(string);
                                    }
                                }
                                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                                }
                                String[] stringArray = o;
                                throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException(stringArray[54]);
                            }
                            exception = policyBundleInstallerEvent.getProcessingException();
                            try {
                                try {
                                    try {
                                        if (exception == null) break block15;
                                        if (exception instanceof BundleResolver.UnknownBundleException) break block16;
                                    }
                                    catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                        throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                                    }
                                    if (!(exception instanceof InterruptedException)) break block17;
                                }
                                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                                }
                                return true;
                            }
                            catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                            }
                        }
                        if (exception instanceof GatewayManagementDocumentUtilities.AccessDeniedManagementResponse) {
                            GatewayManagementDocumentUtilities.AccessDeniedManagementResponse accessDeniedManagementResponse = (GatewayManagementDocumentUtilities.AccessDeniedManagementResponse)exception;
                            String[] stringArray = o;
                            throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException(stringArray[49] + policyBundleInstallerEvent.getContext().getBundleInfo().getName() + stringArray[57] + accessDeniedManagementResponse.getMessage());
                        }
                        String[] stringArray = o;
                        e.warning(stringArray[39] + exception.getClass().getName());
                        e.warning(stringArray[11] + ExceptionUtils.getMessage((Throwable)exception));
                        throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException(exception.getMessage());
                    }
                    throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException((Throwable)exception);
                }
                try {
                    try {
                        if (!Thread.interrupted() && !policyBundleInstallerEvent.isCancelled()) break block18;
                    }
                    catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                        throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                    }
                    bl2 = true;
                    break block19;
                }
                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Loose catch block
     */
    protected List<String> doInstall(@NotNull String string, @NotNull Collection<String> collection, @NotNull Goid goid, @NotNull Map<String, BundleMapping> map, @Nullable String string2, @Nullable Map<String, Map<String, Pair<String, Properties>>> map2) throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException {
        ArrayList<String> arrayList;
        block36: {
            String[] stringArray;
            Object object;
            String string3;
            block40: {
                block39: {
                    String string4;
                    block38: {
                        block37: {
                            block43: {
                                try {
                                    if (string == null) {
                                        PolicyBundleInstallerAdminAbstractImpl.a(37);
                                    }
                                }
                                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                                }
                                try {
                                    if (collection == null) {
                                        PolicyBundleInstallerAdminAbstractImpl.a(38);
                                    }
                                }
                                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                                }
                                try {
                                    if (goid == null) {
                                        PolicyBundleInstallerAdminAbstractImpl.a(39);
                                    }
                                }
                                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                                }
                                try {
                                    if (map == null) {
                                        PolicyBundleInstallerAdminAbstractImpl.a(40);
                                    }
                                }
                                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                                }
                                arrayList = new ArrayList<String>();
                                if (!this.h.compareAndSet(false, true)) break block36;
                                if (string2 == null) break block37;
                                break block43;
                                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                                }
                            }
                            try {
                                block44: {
                                    if (string2.trim().isEmpty()) break block37;
                                    break block44;
                                    catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                        throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                                    }
                                }
                                string4 = string2;
                                break block38;
                            }
                            catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                            }
                        }
                        string4 = null;
                    }
                    string3 = string4;
                    try {
                        if (string3 != null) break block39;
                        object = "";
                        break block40;
                    }
                    catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                        throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                    }
                }
                stringArray = o;
                object = stringArray[37] + string3 + "'";
            }
            String string5 = object;
            stringArray = o;
            DetailedAdminEvent detailedAdminEvent = new DetailedAdminEvent(this, MessageFormat.format(stringArray[38], this.getInstallerName(), stringArray[8], string5), Level.INFO);
            this.k.publishEvent((ApplicationEvent)detailedAdminEvent);
            try {
                Object object2;
                HashSet<String> hashSet = new HashSet<String>();
                Hashtable<String, String> hashtable = new Hashtable<String, String>();
                block27: for (String string6 : collection) {
                    g g2 = this.l.get(string);
                    try {
                        if (g2.b) {
                            break;
                        }
                    }
                    catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                        throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                    }
                    List<BundleInfo> list = this.m.getResultList();
                    for (BundleInfo bundleInfo : list) {
                        Map<String, Pair<String, Properties>> map3;
                        boolean bl2;
                        BundleResolver bundleResolver;
                        String string7;
                        BundleMapping bundleMapping;
                        Goid goid2;
                        BundleInfo bundleInfo2;
                        PolicyBundleInstallerContext policyBundleInstallerContext;
                        PolicyBundleInstallerContext policyBundleInstallerContext2;
                        block42: {
                            block41: {
                                if (!bundleInfo.getId().equals(string6)) continue;
                                try {
                                    block45: {
                                        PolicyBundleInstallerContext policyBundleInstallerContext3;
                                        policyBundleInstallerContext2 = policyBundleInstallerContext3;
                                        policyBundleInstallerContext = policyBundleInstallerContext3;
                                        bundleInfo2 = bundleInfo;
                                        goid2 = goid;
                                        bundleMapping = map.get(string6);
                                        string7 = string3;
                                        bundleResolver = this.m;
                                        bl2 = this.checkingAssertionExistenceRequired;
                                        if (map2 != null) break block41;
                                        break block45;
                                        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                                        }
                                    }
                                    map3 = null;
                                    break block42;
                                }
                                catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                                    throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                                }
                            }
                            map3 = map2.get(string6);
                        }
                        policyBundleInstallerContext2(bundleInfo2, goid2, bundleMapping, string7, bundleResolver, bl2, map3, hashtable);
                        PolicyBundleInstallerContext policyBundleInstallerContext4 = policyBundleInstallerContext;
                        InstallPolicyBundleEvent installPolicyBundleEvent = new InstallPolicyBundleEvent(this, policyBundleInstallerContext4);
                        try {
                            installPolicyBundleEvent.setPolicyBundleInstallerCallback(this.getPolicyBundleInstallerCallback(string3));
                            installPolicyBundleEvent.setAuthenticatedUser(this.n);
                            g2.d = installPolicyBundleEvent;
                            this.k.publishEvent((ApplicationEvent)installPolicyBundleEvent);
                            if (PolicyBundleInstallerAdminAbstractImpl.validateEventProcessed(installPolicyBundleEvent)) {
                                break block27;
                            }
                        }
                        catch (PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
                            throw PolicyBundleInstallerAdminAbstractImpl.a((Exception)((Object)policyBundleInstallerException));
                        }
                        hashSet.add(string6);
                    }
                    arrayList.add(string6);
                }
                if (hashSet.containsAll(collection)) {
                    stringArray = o;
                    object2 = new DetailedAdminEvent(this, MessageFormat.format(stringArray[41], this.getInstallerName(), stringArray[17], string5), Level.INFO);
                    this.k.publishEvent((ApplicationEvent)object2);
                }
                stringArray = o;
                object2 = new DetailedAdminEvent(this, MessageFormat.format(stringArray[41], this.getInstallerName(), stringArray[36], string5), Level.INFO);
                this.k.publishEvent((ApplicationEvent)object2);
            }
            finally {
                this.h.set(false);
            }
        }
        throw new PolicyBundleInstallerAdmin.PolicyBundleInstallerException(o[48]);
        return arrayList;
    }

    protected PolicyBundleInstallerCallback getPolicyBundleInstallerCallback(String string) throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException {
        return null;
    }

    @NotNull
    protected String getInstallerName() {
        String string;
        try {
            string = this.getClass().getSimpleName();
            if (string == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(41);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(illegalArgumentException);
        }
        return string;
    }

    @NotNull
    protected AuditDetail newAuditDetailInstallError(PolicyBundleInstallerAdmin.PolicyBundleInstallerException policyBundleInstallerException) {
        return new AuditDetail((AuditDetailMessage)AssertionMessages.POLICY_BUNDLE_INSTALLER_ERROR, new String[]{this.getInstallerName(), ExceptionUtils.getMessage((Throwable)policyBundleInstallerException)}, ExceptionUtils.getDebugException((Throwable)policyBundleInstallerException));
    }

    @NotNull
    protected AuditDetailMessage getAssertionMessageDryRunConflict() {
        Messages.M m2;
        try {
            m2 = AssertionMessages.POLICY_BUNDLE_INSTALLER_DRY_RUN_CONFLICT;
            if (m2 == null) {
                PolicyBundleInstallerAdminAbstractImpl.a(42);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw PolicyBundleInstallerAdminAbstractImpl.a(illegalArgumentException);
        }
        return m2;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[59];
                var3_1 = 0;
                var2_2 = "#-\u0002D\u0001KW\u000f6WO\u0000\u001f\u0019\u0016'\u0005[\f\u0004W@+\u0019N\n\u0019T\u00016\u001eG\u000bK_\u000f0W\u000e\u00027\u0019L\t\u000et\u00012\u0007A\u000b\fJ\r\u00040\u000ez\u0010\u0005p\u000e1\u0003I\t\u0007\u0018-+\u0004[\f\u0005^@\b3j&Kz\u000f,\u0019M\u0006\u001fP\u000f,\u0004\u0007\u00136\u0016Z\u0011\u000e]\u0018-+\u0010Z\u0004\u001fP\u000f,Wm\u0017\u0019V\u0012b:I\u0015\u001bP\u000e%\u0004\r\u00027\u0019L\t\u000es\u000101A\t\u000e900\u0012\b\f\u0005J\u0014#\u001bD\u0004\u001fP\u000f,WK\r\u000eZ\u000bb\u0014G\u000b\rU\t!\u0003[E\rV\u0012b\u0014G\b\u001bV\u000e'\u0019\\E\u0010\t\u001db\u0011G\u0010\u0005]N\u0007\u00136\u0016Z\u0011\u000e]\u000f\u0004-3Z\u001c9L\u000e\u000b\u0019[\u0011\nU\f\u0011\u000e'\u0000j\u0010\u0005]\f'%M\u0016\u0004U\u0016'\u0005&5,\u0012P\u0015\u000eZ\u0014'\u0013\b\u0000\u0019K\u000f0WL\u0010\u0019P\u000e%WA\u000b\u0018M\u0001.\u001bI\u0011\u0002V\u000exW\t\u0003-\u001aX\t\u000eM\u0005&%00\u0012\b\f\u0005J\u0014#\u001bD\u0004\u001fP\u000f,WK\r\u000eZ\u000bb\u0018NE\u001fQ\u0005b\f\u0018\u0018KBQ?\u000e\u00027\u0019L\t\u000e{\u00011\u0012f\u0004\u0006\\!\u0007'\u0003i\u0016\u0018\\\u00126\u001eG\u000b&\\\u00131\u0016O\u0000/K\u0019\u0010\u0002F&\u0004W\u0006.\u001eK\u0011\f\u0003#\u001bD\f\u0005^#.\u0016[\u0016\t\u0003-\u001aX\t\u000eM\u0005&F\u0003-\u001a\u0007\t\\M\u0005!\u001f\u0007\u0016\u000eK\u0016'\u0005\u0007\u0015\u0004U\t!\u000e\u0007\u0007\u001eW\u0004.\u0012\u00075\u0004U\t!\u000ej\u0010\u0005]\f'>F\u0016\u001fX\f.\u0012Z$\u000fT\t,6J\u0016\u001fK\u0001!\u0003a\b\u001bU\u00076'\u0005[\f\u0004W\u0011\u00012\u0007m\u0013\u000eW\u0014\u0012\u0002J\t\u0002J\b'\u0005\n\u0006-\u001bL\u0000\u0019~\u000f+\u0013F\u0003-\u001a\u0007\t\\M\u0005!\u001f\u0007\u0016\u000eK\u0016'\u0005\u0007\u0015\u0004U\t!\u000e\u0007\u0007\u001eW\u0004.\u0012\u00075\u0004U\t!\u000ej\u0010\u0005]\f'>F\u0016\u001fX\f.\u0012Z$\u000fT\t,6J\u0016\u001fK\u0001!\u0003a\b\u001bU%00\u0012\b\f\u0005J\u0014#\u001bD\u0004\u001fP\u000f,WK\r\u000eZ\u000bb\u0018NE\u001fQ\u0005b\f\u0018\u0018KBQ?\f#'\u0005\\\f\rP\u0003#\u0003M\u0016\u0006\\+\u0019A\u0011U'#-\u0002D\u0001KW\u000f6WN\f\u0005]@4\u0012Z\u0016\u0002V\u000eb\u001eF\u0003\u0004K\r#\u0003A\n\u0005\u0019\t,M\b\u0013@$\u0018ZE\bX\f.\u001eF\u0002KZ\f#\u0004[E\n!1\u0004M\u0017\u001fP\u000f,\u0004\u0012\u00027\u0019L\t\u000ep\u000e$\u0018n\f\u0007\\.#\u001aM\u0013\u0007'\u0003a\u000b\u0018M\u0001.\u001bM\u0017=\\\u00121\u001eG\u000b\u0012\u00027\u0019L\t\u000ep\u000e$\u0018[#\u0019V\r\b\u0016Z\f\u0003-\u001aX\n\u0005\\\u000e6>L\u0016\r\u00040\u000ez\u0010\u0005p\u000e1\u0003I\t\u0007\u0019\u000e#\u001aM\u0016\u001bX\u0003'>F\u0016\u001fX\f.\u0012Z3\u000eK\u0013+\u0018F\b3'\u0005^\f\b\\\u0013\t\u0003#\u0019K\u0000\u0007U\u0005&\u001a\u0017+\u0003@E\u0002W\u00136\u0016D\t\nM\t-\u0019\b\u0015\u0019\\\u0006+\u000f\bB\u001f),\u0004\\\u0004\u0007U\u00016\u001eG\u000bKV\u0006b\u0003@\u0000KBP?WST\u0016\u0019\u001bp\n\u0010%:\u0014M\u0015\u001fP\u000f,W\\\u001c\u001b\\Zb\u0007\t,\u0004\\\u0004\u0007U\u001f),\u0004\\\u0004\u0007U\u00016\u001eG\u000bKV\u0006b\u0003@\u0000KBP?WST\u0016\u0019\u001bp\n\u000e\u0014#\u0004C,\u000f\\\u000e6\u001eN\f\u000eK\u0010\u0007'\u0003i\t\u0007z\u000f/\u0007G\u000b\u000eW\u00141\t\u0004->F\u0016\u001fX\f.\u001a5,\u0016J\t\u000e\u0019\u0014-WX\u0004\u0019J\u0005b\u0005M\u0016\u0004L\u0012!\u0012\u0012E\n\u0007'\u0003~\u0000\u0019J\t-\u0019\u000f#-\u0002D\u0001KW\u000f6WN\f\u0005]@\u001e),\u0004\\\u0004\u0007U@+\u0004\b\u0004\u0007K\u0005#\u0013QE\u0002W@2\u0005G\u0002\u0019\\\u00131\u001300\u0018J\t\u000eT@+\u0019[\u0011\nU\f+\u0019OE\b0-\u001bA\u0006\u0002\\\u0013\u0012-+\u0004[\f\u0005^@\u0003\u0004[\u0000\u0019M\t-\u0019[\t\u0003#\u0019K\u0000\u0007U\u0005&>!0\u0010]\b\u000eW\u0014b\u0011G\u0017Ky.-\u0003f\u0010\u0007U@2\u0016Z\u0004\u0006\\\u0014'\u0005\bBNJGb\u0018NENJNg\u0004\b\b\u001eJ\u0014b\u0019G\u0011K[\u0005b\u0019]\t\u000700-\u001bA\u0006\u0012\u0019\"7\u0019L\t\u000e\u0019),\u0004\\\u0004\u0007U\u00050WE\n\u000fL\f'WA\u0016KW\u000f6WA\u000b\u0018M\u0001.\u001bM\u0001E\u0007\t,\u0004\\\u0004\u0007U\u0010\u0007'\u0003a\u000b\u0018M\u0001.\u001bM\u0017%X\r'";
                var4_3 = "#-\u0002D\u0001KW\u000f6WO\u0000\u001f\u0019\u0016'\u0005[\f\u0004W@+\u0019N\n\u0019T\u00016\u001eG\u000bK_\u000f0W\u000e\u00027\u0019L\t\u000et\u00012\u0007A\u000b\fJ\r\u00040\u000ez\u0010\u0005p\u000e1\u0003I\t\u0007\u0018-+\u0004[\f\u0005^@\b3j&Kz\u000f,\u0019M\u0006\u001fP\u000f,\u0004\u0007\u00136\u0016Z\u0011\u000e]\u0018-+\u0010Z\u0004\u001fP\u000f,Wm\u0017\u0019V\u0012b:I\u0015\u001bP\u000e%\u0004\r\u00027\u0019L\t\u000es\u000101A\t\u000e900\u0012\b\f\u0005J\u0014#\u001bD\u0004\u001fP\u000f,WK\r\u000eZ\u000bb\u0014G\u000b\rU\t!\u0003[E\rV\u0012b\u0014G\b\u001bV\u000e'\u0019\\E\u0010\t\u001db\u0011G\u0010\u0005]N\u0007\u00136\u0016Z\u0011\u000e]\u000f\u0004-3Z\u001c9L\u000e\u000b\u0019[\u0011\nU\f\u0011\u000e'\u0000j\u0010\u0005]\f'%M\u0016\u0004U\u0016'\u0005&5,\u0012P\u0015\u000eZ\u0014'\u0013\b\u0000\u0019K\u000f0WL\u0010\u0019P\u000e%WA\u000b\u0018M\u0001.\u001bI\u0011\u0002V\u000exW\t\u0003-\u001aX\t\u000eM\u0005&%00\u0012\b\f\u0005J\u0014#\u001bD\u0004\u001fP\u000f,WK\r\u000eZ\u000bb\u0018NE\u001fQ\u0005b\f\u0018\u0018KBQ?\u000e\u00027\u0019L\t\u000e{\u00011\u0012f\u0004\u0006\\!\u0007'\u0003i\u0016\u0018\\\u00126\u001eG\u000b&\\\u00131\u0016O\u0000/K\u0019\u0010\u0002F&\u0004W\u0006.\u001eK\u0011\f\u0003#\u001bD\f\u0005^#.\u0016[\u0016\t\u0003-\u001aX\t\u000eM\u0005&F\u0003-\u001a\u0007\t\\M\u0005!\u001f\u0007\u0016\u000eK\u0016'\u0005\u0007\u0015\u0004U\t!\u000e\u0007\u0007\u001eW\u0004.\u0012\u00075\u0004U\t!\u000ej\u0010\u0005]\f'>F\u0016\u001fX\f.\u0012Z$\u000fT\t,6J\u0016\u001fK\u0001!\u0003a\b\u001bU\u00076'\u0005[\f\u0004W\u0011\u00012\u0007m\u0013\u000eW\u0014\u0012\u0002J\t\u0002J\b'\u0005\n\u0006-\u001bL\u0000\u0019~\u000f+\u0013F\u0003-\u001a\u0007\t\\M\u0005!\u001f\u0007\u0016\u000eK\u0016'\u0005\u0007\u0015\u0004U\t!\u000e\u0007\u0007\u001eW\u0004.\u0012\u00075\u0004U\t!\u000ej\u0010\u0005]\f'>F\u0016\u001fX\f.\u0012Z$\u000fT\t,6J\u0016\u001fK\u0001!\u0003a\b\u001bU%00\u0012\b\f\u0005J\u0014#\u001bD\u0004\u001fP\u000f,WK\r\u000eZ\u000bb\u0018NE\u001fQ\u0005b\f\u0018\u0018KBQ?\f#'\u0005\\\f\rP\u0003#\u0003M\u0016\u0006\\+\u0019A\u0011U'#-\u0002D\u0001KW\u000f6WN\f\u0005]@4\u0012Z\u0016\u0002V\u000eb\u001eF\u0003\u0004K\r#\u0003A\n\u0005\u0019\t,M\b\u0013@$\u0018ZE\bX\f.\u001eF\u0002KZ\f#\u0004[E\n!1\u0004M\u0017\u001fP\u000f,\u0004\u0012\u00027\u0019L\t\u000ep\u000e$\u0018n\f\u0007\\.#\u001aM\u0013\u0007'\u0003a\u000b\u0018M\u0001.\u001bM\u0017=\\\u00121\u001eG\u000b\u0012\u00027\u0019L\t\u000ep\u000e$\u0018[#\u0019V\r\b\u0016Z\f\u0003-\u001aX\n\u0005\\\u000e6>L\u0016\r\u00040\u000ez\u0010\u0005p\u000e1\u0003I\t\u0007\u0019\u000e#\u001aM\u0016\u001bX\u0003'>F\u0016\u001fX\f.\u0012Z3\u000eK\u0013+\u0018F\b3'\u0005^\f\b\\\u0013\t\u0003#\u0019K\u0000\u0007U\u0005&\u001a\u0017+\u0003@E\u0002W\u00136\u0016D\t\nM\t-\u0019\b\u0015\u0019\\\u0006+\u000f\bB\u001f),\u0004\\\u0004\u0007U\u00016\u001eG\u000bKV\u0006b\u0003@\u0000KBP?WST\u0016\u0019\u001bp\n\u0010%:\u0014M\u0015\u001fP\u000f,W\\\u001c\u001b\\Zb\u0007\t,\u0004\\\u0004\u0007U\u001f),\u0004\\\u0004\u0007U\u00016\u001eG\u000bKV\u0006b\u0003@\u0000KBP?WST\u0016\u0019\u001bp\n\u000e\u0014#\u0004C,\u000f\\\u000e6\u001eN\f\u000eK\u0010\u0007'\u0003i\t\u0007z\u000f/\u0007G\u000b\u000eW\u00141\t\u0004->F\u0016\u001fX\f.\u001a5,\u0016J\t\u000e\u0019\u0014-WX\u0004\u0019J\u0005b\u0005M\u0016\u0004L\u0012!\u0012\u0012E\n\u0007'\u0003~\u0000\u0019J\t-\u0019\u000f#-\u0002D\u0001KW\u000f6WN\f\u0005]@\u001e),\u0004\\\u0004\u0007U@+\u0004\b\u0004\u0007K\u0005#\u0013QE\u0002W@2\u0005G\u0002\u0019\\\u00131\u001300\u0018J\t\u000eT@+\u0019[\u0011\nU\f+\u0019OE\b0-\u001bA\u0006\u0002\\\u0013\u0012-+\u0004[\f\u0005^@\u0003\u0004[\u0000\u0019M\t-\u0019[\t\u0003#\u0019K\u0000\u0007U\u0005&>!0\u0010]\b\u000eW\u0014b\u0011G\u0017Ky.-\u0003f\u0010\u0007U@2\u0016Z\u0004\u0006\\\u0014'\u0005\bBNJGb\u0018NENJNg\u0004\b\b\u001eJ\u0014b\u0019G\u0011K[\u0005b\u0019]\t\u000700-\u001bA\u0006\u0012\u0019\"7\u0019L\t\u000e\u0019),\u0004\\\u0004\u0007U\u00050WE\n\u000fL\f'WA\u0016KW\u000f6WA\u000b\u0018M\u0001.\u001bM\u0001E\u0007\t,\u0004\\\u0004\u0007U\u0010\u0007'\u0003a\u000b\u0018M\u0001.\u001bM\u0017%X\r'".length();
                var1_4 = 38;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = PolicyBundleInstallerAdminAbstractImpl.b(v0, PolicyBundleInstallerAdminAbstractImpl.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "x@*\u0002.:~\t<w.@8o3!t&@pyilhb\r y3iu-\u0014ux\"=n0\u000eud2%w";
                    var4_3 = "x@*\u0002.:~\t<w.@8o3!t&@pyilhb\r y3iu-\u0014ux\"=n0\u000eud2%w".length();
                    var1_4 = 2;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 69;
                        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++] = PolicyBundleInstallerAdminAbstractImpl.b(v0, PolicyBundleInstallerAdminAbstractImpl.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;
            }
        }
        PolicyBundleInstallerAdminAbstractImpl.o = var5;
        PolicyBundleInstallerAdminAbstractImpl.g = PolicyBundleInstallerAdminAbstractImpl.o[23];
        PolicyBundleInstallerAdminAbstractImpl.f = PolicyBundleInstallerAdminAbstractImpl.o[41];
        PolicyBundleInstallerAdminAbstractImpl.e = Logger.getLogger(PolicyBundleInstallerAdminAbstractImpl.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 Exception a(Exception exception) {
        return exception;
    }

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

