/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.uddi.UDDIRegistry
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.uddi.UDDINamedEntity
 */
package com.l7tech.server.service;

import com.l7tech.gateway.common.uddi.UDDIRegistry;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.server.service.ServiceAdminImpl;
import com.l7tech.server.service.l;
import com.l7tech.uddi.UDDINamedEntity;
import java.util.concurrent.Callable;

class k
implements Callable<UDDINamedEntity[]> {
    final Goid val$registryGoid;
    final String val$namePattern;
    final boolean val$caseSensitive;
    final ServiceAdminImpl this$0;
    private static final String a = k.a(39, k.a("\u0015V\u0011=JAw|J\u0002;O[g.AG"));

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    k(ServiceAdminImpl serviceAdminImpl, Goid goid, String string, boolean bl2) {
        this.this$0 = serviceAdminImpl;
        this.val$registryGoid = goid;
        this.val$namePattern = string;
        this.val$caseSensitive = bl2;
    }

    @Override
    public UDDINamedEntity[] call() throws Exception {
        UDDIRegistry uDDIRegistry = this.this$0.s.findByPrimaryKey(this.val$registryGoid);
        try {
            if (uDDIRegistry == null) {
                throw new FindException(a + String.valueOf(this.val$registryGoid));
            }
        }
        catch (Exception exception) {
            throw k.a(exception);
        }
        return this.this$0.a(uDDIRegistry, new l(this));
    }

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

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

