package 㿎.ሽ.㴹;

import java.io.IOException;
import java.util.List;
import ඓ.K.K.K.C1293;
import 㿎.AbstractC2533;
import 㿎.AbstractC2537;
import 㿎.AbstractC2661;
import 㿎.C2644;
import 㿎.C2671;
import 㿎.ሽ.ඓ.C2543;
import 㿎.ሽ.ඓ.C2548;

/* renamed from: 㿎.ሽ.㴹.㴹  reason: contains not printable characters */
/* compiled from: RealInterceptorChain */
public final class C2583 implements AbstractC2661.AbstractC2662 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public final AbstractC2576 f8689;

    /* renamed from: ඓ  reason: contains not printable characters */
    public final int f8690;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public final int f8691;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public final int f8692;

    /* renamed from: ῲ  reason: contains not printable characters */
    public final C2548 f8693;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public final AbstractC2537 f8694;

    /* renamed from: K  reason: contains not printable characters */
    public final List<AbstractC2661> f8695;

    /* renamed from: 㑃  reason: contains not printable characters */
    public int f8696;

    /* renamed from: 㳳  reason: contains not printable characters */
    public final int f8697;

    /* renamed from: 㴹  reason: contains not printable characters */
    public final C2644 f8698;

    /* renamed from: 㸾  reason: contains not printable characters */
    public final C2543 f8699;

    /* renamed from: 㿎  reason: contains not printable characters */
    public final AbstractC2533 f8700;

    public C2583(List<AbstractC2661> list, C2548 r2, AbstractC2576 r3, C2543 r4, int i, C2644 r6, AbstractC2537 r7, AbstractC2533 r8, int i2, int i3, int i4) {
        this.f8695 = list;
        this.f8699 = r4;
        this.f8693 = r2;
        this.f8689 = r3;
        this.f8690 = i;
        this.f8698 = r6;
        this.f8694 = r7;
        this.f8700 = r8;
        this.f8692 = i2;
        this.f8697 = i3;
        this.f8691 = i4;
    }

    /* renamed from: K  reason: contains not printable characters */
    public C2671 m6789(C2644 r4) throws IOException {
        return m6790(r4, this.f8693, this.f8689, this.f8699);
    }

    /* renamed from: K  reason: contains not printable characters */
    public C2671 m6790(C2644 r19, C2548 r20, AbstractC2576 r21, C2543 r22) throws IOException {
        if (this.f8690 < this.f8695.size()) {
            this.f8696++;
            if (this.f8689 != null) {
                if (!this.f8699.m6667(r19.f8985)) {
                    StringBuilder r3 = C1293.m3416("network interceptor ");
                    r3.append(this.f8695.get(this.f8690 - 1));
                    r3.append(" must retain the same host and port");
                    throw new IllegalStateException(r3.toString());
                }
            }
            if (this.f8689 == null || this.f8696 <= 1) {
                C2583 r1 = new C2583(this.f8695, r20, r21, r22, this.f8690 + 1, r19, this.f8694, this.f8700, this.f8692, this.f8697, this.f8691);
                AbstractC2661 r4 = this.f8695.get(this.f8690);
                C2671 r5 = r4.m6989(r1);
                if (r21 != null && this.f8690 + 1 < this.f8695.size() && r1.f8696 != 1) {
                    throw new IllegalStateException("network interceptor " + r4 + " must call proceed() exactly once");
                } else if (r5 == null) {
                    throw new NullPointerException("interceptor " + r4 + " returned null");
                } else if (r5.f9093 != null) {
                    return r5;
                } else {
                    throw new IllegalStateException("interceptor " + r4 + " returned a response with no body");
                }
            } else {
                StringBuilder r32 = C1293.m3416("network interceptor ");
                r32.append(this.f8695.get(this.f8690 - 1));
                r32.append(" must call proceed() exactly once");
                throw new IllegalStateException(r32.toString());
            }
        } else {
            throw new AssertionError();
        }
    }
}
