package p037.p058.p061;

import p037.p058.p061.C1735;
import p138.p139.p143.p144.C2803;

/* JADX INFO: renamed from: މ.ނ.ؠ.ؠ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C1733 implements C1735.InterfaceC1736 {

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public boolean f5642;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final C1732 f5643;

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public C1741 f5640 = null;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public float f5641 = 0.0f;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public boolean f5644 = false;

    public C1733(C1734 c1734) {
        this.f5643 = new C1732(this, c1734);
    }

    @Override // p037.p058.p061.C1735.InterfaceC1736
    public void clear() {
        this.f5643.m3404();
        this.f5640 = null;
        this.f5641 = 0.0f;
    }

    /* JADX WARN: Removed duplicated region for block: B:29:0x0078  */
    /* JADX WARN: Removed duplicated region for block: B:30:0x007d  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public String toString() {
        String string;
        boolean z;
        if (this.f5640 == null) {
            string = "0";
        } else {
            StringBuilder sbM4889 = C2803.m4889("");
            sbM4889.append(this.f5640);
            string = sbM4889.toString();
        }
        String strM4879 = C2803.m4879(string, " = ");
        if (this.f5641 != 0.0f) {
            StringBuilder sbM48892 = C2803.m4889(strM4879);
            sbM48892.append(this.f5641);
            strM4879 = sbM48892.toString();
            z = true;
        } else {
            z = false;
        }
        int i = this.f5643.f5629;
        for (int i2 = 0; i2 < i; i2++) {
            C1741 c1741M3402 = this.f5643.m3402(i2);
            if (c1741M3402 != null) {
                float fM3407 = this.f5643.m3407(i2);
                if (fM3407 != 0.0f) {
                    String string2 = c1741M3402.toString();
                    if (!z) {
                        if (fM3407 < 0.0f) {
                            strM4879 = C2803.m4879(strM4879, "- ");
                            fM3407 *= -1.0f;
                        }
                        strM4879 = fM3407 == 1.0f ? C2803.m4879(strM4879, string2) : strM4879 + fM3407 + " " + string2;
                        z = true;
                    } else if (fM3407 > 0.0f) {
                        strM4879 = C2803.m4879(strM4879, " + ");
                        if (fM3407 == 1.0f) {
                        }
                        z = true;
                    } else {
                        strM4879 = C2803.m4879(strM4879, " - ");
                        fM3407 *= -1.0f;
                        if (fM3407 == 1.0f) {
                        }
                        z = true;
                    }
                }
            }
        }
        return !z ? C2803.m4879(strM4879, "0.0") : strM4879;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public C1733 m3409(C1735 c1735, int i) {
        this.f5643.m3405(c1735.m3419(i, "ep"), 1.0f);
        this.f5643.m3405(c1735.m3419(i, "em"), -1.0f);
        return this;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public C1733 m3410(C1741 c1741, C1741 c17412, C1741 c17413, int i) {
        boolean z = false;
        if (i != 0) {
            if (i < 0) {
                i *= -1;
                z = true;
            }
            this.f5641 = i;
        }
        if (z) {
            this.f5643.m3405(c1741, 1.0f);
            this.f5643.m3405(c17412, -1.0f);
            this.f5643.m3405(c17413, -1.0f);
        } else {
            this.f5643.m3405(c1741, -1.0f);
            this.f5643.m3405(c17412, 1.0f);
            this.f5643.m3405(c17413, 1.0f);
        }
        return this;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public C1733 m3411(C1741 c1741, C1741 c17412, C1741 c17413, C1741 c17414, float f) {
        this.f5643.m3405(c1741, -1.0f);
        this.f5643.m3405(c17412, 1.0f);
        this.f5643.m3405(c17413, f);
        this.f5643.m3405(c17414, -f);
        return this;
    }

    @Override // p037.p058.p061.C1735.InterfaceC1736
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public C1741 mo3412(C1735 c1735, boolean[] zArr) {
        return this.f5643.m3403(zArr, (C1741) null);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo3413(C1733 c1733, boolean z) {
        C1732 c1732 = this.f5643;
        int i = c1732.f5637;
        while (true) {
            for (int i2 = 0; i != -1 && i2 < c1732.f5629; i2++) {
                int i3 = c1732.f5634[i];
                C1741 c1741 = c1733.f5640;
                if (i3 == c1741.f5678) {
                    float f = c1732.f5636[i];
                    c1732.m3401(c1741, z);
                    C1732 c17322 = c1733.f5643;
                    int i4 = c17322.f5637;
                    for (int i5 = 0; i4 != -1 && i5 < c17322.f5629; i5++) {
                        c1732.m3406(c1732.f5631.f5647[c17322.f5634[i4]], c17322.f5636[i4] * f, z);
                        i4 = c17322.f5635[i4];
                    }
                    this.f5641 = (c1733.f5641 * f) + this.f5641;
                    if (z) {
                        c1733.f5640.m3444(this);
                    }
                    i = c1732.f5637;
                } else {
                    i = c1732.f5635[i];
                }
            }
            return;
        }
    }

    @Override // p037.p058.p061.C1735.InterfaceC1736
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo3414(C1741 c1741) {
        int i = c1741.f5680;
        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.f5643.m3405(c1741, f);
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public C1733 m3415(C1741 c1741, C1741 c17412, C1741 c17413, int i) {
        boolean z = false;
        if (i != 0) {
            if (i < 0) {
                i *= -1;
                z = true;
            }
            this.f5641 = i;
        }
        if (z) {
            this.f5643.m3405(c1741, 1.0f);
            this.f5643.m3405(c17412, -1.0f);
            this.f5643.m3405(c17413, 1.0f);
        } else {
            this.f5643.m3405(c1741, -1.0f);
            this.f5643.m3405(c17412, 1.0f);
            this.f5643.m3405(c17413, -1.0f);
        }
        return this;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public C1733 m3416(C1741 c1741, C1741 c17412, C1741 c17413, C1741 c17414, float f) {
        this.f5643.m3405(c17413, 0.5f);
        this.f5643.m3405(c17414, 0.5f);
        this.f5643.m3405(c1741, -0.5f);
        this.f5643.m3405(c17412, -0.5f);
        this.f5641 = -f;
        return this;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public void m3417(C1741 c1741) {
        C1741 c17412 = this.f5640;
        if (c17412 != null) {
            this.f5643.m3405(c17412, -1.0f);
            this.f5640 = null;
        }
        float fM3401 = this.f5643.m3401(c1741, true) * (-1.0f);
        this.f5640 = c1741;
        if (fM3401 == 1.0f) {
            return;
        }
        this.f5641 /= fM3401;
        C1732 c1732 = this.f5643;
        int i = c1732.f5637;
        for (int i2 = 0; i != -1 && i2 < c1732.f5629; i2++) {
            float[] fArr = c1732.f5636;
            fArr[i] = fArr[i] / fM3401;
            i = c1732.f5635[i];
        }
    }
}
