package defpackage;

import android.os.SystemClock;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Map;

/* renamed from: ˌᵦ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractC1628 implements InterfaceC2569 {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final ArrayList f6505 = new ArrayList(1);

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final boolean f6506;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public C4179 f6507;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public int f6508;

    public AbstractC1628(boolean z) {
        this.f6506 = z;
    }

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final void m4666() {
        for (int i = 0; i < this.f6508; i++) {
            ((C3873) this.f6505.get(i)).getClass();
        }
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final void m4667() {
        C4179 c4179 = this.f6507;
        String str = AbstractC3558.f13329;
        for (int i = 0; i < this.f6508; i++) {
            C3873 c3873 = (C3873) this.f6505.get(i);
            boolean z = this.f6506;
            synchronized (c3873) {
                try {
                    C4471 c4471 = C3873.f14390;
                    if (z && (c4179.f15622 & 8) != 8) {
                        ᵛᵾˏ.ᵿʗᵝʽ(c3873.f14399 > 0);
                        c3873.f14411.getClass();
                        long jElapsedRealtime = SystemClock.elapsedRealtime();
                        int i2 = (int) (jElapsedRealtime - c3873.f14410);
                        c3873.f14408 += i2;
                        long j = c3873.f14409;
                        long j2 = c3873.f14402;
                        c3873.f14409 = j + j2;
                        if (i2 > 0) {
                            c3873.f14400.m7855((int) Math.sqrt(j2), (j2 * 8000.0f) / i2);
                            if (c3873.f14408 >= 2000 || c3873.f14409 >= 524288) {
                                c3873.f14398 = (long) c3873.f14400.m7849();
                            }
                            c3873.m8521(c3873.f14402, i2, c3873.f14398);
                            c3873.f14410 = jElapsedRealtime;
                            c3873.f14402 = 0L;
                        }
                        c3873.f14399--;
                    }
                } catch (Throwable th) {
                    throw th;
                }
            }
        }
        this.f6507 = null;
    }

    @Override // defpackage.InterfaceC2569
    /* renamed from: ᵡˎ */
    public final void mo1415(C3873 c3873) {
        c3873.getClass();
        ArrayList arrayList = this.f6505;
        if (arrayList.contains(c3873)) {
            return;
        }
        arrayList.add(c3873);
        this.f6508++;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m4668(int i) {
        C4179 c4179 = this.f6507;
        String str = AbstractC3558.f13329;
        for (int i2 = 0; i2 < this.f6508; i2++) {
            C3873 c3873 = (C3873) this.f6505.get(i2);
            boolean z = this.f6506;
            synchronized (c3873) {
                C4471 c4471 = C3873.f14390;
                if (z && (c4179.f15622 & 8) != 8) {
                    c3873.f14402 += i;
                }
            }
        }
    }

    @Override // defpackage.InterfaceC2569
    /* renamed from: ᵨᵳʝ */
    public Map mo1416() {
        return Collections.EMPTY_MAP;
    }

    /* renamed from: ᵸˑ, reason: contains not printable characters */
    public final void m4669(C4179 c4179) {
        this.f6507 = c4179;
        for (int i = 0; i < this.f6508; i++) {
            C3873 c3873 = (C3873) this.f6505.get(i);
            boolean z = this.f6506;
            synchronized (c3873) {
                try {
                    C4471 c4471 = C3873.f14390;
                    if (z && (c4179.f15622 & 8) != 8) {
                        if (c3873.f14399 == 0) {
                            c3873.f14411.getClass();
                            c3873.f14410 = SystemClock.elapsedRealtime();
                        }
                        c3873.f14399++;
                    }
                } catch (Throwable th) {
                    throw th;
                }
            }
        }
    }
}
