/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.transport.jms.JmsEndpoint
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.PersistentEntity
 */
package com.l7tech.server.transport.jms2;

import com.l7tech.gateway.common.transport.jms.JmsEndpoint;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.server.PeriodicVersionCheck;
import com.l7tech.server.transport.jms.JmsEndpointManager;
import com.l7tech.server.transport.jms2.JmsBootProcess;

class k
extends PeriodicVersionCheck {
    final JmsBootProcess this$0;
    private static final String[] e;

    k(JmsBootProcess jmsBootProcess, JmsEndpointManager jmsEndpointManager) throws FindException {
        this.this$0 = jmsBootProcess;
        super(jmsEndpointManager);
    }

    @Override
    protected void onDelete(Goid goid) {
        String[] stringArray = e;
        JmsBootProcess.h.info(stringArray[1] + String.valueOf(goid) + stringArray[3]);
        this.this$0.b(goid);
    }

    @Override
    protected void onUpdate(PersistentEntity persistentEntity) {
        String[] stringArray = e;
        JmsBootProcess.h.info(stringArray[2] + String.valueOf(persistentEntity.getGoid()) + stringArray[4]);
        this.this$0.a((JmsEndpoint)persistentEntity, true);
    }

    @Override
    protected void onCreate(PersistentEntity persistentEntity) {
        String[] stringArray = e;
        JmsBootProcess.h.info(stringArray[1] + String.valueOf(persistentEntity.getGoid()) + stringArray[0]);
        this.this$0.a((JmsEndpoint)persistentEntity, true);
    }

    @Override
    public boolean notifyUpdate(Goid goid, int n2) {
        return super.notifyUpdate(goid, n2);
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[5];
                var3_1 = 0;
                var2_2 = "E8<_a\u001c\u0001\u0001z\t 5*Jo\u0001\n\u0011{\t 5*Jo\u0001\n\u0011{";
                var4_3 = "E8<_a\u001c\u0001\u0001z\t 5*Jo\u0001\n\u0011{\t 5*Jo\u0001\n\u0011{".length();
                var1_4 = 9;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = k.b(v0, k.b(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "d\u001e\nwD=  [\td\u000f\u001f\u007f@=  [";
                    var4_3 = "d\u001e\nwD=  [\td\u000f\u001f\u007f@=  [".length();
                    var1_4 = 9;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 46;
                        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++] = k.b(v0, k.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;
            }
        }
        k.e = var5;
    }

    private static char[] b(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x6B);
        }
        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 -> 106;
                    case 1 -> 84;
                    case 2 -> 65;
                    case 3 -> 53;
                    case 4 -> 15;
                    case 5 -> 103;
                    default -> 107;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

