/*
 * Decompiled with CFR 0.152.
 */
package com.l7tech.server.transport.jms;

public final class JmsDefinedProperties
extends Enum<JmsDefinedProperties> {
    public static final /* enum */ JmsDefinedProperties JMSXUserID;
    public static final /* enum */ JmsDefinedProperties JMSXAppID;
    public static final /* enum */ JmsDefinedProperties JMSXDeliveryCount;
    public static final /* enum */ JmsDefinedProperties JMSXGroupID;
    public static final /* enum */ JmsDefinedProperties JMSXGroupSeq;
    public static final /* enum */ JmsDefinedProperties JMSXProducerTXID;
    public static final /* enum */ JmsDefinedProperties JMSXConsumerTXID;
    public static final /* enum */ JmsDefinedProperties JMSXRcvTimestamp;
    public static final /* enum */ JmsDefinedProperties JMSXState;
    private final String name;
    private final Class type;
    private static final /* synthetic */ JmsDefinedProperties[] $VALUES;

    public static JmsDefinedProperties[] values() {
        return (JmsDefinedProperties[])$VALUES.clone();
    }

    public static JmsDefinedProperties valueOf(String string) {
        return Enum.valueOf(JmsDefinedProperties.class, string);
    }

    public String getName() {
        return this.name;
    }

    public Class getType() {
        return this.type;
    }

    private JmsDefinedProperties(String string2, Class clazz) {
        this.name = string2;
        this.type = clazz;
    }

    public static JmsDefinedProperties fromName(String string) {
        for (JmsDefinedProperties jmsDefinedProperties : JmsDefinedProperties.values()) {
            try {
                if (!jmsDefinedProperties.getName().equals(string)) continue;
                return jmsDefinedProperties;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw JmsDefinedProperties.a(illegalArgumentException);
            }
        }
        throw new IllegalArgumentException(string);
    }

    public static boolean isValid(String string, String string2) {
        block9: {
            try {
                JmsDefinedProperties jmsDefinedProperties;
                block8: {
                    jmsDefinedProperties = JmsDefinedProperties.fromName(string);
                    try {
                        if (!jmsDefinedProperties.getType().isAssignableFrom(Integer.class)) break block8;
                        Integer.parseInt(string2);
                        break block9;
                    }
                    catch (NumberFormatException numberFormatException) {
                        throw JmsDefinedProperties.a(numberFormatException);
                    }
                }
                try {
                    if (jmsDefinedProperties.getType().isAssignableFrom(Long.class)) {
                        Long.parseLong(string2);
                    }
                }
                catch (NumberFormatException numberFormatException) {
                    throw JmsDefinedProperties.a(numberFormatException);
                }
            }
            catch (NumberFormatException numberFormatException) {
                return false;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                return false;
            }
        }
        return true;
    }

    private static /* synthetic */ JmsDefinedProperties[] $values() {
        return new JmsDefinedProperties[]{JMSXUserID, JMSXAppID, JMSXDeliveryCount, JMSXGroupID, JMSXGroupSeq, JMSXProducerTXID, JMSXConsumerTXID, JMSXRcvTimestamp, JMSXState};
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var0 = new String[18];
                var4_1 = 0;
                var3_2 = "p[\u0017\u001c!Y|H_\u0000\fp[\u0017\u001c3XvOf\u0017!\u0005\tp[\u0017\u001c5ZisR\tp[\u0017\u001c'^xNs\np[\u0017\u001c!Y|H_\u0000\u0010p[\u0017\u001c7EwIc)!\u0006~AsR\u000bp[\u0017\u001c3XvOf\r\u0000\u0010p[\u0017\u001c&Ion\u007f)!\u0007^xWf\u0010p[\u0017\u001c$Xv^c'!\u0006~AsR\tp[\u0017\u001c'^xNs\u0011p[\u0017\u001c0OuS`!6\rivOx0\u0011p[\u0017\u001c0OuS`!6\rivOx0\fp[\u0017\u001c3XvOf\u0017!\u0005\u000bp[\u0017\u001c3XvOf\r\u0000\u0010p[\u0017\u001c7EwIc)!\u0006~AsR\u0010p[\u0017\u001c&Ion\u007f)!\u0007^xWf";
                var5_3 = "p[\u0017\u001c!Y|H_\u0000\fp[\u0017\u001c3XvOf\u0017!\u0005\tp[\u0017\u001c5ZisR\tp[\u0017\u001c'^xNs\np[\u0017\u001c!Y|H_\u0000\u0010p[\u0017\u001c7EwIc)!\u0006~AsR\u000bp[\u0017\u001c3XvOf\r\u0000\u0010p[\u0017\u001c&Ion\u007f)!\u0007^xWf\u0010p[\u0017\u001c$Xv^c'!\u0006~AsR\tp[\u0017\u001c'^xNs\u0011p[\u0017\u001c0OuS`!6\rivOx0\u0011p[\u0017\u001c0OuS`!6\rivOx0\fp[\u0017\u001c3XvOf\u0017!\u0005\u000bp[\u0017\u001c3XvOf\r\u0000\u0010p[\u0017\u001c7EwIc)!\u0006~AsR\u0010p[\u0017\u001c&Ion\u007f)!\u0007^xWf".length();
                var2_4 = 10;
                var1_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 126;
                    v1 = ++var1_5;
                    v2 = var3_2.substring(v1, v1 + var2_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var0[var4_1++] = JmsDefinedProperties.a(v0, JmsDefinedProperties.a(v2));
                    if ((var1_5 += var2_4) < var5_3) {
                        var2_4 = var3_2.charAt(var1_5);
                        ** continue;
                    }
                    var3_2 = "&\rAJr\u000e \b5qwP(\u0017%\u0004\t&\rAJc\f?%\u0004";
                    var5_3 = "&\rAJr\u000e \b5qwP(\u0017%\u0004\t&\rAJc\f?%\u0004".length();
                    var2_4 = 16;
                    var1_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 40;
                        v4 = ++var1_5;
                        v2 = var3_2.substring(v4, v4 + var2_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var0[var4_1++] = JmsDefinedProperties.a(v0, JmsDefinedProperties.a(v2));
                    if ((var1_5 += var2_4) < var5_3) {
                        var2_4 = var3_2.charAt(var1_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        JmsDefinedProperties.JMSXUserID = new JmsDefinedProperties(var0[0], String.class);
        JmsDefinedProperties.JMSXAppID = new JmsDefinedProperties(var0[2], String.class);
        JmsDefinedProperties.JMSXDeliveryCount = new JmsDefinedProperties(var0[10], Integer.class);
        JmsDefinedProperties.JMSXGroupID = new JmsDefinedProperties(var0[13], String.class);
        JmsDefinedProperties.JMSXGroupSeq = new JmsDefinedProperties(var0[1], Integer.class);
        JmsDefinedProperties.JMSXProducerTXID = new JmsDefinedProperties(var0[16], String.class);
        JmsDefinedProperties.JMSXConsumerTXID = new JmsDefinedProperties(var0[5], String.class);
        JmsDefinedProperties.JMSXRcvTimestamp = new JmsDefinedProperties(var0[15], Long.class);
        JmsDefinedProperties.JMSXState = new JmsDefinedProperties(var0[3], Integer.class);
        JmsDefinedProperties.$VALUES = JmsDefinedProperties.$values();
    }

    private static IllegalArgumentException a(IllegalArgumentException illegalArgumentException) {
        return illegalArgumentException;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x67);
        }
        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 -> 68;
                    case 1 -> 104;
                    case 2 -> 58;
                    case 3 -> 58;
                    case 4 -> 10;
                    case 5 -> 84;
                    default -> 103;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

