/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.ObjectModelException
 *  com.l7tech.util.ExceptionUtils
 *  org.springframework.transaction.TransactionStatus
 *  org.springframework.transaction.support.TransactionCallbackWithoutResult
 */
package com.l7tech.server.service;

import com.l7tech.objectmodel.ObjectModelException;
import com.l7tech.server.module.ServerModuleFileListener;
import com.l7tech.server.service.ServiceCache;
import com.l7tech.util.ExceptionUtils;
import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallbackWithoutResult;

class aw
extends TransactionCallbackWithoutResult {
    final ServiceCache this$0;
    private static final String[] a;

    aw(ServiceCache serviceCache) {
        this.this$0 = serviceCache;
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    protected void doInTransactionWithoutResult(TransactionStatus transactionStatus) {
        try {
            if (ServerModuleFileListener.startEvent != null) {
                try {
                    ServerModuleFileListener.startEvent.get();
                }
                catch (InterruptedException | ExecutionException exception) {
                    String[] stringArray = a;
                    ServiceCache.a.log(Level.WARNING, stringArray[1], ExceptionUtils.getDebugException((Throwable)exception));
                }
            }
        }
        catch (ObjectModelException objectModelException) {
            throw aw.a(objectModelException);
        }
        try {
            this.this$0.initializeServiceCache();
            return;
        }
        catch (ObjectModelException objectModelException) {
            throw new RuntimeException(a[0], objectModelException);
        }
    }

    private static ObjectModelException a(ObjectModelException objectModelException) {
        return objectModelException;
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[2];
        int n2 = 0;
        String string = "rZ{f~I&Y\\`h`\u00005^Fn)\u007f\f=AAjl,\n.T@lIrZ{f~I8VA}`b\u000eoQG{)_\f=AM{)A\u0006+BDl)J\u0000#R\befm\r&YO%)e\u000e!XZl)m\u0007+\u0017\\{p,\u001d \u0017Kfgx\u0000!BM'";
        int n3 = "rZ{f~I&Y\\`h`\u00005^Fn)\u007f\f=AAjl,\n.T@lIrZ{f~I8VA}`b\u000eoQG{)_\f=AM{)A\u0006+BDl)J\u0000#R\befm\r&YO%)e\u000e!XZl)m\u0007+\u0017\\{p,\u001d \u0017Kfgx\u0000!BM'".length();
        int n4 = 31;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = aw.a(100, aw.a(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                a = stringArray;
                return;
            }
            n4 = string.charAt(n5);
        }
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x2B);
        }
        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 -> 83;
                    case 1 -> 76;
                    case 2 -> 109;
                    case 3 -> 109;
                    case 4 -> 104;
                    case 5 -> 13;
                    default -> 43;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

