/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.service.MetricsBin
 */
package com.l7tech.server.service;

import com.l7tech.gateway.common.service.MetricsBin;
import com.l7tech.server.service.ServiceMetricsServicesImpl;
import com.l7tech.server.util.ManagedTimerTask;
import java.util.Date;
import java.util.logging.Level;

class at
extends ManagedTimerTask {
    private final long c;
    private final int d;
    final ServiceMetricsServicesImpl this$0;
    private static final String[] e;

    private at(ServiceMetricsServicesImpl serviceMetricsServicesImpl, long l2, int n2) {
        this.this$0 = serviceMetricsServicesImpl;
        this.c = l2;
        this.d = n2;
    }

    @Override
    protected void doRun() {
        long l2 = System.currentTimeMillis() - this.c;
        try {
            Integer n2 = this.this$0.serviceMetricsManager.delete(l2, this.d);
            try {
                if (ServiceMetricsServicesImpl.a.isLoggable(Level.FINE)) {
                    ServiceMetricsServicesImpl.a.log(Level.FINE, e[0], new Object[]{n2, MetricsBin.describeResolution((int)this.d), new Date(l2)});
                }
            }
            catch (Exception exception) {
                throw at.a(exception);
            }
        }
        catch (Exception exception) {
            ServiceMetricsServicesImpl.a.log(Level.WARNING, e[1] + this.d + "'", exception);
        }
    }

    private static Exception a(Exception exception) {
        return exception;
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[2];
        int n2 = 0;
        String string = "{7u*\u0002Ea\u001f))2V[4Br{&\u0018S%P>}*\u0004\u0000qW3wo\r\u0012x,|=l#\u0012N\"Kr}*\u001aEqZrT*\u0002Rl\\![&\u0018S%Y=ko\u0004EvP>l;\u001fOk\u001fu";
        int n3 = "{7u*\u0002Ea\u001f))2V[4Br{&\u0018S%P>}*\u0004\u0000qW3wo\r\u0012x,|=l#\u0012N\"Kr}*\u001aEqZrT*\u0002Rl\\![&\u0018S%Y=ko\u0004EvP>l;\u001fOk\u001fu".length();
        int n4 = 35;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = at.b(116, at.b(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                e = stringArray;
                return;
            }
            n4 = string.charAt(n5);
        }
    }

    private static char[] b(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x71);
        }
        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 -> 75;
                    case 1 -> 38;
                    case 2 -> 109;
                    case 3 -> 59;
                    case 4 -> 2;
                    case 5 -> 84;
                    default -> 113;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

