/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.module.ModuleState
 *  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.gateway.common.module.ModuleState;
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 c
implements Functions.Nullary<Void> {
    final Goid val$moduleGoid;
    final ModuleState val$state;
    final ServerModuleFileListener this$0;
    private static final String[] a;

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    c(ServerModuleFileListener serverModuleFileListener, Goid goid, ModuleState moduleState) {
        this.this$0 = serverModuleFileListener;
        this.val$moduleGoid = goid;
        this.val$state = moduleState;
    }

    public Void call() {
        try {
            if (ServerModuleFileListener.a.isLoggable(Level.FINE)) {
                ServerModuleFileListener.a.log(Level.FINE, a[1] + String.valueOf(this.val$moduleGoid) + a[0] + String.valueOf(this.val$state) + "\"");
            }
        }
        catch (UpdateException updateException) {
            throw c.a(updateException);
        }
        try {
            this.this$0.serverModuleFileManager.updateState(this.val$moduleGoid, this.val$state);
        }
        catch (UpdateException updateException) {
            String[] stringArray = a;
            ServerModuleFileListener.a.log(Level.WARNING, stringArray[2] + String.valueOf(this.val$moduleGoid) + stringArray[3] + 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 = "X.tOat+\u001f\"v /r0]a|1\u001d\"9Sq`3\u001f\"'Hta:Zd;N5r0\u0013ft\u001e";
                var4_3 = "X.tOat+\u001f\"v /r0]a|1\u001d\"9Sq`3\u001f\"'Hta:Zd;N5r0\u0013ft\u001e".length();
                var1_4 = 10;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = c.a(v0, c.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "\fS\r`@AO>]DyUA\u000e>WDaJA\u001a&WD.\nh\u0012\u0017xDQ\nk\bD";
                    var4_3 = "\fS\r`@AO>]DyUA\u000e>WDaJA\u001a&WD.\nh\u0012\u0017xDQ\nk\bD".length();
                    var1_4 = 25;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 19;
                        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++] = c.a(v0, c.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;
            }
        }
        c.a = var5;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x7C);
        }
        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 -> 89;
                    case 1 -> 33;
                    case 2 -> 119;
                    case 3 -> 31;
                    case 4 -> 54;
                    case 5 -> 54;
                    default -> 124;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

