package k;

import java.util.Arrays;

/* JADX INFO: compiled from: SolverVariable.java */
/* JADX INFO: loaded from: classes.dex */
public class i implements Comparable<i> {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    private static int f5133u = 1;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public boolean f5134e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    private String f5135f;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public float f5139j;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    a f5143n;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public int f5136g = -1;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    int f5137h = -1;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public int f5138i = 0;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public boolean f5140k = false;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    float[] f5141l = new float[9];

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    float[] f5142m = new float[9];

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    b[] f5144o = new b[16];

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    int f5145p = 0;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public int f5146q = 0;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    boolean f5147r = false;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    int f5148s = -1;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    float f5149t = 0.0f;

    /* JADX INFO: compiled from: SolverVariable.java */
    public enum a {
        UNRESTRICTED,
        CONSTANT,
        SLACK,
        ERROR,
        UNKNOWN
    }

    public i(a aVar, String str) {
        this.f5143n = aVar;
    }

    static void c() {
        f5133u++;
    }

    public final void a(b bVar) {
        int i3 = 0;
        while (true) {
            int i4 = this.f5145p;
            if (i3 >= i4) {
                b[] bVarArr = this.f5144o;
                if (i4 >= bVarArr.length) {
                    this.f5144o = (b[]) Arrays.copyOf(bVarArr, bVarArr.length * 2);
                }
                b[] bVarArr2 = this.f5144o;
                int i5 = this.f5145p;
                bVarArr2[i5] = bVar;
                this.f5145p = i5 + 1;
                return;
            }
            if (this.f5144o[i3] == bVar) {
                return;
            } else {
                i3++;
            }
        }
    }

    @Override // java.lang.Comparable
    /* JADX INFO: renamed from: b, reason: merged with bridge method [inline-methods] */
    public int compareTo(i iVar) {
        return this.f5136g - iVar.f5136g;
    }

    public final void d(b bVar) {
        int i3 = this.f5145p;
        int i4 = 0;
        while (i4 < i3) {
            if (this.f5144o[i4] == bVar) {
                while (i4 < i3 - 1) {
                    b[] bVarArr = this.f5144o;
                    int i5 = i4 + 1;
                    bVarArr[i4] = bVarArr[i5];
                    i4 = i5;
                }
                this.f5145p--;
                return;
            }
            i4++;
        }
    }

    public void e() {
        this.f5135f = null;
        this.f5143n = a.UNKNOWN;
        this.f5138i = 0;
        this.f5136g = -1;
        this.f5137h = -1;
        this.f5139j = 0.0f;
        this.f5140k = false;
        this.f5147r = false;
        this.f5148s = -1;
        this.f5149t = 0.0f;
        int i3 = this.f5145p;
        for (int i4 = 0; i4 < i3; i4++) {
            this.f5144o[i4] = null;
        }
        this.f5145p = 0;
        this.f5146q = 0;
        this.f5134e = false;
        Arrays.fill(this.f5142m, 0.0f);
    }

    public void f(d dVar, float f3) {
        this.f5139j = f3;
        this.f5140k = true;
        this.f5147r = false;
        this.f5148s = -1;
        this.f5149t = 0.0f;
        int i3 = this.f5145p;
        this.f5137h = -1;
        for (int i4 = 0; i4 < i3; i4++) {
            this.f5144o[i4].A(dVar, this, false);
        }
        this.f5145p = 0;
    }

    public void g(a aVar, String str) {
        this.f5143n = aVar;
    }

    public final void h(d dVar, b bVar) {
        int i3 = this.f5145p;
        for (int i4 = 0; i4 < i3; i4++) {
            this.f5144o[i4].B(dVar, bVar, false);
        }
        this.f5145p = 0;
    }

    public String toString() {
        if (this.f5135f != null) {
            return "" + this.f5135f;
        }
        return "" + this.f5136g;
    }
}
