package p138.p176.p177.p190.p217.p220.p221;

import android.net.Uri;
import p000.p001.p002.p003.p004.C0567;
import p138.p139.p143.p144.C2803;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໞ.ޞ.އ.ޅ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C3877 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final long f12002;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final long f12003;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final String f12004;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public int f12005;

    public C3877(String str, long j, long j2) {
        this.f12004 = str == null ? "" : str;
        this.f12002 = j;
        this.f12003 = j2;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || C3877.class != obj.getClass()) {
            return false;
        }
        C3877 c3877 = (C3877) obj;
        return this.f12002 == c3877.f12002 && this.f12003 == c3877.f12003 && this.f12004.equals(c3877.f12004);
    }

    public int hashCode() {
        if (this.f12005 == 0) {
            this.f12005 = this.f12004.hashCode() + ((((527 + ((int) this.f12002)) * 31) + ((int) this.f12003)) * 31);
        }
        return this.f12005;
    }

    public String toString() {
        StringBuilder sbM4889 = C2803.m4889("RangedUri(referenceUri=");
        sbM4889.append(this.f12004);
        sbM4889.append(", start=");
        sbM4889.append(this.f12002);
        sbM4889.append(", length=");
        return C2803.m4883(sbM4889, this.f12003, ")");
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public Uri m6289(String str) {
        return C0567.m1934(str, this.f12004);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public C3877 m6290(C3877 c3877, String str) {
        String strM1927 = C0567.m1927(str, this.f12004);
        if (c3877 != null && strM1927.equals(C0567.m1927(str, c3877.f12004))) {
            long j = this.f12003;
            if (j != -1) {
                long j2 = this.f12002;
                if (j2 + j == c3877.f12002) {
                    long j3 = c3877.f12003;
                    return new C3877(strM1927, j2, j3 == -1 ? -1L : j + j3);
                }
            }
            long j4 = c3877.f12003;
            if (j4 != -1) {
                long j5 = c3877.f12002;
                if (j5 + j4 == this.f12002) {
                    long j6 = this.f12003;
                    return new C3877(strM1927, j5, j6 == -1 ? -1L : j4 + j6);
                }
            }
        }
        return null;
    }
}
