/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.log.HybridDiagnosticContext
 *  com.l7tech.common.log.HybridDiagnosticContext$SavedDiagnosticContext
 *  com.l7tech.gateway.common.Component
 *  com.l7tech.gateway.common.audit.AdminAuditRecord
 *  com.l7tech.gateway.common.audit.AuditDetail
 *  com.l7tech.gateway.common.audit.AuditDetailEvent$AuditDetailWithInfo
 *  com.l7tech.gateway.common.audit.AuditDetailMessage
 *  com.l7tech.gateway.common.audit.AuditRecord
 *  com.l7tech.gateway.common.audit.AuditRecordSigner
 *  com.l7tech.gateway.common.audit.ExtendedAuditDetail
 *  com.l7tech.gateway.common.audit.MessageSummaryAuditRecord
 *  com.l7tech.gateway.common.audit.MessagesUtil
 *  com.l7tech.gateway.common.audit.SystemAuditRecord
 *  com.l7tech.gateway.common.security.keystore.SsgKeyEntry
 *  com.l7tech.objectmodel.PersistentEntity
 *  com.l7tech.objectmodel.SaveException
 *  com.l7tech.objectmodel.UpdateException
 *  com.l7tech.policy.assertion.AssertionStatus
 *  com.l7tech.util.Config
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.Functions$Nullary
 *  com.l7tech.util.InetAddressUtil
 *  com.l7tech.util.Pair
 */
package com.l7tech.server.audit;

import com.l7tech.common.log.HybridDiagnosticContext;
import com.l7tech.gateway.common.Component;
import com.l7tech.gateway.common.audit.AdminAuditRecord;
import com.l7tech.gateway.common.audit.AuditDetail;
import com.l7tech.gateway.common.audit.AuditDetailEvent;
import com.l7tech.gateway.common.audit.AuditDetailMessage;
import com.l7tech.gateway.common.audit.AuditRecord;
import com.l7tech.gateway.common.audit.AuditRecordSigner;
import com.l7tech.gateway.common.audit.ExtendedAuditDetail;
import com.l7tech.gateway.common.audit.MessageSummaryAuditRecord;
import com.l7tech.gateway.common.audit.MessagesUtil;
import com.l7tech.gateway.common.audit.SystemAuditRecord;
import com.l7tech.gateway.common.security.keystore.SsgKeyEntry;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.objectmodel.SaveException;
import com.l7tech.objectmodel.UpdateException;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.server.DefaultKey;
import com.l7tech.server.audit.AuditContext;
import com.l7tech.server.audit.AuditFilterPolicyManager;
import com.l7tech.server.audit.AuditLogFormatter;
import com.l7tech.server.audit.AuditLogListener;
import com.l7tech.server.audit.AuditPolicyEvaluator;
import com.l7tech.server.audit.AuditRecordManager;
import com.l7tech.server.audit.DefaultAuditThresholds;
import com.l7tech.server.audit.n;
import com.l7tech.server.audit.o;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.util.Config;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.Functions;
import com.l7tech.util.InetAddressUtil;
import com.l7tech.util.Pair;
import java.security.PrivateKey;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;

