package kotlin.reflect.w.internal.y0.h;

import g.a.a.a.a;
import io.netty.handler.codec.dns.DefaultDnsRecordDecoder;

/* JADX INFO: loaded from: classes2.dex */
public final class b {
    public final c a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final c f8185b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final boolean f8186c;

    public b(c cVar, c cVar2, boolean z2) {
        if (cVar == null) {
            a(1);
            throw null;
        }
        this.a = cVar;
        this.f8185b = cVar2;
        this.f8186c = z2;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public b(c cVar, e eVar) {
        this(cVar, c.k(eVar), false);
        if (cVar == null) {
            a(3);
            throw null;
        }
        if (eVar != null) {
        } else {
            a(4);
            throw null;
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:9:0x0013  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static /* synthetic */ void a(int r10) {
        /*
            Method dump skipped, instruction units count: 300
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.w.internal.y0.h.b.a(int):void");
    }

    public static b e(String str) {
        return f(str, false);
    }

    public static b f(String str, boolean z2) {
        String str2;
        if (str == null) {
            a(12);
            throw null;
        }
        int iLastIndexOf = str.lastIndexOf("/");
        if (iLastIndexOf == -1) {
            str2 = "";
        } else {
            String strReplace = str.substring(0, iLastIndexOf).replace('/', '.');
            str = str.substring(iLastIndexOf + 1);
            str2 = strReplace;
        }
        return new b(new c(str2), new c(str), z2);
    }

    public static b l(c cVar) {
        if (cVar != null) {
            return new b(cVar.e(), cVar.g());
        }
        a(0);
        throw null;
    }

    public c b() {
        if (this.a.d()) {
            c cVar = this.f8185b;
            if (cVar != null) {
                return cVar;
            }
            a(9);
            throw null;
        }
        return new c(this.a.b() + DefaultDnsRecordDecoder.ROOT + this.f8185b.b());
    }

    public String c() {
        if (this.a.d()) {
            String strB = this.f8185b.b();
            if (strB != null) {
                return strB;
            }
            a(13);
            throw null;
        }
        String str = this.a.b().replace('.', '/') + "/" + this.f8185b.b();
        if (str != null) {
            return str;
        }
        a(14);
        throw null;
    }

    public b d(e eVar) {
        if (eVar != null) {
            return new b(h(), this.f8185b.c(eVar), this.f8186c);
        }
        a(8);
        throw null;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || b.class != obj.getClass()) {
            return false;
        }
        b bVar = (b) obj;
        return this.a.equals(bVar.a) && this.f8185b.equals(bVar.f8185b) && this.f8186c == bVar.f8186c;
    }

    public b g() {
        c cVarE = this.f8185b.e();
        if (cVarE.d()) {
            return null;
        }
        return new b(h(), cVarE, this.f8186c);
    }

    public c h() {
        c cVar = this.a;
        if (cVar != null) {
            return cVar;
        }
        a(5);
        throw null;
    }

    public int hashCode() {
        return Boolean.valueOf(this.f8186c).hashCode() + ((this.f8185b.hashCode() + (this.a.hashCode() * 31)) * 31);
    }

    public c i() {
        c cVar = this.f8185b;
        if (cVar != null) {
            return cVar;
        }
        a(6);
        throw null;
    }

    public e j() {
        e eVarG = this.f8185b.g();
        if (eVarG != null) {
            return eVarG;
        }
        a(7);
        throw null;
    }

    public boolean k() {
        return !this.f8185b.e().d();
    }

    public String toString() {
        if (!this.a.d()) {
            return c();
        }
        StringBuilder sbF = a.F("/");
        sbF.append(c());
        return sbF.toString();
    }
}
