package o;

import java.util.Arrays;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class R90 implements Comparable {
    public boolean l;
    public float p;
    public int w;
    public int m = -1;
    public int n = -1;

    /* renamed from: o, reason: collision with root package name */
    public int f310o = 0;
    public boolean q = false;
    public final float[] r = new float[9];
    public final float[] s = new float[9];
    public C2029o9[] t = new C2029o9[16];
    public int u = 0;
    public int v = 0;

    public R90(int i) {
        this.w = i;
    }

    public final void a(C2029o9 c2029o9) {
        int i = 0;
        while (true) {
            int i2 = this.u;
            if (i >= i2) {
                C2029o9[] c2029o9Arr = this.t;
                if (i2 >= c2029o9Arr.length) {
                    this.t = (C2029o9[]) Arrays.copyOf(c2029o9Arr, c2029o9Arr.length * 2);
                }
                C2029o9[] c2029o9Arr2 = this.t;
                int i3 = this.u;
                c2029o9Arr2[i3] = c2029o9;
                this.u = i3 + 1;
                return;
            }
            if (this.t[i] == c2029o9) {
                return;
            } else {
                i++;
            }
        }
    }

    public final void b(C2029o9 c2029o9) {
        int i = this.u;
        int i2 = 0;
        while (i2 < i) {
            if (this.t[i2] == c2029o9) {
                while (i2 < i - 1) {
                    C2029o9[] c2029o9Arr = this.t;
                    int i3 = i2 + 1;
                    c2029o9Arr[i2] = c2029o9Arr[i3];
                    i2 = i3;
                }
                this.u--;
                return;
            }
            i2++;
        }
    }

    public final void c() {
        this.w = 5;
        this.f310o = 0;
        this.m = -1;
        this.n = -1;
        this.p = 0.0f;
        this.q = false;
        int i = this.u;
        for (int i2 = 0; i2 < i; i2++) {
            this.t[i2] = null;
        }
        this.u = 0;
        this.v = 0;
        this.l = false;
        Arrays.fill(this.s, 0.0f);
    }

    @Override // java.lang.Comparable
    public final int compareTo(Object obj) {
        return this.m - ((R90) obj).m;
    }

    public final void d(C2991yL c2991yL, float f) {
        this.p = f;
        this.q = true;
        int i = this.u;
        this.n = -1;
        for (int i2 = 0; i2 < i; i2++) {
            this.t[i2].h(c2991yL, this, false);
        }
        this.u = 0;
    }

    public final void e(C2991yL c2991yL, C2029o9 c2029o9) {
        int i = this.u;
        for (int i2 = 0; i2 < i; i2++) {
            this.t[i2].i(c2991yL, c2029o9, false);
        }
        this.u = 0;
    }

    public final String toString() {
        return "" + this.m;
    }
}
