package defpackage;

import androidx.media3.common.ParserException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/* renamed from: ᵾˎʿ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C5408 {

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public static final C5408 f20264 = new C5408(0, -9223372036854775807L);

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public static final Pattern f20265 = Pattern.compile("npt[:=]([.\\d]+|now)\\s?-\\s?([.\\d]+)?");

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

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

    public C5408(long j, long j2) {
        this.f20266 = j;
        this.f20267 = j2;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static C5408 m11058(String str) {
        Matcher matcher = f20265.matcher(str);
        boolean zMatches = matcher.matches();
        Pattern pattern = AbstractC0306.f1944;
        if (!zMatches) {
            throw ParserException.m357(str, null);
        }
        String strGroup = matcher.group(1);
        if (strGroup == null) {
            throw ParserException.m357(str, null);
        }
        String str2 = AbstractC3558.f13329;
        long j = strGroup.equals("now") ? 0L : (long) (Float.parseFloat(strGroup) * 1000.0f);
        String strGroup2 = matcher.group(2);
        long j2 = -9223372036854775807L;
        if (strGroup2 != null) {
            try {
                long j3 = (long) (Float.parseFloat(strGroup2) * 1000.0f);
                if (j3 >= j) {
                    j2 = j3;
                }
            } catch (NumberFormatException e) {
                throw ParserException.m357(strGroup2, e);
            }
        }
        return new C5408(j, j2);
    }
}
