/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.Component
 *  com.l7tech.gateway.common.cluster.ClusterProperty
 *  com.l7tech.util.Config
 *  org.springframework.beans.BeansException
 *  org.springframework.context.ApplicationContext
 *  org.springframework.context.ApplicationContextAware
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.core.Ordered
 */
package com.l7tech.server.audit;

import com.l7tech.gateway.common.Component;
import com.l7tech.gateway.common.cluster.ClusterProperty;
import com.l7tech.server.audit.DefaultAuditThresholds;
import com.l7tech.server.audit.av;
import com.l7tech.server.audit.k;
import com.l7tech.server.event.EntityInvalidationEvent;
import com.l7tech.server.event.system.ReadyForMessages;
import com.l7tech.server.event.system.SystemEvent;
import com.l7tech.server.util.PostStartupApplicationListener;
import com.l7tech.util.Config;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ApplicationEvent;
import org.springframework.core.Ordered;

public class AuditClusterPropertiesChecker
implements ApplicationContextAware,
PostStartupApplicationListener,
Ordered {
    public static final String CLUSTER_PROP_ADMIN_AUDIT_THRESHOLD;
    public static final String INTERNAL_AUDIT_SYSTEM;
    public static final String AUDIT_SINK_POLICY;
    public static final String AUDIT_SINK_SYSTEM_STARTED;
    public static final String AUDIT_SINK_SYSTEM_DISABLED;
    public static final String AUDIT_SINK_FALL_BACK_STATUS;
    public static final String ENABLED;
    public static final String DISABLED;
    public static final String INTERNAL_AUDIT_SYSTEM_STARTED;
    public static final String INTERNAL_AUDIT_SYSTEM_DISABLED;
    public static final String AUDIT_SINK_POLICY_STARTED;
    public static final String AUDIT_SINK_POLICY_DISABLED;
    public static final String AUDIT_SINK_FALL_BACK_ENABLED;
    public static final String AUDIT_SINK_FALL_BACK_DISABLED;
    public static final String AUDIT_SINK_FALL_BACK_WARNING;
    public static final String AUDIT_ADMIN_THRESHOLD_WARNING;
    private static final Logger a;
    private ApplicationContext b;
    private final Config c;
    private final Timer d;
    private final Map<String, Boolean> e = new HashMap<String, Boolean>();
    private static final String[] f;

    public AuditClusterPropertiesChecker(Config config, Timer timer) {
        this.c = config;
        this.d = timer;
    }

    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.b = applicationContext;
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    public void onApplicationEvent(ApplicationEvent applicationEvent) {
        boolean bl2;
        ClusterProperty clusterProperty;
        block26: {
            block27: {
                boolean bl3;
                EntityInvalidationEvent entityInvalidationEvent;
                block25: {
                    block24: {
                        try {
                            if (!(applicationEvent instanceof ReadyForMessages)) break block24;
                            this.a();
                            return;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                        }
                    }
                    if (!(applicationEvent instanceof EntityInvalidationEvent) || !ClusterProperty.class.equals((entityInvalidationEvent = (EntityInvalidationEvent)applicationEvent).getEntityClass())) return;
                    Object object = entityInvalidationEvent.getSource();
                    try {
                        if (!(object instanceof ClusterProperty)) {
                            return;
                        }
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                    }
                    clusterProperty = (ClusterProperty)object;
                    try {
                        try {
                            try {
                                try {
                                    if (f[28].equals(clusterProperty.getName()) || f[13].equals(clusterProperty.getName())) break block25;
                                }
                                catch (IllegalArgumentException illegalArgumentException) {
                                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                }
                                if (f[8].equals(clusterProperty.getName())) break block25;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                            }
                            if (f[27].equals(clusterProperty.getName())) break block25;
                            return;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                        }
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                    }
                }
                try {
                    bl3 = 'D' == entityInvalidationEvent.getEntityOperations()[0];
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                }
                bl2 = bl3;
                try {
                    try {
                        if (!f[17].equals(clusterProperty.getName())) break block26;
                        if (!bl2) break block27;
                        return;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                    }
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                }
            }
            Level level = this.a(clusterProperty.getValue());
            try {
                if (level.intValue() <= Level.INFO.intValue()) return;
                this.b.publishEvent((ApplicationEvent)new SystemEvent(this, Component.GW_AUDIT_SINK_CONFIG, null, Level.WARNING, MessageFormat.format(f[26], level.getName())){
                    static final long serialVersionUID = 2816518439046730891L;
                    private static final String b = 1.b(103, 1.b("r50'-4\\F54:c@uA4.&,xy\u0013\u0014+//a|G82 "));

                    @Override
                    public String getAction() {
                        return b;
                    }

                    private static char[] b(String string) {
                        char[] cArray = string.toCharArray();
                        if (cArray.length < 2) {
                            cArray = cArray;
                            cArray[0] = (char)(cArray[0] ^ 0x7A);
                        }
                        return cArray;
                    }

                    /*
                     * Handled impossible loop by duplicating code
                     * Enabled aggressive block sorting
                     */
                    private static String b(int n2, char[] cArray) {
                        char[] cArray2;
                        block11: {
                            int n3;
                            int n4;
                            int n5;
                            block10: {
                                n5 = n2;
                                cArray2 = cArray;
                                n4 = cArray.length;
                                n3 = 0;
                                if (!true) break block10;
                                n4 = n4;
                                if (n4 <= n3) break block11;
                            }
                            do {
                                n5 = n5;
                                cArray2 = cArray2;
                                int n6 = n3;
                                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                                    case 0 -> 84;
                                    case 1 -> 54;
                                    case 2 -> 58;
                                    case 3 -> 41;
                                    case 4 -> 36;
                                    case 5 -> 115;
                                    default -> 122;
                                })));
                                ++n3;
                                n4 = n4;
                            } while (n4 > n3);
                        }
                        return new String(cArray2).intern();
                    }
                });
                return;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw AuditClusterPropertiesChecker.a(illegalArgumentException);
            }
        }
        k k2 = this.getAndUpdatePropertyStatus(clusterProperty, this.e, bl2);
        try {
            if (k2 == null) {
                return;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
        }
        this.d.schedule((TimerTask)new av(this, k2), 100L);
    }

    public int getOrder() {
        return 50000;
    }

    private void a() {
        try {
            this.e.put(f[28], this.isInternalAuditSystemEnabled(true));
            this.e.put(f[13], this.isAuditSinkPolicyEnabled());
            this.e.put(f[8], this.isFallbackToDatabaseIfSinkPolicyFails());
            if (this.isInternalAuditSystemEnabled(true)) {
                this.b.publishEvent((ApplicationEvent)new SystemEvent(this, Component.GW_AUDIT_SINK_CONFIG, null, Level.INFO, INTERNAL_AUDIT_SYSTEM_STARTED){
                    static final long serialVersionUID = -7157288050462257652L;
                    private static final String b = 3.b(106, 3.b("\u0018q/YXh\r!f3\txl\u0018$v!]Tu\u0017"));

                    @Override
                    public String getAction() {
                        return b;
                    }

                    private static char[] b(String string) {
                        char[] cArray = string.toCharArray();
                        if (cArray.length < 2) {
                            cArray = cArray;
                            cArray[0] = (char)(cArray[0] ^ 0x13);
                        }
                        return cArray;
                    }

                    /*
                     * Handled impossible loop by duplicating code
                     * Enabled aggressive block sorting
                     */
                    private static String b(int n2, char[] cArray) {
                        char[] cArray2;
                        block11: {
                            int n3;
                            int n4;
                            int n5;
                            block10: {
                                n5 = n2;
                                cArray2 = cArray;
                                n4 = cArray.length;
                                n3 = 0;
                                if (!true) break block10;
                                n4 = n4;
                                if (n4 <= n3) break block11;
                            }
                            do {
                                n5 = n5;
                                cArray2 = cArray2;
                                int n6 = n3;
                                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                                    case 0 -> 34;
                                    case 1 -> 105;
                                    case 2 -> 42;
                                    case 3 -> 67;
                                    case 4 -> 87;
                                    case 5 -> 112;
                                    default -> 19;
                                })));
                                ++n3;
                                n4 = n4;
                            } while (n4 > n3);
                        }
                        return new String(cArray2).intern();
                    }
                });
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
        }
        try {
            if (this.isAuditSinkPolicyEnabled()) {
                this.b.publishEvent((ApplicationEvent)new SystemEvent(this, Component.GW_AUDIT_SINK_CONFIG, null, Level.INFO, AUDIT_SINK_POLICY_STARTED){
                    static final long serialVersionUID = 7282579916471708247L;
                    private static final String b = 4.b(74, 4.b("`u+. nVYb7~\u0000jC\\r%*,sL"));

                    @Override
                    public String getAction() {
                        return b;
                    }

                    private static char[] b(String string) {
                        char[] cArray = string.toCharArray();
                        if (cArray.length < 2) {
                            cArray = cArray;
                            cArray[0] = (char)(cArray[0] ^ 0x68);
                        }
                        return cArray;
                    }

                    /*
                     * Handled impossible loop by duplicating code
                     * Enabled aggressive block sorting
                     */
                    private static String b(int n2, char[] cArray) {
                        char[] cArray2;
                        block11: {
                            int n3;
                            int n4;
                            int n5;
                            block10: {
                                n5 = n2;
                                cArray2 = cArray;
                                n4 = cArray.length;
                                n3 = 0;
                                if (!true) break block10;
                                n4 = n4;
                                if (n4 <= n3) break block11;
                            }
                            do {
                                n5 = n5;
                                cArray2 = cArray2;
                                int n6 = n3;
                                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                                    case 0 -> 122;
                                    case 1 -> 77;
                                    case 2 -> 14;
                                    case 3 -> 20;
                                    case 4 -> 15;
                                    case 5 -> 86;
                                    default -> 104;
                                })));
                                ++n3;
                                n4 = n4;
                            } while (n4 > n3);
                        }
                        return new String(cArray2).intern();
                    }
                });
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
        }
        String[] stringArray = f;
        Level level = this.a(this.c.getProperty(stringArray[6]));
        try {
            if (level.intValue() > Level.INFO.intValue()) {
                this.b.publishEvent((ApplicationEvent)new SystemEvent(this, Component.GW_AUDIT_SINK_CONFIG, null, Level.WARNING, MessageFormat.format(stringArray[22], level.getName())){
                    static final long serialVersionUID = 4747584242609410305L;
                    private static final String b = 5.b(65, 5.b("+j $\u0001\u00133\u001fj$9Og\u001a\u0018k>%\u0000_\u0016JK;,\u0003F\u0013\u001eg\"#"));

                    @Override
                    public String getAction() {
                        return b;
                    }

                    private static char[] b(String string) {
                        char[] cArray = string.toCharArray();
                        if (cArray.length < 2) {
                            cArray = cArray;
                            cArray[0] = (char)(cArray[0] ^ 0x33);
                        }
                        return cArray;
                    }

                    /*
                     * Handled impossible loop by duplicating code
                     * Enabled aggressive block sorting
                     */
                    private static String b(int n2, char[] cArray) {
                        char[] cArray2;
                        block11: {
                            int n3;
                            int n4;
                            int n5;
                            block10: {
                                n5 = n2;
                                cArray2 = cArray;
                                n4 = cArray.length;
                                n3 = 0;
                                if (!true) break block10;
                                n4 = n4;
                                if (n4 <= n3) break block11;
                            }
                            do {
                                n5 = n5;
                                cArray2 = cArray2;
                                int n6 = n3;
                                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                                    case 0 -> 43;
                                    case 1 -> 79;
                                    case 2 -> 12;
                                    case 3 -> 12;
                                    case 4 -> 46;
                                    case 5 -> 114;
                                    default -> 51;
                                })));
                                ++n3;
                                n4 = n4;
                            } while (n4 > n3);
                        }
                        return new String(cArray2).intern();
                    }
                });
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
        }
    }

    public boolean isInternalAuditSystemEnabled(boolean bl2) {
        boolean bl3;
        block8: {
            block7: {
                boolean bl4 = this.c.getBooleanProperty(f[28], false);
                try {
                    block6: {
                        try {
                            try {
                                if (bl4) break block6;
                                if (!bl2) break block7;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                            }
                            if (this.isAuditSinkPolicyEnabled()) break block7;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                        }
                    }
                    bl3 = true;
                    break block8;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                }
            }
            bl3 = false;
        }
        return bl3;
    }

    public boolean isAuditSinkPolicyEnabled() {
        boolean bl2;
        block5: {
            block4: {
                String string = this.c.getProperty(f[13]);
                try {
                    try {
                        if (string == null || string.trim().isEmpty()) break block4;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                    }
                    bl2 = true;
                    break block5;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    public boolean isFallbackToDatabaseIfSinkPolicyFails() {
        boolean bl2;
        block5: {
            block4: {
                String string = this.c.getProperty(f[8]);
                try {
                    try {
                        if (string != null && !Boolean.parseBoolean(string)) break block4;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                    }
                    bl2 = true;
                    break block5;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    private Level a(String string) {
        Level level = null;
        if (string != null) {
            try {
                level = Level.parse(string);
            }
            catch (IllegalArgumentException illegalArgumentException) {
                String[] stringArray = f;
                a.warning(stringArray[16] + string + stringArray[25] + DefaultAuditThresholds.DEFAULT_ADMIN_THRESHOLD.getName() + stringArray[9]);
            }
        }
        if (level == null) {
            level = DefaultAuditThresholds.DEFAULT_ADMIN_THRESHOLD;
        }
        return level;
    }

    public k getAndUpdatePropertyStatus(ClusterProperty clusterProperty, Map<String, Boolean> map, boolean bl2) {
        k k2;
        block31: {
            boolean bl3;
            block34: {
                block33: {
                    block27: {
                        boolean bl4;
                        block30: {
                            block29: {
                                block28: {
                                    block23: {
                                        boolean bl5;
                                        block26: {
                                            block25: {
                                                block24: {
                                                    k2 = null;
                                                    try {
                                                        try {
                                                            if (!f[21].equals(clusterProperty.getName())) break block23;
                                                            if (!bl2) break block24;
                                                        }
                                                        catch (IllegalArgumentException illegalArgumentException) {
                                                            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                                        }
                                                        return null;
                                                    }
                                                    catch (IllegalArgumentException illegalArgumentException) {
                                                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                                    }
                                                }
                                                try {
                                                    try {
                                                        if (!Boolean.parseBoolean(clusterProperty.getValue()) && map.get(f[5]).booleanValue()) break block25;
                                                    }
                                                    catch (IllegalArgumentException illegalArgumentException) {
                                                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                                    }
                                                    bl5 = true;
                                                    break block26;
                                                }
                                                catch (IllegalArgumentException illegalArgumentException) {
                                                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                                }
                                            }
                                            bl5 = false;
                                        }
                                        boolean bl6 = bl5;
                                        String[] stringArray = f;
                                        k2 = new k(stringArray[28], bl6, map.get(stringArray[28]));
                                        map.put(stringArray[28], bl6);
                                        break block31;
                                    }
                                    try {
                                        if (!f[13].equals(clusterProperty.getName())) break block27;
                                        if (!bl2) break block28;
                                    }
                                    catch (IllegalArgumentException illegalArgumentException) {
                                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                    }
                                    boolean bl7 = true;
                                    String[] stringArray = f;
                                    k k3 = new k(stringArray[28], true, map.get(stringArray[28]));
                                    map.put(stringArray[28], true);
                                    boolean bl8 = false;
                                    k2 = new k(stringArray[13], false, map.get(stringArray[13]), k3);
                                    map.put(stringArray[13], false);
                                    break block31;
                                }
                                String string = clusterProperty.getValue();
                                try {
                                    try {
                                        if (string == null || string.trim().isEmpty()) break block29;
                                    }
                                    catch (IllegalArgumentException illegalArgumentException) {
                                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                    }
                                    bl4 = true;
                                    break block30;
                                }
                                catch (IllegalArgumentException illegalArgumentException) {
                                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                }
                            }
                            bl4 = false;
                        }
                        boolean bl9 = bl4;
                        String[] stringArray = f;
                        boolean bl10 = map.get(stringArray[13]);
                        k2 = new k(stringArray[13], bl9, bl10);
                        map.put(stringArray[13], bl9);
                        if (bl9 != bl10) {
                            boolean bl11 = this.isInternalAuditSystemEnabled(false);
                            try {
                                if (!bl9 || this.isInternalAuditSystemEnabled(false)) break block31;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                            }
                            stringArray = f;
                            k k4 = new k(stringArray[28], bl11, map.get(stringArray[28]));
                            map.put(stringArray[28], bl11);
                            k2.d = k4;
                        }
                        break block31;
                    }
                    try {
                        block32: {
                            try {
                                try {
                                    if (!f[14].equals(clusterProperty.getName())) break block31;
                                    if (bl2) break block32;
                                }
                                catch (IllegalArgumentException illegalArgumentException) {
                                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                }
                                if (!Boolean.parseBoolean(clusterProperty.getValue())) break block33;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                            }
                        }
                        bl3 = true;
                        break block34;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                    }
                }
                bl3 = false;
            }
            boolean bl12 = bl3;
            String[] stringArray = f;
            k2 = new k(stringArray[8], bl12, map.get(stringArray[8]));
            map.put(stringArray[8], bl12);
        }
        return k2;
    }

    public List<String> checkAndAuditPropsStatus(k k2) {
        ArrayList<String> arrayList;
        block30: {
            String string;
            ArrayList<String> arrayList2;
            block40: {
                block39: {
                    block33: {
                        String string2;
                        ArrayList<String> arrayList3;
                        block38: {
                            block37: {
                                block34: {
                                    String string3;
                                    ArrayList<String> arrayList4;
                                    block36: {
                                        block35: {
                                            block29: {
                                                String string4;
                                                ArrayList<String> arrayList5;
                                                block32: {
                                                    block31: {
                                                        arrayList = new ArrayList<String>();
                                                        try {
                                                            if (k2 == null) {
                                                                return arrayList;
                                                            }
                                                        }
                                                        catch (IllegalArgumentException illegalArgumentException) {
                                                            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                                        }
                                                        try {
                                                            try {
                                                                try {
                                                                    if (!f[28].equals(k2.a)) break block29;
                                                                    if (k2.b == k2.c) break block30;
                                                                }
                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                                                }
                                                                arrayList5 = arrayList;
                                                                if (!k2.b) break block31;
                                                            }
                                                            catch (IllegalArgumentException illegalArgumentException) {
                                                                throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                                            }
                                                            string4 = INTERNAL_AUDIT_SYSTEM_STARTED;
                                                            break block32;
                                                        }
                                                        catch (IllegalArgumentException illegalArgumentException) {
                                                            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                                        }
                                                    }
                                                    string4 = INTERNAL_AUDIT_SYSTEM_DISABLED;
                                                }
                                                arrayList5.add(string4);
                                                break block30;
                                            }
                                            try {
                                                try {
                                                    try {
                                                        if (!f[13].equals(k2.a)) break block33;
                                                        if (k2.b == k2.c) break block34;
                                                    }
                                                    catch (IllegalArgumentException illegalArgumentException) {
                                                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                                    }
                                                    arrayList4 = arrayList;
                                                    if (!k2.b) break block35;
                                                }
                                                catch (IllegalArgumentException illegalArgumentException) {
                                                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                                }
                                                string3 = AUDIT_SINK_POLICY_STARTED;
                                                break block36;
                                            }
                                            catch (IllegalArgumentException illegalArgumentException) {
                                                throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                            }
                                        }
                                        string3 = AUDIT_SINK_POLICY_DISABLED;
                                    }
                                    arrayList4.add(string3);
                                }
                                try {
                                    try {
                                        try {
                                            if (k2.d == null || k2.d.b == k2.d.c) break block30;
                                        }
                                        catch (IllegalArgumentException illegalArgumentException) {
                                            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                        }
                                        arrayList3 = arrayList;
                                        if (!k2.d.b) break block37;
                                    }
                                    catch (IllegalArgumentException illegalArgumentException) {
                                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                    }
                                    string2 = INTERNAL_AUDIT_SYSTEM_STARTED;
                                    break block38;
                                }
                                catch (IllegalArgumentException illegalArgumentException) {
                                    throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                                }
                            }
                            string2 = INTERNAL_AUDIT_SYSTEM_DISABLED;
                        }
                        arrayList3.add(string2);
                        break block30;
                    }
                    try {
                        try {
                            try {
                                if (!f[8].equals(k2.a) || k2.b == k2.c) break block30;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                            }
                            arrayList2 = arrayList;
                            if (!k2.b) break block39;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                        }
                        string = AUDIT_SINK_FALL_BACK_ENABLED;
                        break block40;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw AuditClusterPropertiesChecker.a(illegalArgumentException);
                    }
                }
                string = AUDIT_SINK_FALL_BACK_DISABLED;
            }
            arrayList2.add(string);
        }
        if (!arrayList.isEmpty()) {
            for (String string : arrayList) {
                this.b.publishEvent((ApplicationEvent)new SystemEvent(this, Component.GW_AUDIT_SINK_CONFIG, null, Level.INFO, string){
                    static final long serialVersionUID = 4565099771847654446L;
                    private static final String b = 6.b(112, 6.b("sf\u001b\u0010i\u000f)Jq\u0007@I\u000b<Oa\u0015\u0014e\u00123"));

                    @Override
                    public String getAction() {
                        return b;
                    }

                    private static char[] b(String string) {
                        char[] cArray = string.toCharArray();
                        if (cArray.length < 2) {
                            cArray = cArray;
                            cArray[0] = (char)(cArray[0] ^ 0x2D);
                        }
                        return cArray;
                    }

                    /*
                     * Handled impossible loop by duplicating code
                     * Enabled aggressive block sorting
                     */
                    private static String b(int n2, char[] cArray) {
                        char[] cArray2;
                        block11: {
                            int n3;
                            int n4;
                            int n5;
                            block10: {
                                n5 = n2;
                                cArray2 = cArray;
                                n4 = cArray.length;
                                n3 = 0;
                                if (!true) break block10;
                                n4 = n4;
                                if (n4 <= n3) break block11;
                            }
                            do {
                                n5 = n5;
                                cArray2 = cArray2;
                                int n6 = n3;
                                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                                    case 0 -> 83;
                                    case 1 -> 100;
                                    case 2 -> 4;
                                    case 3 -> 16;
                                    case 4 -> 124;
                                    case 5 -> 13;
                                    default -> 45;
                                })));
                                ++n3;
                                n4 = n4;
                            } while (n4 > n3);
                        }
                        return new String(cArray2).intern();
                    }
                });
            }
        }
        return arrayList;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[29];
                var3_1 = 0;
                var2_2 = "Hm*H>1\u0005`v%\u0001\u001a~:`{7\bmq=@(}3m\u0011Hm*H>1\u0005`v%\u0001\u001a~:`{7BHm*H>1\u0005`v%\u0001\u001a~:`{7\u0001,p?e}*\u0001+\u007f2)Q U/c8htn`?u?}8\b@&}vKy-Jjx%)|'R+s:l|`\fr(3\u0001.x%hz\"D.\u0016hm*H>?%`v%\u000f:~:`{7\u000f-d?m\u0013hm*H>P2dq u\"c3zp!M.&Oy\"Mjs7jsnN$1?gl+S$p:)y;E#evza=U/|vr(3\u001dhm*H>?%`v%\u000f,p:ez/B!E9@v:D8\u007f7e\t)q R>t7m6\u0007lv/C&t2\u0015@v:D8\u007f7e8\u000fT.x\")K7R>t;\bmq=@(}3m\u0016hm*H>?%`v%\u000f:~:`{7\u000f-d?m\u001dhm*H>?%`v%\u000f,p:ez/B!E9@v:D8\u007f7e\u0007lv/C&t2\u001f@v8@&x2)y*L#\u007fv}p<D9y9e|nW+}#l8i\u0014hm*H>?7mu'O\u001ey$lk&N&u\u000br(3\u00019e7{l+E\fr(3\u0001.x%hz\"D.&Oy\"Mjs7jsnN$1?gl+S$p:)y;E#evza=U/|vr(3\u001dhm*H>?%`v%\u000f+}!ha=r+g3@v:D8\u007f7e}]p+\u0001+u;`vn@?u?}8:I8t%aw\"Ejb3}8:Njjft8\"D<t:)o'M&15hm=Dj|9zln@.|?g8/T.x\"z8:Nj\u007f9}8,Dja3{k'R>t2)w<\u00019t8}8:Nje>l8/T.x\")k'O!1&ft'B3?\u0015@v:D8\u007f7e8\u000fT.x\")K7R>t;\u000br(3\u00019e7{l+E\u0014.6nv#}:)m=Dju3oy;M>1}]p+\u0001+u;`vn@?u?}8:I8t%aw\"Ejb3}8:Njjft8\"D<t:)o'M&15hm=Dj|9zln@.|?g8/T.x\"z8:Nj\u007f9}8,Dja3{k'R>t2)w<\u00019t8}8:Nje>l8/T.x\")k'O!1&ft'B3?";
                var4_3 = "Hm*H>1\u0005`v%\u0001\u001a~:`{7\bmq=@(}3m\u0011Hm*H>1\u0005`v%\u0001\u001a~:`{7BHm*H>1\u0005`v%\u0001\u001a~:`{7\u0001,p?e}*\u0001+\u007f2)Q U/c8htn`?u?}8\b@&}vKy-Jjx%)|'R+s:l|`\fr(3\u0001.x%hz\"D.\u0016hm*H>?%`v%\u000f:~:`{7\u000f-d?m\u0013hm*H>P2dq u\"c3zp!M.&Oy\"Mjs7jsnN$1?gl+S$p:)y;E#evza=U/|vr(3\u001dhm*H>?%`v%\u000f,p:ez/B!E9@v:D8\u007f7e\t)q R>t7m6\u0007lv/C&t2\u0015@v:D8\u007f7e8\u000fT.x\")K7R>t;\bmq=@(}3m\u0016hm*H>?%`v%\u000f:~:`{7\u000f-d?m\u001dhm*H>?%`v%\u000f,p:ez/B!E9@v:D8\u007f7e\u0007lv/C&t2\u001f@v8@&x2)y*L#\u007fv}p<D9y9e|nW+}#l8i\u0014hm*H>?7mu'O\u001ey$lk&N&u\u000br(3\u00019e7{l+E\fr(3\u0001.x%hz\"D.&Oy\"Mjs7jsnN$1?gl+S$p:)y;E#evza=U/|vr(3\u001dhm*H>?%`v%\u000f+}!ha=r+g3@v:D8\u007f7e}]p+\u0001+u;`vn@?u?}8:I8t%aw\"Ejb3}8:Njjft8\"D<t:)o'M&15hm=Dj|9zln@.|?g8/T.x\"z8:Nj\u007f9}8,Dja3{k'R>t2)w<\u00019t8}8:Nje>l8/T.x\")k'O!1&ft'B3?\u0015@v:D8\u007f7e8\u000fT.x\")K7R>t;\u000br(3\u00019e7{l+E\u0014.6nv#}:)m=Dju3oy;M>1}]p+\u0001+u;`vn@?u?}8:I8t%aw\"Ejb3}8:Njjft8\"D<t:)o'M&15hm=Dj|9zln@.|?g8/T.x\"z8:Nj\u007f9}8,Dja3{k'R>t2)w<\u00019t8}8:Nje>l8/T.x\")k'O!1&ft'B3?".length();
                var1_4 = 17;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = AuditClusterPropertiesChecker.a(v0, AuditClusterPropertiesChecker.b(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "27p\u0012dem7/}\u0015D#~61|\u0014|/\u001d27p\u0012de\u007f:,\u007fUq'{2;g(q=i\u001a,`\u001eb%m?";
                    var4_3 = "27p\u0012dem7/}\u0015D#~61|\u0014|/\u001d27p\u0012de\u007f:,\u007fUq'{2;g(q=i\u001a,`\u001eb%m?".length();
                    var1_4 = 20;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 84;
                        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++] = AuditClusterPropertiesChecker.a(v0, AuditClusterPropertiesChecker.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;
            }
        }
        AuditClusterPropertiesChecker.f = var5;
        AuditClusterPropertiesChecker.AUDIT_SINK_POLICY = AuditClusterPropertiesChecker.f[0];
        AuditClusterPropertiesChecker.AUDIT_SINK_FALL_BACK_WARNING = AuditClusterPropertiesChecker.f[3];
        AuditClusterPropertiesChecker.AUDIT_ADMIN_THRESHOLD_WARNING = AuditClusterPropertiesChecker.f[22];
        AuditClusterPropertiesChecker.AUDIT_SINK_SYSTEM_DISABLED = AuditClusterPropertiesChecker.f[19];
        AuditClusterPropertiesChecker.CLUSTER_PROP_ADMIN_AUDIT_THRESHOLD = AuditClusterPropertiesChecker.f[17];
        AuditClusterPropertiesChecker.AUDIT_SINK_SYSTEM_STARTED = AuditClusterPropertiesChecker.f[24];
        AuditClusterPropertiesChecker.INTERNAL_AUDIT_SYSTEM = AuditClusterPropertiesChecker.f[23];
        AuditClusterPropertiesChecker.DISABLED = AuditClusterPropertiesChecker.f[12];
        AuditClusterPropertiesChecker.ENABLED = AuditClusterPropertiesChecker.f[15];
        AuditClusterPropertiesChecker.AUDIT_SINK_FALL_BACK_STATUS = AuditClusterPropertiesChecker.f[20];
        var0_6 = AuditClusterPropertiesChecker.f;
        AuditClusterPropertiesChecker.INTERNAL_AUDIT_SYSTEM_STARTED = MessageFormat.format(var0_6[18], new Object[]{var0_6[11]});
        AuditClusterPropertiesChecker.INTERNAL_AUDIT_SYSTEM_DISABLED = MessageFormat.format(var0_6[4], new Object[]{var0_6[23]});
        AuditClusterPropertiesChecker.AUDIT_SINK_POLICY_STARTED = MessageFormat.format(var0_6[24], new Object[]{var0_6[2]});
        AuditClusterPropertiesChecker.AUDIT_SINK_POLICY_DISABLED = MessageFormat.format(var0_6[19], new Object[]{var0_6[0]});
        AuditClusterPropertiesChecker.AUDIT_SINK_FALL_BACK_ENABLED = MessageFormat.format(var0_6[7], new Object[]{var0_6[10]});
        AuditClusterPropertiesChecker.AUDIT_SINK_FALL_BACK_DISABLED = MessageFormat.format(var0_6[20], new Object[]{var0_6[1]});
        AuditClusterPropertiesChecker.a = Logger.getLogger(AuditClusterPropertiesChecker.class.getName());
    }

    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] ^ 0x58);
        }
        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 -> 7;
                    case 1 -> 22;
                    case 2 -> 64;
                    case 3 -> 47;
                    case 4 -> 68;
                    case 5 -> 31;
                    default -> 88;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

