package p138.p176.p177.p190.p239;

import p000.p001.p002.p003.p004.C0567;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ဢ.ޗ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C4149 {

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

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

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public volatile long f13258 = -9223372036854775807L;

    public C4149(long j) {
        m6739(j);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public long m6735() {
        if (this.f13256 == Long.MAX_VALUE) {
            return 0L;
        }
        if (this.f13258 == -9223372036854775807L) {
            return -9223372036854775807L;
        }
        return this.f13257;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public long m6736(long j) {
        if (j == -9223372036854775807L) {
            return -9223372036854775807L;
        }
        if (this.f13258 != -9223372036854775807L) {
            this.f13258 = j;
        } else {
            long j2 = this.f13256;
            if (j2 != Long.MAX_VALUE) {
                this.f13257 = j2 - j;
            }
            synchronized (this) {
                this.f13258 = j;
                notifyAll();
            }
        }
        return j + this.f13257;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public long m6737(long j) {
        if (j == -9223372036854775807L) {
            return -9223372036854775807L;
        }
        if (this.f13258 != -9223372036854775807L) {
            long j2 = (this.f13258 * 90000) / 1000000;
            long j3 = (4294967296L + j2) / 8589934592L;
            long j4 = ((j3 - 1) * 8589934592L) + j;
            j += j3 * 8589934592L;
            if (Math.abs(j4 - j2) < Math.abs(j - j2)) {
                j = j4;
            }
        }
        return m6736((j * 1000000) / 90000);
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public synchronized void m6738() {
        while (this.f13258 == -9223372036854775807L) {
            wait();
        }
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public synchronized void m6739(long j) {
        C0567.m1932(this.f13258 == -9223372036854775807L);
        this.f13256 = j;
    }
}
