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

import com.l7tech.server.audit.AuditRecordManagerImpl;
import com.l7tech.server.audit.ah;
import com.l7tech.util.ExceptionUtils;
import java.util.logging.Level;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallback;

class ai
implements TransactionCallback {
    final int val$tempTotal;
    final ah this$1;
    private static final String a = ai.a(91, ai.a("M?vl!\u001eQl>7j(\u0017\u0014l47l,\u000f\u0012pk7"));

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    ai(ah ah2, int n2) {
        this.this$1 = ah2;
        this.val$tempTotal = n2;
    }

    public Object doInTransaction(TransactionStatus transactionStatus) {
        try {
            return this.this$1.a(this.this$1.a, this.this$1.b, this.val$tempTotal);
        }
        catch (Exception exception) {
            AuditRecordManagerImpl.P.log(Level.WARNING, a + ExceptionUtils.getMessage((Throwable)exception), exception);
            transactionStatus.setRollbackOnly();
            return 0;
        }
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x2A);
        }
        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 -> 67;
                    case 1 -> 10;
                    case 2 -> 76;
                    case 3 -> 85;
                    case 4 -> 22;
                    case 5 -> 32;
                    default -> 42;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

