package defpackage;

import java.util.ArrayList;

/* renamed from: ᵼˆˏˈ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C5251 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final C1947 f19657;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final int f19658;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final int f19659;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final int f19660;

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public int f19661;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final C1588 f19662;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final ArrayList f19663;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final int f19664;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final C4699 f19665;

    public C5251(C1588 c1588, ArrayList arrayList, int i, C4699 c4699, C1947 c1947, int i2, int i3, int i4) {
        this.f19662 = c1588;
        this.f19663 = arrayList;
        this.f19660 = i;
        this.f19665 = c4699;
        this.f19657 = c1947;
        this.f19659 = i2;
        this.f19658 = i3;
        this.f19664 = i4;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static C5251 m10901(C5251 c5251, int i, C4699 c4699, C1947 c1947, int i2) {
        if ((i2 & 1) != 0) {
            i = c5251.f19660;
        }
        int i3 = i;
        if ((i2 & 2) != 0) {
            c4699 = c5251.f19665;
        }
        C4699 c46992 = c4699;
        if ((i2 & 4) != 0) {
            c1947 = c5251.f19657;
        }
        int i4 = c5251.f19659;
        int i5 = c5251.f19658;
        int i6 = c5251.f19664;
        return new C5251(c5251.f19662, c5251.f19663, i3, c46992, c1947, i4, i5, i6);
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final C2977 m10902(C1947 c1947) {
        ArrayList arrayList = this.f19663;
        int size = arrayList.size();
        int i = this.f19660;
        if (i >= size) {
            ᵹˉᵞ.ᵳٴᵶ("Check failed.");
            return null;
        }
        this.f19661++;
        C4699 c4699 = this.f19665;
        if (c4699 != null) {
            C0290 c0290Mo6923 = ((InterfaceC3060) c4699.f17375).mo6923();
            C1489 c1489 = c1947.f7850;
            C1489 c14892 = c0290Mo6923.f1900.f19157;
            if (c1489.f5994 != c14892.f5994 || !ᵲᵝᵪ.ᵹᵝᵶ(c1489.f6002, c14892.f6002)) {
                ᵨᴵᵺ.ˌᵜᵹᵩ("network interceptor ", arrayList.get(i - 1), " must retain the same host and port");
                return null;
            }
            if (this.f19661 != 1) {
                ᵨᴵᵺ.ˌᵜᵹᵩ("network interceptor ", arrayList.get(i - 1), " must call proceed() exactly once");
                return null;
            }
        }
        int i2 = i + 1;
        C5251 c5251M10901 = m10901(this, i2, null, c1947, 58);
        InterfaceC4849 interfaceC4849 = (InterfaceC4849) arrayList.get(i);
        C2977 c2977Mo6305 = interfaceC4849.mo6305(c5251M10901);
        if (c2977Mo6305 == null) {
            throw new NullPointerException("interceptor " + interfaceC4849 + " returned null");
        }
        if (c4699 == null || i2 >= arrayList.size() || c5251M10901.f19661 == 1) {
            return c2977Mo6305;
        }
        ᵨᴵᵺ.ˌᵜᵹᵩ("network interceptor ", interfaceC4849, " must call proceed() exactly once");
        return null;
    }
}
