/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.mime.PartInfo
 *  com.l7tech.common.mime.PartIterator
 *  com.l7tech.policy.assertion.ext.message.knob.CustomPartsKnob$Part
 */
package com.l7tech.server.custom.knob;

import com.l7tech.common.mime.PartInfo;
import com.l7tech.common.mime.PartIterator;
import com.l7tech.policy.assertion.ext.message.knob.CustomPartsKnob;
import com.l7tech.server.custom.knob.CustomPartsKnobImpl;
import com.l7tech.server.custom.knob.b;
import java.util.Iterator;
import java.util.NoSuchElementException;

class a
implements Iterator<CustomPartsKnob.Part> {
    final PartIterator val$partIterator;
    final boolean val$disallowBuffering;
    private static final String a = com.l7tech.server.custom.knob.a.a(24, com.l7tech.server.custom.knob.a.a(">-Mbzzh\f#\u0004kgj:\u0019/P.kv-X\"Avk>-\u0014)IkqjdX%Pkm\u007f<\u0017>\u0004gl>!\u0016:Ebvzi"));

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    a(CustomPartsKnobImpl customPartsKnobImpl, PartIterator partIterator, boolean bl2) {
        this.val$partIterator = partIterator;
        this.val$disallowBuffering = bl2;
    }

    @Override
    public boolean hasNext() {
        boolean bl2;
        block5: {
            block4: {
                try {
                    try {
                        if (this.val$partIterator == null || !this.val$partIterator.hasNext()) break block4;
                    }
                    catch (NoSuchElementException noSuchElementException) {
                        throw com.l7tech.server.custom.knob.a.a(noSuchElementException);
                    }
                    bl2 = true;
                    break block5;
                }
                catch (NoSuchElementException noSuchElementException) {
                    throw com.l7tech.server.custom.knob.a.a(noSuchElementException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    @Override
    public CustomPartsKnob.Part next() {
        try {
            if (this.val$partIterator == null) {
                throw new NoSuchElementException(a);
            }
        }
        catch (NoSuchElementException noSuchElementException) {
            throw com.l7tech.server.custom.knob.a.a(noSuchElementException);
        }
        PartInfo partInfo = this.val$partIterator.next();
        return new b(this, partInfo);
    }

    @Override
    public void remove() {
        throw new UnsupportedOperationException();
    }

    private static NoSuchElementException a(NoSuchElementException noSuchElementException) {
        return noSuchElementException;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x50);
        }
        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 -> 96;
                    case 1 -> 84;
                    case 2 -> 60;
                    case 3 -> 22;
                    case 4 -> 7;
                    case 5 -> 6;
                    default -> 80;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

