package X6FRs_4.X6FRs_4.KQgRr5e_0;

import X6FRs_4.X6FRs_4.KQgRr5e_0.X6FRs_4;
import X6FRs_4.X6FRs_4.KQgRr5e_0.Xgtqvk_8;
import com.wang.avi.BuildConfig;
/* compiled from: ArrayRow.java */
/* loaded from: classes.dex */
public class QxJ9d_1 implements X6FRs_4.KQgRr5e_0 {

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final KQgRr5e_0 f1115KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public boolean f1117KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public Xgtqvk_8 f1116KQgRr5e_0 = null;
    public float KQgRr5e_0 = 0.0f;
    public boolean QxJ9d_1 = false;

    public QxJ9d_1(PGPF6hQ_2 pGPF6hQ_2) {
        this.f1115KQgRr5e_0 = new KQgRr5e_0(this, pGPF6hQ_2);
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.X6FRs_4.KQgRr5e_0
    public boolean KQgRr5e_0() {
        Xgtqvk_8 xgtqvk_8 = this.f1116KQgRr5e_0;
        return xgtqvk_8 != null && (xgtqvk_8.f1128KQgRr5e_0 == Xgtqvk_8.KQgRr5e_0.UNRESTRICTED || this.KQgRr5e_0 >= 0.0f);
    }

    public QxJ9d_1 PGPF6hQ_2(Xgtqvk_8 xgtqvk_8, int i) {
        if (i < 0) {
            this.KQgRr5e_0 = i * (-1);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, 1.0f);
        } else {
            this.KQgRr5e_0 = i;
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, -1.0f);
        }
        return this;
    }

    public void QxJ9d_1() {
        this.f1116KQgRr5e_0 = null;
        this.f1115KQgRr5e_0.KQgRr5e_0();
        this.KQgRr5e_0 = 0.0f;
        this.QxJ9d_1 = false;
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.X6FRs_4.KQgRr5e_0
    public void clear() {
        this.f1115KQgRr5e_0.KQgRr5e_0();
        this.f1116KQgRr5e_0 = null;
        this.KQgRr5e_0 = 0.0f;
    }

    public String toString() {
        return KQgRr5e_0();
    }

    /* JADX WARN: Removed duplicated region for block: B:30:0x00c0  */
    /* JADX WARN: Removed duplicated region for block: B:31:0x00d0  */
    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.X6FRs_4.KQgRr5e_0
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public String KQgRr5e_0() {
        boolean z;
        String str = (this.f1116KQgRr5e_0 == null ? BuildConfig.FLAVOR + "0" : BuildConfig.FLAVOR + this.f1116KQgRr5e_0) + " = ";
        if (this.KQgRr5e_0 != 0.0f) {
            str = str + this.KQgRr5e_0;
            z = true;
        } else {
            z = false;
        }
        int i = this.f1115KQgRr5e_0.KQgRr5e_0;
        for (int i2 = 0; i2 < i; i2++) {
            Xgtqvk_8 m533KQgRr5e_0 = this.f1115KQgRr5e_0.m533KQgRr5e_0(i2);
            if (m533KQgRr5e_0 != null) {
                float KQgRr5e_0 = this.f1115KQgRr5e_0.KQgRr5e_0(i2);
                if (KQgRr5e_0 != 0.0f) {
                    String xgtqvk_8 = m533KQgRr5e_0.toString();
                    if (!z) {
                        if (KQgRr5e_0 < 0.0f) {
                            str = str + "- ";
                            KQgRr5e_0 *= -1.0f;
                        }
                        str = KQgRr5e_0 == 1.0f ? str + xgtqvk_8 : str + KQgRr5e_0 + " " + xgtqvk_8;
                        z = true;
                    } else if (KQgRr5e_0 > 0.0f) {
                        str = str + " + ";
                        if (KQgRr5e_0 == 1.0f) {
                        }
                        z = true;
                    } else {
                        str = str + " - ";
                        KQgRr5e_0 *= -1.0f;
                        if (KQgRr5e_0 == 1.0f) {
                        }
                        z = true;
                    }
                }
            }
        }
        if (z) {
            return str;
        }
        return str + "0.0";
    }

    public QxJ9d_1 QxJ9d_1(Xgtqvk_8 xgtqvk_8, int i) {
        this.f1116KQgRr5e_0 = xgtqvk_8;
        float f = i;
        xgtqvk_8.KQgRr5e_0 = f;
        this.KQgRr5e_0 = f;
        this.QxJ9d_1 = true;
        return this;
    }

    public QxJ9d_1 QxJ9d_1(Xgtqvk_8 xgtqvk_8, Xgtqvk_8 xgtqvk_82, Xgtqvk_8 xgtqvk_83, int i) {
        boolean z = false;
        if (i != 0) {
            if (i < 0) {
                i *= -1;
                z = true;
            }
            this.KQgRr5e_0 = i;
        }
        if (!z) {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, -1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, -1.0f);
        } else {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, -1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, 1.0f);
        }
        return this;
    }

    public QxJ9d_1 QxJ9d_1(Xgtqvk_8 xgtqvk_8, Xgtqvk_8 xgtqvk_82, Xgtqvk_8 xgtqvk_83, Xgtqvk_8 xgtqvk_84, float f) {
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, 0.5f);
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_84, 0.5f);
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, -0.5f);
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, -0.5f);
        this.KQgRr5e_0 = -f;
        return this;
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.X6FRs_4.KQgRr5e_0
    public boolean KQgRr5e_0(Xgtqvk_8 xgtqvk_8) {
        return this.f1115KQgRr5e_0.m534KQgRr5e_0(xgtqvk_8);
    }

    public QxJ9d_1 KQgRr5e_0(Xgtqvk_8 xgtqvk_8, Xgtqvk_8 xgtqvk_82, int i) {
        boolean z = false;
        if (i != 0) {
            if (i < 0) {
                i *= -1;
                z = true;
            }
            this.KQgRr5e_0 = i;
        }
        if (!z) {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, -1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, 1.0f);
        } else {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, -1.0f);
        }
        return this;
    }

    public void QxJ9d_1(Xgtqvk_8 xgtqvk_8) {
        Xgtqvk_8 xgtqvk_82 = this.f1116KQgRr5e_0;
        if (xgtqvk_82 != null) {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, -1.0f);
            this.f1116KQgRr5e_0 = null;
        }
        float KQgRr5e_0 = this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, true) * (-1.0f);
        this.f1116KQgRr5e_0 = xgtqvk_8;
        if (KQgRr5e_0 == 1.0f) {
            return;
        }
        this.KQgRr5e_0 /= KQgRr5e_0;
        this.f1115KQgRr5e_0.KQgRr5e_0(KQgRr5e_0);
    }

    public QxJ9d_1 KQgRr5e_0(Xgtqvk_8 xgtqvk_8, int i) {
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, i);
        return this;
    }

    public QxJ9d_1 KQgRr5e_0(Xgtqvk_8 xgtqvk_8, Xgtqvk_8 xgtqvk_82, Xgtqvk_8 xgtqvk_83, int i) {
        boolean z = false;
        if (i != 0) {
            if (i < 0) {
                i *= -1;
                z = true;
            }
            this.KQgRr5e_0 = i;
        }
        if (!z) {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, -1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, 1.0f);
        } else {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, -1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, -1.0f);
        }
        return this;
    }

    /* renamed from: QxJ9d_1  reason: collision with other method in class */
    public boolean m535QxJ9d_1() {
        return this.f1116KQgRr5e_0 == null && this.KQgRr5e_0 == 0.0f && this.f1115KQgRr5e_0.KQgRr5e_0 == 0;
    }

    public QxJ9d_1 KQgRr5e_0(float f, float f2, float f3, Xgtqvk_8 xgtqvk_8, Xgtqvk_8 xgtqvk_82, Xgtqvk_8 xgtqvk_83, Xgtqvk_8 xgtqvk_84) {
        this.KQgRr5e_0 = 0.0f;
        if (f2 == 0.0f || f == f3) {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, -1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_84, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, -1.0f);
        } else if (f == 0.0f) {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, -1.0f);
        } else if (f3 == 0.0f) {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_84, -1.0f);
        } else {
            float f4 = (f / f2) / (f3 / f2);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, -1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_84, f4);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, -f4);
        }
        return this;
    }

    public QxJ9d_1 KQgRr5e_0(Xgtqvk_8 xgtqvk_8, Xgtqvk_8 xgtqvk_82, int i, float f, Xgtqvk_8 xgtqvk_83, Xgtqvk_8 xgtqvk_84, int i2) {
        if (xgtqvk_82 == xgtqvk_83) {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_84, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, -2.0f);
            return this;
        }
        if (f == 0.5f) {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, -1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, -1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_84, 1.0f);
            if (i > 0 || i2 > 0) {
                this.KQgRr5e_0 = (-i) + i2;
            }
        } else if (f <= 0.0f) {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, -1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, 1.0f);
            this.KQgRr5e_0 = i;
        } else if (f >= 1.0f) {
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, -1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_84, 1.0f);
            this.KQgRr5e_0 = i2;
        } else {
            float f2 = 1.0f - f;
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, f2 * 1.0f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, f2 * (-1.0f));
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, (-1.0f) * f);
            this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_84, 1.0f * f);
            if (i > 0 || i2 > 0) {
                this.KQgRr5e_0 = ((-i) * f2) + (i2 * f);
            }
        }
        return this;
    }

    public QxJ9d_1 KQgRr5e_0(X6FRs_4 x6FRs_4, int i) {
        this.f1115KQgRr5e_0.KQgRr5e_0(x6FRs_4.KQgRr5e_0(i, "ep"), 1.0f);
        this.f1115KQgRr5e_0.KQgRr5e_0(x6FRs_4.KQgRr5e_0(i, "em"), -1.0f);
        return this;
    }

    public QxJ9d_1 KQgRr5e_0(Xgtqvk_8 xgtqvk_8, Xgtqvk_8 xgtqvk_82, Xgtqvk_8 xgtqvk_83, float f) {
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, -1.0f);
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, 1.0f - f);
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, f);
        return this;
    }

    public QxJ9d_1 KQgRr5e_0(Xgtqvk_8 xgtqvk_8, Xgtqvk_8 xgtqvk_82, Xgtqvk_8 xgtqvk_83, Xgtqvk_8 xgtqvk_84, float f) {
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, -1.0f);
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_82, 1.0f);
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_83, f);
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_84, -f);
        return this;
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.X6FRs_4.KQgRr5e_0
    public void KQgRr5e_0() {
        float f = this.KQgRr5e_0;
        if (f < 0.0f) {
            this.KQgRr5e_0 = f * (-1.0f);
            this.f1115KQgRr5e_0.QxJ9d_1();
        }
    }

    public boolean KQgRr5e_0(X6FRs_4 x6FRs_4) {
        boolean z;
        Xgtqvk_8 KQgRr5e_0 = this.f1115KQgRr5e_0.KQgRr5e_0(x6FRs_4);
        if (KQgRr5e_0 == null) {
            z = true;
        } else {
            QxJ9d_1(KQgRr5e_0);
            z = false;
        }
        if (this.f1115KQgRr5e_0.KQgRr5e_0 == 0) {
            this.QxJ9d_1 = true;
        }
        return z;
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.X6FRs_4.KQgRr5e_0
    public Xgtqvk_8 KQgRr5e_0(Xgtqvk_8 xgtqvk_8) {
        return this.f1115KQgRr5e_0.KQgRr5e_0((boolean[]) null, xgtqvk_8);
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.X6FRs_4.KQgRr5e_0
    public Xgtqvk_8 KQgRr5e_0(X6FRs_4 x6FRs_4, boolean[] zArr) {
        return this.f1115KQgRr5e_0.KQgRr5e_0(zArr, (Xgtqvk_8) null);
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.X6FRs_4.KQgRr5e_0
    public void KQgRr5e_0(X6FRs_4.KQgRr5e_0 kQgRr5e_0) {
        if (!(kQgRr5e_0 instanceof QxJ9d_1)) {
            return;
        }
        QxJ9d_1 qxJ9d_1 = (QxJ9d_1) kQgRr5e_0;
        this.f1116KQgRr5e_0 = null;
        this.f1115KQgRr5e_0.KQgRr5e_0();
        int i = 0;
        while (true) {
            KQgRr5e_0 kQgRr5e_02 = qxJ9d_1.f1115KQgRr5e_0;
            if (i >= kQgRr5e_02.KQgRr5e_0) {
                return;
            }
            this.f1115KQgRr5e_0.KQgRr5e_0(kQgRr5e_02.m533KQgRr5e_0(i), qxJ9d_1.f1115KQgRr5e_0.KQgRr5e_0(i), true);
            i++;
        }
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.X6FRs_4.KQgRr5e_0
    public void KQgRr5e_0(Xgtqvk_8 xgtqvk_8) {
        int i = xgtqvk_8.PGPF6hQ_2;
        float f = 1.0f;
        if (i != 1) {
            if (i == 2) {
                f = 1000.0f;
            } else if (i == 3) {
                f = 1000000.0f;
            } else if (i == 4) {
                f = 1.0E9f;
            } else if (i == 5) {
                f = 1.0E12f;
            }
        }
        this.f1115KQgRr5e_0.KQgRr5e_0(xgtqvk_8, f);
    }

    @Override // X6FRs_4.X6FRs_4.KQgRr5e_0.X6FRs_4.KQgRr5e_0
    public Xgtqvk_8 KQgRr5e_0() {
        return this.f1116KQgRr5e_0;
    }
}
