/*
 * 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.WsdlPortInfo
 */
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.t;
import com.l7tech.uddi.WsdlPortInfo;
import java.util.concurrent.Callable;

class s
implements Callable<WsdlPortInfo[]> {
    final Goid val$registryGoid;
    final String val$serviceKey;
    final boolean val$getFirstOnly;
    final ServiceAdminImpl this$0;
    private static final String a = s.a(101, s.a(".iR\tFc<GuA\u000fCy,\u0015~\u0004"));

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

    @Override
    public WsdlPortInfo[] 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 s.a(exception);
        }
        return this.this$0.a(uDDIRegistry, new t(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] ^ 0x3D);
        }
        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 -> 2;
                    case 1 -> 98;
                    case 2 -> 65;
                    case 3 -> 13;
                    case 4 -> 79;
                    case 5 -> 111;
                    default -> 61;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

