/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.UpdateException
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.Functions$Nullary
 */
package com.l7tech.server.module;

import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.UpdateException;
import com.l7tech.server.module.ServerModuleFileListener;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.Functions;
import java.util.logging.Level;

class k
implements Functions.Nullary<Void> {
    final Goid val$moduleGoid;
    final String val$errorMessage;
    final ServerModuleFileListener this$0;
    private static final String[] a;

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    k(ServerModuleFileListener serverModuleFileListener, Goid goid, String string) {
        this.this$0 = serverModuleFileListener;
        this.val$moduleGoid = goid;
        this.val$errorMessage = string;
    }

    public Void call() {
        try {
            if (ServerModuleFileListener.a.isLoggable(Level.FINE)) {
                ServerModuleFileListener.a.log(Level.FINE, a[1] + String.valueOf(this.val$moduleGoid) + a[0] + this.val$errorMessage + "\"");
            }
        }
        catch (UpdateException updateException) {
            throw k.a(updateException);
        }
        try {
            this.this$0.serverModuleFileManager.updateState(this.val$moduleGoid, this.val$errorMessage);
        }
        catch (UpdateException updateException) {
            String[] stringArray = a;
            ServerModuleFileListener.a.log(Level.WARNING, stringArray[3] + String.valueOf(this.val$moduleGoid) + stringArray[2] + ExceptionUtils.getMessageWithCause((Throwable)updateException), ExceptionUtils.getDebugException((Throwable)updateException));
        }
        return null;
    }

    private static UpdateException a(UpdateException updateException) {
        return updateException;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[4];
                var3_1 = 0;
                var2_2 = ".\u000f)\u0000R#\u0007~\u000ed\u0000S\"\tkF)G.YSm\u0004T8\u0006k\u0003d\nD$\u0004i\u0003z\u0011A%\r,F{\u0017O#HaFz\u0016A6\r,Ef\u0017\u00006\u0007eG)G";
                var4_3 = ".\u000f)\u0000R#\u0007~\u000ed\u0000S\"\tkF)G.YSm\u0004T8\u0006k\u0003d\nD$\u0004i\u0003z\u0011A%\r,F{\u0017O#HaFz\u0016A6\r,Ef\u0017\u00006\u0007eG)G".length();
                var1_4 = 18;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 10;
                    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.a(v0, k.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "Ux\u0001j:^vW=\u0000l4X3\u001a=\u0001m:MvMx\u001919\u001br>N3\u00037Rk+Nr\u0003=Rs4Nf\u001b=R<";
                    var4_3 = "Ux\u0001j:^vW=\u0000l4X3\u001a=\u0001m:MvMx\u001919\u001br>N3\u00037Rk+Nr\u0003=Rs4Nf\u001b=R<".length();
                    var1_4 = 23;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 113;
                        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.a(v0, k.a(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.a = var5;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x62);
        }
        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 -> 6;
                    case 1 -> 41;
                    case 2 -> 3;
                    case 3 -> 111;
                    case 4 -> 42;
                    case 5 -> 91;
                    default -> 98;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

