/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.audit.Audit
 *  com.l7tech.gateway.common.audit.AuditFactory
 *  com.l7tech.gateway.common.stepdebug.DebugState
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.policy.assertion.AssertionStatus
 *  com.l7tech.util.Background
 *  com.l7tech.util.ConfigFactory
 *  com.l7tech.util.Option
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.context.ApplicationEventPublisher
 *  org.springframework.context.ApplicationEventPublisherAware
 */
package com.l7tech.server.stepdebug;

import com.l7tech.gateway.common.audit.Audit;
import com.l7tech.gateway.common.audit.AuditFactory;
import com.l7tech.gateway.common.stepdebug.DebugState;
import com.l7tech.objectmodel.Goid;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.server.event.admin.PolicyDebuggerAdminEvent;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.stepdebug.DebugContext;
import com.l7tech.server.stepdebug.DebugManager;
import com.l7tech.server.stepdebug.c;
import com.l7tech.util.Background;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.Option;
import java.util.Collection;
import java.util.Map;
import java.util.TimerTask;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Logger;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;

/*
 * Exception performing whole class analysis ignored.
 */
public class DebugManagerImpl
implements ApplicationEventPublisherAware,
DebugManager {
    private static final Logger a;
    private static final String b;
    private static final long c = 86460000L;
    private static final String d;
    private static final long e = 86400000L;
    private final Audit f;
    private ApplicationEventPublisher g;
    private final Map<String, DebugContext> h;
    private final Map<Goid, DebugContext> i;
    private final Lock j;
    private static final String[] k;

    public DebugManagerImpl(@NotNull AuditFactory auditFactory) {
        if (auditFactory == null) {
            DebugManagerImpl.a(0);
        }
        this.h = new ConcurrentHashMap<String, DebugContext>();
        this.i = new ConcurrentHashMap<Goid, DebugContext>();
        this.j = new ReentrantLock(true);
        this.f = auditFactory.newInstance((Object)this, a);
        String[] stringArray = k;
        long l2 = ConfigFactory.getLongProperty((String)stringArray[9], (long)86460000L);
        long l3 = ConfigFactory.getLongProperty((String)stringArray[14], (long)86400000L);
        Background.scheduleRepeated((TimerTask)new c(this, l3), (long)l2, (long)l2);
    }

    public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
        this.g = applicationEventPublisher;
    }

    @Override
    @NotNull
    public DebugContext createDebugContext(@NotNull Goid goid) {
        DebugContext debugContext;
        try {
            if (goid == null) {
                DebugManagerImpl.a(1);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        String string = UUID.randomUUID().toString();
        DebugContext debugContext2 = new DebugContext(goid, string, this.f);
        try {
            this.h.put(string, debugContext2);
            debugContext = debugContext2;
            if (debugContext == null) {
                DebugManagerImpl.a(2);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        return debugContext;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    @Override
    @NotNull
    public Option<String> startDebug(@NotNull String string) {
        Option option;
        Goid goid;
        DebugContext debugContext;
        block16: {
            Option option2;
            try {
                if (string == null) {
                    DebugManagerImpl.a(3);
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw DebugManagerImpl.a(illegalArgumentException);
            }
            this.j.lock();
            debugContext = this.a(string);
            goid = debugContext.getPolicyGoid();
            boolean bl2 = false;
            for (DebugContext debugContext2 : this.h.values()) {
                try {
                    if (!goid.equals((Object)debugContext2.getPolicyGoid()) || debugContext2.getDebugState().equals((Object)DebugState.STOPPED)) continue;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw DebugManagerImpl.a(illegalArgumentException);
                }
                bl2 = true;
            }
            if (!bl2) break block16;
            Option option3 = Option.some((Object)k[13]);
            try {
                this.j.unlock();
                option2 = option3;
                if (option2 == null) {
                    DebugManagerImpl.a(4);
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw DebugManagerImpl.a(illegalArgumentException);
            }
            return option2;
        }
        try {
            this.g.publishEvent((ApplicationEvent)new PolicyDebuggerAdminEvent((Object)this, true, goid));
            debugContext.startDebugging();
            this.i.put(goid, debugContext);
        }
        finally {
            this.j.unlock();
        }
        try {
            option = Option.none();
            if (option == null) {
                DebugManagerImpl.a(5);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        return option;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    @Override
    public void stopDebug(@NotNull String string) {
        block9: {
            try {
                if (string == null) {
                    DebugManagerImpl.a(6);
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw DebugManagerImpl.a(illegalArgumentException);
            }
            this.j.lock();
            try {
                DebugContext debugContext = this.getDebugContext(string);
                if (debugContext == null) break block9;
                Goid goid = debugContext.getPolicyGoid();
                try {
                    this.i.remove(goid);
                    if (!debugContext.getDebugState().equals((Object)DebugState.STOPPED)) {
                        this.g.publishEvent((ApplicationEvent)new PolicyDebuggerAdminEvent((Object)this, false, goid));
                        debugContext.stopDebugging();
                    }
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw DebugManagerImpl.a(illegalArgumentException);
                }
            }
            finally {
                this.j.unlock();
            }
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    @Override
    public void stepOver(@NotNull String string, @NotNull Collection<Integer> collection) {
        try {
            if (string == null) {
                DebugManagerImpl.a(7);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        try {
            if (collection == null) {
                DebugManagerImpl.a(8);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        this.j.lock();
        try {
            DebugContext debugContext = this.a(string);
            debugContext.stepOver(collection);
        }
        finally {
            this.j.unlock();
        }
    }

    @Override
    public void stepInto(@NotNull String string) {
        try {
            if (string == null) {
                DebugManagerImpl.a(9);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        this.j.lock();
        try {
            DebugContext debugContext = this.a(string);
            debugContext.stepInto();
        }
        finally {
            this.j.unlock();
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    @Override
    public void stepOut(@NotNull String string, @NotNull Collection<Integer> collection) {
        try {
            if (string == null) {
                DebugManagerImpl.a(10);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        try {
            if (collection == null) {
                DebugManagerImpl.a(11);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        this.j.lock();
        try {
            DebugContext debugContext = this.a(string);
            debugContext.stepOut(collection);
        }
        finally {
            this.j.unlock();
        }
    }

    @Override
    public void resume(@NotNull String string) {
        try {
            if (string == null) {
                DebugManagerImpl.a(12);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        this.j.lock();
        try {
            DebugContext debugContext = this.a(string);
            debugContext.resume();
        }
        finally {
            this.j.unlock();
        }
    }

    @Override
    public void terminateDebug(@NotNull String string) {
        try {
            if (string == null) {
                DebugManagerImpl.a(13);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        this.j.lock();
        try {
            this.stopDebug(string);
            DebugContext debugContext = this.getDebugContext(string);
            try {
                if (debugContext != null) {
                    debugContext.setIsTerminated(true);
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw DebugManagerImpl.a(illegalArgumentException);
            }
            this.h.remove(string);
        }
        finally {
            this.j.unlock();
        }
    }

    @Override
    public void toggleBreakpoint(@NotNull String string, @NotNull Collection<Integer> collection) {
        try {
            if (string == null) {
                DebugManagerImpl.a(14);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        try {
            if (collection == null) {
                DebugManagerImpl.a(15);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        DebugContext debugContext = this.a(string);
        debugContext.toggleBreakpoint(collection);
    }

    @Override
    public void removeAllBreakpoints(@NotNull String string) {
        try {
            if (string == null) {
                DebugManagerImpl.a(16);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        DebugContext debugContext = this.a(string);
        debugContext.removeAllBreakpoints();
    }

    @Override
    public void addUserContextVariable(@NotNull String string, @NotNull String string2) {
        try {
            if (string == null) {
                DebugManagerImpl.a(17);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        try {
            if (string2 == null) {
                DebugManagerImpl.a(18);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        DebugContext debugContext = this.a(string);
        debugContext.addUserContextVariable(string2);
    }

    @Override
    public void removeUserContextVariable(@NotNull String string, @NotNull String string2) {
        try {
            if (string == null) {
                DebugManagerImpl.a(19);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        try {
            if (string2 == null) {
                DebugManagerImpl.a(20);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        DebugContext debugContext = this.a(string);
        debugContext.removeUserContextVariable(string2);
    }

    @Override
    @Nullable
    public DebugContext getDebugContext(@NotNull String string) {
        try {
            if (string == null) {
                DebugManagerImpl.a(21);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        return this.h.get(string);
    }

    @Override
    public void onMessageArrived(@NotNull PolicyEnforcementContext policyEnforcementContext, @NotNull Goid goid) {
        try {
            if (policyEnforcementContext == null) {
                DebugManagerImpl.a(22);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        try {
            if (goid == null) {
                DebugManagerImpl.a(23);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        DebugContext debugContext = this.i.remove(goid);
        try {
            if (debugContext != null) {
                debugContext.onMessageArrived(policyEnforcementContext);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
    }

    @Override
    public void onMessageFinished(@NotNull PolicyEnforcementContext policyEnforcementContext, @Nullable AssertionStatus assertionStatus) {
        try {
            if (policyEnforcementContext == null) {
                DebugManagerImpl.a(24);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        DebugContext debugContext = policyEnforcementContext.getDebugContext();
        try {
            if (debugContext != null) {
                debugContext.onMessageFinished(policyEnforcementContext, assertionStatus);
                this.stopDebug(debugContext.getTaskId());
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
    }

    void a() {
        for (DebugContext debugContext : this.h.values()) {
            this.terminateDebug(debugContext.getTaskId());
        }
        this.h.clear();
        this.i.clear();
    }

    @NotNull
    private DebugContext a(@NotNull String string) {
        DebugContext debugContext;
        try {
            if (string == null) {
                DebugManagerImpl.a(25);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        try {
            debugContext = this.h.get(string);
            if (debugContext == null) {
                DebugManagerImpl.a(26);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw DebugManagerImpl.a(illegalArgumentException);
        }
        return debugContext;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[35];
                var3_1 = 0;
                var2_2 = "Y%J6\f\u00177Y\u0003Q\u001c\u001d\u0010:J\u0006_\u001b\u0005<$p5R\u001e\u0011Q.s\u0017\u001a\u0006#Y%x\u001b\u0007\u001c1V%Z\u000f_3M\u0017\u001b\u0001+Q.p\u0007\u0004\u0017'L\u0014L%S\u001d\u001f\u0010\u0003R,|\u0000\f\u0014)N/W\u001c\u001d\u0006\f_5Z\u001b\u001d3#]4Q\u0000\u0010\u0006J!M\u0019 \u0011\bM4[\u0002 \u001b6Q\u0019L%S\u001d\u001f\u0010\u0017M%L1\u0006\u001b6[8J$\b\u0007+_\"R\u0017*~\u000eQ\u0006'\u0000.R`S\u0017\u001d\u001d-Z`\u001b\u0001GP1\u001e-K\u0001\u001dU,Q4\u001e\u0000\f\u00017L.\u001e\u001c\u001c\u0019.>]/S\\\u0005B6[#V\\\u001a\u00100H%L\\\u001a\u0001'N$[\u0010\u001c\u0012lW._\u0011\u001d\u001c4[\u0013[\u0001\u001a\u001c-P\u0003R\u0017\b\u001b\u000bP4[\u0000\u001f\u0014.s)R\u001e\u0000\u0006\u0010J/Y\u0015\u0005\u0010\u0000L%_\u0019\u0019\u001a+P48]/S\\\u0005B6[#V\\\u001a\u00100H%L\\\u001a\u0001'N$[\u0010\u001c\u0012lW._\u0011\u001d\u001c4[\u0013[\u0001\u001a\u001c-P\u0014W\u001f\f\u001a7J\rW\u001e\u0005\u001c1\nM4_\u0000\u001d1'\\5Yb}!P\u001c\u0006\u0001bM4_\u0000\u001dU\u0011[2H\u001b\n\u0010bz%\\\u0007\u000e\u0012'Ln\u001e&\u0001\u00100[`W\u0001I\u0014bm%L\u0004\u0000\u0016'\u001e\u0004[\u0010\u001c\u0012%[2\u001e\u0013\u0005\u0007'_$GR\u001b\u0000,P)P\u0015I\u0013-L`J\u001a\fU1[2H\u001b\n\u0010mN/R\u001b\n\fl8]/S\\\u0005B6[#V\\\u001a\u00100H%L\\\u001a\u0001'N$[\u0010\u001c\u0012lW._\u0011\u001d\u001c4[\u0013[\u0001\u001a\u001c-P\u0014W\u001f\f\u001a7J\rW\u001e\u0005\u001c1\u0019Y%J6\f\u00177Y\u0003Q\u001c\u001d\u0010:J\u0006_\u001b\u0005<$p5R\u001e\u0006\u0002)P\u001b\u001dK>]/S\\\u0005B6[#V\\\u001a\u00100H%L\\\u001a\u0001'N$[\u0010\u001c\u0012lW._\u0011\u001d\u001c4[\u0013[\u0001\u001a\u001c-P\u0003R\u0017\b\u001b\u000bP4[\u0000\u001f\u0014.s)R\u001e\u0000\u0006\nM4_\u0000\u001d1'\\5Y\u0003N%],]/S]\u0005B6[#V]\u001a\u00100H%L]\u001a\u0001'N$[\u0010\u001c\u0012mz%\\\u0007\u000e8#P!Y\u0017\u001b</N,\tM4Q\u0002-\u0010 K'>\u007f2Y\u0007\u0004\u0010,J`X\u001d\u001bU\u0002p/J<\u001c\u0019.\u001e0_\u0000\b\u0018'J%LRNP1\u0019`Q\u0014IP1\u0010eMR\u0004\u00001J`P\u001d\u001dU [`P\u0007\u0005\u0019\nN/R\u001b\n\f\u0005Q)Z\u0004P!S\u0017\u000eJ%L\u001f\u0000\u001b#J%z\u0017\u000b\u0000%\u0016_$Z'\u001a\u00100}/P\u0006\f\r6h!L\u001b\b\u0017.[,]/S]\u0005B6[#V]\u001a\u00100H%L]\u001a\u0001'N$[\u0010\u001c\u0012mz%\\\u0007\u000e8#P!Y\u0017\u001b</N,\u0006L%M\u0007\u0004\u0010\bM4[\u0002&\u0003'L\u0012]2[\u0013\u001d\u0010\u0006[\"K\u0015*\u001a,J%F\u0006\u0010Q.s\u0017\u001a\u0006#Y%\u007f\u0000\u001b\u001c4[$\u0012]2[\u0013\u001d\u0010\u0006[\"K\u0015*\u001a,J%F\u0006";
                var4_3 = "Y%J6\f\u00177Y\u0003Q\u001c\u001d\u0010:J\u0006_\u001b\u0005<$p5R\u001e\u0011Q.s\u0017\u001a\u0006#Y%x\u001b\u0007\u001c1V%Z\u000f_3M\u0017\u001b\u0001+Q.p\u0007\u0004\u0017'L\u0014L%S\u001d\u001f\u0010\u0003R,|\u0000\f\u0014)N/W\u001c\u001d\u0006\f_5Z\u001b\u001d3#]4Q\u0000\u0010\u0006J!M\u0019 \u0011\bM4[\u0002 \u001b6Q\u0019L%S\u001d\u001f\u0010\u0017M%L1\u0006\u001b6[8J$\b\u0007+_\"R\u0017*~\u000eQ\u0006'\u0000.R`S\u0017\u001d\u001d-Z`\u001b\u0001GP1\u001e-K\u0001\u001dU,Q4\u001e\u0000\f\u00017L.\u001e\u001c\u001c\u0019.>]/S\\\u0005B6[#V\\\u001a\u00100H%L\\\u001a\u0001'N$[\u0010\u001c\u0012lW._\u0011\u001d\u001c4[\u0013[\u0001\u001a\u001c-P\u0003R\u0017\b\u001b\u000bP4[\u0000\u001f\u0014.s)R\u001e\u0000\u0006\u0010J/Y\u0015\u0005\u0010\u0000L%_\u0019\u0019\u001a+P48]/S\\\u0005B6[#V\\\u001a\u00100H%L\\\u001a\u0001'N$[\u0010\u001c\u0012lW._\u0011\u001d\u001c4[\u0013[\u0001\u001a\u001c-P\u0014W\u001f\f\u001a7J\rW\u001e\u0005\u001c1\nM4_\u0000\u001d1'\\5Yb}!P\u001c\u0006\u0001bM4_\u0000\u001dU\u0011[2H\u001b\n\u0010bz%\\\u0007\u000e\u0012'Ln\u001e&\u0001\u00100[`W\u0001I\u0014bm%L\u0004\u0000\u0016'\u001e\u0004[\u0010\u001c\u0012%[2\u001e\u0013\u0005\u0007'_$GR\u001b\u0000,P)P\u0015I\u0013-L`J\u001a\fU1[2H\u001b\n\u0010mN/R\u001b\n\fl8]/S\\\u0005B6[#V\\\u001a\u00100H%L\\\u001a\u0001'N$[\u0010\u001c\u0012lW._\u0011\u001d\u001c4[\u0013[\u0001\u001a\u001c-P\u0014W\u001f\f\u001a7J\rW\u001e\u0005\u001c1\u0019Y%J6\f\u00177Y\u0003Q\u001c\u001d\u0010:J\u0006_\u001b\u0005<$p5R\u001e\u0006\u0002)P\u001b\u001dK>]/S\\\u0005B6[#V\\\u001a\u00100H%L\\\u001a\u0001'N$[\u0010\u001c\u0012lW._\u0011\u001d\u001c4[\u0013[\u0001\u001a\u001c-P\u0003R\u0017\b\u001b\u000bP4[\u0000\u001f\u0014.s)R\u001e\u0000\u0006\nM4_\u0000\u001d1'\\5Y\u0003N%],]/S]\u0005B6[#V]\u001a\u00100H%L]\u001a\u0001'N$[\u0010\u001c\u0012mz%\\\u0007\u000e8#P!Y\u0017\u001b</N,\tM4Q\u0002-\u0010 K'>\u007f2Y\u0007\u0004\u0010,J`X\u001d\u001bU\u0002p/J<\u001c\u0019.\u001e0_\u0000\b\u0018'J%LRNP1\u0019`Q\u0014IP1\u0010eMR\u0004\u00001J`P\u001d\u001dU [`P\u0007\u0005\u0019\nN/R\u001b\n\f\u0005Q)Z\u0004P!S\u0017\u000eJ%L\u001f\u0000\u001b#J%z\u0017\u000b\u0000%\u0016_$Z'\u001a\u00100}/P\u0006\f\r6h!L\u001b\b\u0017.[,]/S]\u0005B6[#V]\u001a\u00100H%L]\u001a\u0001'N$[\u0010\u001c\u0012mz%\\\u0007\u000e8#P!Y\u0017\u001b</N,\u0006L%M\u0007\u0004\u0010\bM4[\u0002&\u0003'L\u0012]2[\u0013\u001d\u0010\u0006[\"K\u0015*\u001a,J%F\u0006\u0010Q.s\u0017\u001a\u0006#Y%\u007f\u0000\u001b\u001c4[$\u0012]2[\u0013\u001d\u0010\u0006[\"K\u0015*\u001a,J%F\u0006".length();
                var1_4 = 25;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = DebugManagerImpl.a(v0, DebugManagerImpl.b(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "f\u001fp)\r+\u001d\u000fr\u000ea\u001d'<\u001cr(z76;\u0011a";
                    var4_3 = "f\u001fp)\r+\u001d\u000fr\u000ea\u001d'<\u001cr(z76;\u0011a".length();
                    var1_4 = 7;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 116;
                        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++] = DebugManagerImpl.a(v0, DebugManagerImpl.b(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        DebugManagerImpl.k = var5;
        DebugManagerImpl.d = DebugManagerImpl.k[11];
        DebugManagerImpl.b = DebugManagerImpl.k[17];
        DebugManagerImpl.a = Logger.getLogger(DebugManagerImpl.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 IllegalArgumentException a(IllegalArgumentException illegalArgumentException) {
        return illegalArgumentException;
    }

    private static char[] b(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x1D);
        }
        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 -> 97;
                    case 1 -> 31;
                    case 2 -> 97;
                    case 3 -> 45;
                    case 4 -> 54;
                    case 5 -> 42;
                    default -> 29;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

