package 㿎;

import com.facebook.internal.security.CertificateUtil;
import java.net.Proxy;
import java.net.ProxySelector;
import java.util.List;
import javax.net.SocketFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSocketFactory;
import okhttp3.Protocol;
import ඓ.K.K.K.C1293;
import 㿎.C2531;
import 㿎.ሽ.C2540;

/* renamed from: 㿎.K  reason: contains not printable characters */
/* compiled from: Address */
public final class C2640 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public final SocketFactory f8963;

    /* renamed from: ඓ  reason: contains not printable characters */
    public final List<Protocol> f8964;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public final C2638 f8965;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public final SSLSocketFactory f8966;

    /* renamed from: ῲ  reason: contains not printable characters */
    public final AbstractC2647 f8967;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public final ProxySelector f8968;

    /* renamed from: K  reason: contains not printable characters */
    public final C2531 f8969;

    /* renamed from: 㳳  reason: contains not printable characters */
    public final HostnameVerifier f8970;

    /* renamed from: 㴹  reason: contains not printable characters */
    public final List<C2630> f8971;

    /* renamed from: 㸾  reason: contains not printable characters */
    public final AbstractC2636 f8972;

    /* renamed from: 㿎  reason: contains not printable characters */
    public final Proxy f8973;

    public C2640(String str, int i, AbstractC2647 r16, SocketFactory socketFactory, SSLSocketFactory sSLSocketFactory, HostnameVerifier hostnameVerifier, C2638 r20, AbstractC2636 r21, Proxy proxy, List<Protocol> list, List<C2630> list2, ProxySelector proxySelector) {
        C2531.C2532 k = new C2531.C2532();
        String str2 = sSLSocketFactory != null ? "https" : "http";
        if (str2.equalsIgnoreCase("http")) {
            k.f8548 = "http";
        } else if (str2.equalsIgnoreCase("https")) {
            k.f8548 = "https";
        } else {
            throw new IllegalArgumentException(C1293.m3412("unexpected scheme: ", str2));
        }
        if (str != null) {
            String r9 = C2531.C2532.m6601(str, 0, str.length());
            if (r9 != null) {
                k.f8550 = r9;
                if (i <= 0 || i > 65535) {
                    throw new IllegalArgumentException(C1293.m3408("unexpected port: ", i));
                }
                k.f8545 = i;
                this.f8969 = k.m6607();
                if (r16 != null) {
                    this.f8967 = r16;
                    if (socketFactory != null) {
                        this.f8963 = socketFactory;
                        if (r21 != null) {
                            this.f8972 = r21;
                            if (list != null) {
                                this.f8964 = C2540.m6646(list);
                                if (list2 != null) {
                                    this.f8971 = C2540.m6646(list2);
                                    if (proxySelector != null) {
                                        this.f8968 = proxySelector;
                                        this.f8973 = proxy;
                                        this.f8966 = sSLSocketFactory;
                                        this.f8970 = hostnameVerifier;
                                        this.f8965 = r20;
                                        return;
                                    }
                                    throw new NullPointerException("proxySelector == null");
                                }
                                throw new NullPointerException("connectionSpecs == null");
                            }
                            throw new NullPointerException("protocols == null");
                        }
                        throw new NullPointerException("proxyAuthenticator == null");
                    }
                    throw new NullPointerException("socketFactory == null");
                }
                throw new NullPointerException("dns == null");
            }
            throw new IllegalArgumentException(C1293.m3412("unexpected host: ", str));
        }
        throw new NullPointerException("host == null");
    }

    public boolean equals(Object obj) {
        if (obj instanceof C2640) {
            C2640 k = (C2640) obj;
            return this.f8969.equals(k.f8969) && m6951(k);
        }
    }

    public int hashCode() {
        int hashCode = this.f8967.hashCode();
        int hashCode2 = (this.f8968.hashCode() + ((this.f8971.hashCode() + ((this.f8964.hashCode() + ((this.f8972.hashCode() + ((hashCode + ((this.f8969.hashCode() + 527) * 31)) * 31)) * 31)) * 31)) * 31)) * 31;
        Proxy proxy = this.f8973;
        int i = 0;
        int hashCode3 = (hashCode2 + (proxy != null ? proxy.hashCode() : 0)) * 31;
        SSLSocketFactory sSLSocketFactory = this.f8966;
        int hashCode4 = (hashCode3 + (sSLSocketFactory != null ? sSLSocketFactory.hashCode() : 0)) * 31;
        HostnameVerifier hostnameVerifier = this.f8970;
        int hashCode5 = (hashCode4 + (hostnameVerifier != null ? hostnameVerifier.hashCode() : 0)) * 31;
        C2638 r0 = this.f8965;
        if (r0 != null) {
            i = r0.hashCode();
        }
        return hashCode5 + i;
    }

    public String toString() {
        StringBuilder r0 = C1293.m3416("Address{");
        r0.append(this.f8969.f8542);
        r0.append(CertificateUtil.DELIMITER);
        r0.append(this.f8969.f8536);
        if (this.f8973 != null) {
            r0.append(", proxy=");
            r0.append(this.f8973);
        } else {
            r0.append(", proxySelector=");
            r0.append(this.f8968);
        }
        r0.append("}");
        return r0.toString();
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public HostnameVerifier m6949() {
        return this.f8970;
    }

    /* renamed from: K  reason: contains not printable characters */
    public C2638 m6950() {
        return this.f8965;
    }

    /* renamed from: K  reason: contains not printable characters */
    public boolean m6951(C2640 k) {
        return this.f8967.equals(k.f8967) && this.f8972.equals(k.f8972) && this.f8964.equals(k.f8964) && this.f8971.equals(k.f8971) && this.f8968.equals(k.f8968) && C2540.m6654(this.f8973, k.f8973) && C2540.m6654(this.f8966, k.f8966) && C2540.m6654(this.f8970, k.f8970) && C2540.m6654(this.f8965, k.f8965) && this.f8969.f8536 == k.f8969.f8536;
    }
}