public class AuditContextImpl
implements AuditContext {
    private static final Logger a;
    private static final String b;
    private static final Boolean c;
    private static final String d;
    private final Config e;
    private final AuditRecordManager f;
    private final String g;
    private final AuditPolicyEvaluator h;
    private final AuditFilterPolicyManager i;
    private final DefaultKey j;
    private final AuditLogListener k;
    private Map<String, Object> l;
    private Level m;
    private Level n;
    private Level o;
    private Level p;
    private Boolean q;
    private Boolean r;
    private AuditRecord s;
    private String t;
    private boolean u;
    private Level v = Level.ALL;
    private volatile int w = 0;
    private boolean x = false;
    static final String y;
    private final Map<Object, List<AuditDetailEvent.AuditDetailWithInfo>> z = new LinkedHashMap<Object, List<AuditDetailEvent.AuditDetailWithInfo>>();
    private static final String[] A;

    AuditContextImpl(Config config, AuditRecordManager auditRecordManager, AuditPolicyEvaluator auditPolicyEvaluator, AuditFilterPolicyManager auditFilterPolicyManager, String string, DefaultKey defaultKey, AuditLogListener auditLogListener) {
        if (config == null) {
            String[] stringArray = A;
            throw new IllegalArgumentException(stringArray[42]);
        }
        try {
            if (auditRecordManager == null) {
                throw new IllegalArgumentException(A[9]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw AuditContextImpl.a(illegalArgumentException);
        }
        this.e = config;
        this.f = auditRecordManager;
        this.h = auditPolicyEvaluator;
        this.i = auditFilterPolicyManager;
        this.g = string;
        this.j = defaultKey;
        this.k = auditLogListener;
    }

    void a(AuditRecord auditRecord) {
        block13: {
            try {
                this.b(A[1]);
                if (auditRecord == null) {
                    throw new NullPointerException(A[37]);
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw AuditContextImpl.a(illegalArgumentException);
            }
            try {
                if (this.s != null) {
                    throw new IllegalStateException(A[33] + this.s.getMessage() + A[18] + auditRecord.getMessage() + A[5]);
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw AuditContextImpl.a(illegalArgumentException);
            }
            try {
                try {
                    if (auditRecord.getLevel() == null || auditRecord.getLevel().intValue() <= this.v.intValue()) break block13;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditContextImpl.a(illegalArgumentException);
                }
                this.v = auditRecord.getLevel();
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw AuditContextImpl.a(illegalArgumentException);
            }
        }
        try {
            if (AuditLogFormatter.isFormatJson()) {
                this.t = UUID.randomUUID().toString();
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw AuditContextImpl.a(illegalArgumentException);
        }
        this.s = auditRecord;
    }

    @Override
    public void addDetail(AuditDetail auditDetail, Object object) {
        this.addDetail(new AuditDetailEvent.AuditDetailWithInfo(object, auditDetail, null, null));
    }

    @Override
    public void addDetail(AuditDetailEvent.AuditDetailWithInfo auditDetailWithInfo) {
        block14: {
            Level level;
            try {
                this.b(A[15]);
                if (auditDetailWithInfo == null) {
                    throw new NullPointerException(A[49]);
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw AuditContextImpl.a(illegalArgumentException);
            }
            AuditDetail auditDetail = auditDetailWithInfo.getDetail();
            AuditDetailMessage auditDetailMessage = MessagesUtil.getAuditDetailMessageById((int)auditDetail.getMessageId());
            try {
                if (auditDetailMessage == null) {
                    throw new RuntimeException(A[43] + auditDetail.getMessageId() + A[61]);
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw AuditContextImpl.a(illegalArgumentException);
            }
            try {
                level = this.h() ? MessagesUtil.getAuditLevelByIdWithFilter((int)auditDetail.getMessageId()) : auditDetailMessage.getLevel();
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw AuditContextImpl.a(illegalArgumentException);
            }
            Level level2 = level;
            try {
                try {
                    try {
                        auditDetail.setOrdinal(this.w++);
                        this.a(auditDetailWithInfo.getSource()).add(auditDetailWithInfo);
                        if (!this.h() || level2 == null) break block14;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw AuditContextImpl.a(illegalArgumentException);
                    }
                    if (level2.intValue() <= this.v.intValue()) break block14;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditContextImpl.a(illegalArgumentException);
                }
                this.v = level2;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw AuditContextImpl.a(illegalArgumentException);
            }
        }
    }

    public void setUpdate(boolean bl2) {
        this.b(A[56]);
        this.u = bl2;
    }

    private List<AuditDetailEvent.AuditDetailWithInfo> a(Object object) {
        List<AuditDetailEvent.AuditDetailWithInfo> list = this.z.get(object);
        if (list == null) {
            list = new LinkedList<AuditDetailEvent.AuditDetailWithInfo>();
            this.z.put(object, list);
        }
        return list;
    }

    @Override
    public Set getHints() {
        HashSet hashSet = new HashSet();
        for (List<AuditDetailEvent.AuditDetailWithInfo> list : this.z.values()) {
            for (AuditDetailEvent.AuditDetailWithInfo auditDetailWithInfo : list) {
                Set set;
                AuditDetailMessage auditDetailMessage = MessagesUtil.getAuditDetailMessageById((int)auditDetailWithInfo.getDetail().getMessageId());
                try {
                    set = auditDetailMessage == null ? null : auditDetailMessage.getHints();
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditContextImpl.a(illegalArgumentException);
                }
                Set set2 = set;
                try {
                    if (set2 == null) continue;
                    hashSet.addAll(set2);
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditContextImpl.a(illegalArgumentException);
                }
            }
        }
        return Collections.unmodifiableSet(hashSet);
    }

    /*
     * Could not resolve type clashes
     * Loose catch block
     */
    void a() {
        block65: {
            block54: {
                try {
                    if (this.x) {
                        throw new IllegalStateException(A[46]);
                    }
                }
                catch (SaveException saveException) {
                    throw AuditContextImpl.a((Exception)((Object)saveException));
                }
                this.x = true;
                if (this.s != null) break block65;
                try {
                    block66: {
                        if (this.z.isEmpty()) break block54;
                        break block66;
                        catch (SaveException saveException) {
                            throw AuditContextImpl.a((Exception)((Object)saveException));
                        }
                    }
                    a.warning(A[23]);
                }
                catch (SaveException saveException) {
                    throw AuditContextImpl.a((Exception)((Object)saveException));
                }
            }
            return;
        }
        PolicyEnforcementContext policyEnforcementContext = null;
        try {
            AuditDetail auditDetail;
            Object object4;
            Object object2;
            Object object3;
            block59: {
                block63: {
                    block74: {
                        block61: {
                            block62: {
                                block72: {
                                    block71: {
                                        block58: {
                                            block60: {
                                                block69: {
                                                    block55: {
                                                        block56: {
                                                            block57: {
                                                                block67: {
                                                                    if (!(this.s instanceof MessageSummaryAuditRecord)) break block55;
                                                                    if (this.v.intValue() >= this.f().intValue()) break block56;
                                                                    break block67;
                                                                    catch (SaveException saveException) {
                                                                        throw AuditContextImpl.a((Exception)((Object)saveException));
                                                                    }
                                                                }
                                                                try {
                                                                    block68: {
                                                                        if (!a.isLoggable(Level.FINE)) break block57;
                                                                        break block68;
                                                                        catch (SaveException saveException) {
                                                                            throw AuditContextImpl.a((Exception)((Object)saveException));
                                                                        }
                                                                    }
                                                                    a.fine(A[29] + String.valueOf(this.s.getLevel()) + A[35] + this.f().getName());
                                                                }
                                                                catch (SaveException saveException) {
                                                                    throw AuditContextImpl.a((Exception)((Object)saveException));
                                                                }
                                                            }
                                                            return;
                                                        }
                                                        policyEnforcementContext = (PolicyEnforcementContext)((MessageSummaryAuditRecord)this.s).originalPolicyEnforcementContext();
                                                        break block59;
                                                    }
                                                    if (!(this.s instanceof AdminAuditRecord)) break block58;
                                                    if (this.s.getLevel().intValue() >= this.i().intValue()) break block59;
                                                    break block69;
                                                    catch (SaveException saveException) {
                                                        throw AuditContextImpl.a((Exception)((Object)saveException));
                                                    }
                                                }
                                                try {
                                                    block70: {
                                                        if (!a.isLoggable(Level.FINE)) break block60;
                                                        break block70;
                                                        catch (SaveException saveException) {
                                                            throw AuditContextImpl.a((Exception)((Object)saveException));
                                                        }
                                                    }
                                                    a.fine(A[2] + String.valueOf(this.s.getLevel()) + A[38] + this.i().getName());
                                                }
                                                catch (SaveException saveException) {
                                                    throw AuditContextImpl.a((Exception)((Object)saveException));
                                                }
                                            }
                                            return;
                                        }
                                        if (!(this.s instanceof SystemAuditRecord)) break block59;
                                        object3 = (SystemAuditRecord)this.s;
                                        object2 = Component.fromId((int)object3.getComponentId());
                                        if (object2 == null) break block61;
                                        if (!object2.isClientComponent()) break block61;
                                        break block71;
                                        catch (SaveException saveException) {
                                            throw AuditContextImpl.a((Exception)((Object)saveException));
                                        }
                                    }
                                    if (this.v.intValue() >= this.j().intValue()) break block59;
                                    break block72;
                                    catch (SaveException saveException) {
                                        throw AuditContextImpl.a((Exception)((Object)saveException));
                                    }
                                }
                                try {
                                    block73: {
                                        if (!a.isLoggable(Level.FINE)) break block62;
                                        break block73;
                                        catch (SaveException saveException) {
                                            throw AuditContextImpl.a((Exception)((Object)saveException));
                                        }
                                    }
                                    a.fine(A[13] + String.valueOf(this.s.getLevel()) + A[34] + this.j().getName());
                                }
                                catch (SaveException saveException) {
                                    throw AuditContextImpl.a((Exception)((Object)saveException));
                                }
                            }
                            return;
                        }
                        if (object3.alwaysAudit()) break block59;
                        if (this.v.intValue() >= Level.WARNING.intValue()) break block59;
                        break block74;
                        catch (SaveException saveException) {
                            throw AuditContextImpl.a((Exception)((Object)saveException));
                        }
                    }
                    try {
                        block75: {
                            if (!a.isLoggable(Level.FINEST)) break block63;
                            break block75;
                            catch (SaveException saveException) {
                                throw AuditContextImpl.a((Exception)((Object)saveException));
                            }
                        }
                        a.finest(A[27] + String.valueOf(this.s.getLevel()) + A[31]);
                    }
                    catch (SaveException saveException) {
                        throw AuditContextImpl.a((Exception)((Object)saveException));
                    }
                }
                return;
            }
            object3 = new AuditLogFormatter(this.l);
            try {
                this.s.setLevel(this.v);
                if (!this.b()) {
                    this.k.notifyRecordFlushed(this.s, this.t, (AuditLogFormatter)object3, true);
                }
            }
            catch (SaveException saveException) {
                throw AuditContextImpl.a((Exception)((Object)saveException));
            }
            object2 = new TreeSet<AuditDetail>(new n(this));
            for (Object object4 : this.z.values()) {
                auditDetail = object4.iterator();
                while (auditDetail.hasNext()) {
                    AuditDetailMessage auditDetailMessage;
                    AuditDetailEvent.AuditDetailWithInfo auditDetailWithInfo;
                    block64: {
                        auditDetailWithInfo = auditDetail.next();
                        int n2 = auditDetailWithInfo.getDetail().getMessageId();
                        Pair pair = MessagesUtil.getAuditDetailMessageByIdWithFilter((int)n2);
                        try {
                            if (!((Boolean)pair.left).booleanValue()) {
                                throw new RuntimeException(A[66] + n2 + A[60]);
                            }
                        }
                        catch (SaveException saveException) {
                            throw AuditContextImpl.a((Exception)((Object)saveException));
                        }
                        auditDetailMessage = (AuditDetailMessage)pair.right;
                        try {
                            if (auditDetailMessage == null) {
                                continue;
                            }
                        }
                        catch (SaveException saveException) {
                            throw AuditContextImpl.a((Exception)((Object)saveException));
                        }
                        Level level = auditDetailMessage.getLevel();
                        try {
                            if (level.intValue() < this.g().intValue()) continue;
                            auditDetailWithInfo.getDetail().setAuditRecord(this.s);
                            if (!(auditDetailWithInfo.getDetail() instanceof ExtendedAuditDetail)) break block64;
                        }
                        catch (SaveException saveException) {
                            throw AuditContextImpl.a((Exception)((Object)saveException));
                        }
                        ExtendedAuditDetail extendedAuditDetail = (ExtendedAuditDetail)auditDetailWithInfo.getDetail();
                        try {
                            if (!extendedAuditDetail.shouldSave()) {
                                continue;
                            }
                        }
                        catch (SaveException saveException) {
                            throw AuditContextImpl.a((Exception)((Object)saveException));
                        }
                    }
                    object2.add(auditDetailWithInfo.getDetail());
                    HybridDiagnosticContext.doWithContext((HybridDiagnosticContext.SavedDiagnosticContext)auditDetailWithInfo.getContext(), (Functions.Nullary)new o(this, auditDetailWithInfo, auditDetailMessage, (AuditLogFormatter)object3));
                }
            }
            if (this.b(this.s)) {
                return;
            }
            int n3 = 0;
            object4 = object2.iterator();
            while (object4.hasNext()) {
                auditDetail = (AuditDetail)object4.next();
                auditDetail.setOrdinal(n3++);
            }
            this.s.setDetails((Set)object2);
            this.a(this.s, this.u, policyEnforcementContext, (AuditLogFormatter)object3);
        }
        catch (SaveException saveException) {
            String[] stringArray = A;
            a.log(Level.SEVERE, stringArray[24], saveException);
        }
        catch (UpdateException updateException) {
            a.log(Level.SEVERE, A[20], updateException);
        }
    }

    private boolean b(AuditRecord auditRecord) {
        block12: {
            block13: {
                String string;
                String string2;
                try {
                    if (auditRecord.getMessageSummaryAuditStatus() == null) {
                        return false;
                    }
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditContextImpl.a(illegalArgumentException);
                }
                switch (auditRecord.getMessageSummaryAuditStatus()) {
                    case MESSAGE_PROCESSED_SUCCESSFULLY: {
                        String[] stringArray = A;
                        string2 = stringArray[11];
                        string = stringArray[30];
                        break;
                    }
                    case MESSAGE_WAS_NOT_PROCESSED: {
                        String[] stringArray = A;
                        string2 = stringArray[6];
                        string = stringArray[63];
                        break;
                    }
                    case MESSAGE_PROCESSED_WITH_HTTP_ERROR_CODE: {
                        String[] stringArray = A;
                        string2 = stringArray[64];
                        string = stringArray[47];
                        break;
                    }
                    default: {
                        return false;
                    }
                }
                try {
                    try {
                        if (!this.e.getBooleanProperty(string2, false)) break block12;
                        if (!a.isLoggable(Level.FINEST)) break block13;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw AuditContextImpl.a(illegalArgumentException);
                    }
                    a.finest(string);
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditContextImpl.a(illegalArgumentException);
                }
            }
            return true;
        }
        return false;
    }

    private boolean b() {
        boolean bl2;
        block4: {
            String[] stringArray = A;
            bl2 = this.e.getBooleanProperty(stringArray[41], false);
            try {
                try {
                    if (!bl2 || !a.isLoggable(Level.FINEST)) break block4;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditContextImpl.a(illegalArgumentException);
                }
                a.finest(A[51]);
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw AuditContextImpl.a(illegalArgumentException);
            }
        }
        return bl2;
    }

    private void a(AuditRecord auditRecord, boolean bl2, PolicyEnforcementContext policyEnforcementContext, AuditLogFormatter auditLogFormatter) throws UpdateException, SaveException {
        block59: {
            String[] stringArray;
            AssertionStatus assertionStatus;
            boolean bl3;
            block53: {
                block56: {
                    block55: {
                        block54: {
                            block52: {
                                long l2;
                                block44: {
                                    block48: {
                                        block49: {
                                            SystemAuditRecord systemAuditRecord;
                                            block50: {
                                                block47: {
                                                    block46: {
                                                        block45: {
                                                            bl3 = false;
                                                            assertionStatus = null;
                                                            try {
                                                                if (this.i != null) {
                                                                    this.i.filterAuditRecord(auditRecord, policyEnforcementContext, this.k, auditLogFormatter);
                                                                }
                                                            }
                                                            catch (UpdateException updateException) {
                                                                throw AuditContextImpl.a((Exception)((Object)updateException));
                                                            }
                                                            try {
                                                                try {
                                                                    this.k.notifyRecordFlushed(this.s, this.t, auditLogFormatter, false);
                                                                    if (this.h == null) break block44;
                                                                    if (!bl2) break block45;
                                                                }
                                                                catch (UpdateException updateException) {
                                                                    throw AuditContextImpl.a((Exception)((Object)updateException));
                                                                }
                                                                return;
                                                            }
                                                            catch (UpdateException updateException) {
                                                                throw AuditContextImpl.a((Exception)((Object)updateException));
                                                            }
                                                        }
                                                        try {
                                                            if (this.k()) {
                                                                this.d(auditRecord);
                                                            }
                                                        }
                                                        catch (UpdateException updateException) {
                                                            throw AuditContextImpl.a((Exception)((Object)updateException));
                                                        }
                                                        assertionStatus = this.h.outputRecordToPolicyAuditSink(auditRecord, policyEnforcementContext);
                                                        try {
                                                            try {
                                                                if (!AssertionStatus.NONE.equals(assertionStatus)) break block46;
                                                                if (this.e()) break block44;
                                                            }
                                                            catch (UpdateException updateException) {
                                                                throw AuditContextImpl.a((Exception)((Object)updateException));
                                                            }
                                                            return;
                                                        }
                                                        catch (UpdateException updateException) {
                                                            throw AuditContextImpl.a((Exception)((Object)updateException));
                                                        }
                                                    }
                                                    try {
                                                        if (null != assertionStatus) break block47;
                                                        break block44;
                                                    }
                                                    catch (UpdateException updateException) {
                                                        throw AuditContextImpl.a((Exception)((Object)updateException));
                                                    }
                                                }
                                                try {
                                                    try {
                                                        if (this.e() || this.d()) break block48;
                                                    }
                                                    catch (UpdateException updateException) {
                                                        throw AuditContextImpl.a((Exception)((Object)updateException));
                                                    }
                                                    if (!this.c()) break block49;
                                                }
                                                catch (UpdateException updateException) {
                                                    throw AuditContextImpl.a((Exception)((Object)updateException));
                                                }
                                                String[] stringArray2 = A;
                                                a.warning(stringArray2[10]);
                                                systemAuditRecord = new SystemAuditRecord(Level.WARNING, this.g, Component.GW_AUDIT_SYSTEM, stringArray2[39], false, null, null, null, stringArray2[0], d);
                                                try {
                                                    try {
                                                        if (!this.c((AuditRecord)systemAuditRecord)) break block49;
                                                        if (!this.k()) break block50;
                                                    }
                                                    catch (UpdateException updateException) {
                                                        throw AuditContextImpl.a((Exception)((Object)updateException));
                                                    }
                                                    this.d((AuditRecord)systemAuditRecord);
                                                }
                                                catch (UpdateException updateException) {
                                                    throw AuditContextImpl.a((Exception)((Object)updateException));
                                                }
                                            }
                                            this.f.save((PersistentEntity)systemAuditRecord);
                                        }
                                        return;
                                    }
                                    bl3 = true;
                                }
                                if (auditRecord instanceof MessageSummaryAuditRecord && (l2 = this.e.getLongProperty((stringArray = A)[62], 0xA00000L)) > 0L) {
                                    MessageSummaryAuditRecord messageSummaryAuditRecord;
                                    block51: {
                                        messageSummaryAuditRecord = (MessageSummaryAuditRecord)auditRecord;
                                        try {
                                            try {
                                                if (messageSummaryAuditRecord.getRequestXml() == null || (long)messageSummaryAuditRecord.getRequestXml().length() <= l2) break block51;
                                            }
                                            catch (UpdateException updateException) {
                                                throw AuditContextImpl.a((Exception)((Object)updateException));
                                            }
                                            messageSummaryAuditRecord.setRequestXml(A[26]);
                                        }
                                        catch (UpdateException updateException) {
                                            throw AuditContextImpl.a((Exception)((Object)updateException));
                                        }
                                    }
                                    try {
                                        try {
                                            if (messageSummaryAuditRecord.getResponseXml() == null || (long)messageSummaryAuditRecord.getResponseXml().length() <= l2) break block52;
                                        }
                                        catch (UpdateException updateException) {
                                            throw AuditContextImpl.a((Exception)((Object)updateException));
                                        }
                                        messageSummaryAuditRecord.setResponseXml(A[57]);
                                    }
                                    catch (UpdateException updateException) {
                                        throw AuditContextImpl.a((Exception)((Object)updateException));
                                    }
                                }
                            }
                            try {
                                try {
                                    if (!this.c(auditRecord)) break block53;
                                    if (!this.k()) break block54;
                                }
                                catch (UpdateException updateException) {
                                    throw AuditContextImpl.a((Exception)((Object)updateException));
                                }
                                this.d(auditRecord);
                                break block55;
                            }
                            catch (UpdateException updateException) {
                                throw AuditContextImpl.a((Exception)((Object)updateException));
                            }
                        }
                        auditRecord.setSignature(null);
                    }
                    try {
                        if (!bl2) break block56;
                        this.f.update((PersistentEntity)auditRecord);
                        break block53;
                    }
                    catch (UpdateException updateException) {
                        throw AuditContextImpl.a((Exception)((Object)updateException));
                    }
                }
                this.f.save((PersistentEntity)auditRecord);
            }
            if (bl3) {
                SystemAuditRecord systemAuditRecord;
                block57: {
                    block58: {
                        stringArray = A;
                        systemAuditRecord = new SystemAuditRecord(Level.WARNING, this.g, Component.GW_AUDIT_SYSTEM, stringArray[36] + assertionStatus.getNumeric(), false, null, null, null, stringArray[14], d);
                        try {
                            try {
                                if (!this.c((AuditRecord)systemAuditRecord)) break block57;
                                if (!this.k()) break block58;
                            }
                            catch (UpdateException updateException) {
                                throw AuditContextImpl.a((Exception)((Object)updateException));
                            }
                            this.d((AuditRecord)systemAuditRecord);
                        }
                        catch (UpdateException updateException) {
                            throw AuditContextImpl.a((Exception)((Object)updateException));
                        }
                    }
                    this.f.save((PersistentEntity)systemAuditRecord);
                    break block59;
                }
                a.warning(systemAuditRecord.getMessage());
            }
        }
    }

    private boolean c(AuditRecord auditRecord) {
        try {
            if (auditRecord instanceof MessageSummaryAuditRecord) {
                return this.e.getBooleanProperty(A[12], true);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw AuditContextImpl.a(illegalArgumentException);
        }
        try {
            if (auditRecord instanceof SystemAuditRecord) {
                return this.e.getBooleanProperty(A[50], true);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw AuditContextImpl.a(illegalArgumentException);
        }
        try {
            if (auditRecord instanceof AdminAuditRecord) {
                return this.e.getBooleanProperty(A[8], true);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw AuditContextImpl.a(illegalArgumentException);
        }
        return true;
    }

    private boolean c() {
        return this.e.getBooleanProperty(A[25], false);
    }

    private boolean d() {
        return this.e.getBooleanProperty(A[58], true);
    }

    private boolean e() {
        return this.e.getBooleanProperty(A[22], false);
    }

    @Override
    public void setContextVariables(Map<String, Object> map) {
        this.b(A[32]);
        this.l = map;
    }

    void d(AuditRecord auditRecord) {
        try {
            SsgKeyEntry ssgKeyEntry = this.j.getAuditSigningInfo();
            if (ssgKeyEntry == null) {
                ssgKeyEntry = this.j.getServerSslInfo();
            }
            PrivateKey privateKey = ssgKeyEntry.getPrivate();
            new AuditRecordSigner(privateKey).signAuditRecord(auditRecord);
        }
        catch (Exception exception) {
            a.log(Level.WARNING, A[55] + ExceptionUtils.getMessage((Throwable)exception), exception);
        }
    }

    @Override
    public Map<Object, List<AuditDetail>> getDetails() {
        HashMap hashMap = new HashMap();
        for (Map.Entry<Object, List<AuditDetailEvent.AuditDetailWithInfo>> entry : this.z.entrySet()) {
            ArrayList<AuditDetail> arrayList = new ArrayList<AuditDetail>();
            for (AuditDetailEvent.AuditDetailWithInfo auditDetailWithInfo : entry.getValue()) {
                arrayList.add(auditDetailWithInfo.getDetail());
            }
            hashMap.put(entry.getKey(), arrayList);
        }
        return Collections.unmodifiableMap(hashMap);
    }

    private Level f() {
        if (this.m == null) {
            String[] stringArray = A;
            String string = this.e.getProperty(stringArray[7]);
            Level level = null;
            if (string != null) {
                try {
                    level = this.a(string);
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    stringArray = A;
                    a.warning(stringArray[3] + string + stringArray[45] + DefaultAuditThresholds.DEFAULT_MESSAGE_THRESHOLD.getName() + stringArray[65]);
                }
            }
            if (level == null) {
                level = DefaultAuditThresholds.DEFAULT_MESSAGE_THRESHOLD;
            }
            this.m = level;
        }
        return this.m;
    }

    private Level g() {
        if (this.p == null) {
            String[] stringArray = A;
            String string = this.e.getProperty(stringArray[44]);
            Level level = null;
            if (string != null) {
                try {
                    level = this.a(string);
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    stringArray = A;
                    a.warning(stringArray[16] + string + stringArray[45] + DefaultAuditThresholds.DEFAULT_ASSOCIATED_LOGS_THRESHOLD.getName() + stringArray[65]);
                }
            }
            if (level == null) {
                level = DefaultAuditThresholds.DEFAULT_ASSOCIATED_LOGS_THRESHOLD;
            }
            this.p = level;
        }
        return this.p;
    }

    private boolean h() {
        if (this.q == null) {
            String string = this.e.getProperty(A[4]);
            Boolean bl2 = null;
            if (string != null) {
                bl2 = Boolean.valueOf(string.trim());
            }
            if (bl2 == null) {
                bl2 = DefaultAuditThresholds.DEFAULT_USE_ASSOCIATED_LOGS_THRESHOLD;
            }
            this.q = bl2;
        }
        return this.q;
    }

    private Level i() {
        if (this.n == null) {
            String[] stringArray = A;
            String string = this.e.getProperty(stringArray[52]);
            Level level = null;
            if (string != null) {
                try {
                    level = this.a(string);
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    stringArray = A;
                    a.warning(stringArray[40] + string + stringArray[45] + DefaultAuditThresholds.DEFAULT_ADMIN_THRESHOLD.getName() + stringArray[65]);
                }
            }
            if (level == null) {
                level = DefaultAuditThresholds.DEFAULT_ADMIN_THRESHOLD;
            }
            this.n = level;
        }
        return this.n;
    }

    private Level j() {
        if (this.o == null) {
            String[] stringArray = A;
            String string = this.e.getProperty(stringArray[54]);
            Level level = null;
            if (string != null) {
                try {
                    level = this.a(string);
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    stringArray = A;
                    a.warning(stringArray[59] + string + stringArray[21] + DefaultAuditThresholds.DEFAULT_SYSTEM_CLIENT_THRESHOLD.getName() + stringArray[48]);
                }
            }
            if (level == null) {
                level = DefaultAuditThresholds.DEFAULT_SYSTEM_CLIENT_THRESHOLD;
            }
            this.o = level;
        }
        return this.o;
    }

    private boolean k() {
        if (this.r == null) {
            String string = this.e.getProperty(A[17]);
            Boolean bl2 = null;
            if (string != null) {
                bl2 = Boolean.valueOf(string.trim());
            }
            if (bl2 == null) {
                bl2 = c;
            }
            this.r = bl2;
        }
        return this.r;
    }

    private Level a(String string) {
        Level level = Level.WARNING.getName().equals(string) ? Level.WARNING : (Level.INFO.getName().equals(string) ? Level.INFO : (Level.SEVERE.getName().equals(string) ? Level.SEVERE : Level.parse(string)));
        return level;
    }

    private String a(Object object, String string) {
        String string2 = string;
        if (object != null) {
            string2 = object.getClass().getName();
        }
        return string2;
    }

    private void b(String string) {
        try {
            if (this.x) {
                throw new IllegalStateException(A[28] + string + A[53]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw AuditContextImpl.a(illegalArgumentException);
        }
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[67];
                var3_1 = 0;
                var2_2 = "5#\u001eX]i\u000e\u001d8\u0011\u0011y;2\u00043\bE@,.T\u0013\fPE<<\u0000?\u0015_\u0010\u00073\u000er\\;/\u00118\u000ecL*2\u00062&52\u0017XG\b(\u0010?\u000ecL*2\u00062ZVL'8\u00067\u000eTMi*\u001d\"\u0012\u0011E,+\u0011:Z!=8\fPE 9T;\u001fBZ(:\u0011v\u000eY[,.\u001c9\u0016U\t?<\u0018#\u001f\u0011\u000e%\u0015#\u001eX]\b.\u00079\u0019XH=8\u0010\u001a\u0015VZ\u001d5\u00063\tYF%9&3\tAL*)\u00112\u0002S\u007f4\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118-PZ\u00072\u0000\u0006\b^J,.\u00073\u001e\u0015\u0015#\u001eX]\u00048\u0007%\u001bVL\u001d5\u00063\tYF%9\u0018\u0015#\u001eX]\b9\u0019?\u0014bH?8 93_],/\u001a7\u0016 5#\u001eX]i\u000f\u00115\u0015CMi\u0010\u00158\u001bVL;}\u001d%ZCL8(\u001d$\u001fUB5#\u001eX]i\u000e\u001d8\u0011\u0011y&1\u001d5\u0003\u0011O(4\u00183\u001e\u0011H'9T\u001f\u0014EL;3\u0015:Zp\\-4\u0000v<PE%}67\u0019Z\t .T2\u0013BH+1\u00112T,\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118)DJ*8\u0007%\u001a\u0015#\u001eX]\u00048\u0007%\u001bVL\u001a<\u00023.^`')\u0011$\u0014PE<'/\tEL$\u001c\u00012\u0013E{,>\u001b$\u001e\u0011O&/T5\u0016XL')T5\u0015\\Y&3\u00118\u000e\u0011N,3\u0011$\u001bEL-}\u0003?\u000eY\t%8\u00023\u0016\u0011\f'?\u0014Z\t\u000f<\u001d:\u000fCL\t\u00152\u001euL=<\u001d:)=8\fPE 9T7\tBF*4\u0015\"\u001fU\t%2\u0013%ZEA;8\u0007>\u0015]Mi+\u0015:\u000fT\tn\u0013\u0015#\u001eX]\u001a4\u00138\u0013_N\f3\u00154\u0016TM\u000bSzZ_L>}\u001d%Z\u0016\u0013\u0015#\u001eX]\u001a4\u00138\u0013_N\f3\u00154\u0016TM\u001d79\u000f]M'z\u0000v\u000fAM()\u0011v\u001bDM )T$\u001fRF;9\u0007\u0014SxZf@%1T#\tT\t-8\u00127\u000f]]i\u001d\u0015#\u001eX]g.\u001d8\u0011\u001fH%*\u0015/\tbH?8=8\u000eT['<\u00183\u0012:\u000fBAatT5\u001b]E,9T!\u0013EAi\u001c\u00012\u0013Em,)\u0015?\u0016B\t+(\u0000v\u0014^\t\b(\u0010?\u000ecL*2\u00062\u001b79\u000f]M'z\u0000v\tP_,}\u0015#\u001eX]i/\u00115\u0015CM:\u0017\u00073\u0019D[ )\rx\nR@-.\u0007x\u001f_H+1\u00112/93\tBH.8T8\u0015E\t((\u0010?\u000eTMe}\u00193\tBH.8T%\u0013KLi8\f5\u001fTM:}\u0018?\u0017X]:'/\tEL$\u001c\u00012\u0013E{,>\u001b$\u001e\u0011O&/T9\nE@&3\u0015:ZP\\-4\u0000v\u001dTG,/\u0015\"\u001fU\t>4\u0000>Z]L?8\u0018v !8\u001bSE,}\u00009ZRA(3\u00133ZP\\-4\u0000v\u0019^G=8\f\"Z\u0019/93\tBH.8'#\u0017\\H;$5#\u001eX]\u001b8\u00179\bU\t.8\u001a3\bP],9T!\u0013EAi1\u0011 \u001f]\tk\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118)DJ*8\u0007%ZXZi.\u0011\"ZEFi)\u0006#\u001f\u001d\tn\u0010\u0011%\tPN,}\u0004$\u0015RL:.\u00112ZB\\*>\u0011%\tW\\%1\rqZXZi3\u001b\"ZBH?8\u0010xCT!\u0013]Ei3\u001b\"ZSLi.\u0015 \u001fU\u0012i)\u001c$\u001fBA&1\u0010v\u001c^[i2\u0004\"\u0013^G(1T%\u0003B],0T7\u000fU@=.T?\t\u0011~\b\u000f:\u001f4v\u0013\u00073\u000erF')\u0011.\u000egH;4\u00154\u0016TZ>;8\u0016H\t&3\u0011v\u001bDM )T$\u001fRF;9T5\u001b_\t+8T7\u0019E@?8T7\u000e\u0011F'8T\"\u0013\\Liu\u0011.\u0013B] 3\u0013v\u0013B\tn7T!\u0013]Ei3\u001b\"ZSLi.\u0015 \u001fU\u0012i>\u0001$\bTG=}\u0007/\tEL$}\u0017:\u0013TG=}\u0000>\bTZ!2\u00182ZXZi7T!\u0013]Ei3\u001b\"ZSLi.\u0015 \u001fU\u0012i>\u0001$\bTG=}\u00193\tBH.8T7\u000fU@=}\u0000>\bTZ!2\u00182ZXZi#5#\u001eX]i.\u001d8\u0011\u0011Y&1\u001d5\u0003\u0011O(4\u00183\u001e\n\t:)\u0015\"\u000fB\tt}\u0018\u001a9ZP\\-4\u0000v\bTJ&/\u0010v\nCF?4\u00103\u001e5T!\u0013]Ei3\u001b\"ZSLi.\u0015 \u001fU\u0012i>\u0001$\bTG=}\u00152\u0017XGi<\u00012\u0013E\t=5\u00063\tYF%9T?\t\u0011B5#\u001eX]i\u000e\u001d8\u0011\u0011y&1\u001d5\u0003\u0011O(4\u00183\u001e\u0011H'9T\u001f\u0014EL;3\u0015:Zp\\-4\u0000v<PE%}67\u0019Z\t .T2\u0013BH+1\u00112T\u001f=8\fPE 9T7\u001e\\@'}\u0000>\bTZ!2\u00182ZGH%(\u0011v]!\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*8&3\u0017^_,\u0015\u00117\u001eT[\u0019'3\bGL;}79\u0014W@.}\u001d%ZCL8(\u001d$\u001fU\u001c77\u0014_F=}\u0012?\u0014U\t=5\u0011v\u0017TZ:<\u00133Z\u0019@-`\u001c\u0015#\u001eX]\b.\u00079\u0019XH=8\u0010\u001a\u0015VZ\u001d5\u00063\tYF%9\u0014SxZf@%1T#\tT\t-8\u00127\u000f]]i2\u0012:\u000fBAatT5\u001b]E,9T9\u0014\u0011H%/\u00117\u001eH\u0004/1\u0001%\u0012TMi\u001c\u00012\u0013Ej&3\u00003\u0002E`$-\u0018\u0086\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118*CF*8\u0007%\u001fU~ )\u001c\u001e\u000eEY\f/\u00069\brF-8T?\t\u0011Z,)T\"\u0015\u0011];(\u0011zZ\u0016d,.\u00077\u001dT\t9/\u001b5\u001fBZ,9T!\u0013EAi\u0015 \u0002*\u0011L;/\u001b$ZRF-8Sv\u0013B\t'2\u0000v\tP_,9Z\tT?\u0014B],<\u0010x\u001a\u001a9ZUL=<\u001d:-X]!\u0014\u001a0\u0015\u0011Y;2\u0002?\u001eTM\u0019\u0015#\u001eX]\u001a$\u0007\"\u001f\\z(+\u0011\u0002\u0015xG=8\u00068\u001b]L\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*8&3\u0017^_,\u0015\u00117\u001eT[i4\u0007v\tT]i)\u001bv\u000eC\\,qT>\u001fPM,/T7\u000fU@=}\u001d%Z_F=}\u00077\fTMg\u0013\u0015#\u001eX]\b9\u0019?\u0014eA;8\u0007>\u0015]M)]vW\u0011]!4\u0007v\u0019^G=8\f\"ZYH:}\u0015:\bTH-$T4\u001fTGi;\u0018#\tYL-\u001e\u0015#\u001eX]\n1\u001d3\u0014Ez0.\u00003\u0017}F.. >\bTZ!2\u00182\"1\u0004(~{i\u001a1\u0018?ch\u001d\u0014:\u0011Zp|\r\u0014 v)xn\u0007\u001c \u0003(t\u0013i\t\u00073\u000edY-<\u00003/93\tBH.8T8\u0015E\t((\u0010?\u000eTMe}\u00193\tBH.8T%\u0013KLi8\f5\u001fTM:}\u0018?\u0017X]\u001d\u0015#\u001eX]g.\u001d8\u0011\u001fO(1\u00184\u001bRB\u001d2=8\u000eT['<\u0018'=8\fPE 9T%\u0003B],0T5\u0016XL')T\"\u0012CL:5\u001b:\u001e\u0011_(1\u00013Z\u0016\u0015]v\u0013_\t=5\u0011v7TZ:<\u00133Z|H9s\u0015]v\u0013_\t=5\u0011v7TZ:<\u00133Z|H9s\u0016\u0015#\u001eX]g0\u0011%\tPN,\u000e\u001d,\u001f}@$4\u0000n\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118-PZ\u00072\u0000\u0006\b^J,.\u00073\u001e\u0011@:}\u00073\u000e\u0011]&}\u0000$\u000fT\u0005iz93\tBH.8T!\u001bB\t'2\u0000v\nCF*8\u0007%\u001fU\u000ei4\u0007v\u0014^]i.\u0015 \u001fU\u0007?\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118*CF*8\u0007%\u001fU~ )\u001c\u001e\u000eEY\f/\u00069\brF-8";
                var4_3 = "5#\u001eX]i\u000e\u001d8\u0011\u0011y;2\u00043\bE@,.T\u0013\fPE<<\u0000?\u0015_\u0010\u00073\u000er\\;/\u00118\u000ecL*2\u00062&52\u0017XG\b(\u0010?\u000ecL*2\u00062ZVL'8\u00067\u000eTMi*\u001d\"\u0012\u0011E,+\u0011:Z!=8\fPE 9T;\u001fBZ(:\u0011v\u000eY[,.\u001c9\u0016U\t?<\u0018#\u001f\u0011\u000e%\u0015#\u001eX]\b.\u00079\u0019XH=8\u0010\u001a\u0015VZ\u001d5\u00063\tYF%9&3\tAL*)\u00112\u0002S\u007f4\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118-PZ\u00072\u0000\u0006\b^J,.\u00073\u001e\u0015\u0015#\u001eX]\u00048\u0007%\u001bVL\u001d5\u00063\tYF%9\u0018\u0015#\u001eX]\b9\u0019?\u0014bH?8 93_],/\u001a7\u0016 5#\u001eX]i\u000f\u00115\u0015CMi\u0010\u00158\u001bVL;}\u001d%ZCL8(\u001d$\u001fUB5#\u001eX]i\u000e\u001d8\u0011\u0011y&1\u001d5\u0003\u0011O(4\u00183\u001e\u0011H'9T\u001f\u0014EL;3\u0015:Zp\\-4\u0000v<PE%}67\u0019Z\t .T2\u0013BH+1\u00112T,\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118)DJ*8\u0007%\u001a\u0015#\u001eX]\u00048\u0007%\u001bVL\u001a<\u00023.^`')\u0011$\u0014PE<'/\tEL$\u001c\u00012\u0013E{,>\u001b$\u001e\u0011O&/T5\u0016XL')T5\u0015\\Y&3\u00118\u000e\u0011N,3\u0011$\u001bEL-}\u0003?\u000eY\t%8\u00023\u0016\u0011\f'?\u0014Z\t\u000f<\u001d:\u000fCL\t\u00152\u001euL=<\u001d:)=8\fPE 9T7\tBF*4\u0015\"\u001fU\t%2\u0013%ZEA;8\u0007>\u0015]Mi+\u0015:\u000fT\tn\u0013\u0015#\u001eX]\u001a4\u00138\u0013_N\f3\u00154\u0016TM\u000bSzZ_L>}\u001d%Z\u0016\u0013\u0015#\u001eX]\u001a4\u00138\u0013_N\f3\u00154\u0016TM\u001d79\u000f]M'z\u0000v\u000fAM()\u0011v\u001bDM )T$\u001fRF;9\u0007\u0014SxZf@%1T#\tT\t-8\u00127\u000f]]i\u001d\u0015#\u001eX]g.\u001d8\u0011\u001fH%*\u0015/\tbH?8=8\u000eT['<\u00183\u0012:\u000fBAatT5\u001b]E,9T!\u0013EAi\u001c\u00012\u0013Em,)\u0015?\u0016B\t+(\u0000v\u0014^\t\b(\u0010?\u000ecL*2\u00062\u001b79\u000f]M'z\u0000v\tP_,}\u0015#\u001eX]i/\u00115\u0015CM:\u0017\u00073\u0019D[ )\rx\nR@-.\u0007x\u001f_H+1\u00112/93\tBH.8T8\u0015E\t((\u0010?\u000eTMe}\u00193\tBH.8T%\u0013KLi8\f5\u001fTM:}\u0018?\u0017X]:'/\tEL$\u001c\u00012\u0013E{,>\u001b$\u001e\u0011O&/T9\nE@&3\u0015:ZP\\-4\u0000v\u001dTG,/\u0015\"\u001fU\t>4\u0000>Z]L?8\u0018v !8\u001bSE,}\u00009ZRA(3\u00133ZP\\-4\u0000v\u0019^G=8\f\"Z\u0019/93\tBH.8'#\u0017\\H;$5#\u001eX]\u001b8\u00179\bU\t.8\u001a3\bP],9T!\u0013EAi1\u0011 \u001f]\tk\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118)DJ*8\u0007%ZXZi.\u0011\"ZEFi)\u0006#\u001f\u001d\tn\u0010\u0011%\tPN,}\u0004$\u0015RL:.\u00112ZB\\*>\u0011%\tW\\%1\rqZXZi3\u001b\"ZBH?8\u0010xCT!\u0013]Ei3\u001b\"ZSLi.\u0015 \u001fU\u0012i)\u001c$\u001fBA&1\u0010v\u001c^[i2\u0004\"\u0013^G(1T%\u0003B],0T7\u000fU@=.T?\t\u0011~\b\u000f:\u001f4v\u0013\u00073\u000erF')\u0011.\u000egH;4\u00154\u0016TZ>;8\u0016H\t&3\u0011v\u001bDM )T$\u001fRF;9T5\u001b_\t+8T7\u0019E@?8T7\u000e\u0011F'8T\"\u0013\\Liu\u0011.\u0013B] 3\u0013v\u0013B\tn7T!\u0013]Ei3\u001b\"ZSLi.\u0015 \u001fU\u0012i>\u0001$\bTG=}\u0007/\tEL$}\u0017:\u0013TG=}\u0000>\bTZ!2\u00182ZXZi7T!\u0013]Ei3\u001b\"ZSLi.\u0015 \u001fU\u0012i>\u0001$\bTG=}\u00193\tBH.8T7\u000fU@=}\u0000>\bTZ!2\u00182ZXZi#5#\u001eX]i.\u001d8\u0011\u0011Y&1\u001d5\u0003\u0011O(4\u00183\u001e\n\t:)\u0015\"\u000fB\tt}\u0018\u001a9ZP\\-4\u0000v\bTJ&/\u0010v\nCF?4\u00103\u001e5T!\u0013]Ei3\u001b\"ZSLi.\u0015 \u001fU\u0012i>\u0001$\bTG=}\u00152\u0017XGi<\u00012\u0013E\t=5\u00063\tYF%9T?\t\u0011B5#\u001eX]i\u000e\u001d8\u0011\u0011y&1\u001d5\u0003\u0011O(4\u00183\u001e\u0011H'9T\u001f\u0014EL;3\u0015:Zp\\-4\u0000v<PE%}67\u0019Z\t .T2\u0013BH+1\u00112T\u001f=8\fPE 9T7\u001e\\@'}\u0000>\bTZ!2\u00182ZGH%(\u0011v]!\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*8&3\u0017^_,\u0015\u00117\u001eT[\u0019'3\bGL;}79\u0014W@.}\u001d%ZCL8(\u001d$\u001fU\u001c77\u0014_F=}\u0012?\u0014U\t=5\u0011v\u0017TZ:<\u00133Z\u0019@-`\u001c\u0015#\u001eX]\b.\u00079\u0019XH=8\u0010\u001a\u0015VZ\u001d5\u00063\tYF%9\u0014SxZf@%1T#\tT\t-8\u00127\u000f]]i2\u0012:\u000fBAatT5\u001b]E,9T9\u0014\u0011H%/\u00117\u001eH\u0004/1\u0001%\u0012TMi\u001c\u00012\u0013Ej&3\u00003\u0002E`$-\u0018\u0086\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118*CF*8\u0007%\u001fU~ )\u001c\u001e\u000eEY\f/\u00069\brF-8T?\t\u0011Z,)T\"\u0015\u0011];(\u0011zZ\u0016d,.\u00077\u001dT\t9/\u001b5\u001fBZ,9T!\u0013EAi\u0015 \u0002*\u0011L;/\u001b$ZRF-8Sv\u0013B\t'2\u0000v\tP_,9Z\tT?\u0014B],<\u0010x\u001a\u001a9ZUL=<\u001d:-X]!\u0014\u001a0\u0015\u0011Y;2\u0002?\u001eTM\u0019\u0015#\u001eX]\u001a$\u0007\"\u001f\\z(+\u0011\u0002\u0015xG=8\u00068\u001b]L\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*8&3\u0017^_,\u0015\u00117\u001eT[i4\u0007v\tT]i)\u001bv\u000eC\\,qT>\u001fPM,/T7\u000fU@=}\u001d%Z_F=}\u00077\fTMg\u0013\u0015#\u001eX]\b9\u0019?\u0014eA;8\u0007>\u0015]M)]vW\u0011]!4\u0007v\u0019^G=8\f\"ZYH:}\u0015:\bTH-$T4\u001fTGi;\u0018#\tYL-\u001e\u0015#\u001eX]\n1\u001d3\u0014Ez0.\u00003\u0017}F.. >\bTZ!2\u00182\"1\u0004(~{i\u001a1\u0018?ch\u001d\u0014:\u0011Zp|\r\u0014 v)xn\u0007\u001c \u0003(t\u0013i\t\u00073\u000edY-<\u00003/93\tBH.8T8\u0015E\t((\u0010?\u000eTMe}\u00193\tBH.8T%\u0013KLi8\f5\u001fTM:}\u0018?\u0017X]\u001d\u0015#\u001eX]g.\u001d8\u0011\u001fO(1\u00184\u001bRB\u001d2=8\u000eT['<\u0018'=8\fPE 9T%\u0003B],0T5\u0016XL')T\"\u0012CL:5\u001b:\u001e\u0011_(1\u00013Z\u0016\u0015]v\u0013_\t=5\u0011v7TZ:<\u00133Z|H9s\u0015]v\u0013_\t=5\u0011v7TZ:<\u00133Z|H9s\u0016\u0015#\u001eX]g0\u0011%\tPN,\u000e\u001d,\u001f}@$4\u0000n\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118-PZ\u00072\u0000\u0006\b^J,.\u00073\u001e\u0011@:}\u00073\u000e\u0011]&}\u0000$\u000fT\u0005iz93\tBH.8T!\u001bB\t'2\u0000v\nCF*8\u0007%\u001fU\u000ei4\u0007v\u0014^]i.\u0015 \u001fU\u0007?\u0015#\u001eX]\u00052\u0013\u0010\u0015CD()'3\bG@*829\u0015EL;\u000f\u0011;\u0015GL\u001e5\u00118*CF*8\u0007%\u001fU~ )\u001c\u001e\u000eEY\f/\u00069\brF-8".length();
                var1_4 = 32;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = AuditContextImpl.a(v0, AuditContextImpl.c(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "0[p&9HXt\u001c\u001cSSp;\"Y\u0019v[p1mYQu\u0012s0>^XwW>}$I\u0004";
                    var4_3 = "0[p&9HXt\u001c\u001cSSp;\"Y\u0019v[p1mYQu\u0012s0>^XwW>}$I\u0004".length();
                    var1_4 = 9;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 108;
                        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++] = AuditContextImpl.a(v0, AuditContextImpl.c(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;
            }
        }
        AuditContextImpl.A = var5;
        AuditContextImpl.y = AuditContextImpl.A[57];
        AuditContextImpl.b = AuditContextImpl.A[19];
        AuditContextImpl.a = Logger.getLogger(AuditContextImpl.class.getName());
        AuditContextImpl.c = false;
        AuditContextImpl.d = InetAddressUtil.getLocalHost().getHostAddress();
    }

    private static Exception a(Exception exception) {
        return exception;
    }

    private static char[] c(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x55);
        }
        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 -> 124;
                    case 1 -> 94;
                    case 2 -> 114;
                    case 3 -> 57;
                    case 4 -> 33;
                    case 5 -> 65;
                    default -> 85;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

