package c.e.b;

import java.util.Arrays;

/* JADX INFO: compiled from: SolverVariable.java */
/* JADX INFO: loaded from: classes.dex */
public class g {
    public static int a = 1;

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

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

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

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

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

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

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

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

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

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

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public int f1107l = 0;
    public int m = 0;
    public int n = -1;

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

    public g(a aVar) {
        this.f1105j = aVar;
    }

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

    public final void b(b bVar) {
        int i2 = this.f1107l;
        int i3 = 0;
        while (i3 < i2) {
            if (this.f1106k[i3] == bVar) {
                while (i3 < i2 - 1) {
                    b[] bVarArr = this.f1106k;
                    int i4 = i3 + 1;
                    bVarArr[i3] = bVarArr[i4];
                    i3 = i4;
                }
                this.f1107l--;
                return;
            }
            i3++;
        }
    }

    public void c() {
        this.f1105j = a.UNKNOWN;
        this.f1100e = 0;
        this.f1098c = -1;
        this.f1099d = -1;
        this.f1101f = 0.0f;
        this.f1102g = false;
        this.n = -1;
        int i2 = this.f1107l;
        for (int i3 = 0; i3 < i2; i3++) {
            this.f1106k[i3] = null;
        }
        this.f1107l = 0;
        this.m = 0;
        this.f1097b = false;
        Arrays.fill(this.f1104i, 0.0f);
    }

    public void d(d dVar, float f2) {
        this.f1101f = f2;
        this.f1102g = true;
        this.n = -1;
        int i2 = this.f1107l;
        this.f1099d = -1;
        for (int i3 = 0; i3 < i2; i3++) {
            this.f1106k[i3].k(dVar, this, false);
        }
        this.f1107l = 0;
    }

    public final void e(d dVar, b bVar) {
        int i2 = this.f1107l;
        for (int i3 = 0; i3 < i2; i3++) {
            this.f1106k[i3].l(dVar, bVar, false);
        }
        this.f1107l = 0;
    }

    public String toString() {
        StringBuilder sbB = d.b.a.a.a.B("");
        sbB.append(this.f1098c);
        return sbB.toString();
    }
}
