package defpackage;

import java.util.ArrayList;

/* renamed from: ᵖʾː, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C2343 extends AbstractC2841 {

    /* renamed from: ˌᵜᵹᵩ, reason: contains not printable characters */
    public C1683 f9176;

    /* renamed from: ᵸˑ, reason: contains not printable characters */
    public C3563 f9177;

    public final String toString() {
        return "VerticalRun " + this.f10930.f2392;
    }

    @Override // defpackage.AbstractC2841
    /* renamed from: ˇʼʤˎ */
    public final void mo2582() {
        C3563 c3563 = this.f10932;
        if (c3563.f13352) {
            this.f10930.f2416 = c3563.f13346;
        }
    }

    @Override // defpackage.AbstractC2841
    /* renamed from: ˏˋٴ */
    public final void mo2583() {
        this.f10927 = null;
        this.f10932.m8163();
        this.f10928.m8163();
        this.f9177.m8163();
        this.f10924.m8163();
        this.f10925 = false;
    }

    @Override // defpackage.InterfaceC0145
    /* renamed from: ᵥᵯˎ */
    public final void mo1290(InterfaceC0145 interfaceC0145) {
        float f;
        float f2;
        float f3;
        int i;
        if (AbstractC1327.m4088(this.f10931) == 3) {
            C0425 c0425 = this.f10930;
            m6947(c0425.f2407, c0425.f2420, 1);
            return;
        }
        C2995 c2995 = this.f10924;
        if (c2995.f13348 && !c2995.f13352 && this.f10933 == 3) {
            C0425 c04252 = this.f10930;
            int i2 = c04252.f2381;
            if (i2 == 2) {
                C0425 c04253 = c04252.f2367;
                if (c04253 != null) {
                    if (c04253.f2361.f10924.f13352) {
                        c2995.mo7338((int) ((r5.f13346 * c04252.f2391) + 0.5f));
                    }
                }
            } else if (i2 == 3) {
                C2995 c29952 = c04252.f2415.f10924;
                if (c29952.f13352) {
                    int i3 = c04252.f2371;
                    if (i3 == -1) {
                        f = c29952.f13346;
                        f2 = c04252.f2362;
                    } else if (i3 == 0) {
                        f3 = c29952.f13346 * c04252.f2362;
                        i = (int) (f3 + 0.5f);
                        c2995.mo7338(i);
                    } else if (i3 != 1) {
                        i = 0;
                        c2995.mo7338(i);
                    } else {
                        f = c29952.f13346;
                        f2 = c04252.f2362;
                    }
                    f3 = f / f2;
                    i = (int) (f3 + 0.5f);
                    c2995.mo7338(i);
                }
            }
        }
        C3563 c3563 = this.f10932;
        boolean z = c3563.f13348;
        ArrayList arrayList = c3563.f13345;
        if (z) {
            C3563 c35632 = this.f10928;
            boolean z2 = c35632.f13348;
            ArrayList arrayList2 = c35632.f13345;
            if (z2) {
                if (c3563.f13352 && c35632.f13352 && c2995.f13352) {
                    return;
                }
                if (!c2995.f13352 && this.f10933 == 3) {
                    C0425 c04254 = this.f10930;
                    if (c04254.f2410 == 0 && !c04254.m2013()) {
                        C3563 c35633 = (C3563) arrayList.get(0);
                        C3563 c35634 = (C3563) arrayList2.get(0);
                        int i4 = c35633.f13346 + c3563.f13347;
                        int i5 = c35634.f13346 + c35632.f13347;
                        c3563.mo7338(i4);
                        c35632.mo7338(i5);
                        c2995.mo7338(i5 - i4);
                        return;
                    }
                }
                if (!c2995.f13352 && this.f10933 == 3 && this.f10929 == 1 && arrayList.size() > 0 && arrayList2.size() > 0) {
                    C3563 c35635 = (C3563) arrayList.get(0);
                    int i6 = (((C3563) arrayList2.get(0)).f13346 + c35632.f13347) - (c35635.f13346 + c3563.f13347);
                    int i7 = c2995.f11555;
                    if (i6 < i7) {
                        c2995.mo7338(i6);
                    } else {
                        c2995.mo7338(i7);
                    }
                }
                if (c2995.f13352 && arrayList.size() > 0 && arrayList2.size() > 0) {
                    C3563 c35636 = (C3563) arrayList.get(0);
                    C3563 c35637 = (C3563) arrayList2.get(0);
                    int i8 = c35636.f13346;
                    int i9 = c3563.f13347 + i8;
                    int i10 = c35637.f13346;
                    int i11 = c35632.f13347 + i10;
                    float f4 = this.f10930.f2383;
                    if (c35636 == c35637) {
                        f4 = 0.5f;
                    } else {
                        i8 = i9;
                        i10 = i11;
                    }
                    c3563.mo7338((int) ((((i10 - i8) - c2995.f13346) * f4) + i8 + 0.5f));
                    c35632.mo7338(c3563.f13346 + c2995.f13346);
                }
            }
        }
    }

    /* renamed from: ᵯٴᵦ, reason: contains not printable characters */
    public final void m6061() {
        this.f10925 = false;
        C3563 c3563 = this.f10932;
        c3563.m8163();
        c3563.f13352 = false;
        C3563 c35632 = this.f10928;
        c35632.m8163();
        c35632.f13352 = false;
        C3563 c35633 = this.f9177;
        c35633.m8163();
        c35633.f13352 = false;
        this.f10924.f13352 = false;
    }

    @Override // defpackage.AbstractC2841
    /* renamed from: ᵸˑ */
    public final boolean mo2585() {
        return this.f10933 != 3 || this.f10930.f2381 == 0;
    }

    @Override // defpackage.AbstractC2841
    /* renamed from: ᵻᵢﹳᵰ */
    public final void mo2586() {
        C0425 c0425;
        C0425 c04252;
        C0425 c04253;
        C0425 c04254;
        C3563 c3563 = this.f9177;
        C0425 c04255 = this.f10930;
        boolean z = c04255.f2394;
        C2995 c2995 = this.f10924;
        if (z) {
            c2995.mo7338(c04255.m2010());
        }
        boolean z2 = c2995.f13352;
        ArrayList arrayList = c2995.f13353;
        ArrayList arrayList2 = c2995.f13345;
        C3563 c35632 = this.f10928;
        C3563 c35633 = this.f10932;
        if (!z2) {
            C0425 c04256 = this.f10930;
            this.f10933 = c04256.f2382[1];
            if (c04256.f2370) {
                this.f9176 = new C1683(this);
            }
            int i = this.f10933;
            if (i != 3) {
                if (i == 4 && (c04254 = this.f10930.f2367) != null && c04254.f2382[1] == 1) {
                    int iM2010 = (c04254.m2010() - this.f10930.f2407.m3348()) - this.f10930.f2420.m3348();
                    AbstractC2841.m6945(c35633, c04254.f2361.f10932, this.f10930.f2407.m3348());
                    AbstractC2841.m6945(c35632, c04254.f2361.f10928, -this.f10930.f2420.m3348());
                    c2995.mo7338(iM2010);
                    return;
                }
                if (i == 1) {
                    c2995.mo7338(this.f10930.m2010());
                }
            }
        } else if (this.f10933 == 4 && (c04252 = (c0425 = this.f10930).f2367) != null && c04252.f2382[1] == 1) {
            AbstractC2841.m6945(c35633, c04252.f2361.f10932, c0425.f2407.m3348());
            AbstractC2841.m6945(c35632, c04252.f2361.f10928, -this.f10930.f2420.m3348());
            return;
        }
        boolean z3 = c2995.f13352;
        if (z3) {
            C0425 c04257 = this.f10930;
            if (c04257.f2394) {
                C0994[] c0994Arr = c04257.f2357;
                C0994 c0994 = c0994Arr[2];
                C0994 c09942 = c0994.f4392;
                if (c09942 != null && c0994Arr[3].f4392 != null) {
                    boolean zM2013 = c04257.m2013();
                    C0425 c04258 = this.f10930;
                    if (zM2013) {
                        c35633.f13347 = c04258.f2357[2].m3348();
                        c35632.f13347 = -this.f10930.f2357[3].m3348();
                    } else {
                        C3563 c3563M6946 = AbstractC2841.m6946(c04258.f2357[2]);
                        if (c3563M6946 != null) {
                            AbstractC2841.m6945(c35633, c3563M6946, this.f10930.f2357[2].m3348());
                        }
                        C3563 c3563M69462 = AbstractC2841.m6946(this.f10930.f2357[3]);
                        if (c3563M69462 != null) {
                            AbstractC2841.m6945(c35632, c3563M69462, -this.f10930.f2357[3].m3348());
                        }
                        c35633.f13351 = true;
                        c35632.f13351 = true;
                    }
                    C0425 c04259 = this.f10930;
                    if (c04259.f2370) {
                        AbstractC2841.m6945(c3563, c35633, c04259.f2355);
                        return;
                    }
                    return;
                }
                if (c09942 != null) {
                    C3563 c3563M69463 = AbstractC2841.m6946(c0994);
                    if (c3563M69463 != null) {
                        AbstractC2841.m6945(c35633, c3563M69463, this.f10930.f2357[2].m3348());
                        AbstractC2841.m6945(c35632, c35633, c2995.f13346);
                        C0425 c042510 = this.f10930;
                        if (c042510.f2370) {
                            AbstractC2841.m6945(c3563, c35633, c042510.f2355);
                            return;
                        }
                        return;
                    }
                    return;
                }
                C0994 c09943 = c0994Arr[3];
                if (c09943.f4392 != null) {
                    C3563 c3563M69464 = AbstractC2841.m6946(c09943);
                    if (c3563M69464 != null) {
                        AbstractC2841.m6945(c35632, c3563M69464, -this.f10930.f2357[3].m3348());
                        AbstractC2841.m6945(c35633, c35632, -c2995.f13346);
                    }
                    C0425 c042511 = this.f10930;
                    if (c042511.f2370) {
                        AbstractC2841.m6945(c3563, c35633, c042511.f2355);
                        return;
                    }
                    return;
                }
                C0994 c09944 = c0994Arr[4];
                if (c09944.f4392 != null) {
                    C3563 c3563M69465 = AbstractC2841.m6946(c09944);
                    if (c3563M69465 != null) {
                        AbstractC2841.m6945(c3563, c3563M69465, 0);
                        AbstractC2841.m6945(c35633, c3563, -this.f10930.f2355);
                        AbstractC2841.m6945(c35632, c35633, c2995.f13346);
                        return;
                    }
                    return;
                }
                if ((c04257 instanceof AbstractC1133) || c04257.f2367 == null || c04257.mo1992(7).f4392 != null) {
                    return;
                }
                C0425 c042512 = this.f10930;
                AbstractC2841.m6945(c35633, c042512.f2367.f2361.f10932, c042512.m1993());
                AbstractC2841.m6945(c35632, c35633, c2995.f13346);
                C0425 c042513 = this.f10930;
                if (c042513.f2370) {
                    AbstractC2841.m6945(c3563, c35633, c042513.f2355);
                    return;
                }
                return;
            }
        }
        if (z3 || this.f10933 != 3) {
            c2995.m8164(this);
        } else {
            C0425 c042514 = this.f10930;
            int i2 = c042514.f2381;
            if (i2 == 2) {
                C0425 c042515 = c042514.f2367;
                if (c042515 != null) {
                    C2995 c29952 = c042515.f2361.f10924;
                    arrayList2.add(c29952);
                    c29952.f13353.add(c2995);
                    c2995.f13351 = true;
                    arrayList.add(c35633);
                    arrayList.add(c35632);
                }
            } else if (i2 == 3 && !c042514.m2013()) {
                C0425 c042516 = this.f10930;
                if (c042516.f2410 != 3) {
                    C2995 c29953 = c042516.f2415.f10924;
                    arrayList2.add(c29953);
                    c29953.f13353.add(c2995);
                    c2995.f13351 = true;
                    arrayList.add(c35633);
                    arrayList.add(c35632);
                }
            }
        }
        C0425 c042517 = this.f10930;
        C0994[] c0994Arr2 = c042517.f2357;
        C0994 c09945 = c0994Arr2[2];
        C0994 c09946 = c09945.f4392;
        if (c09946 != null && c0994Arr2[3].f4392 != null) {
            boolean zM20132 = c042517.m2013();
            C0425 c042518 = this.f10930;
            if (zM20132) {
                c35633.f13347 = c042518.f2357[2].m3348();
                c35632.f13347 = -this.f10930.f2357[3].m3348();
            } else {
                C3563 c3563M69466 = AbstractC2841.m6946(c042518.f2357[2]);
                C3563 c3563M69467 = AbstractC2841.m6946(this.f10930.f2357[3]);
                if (c3563M69466 != null) {
                    c3563M69466.m8164(this);
                }
                if (c3563M69467 != null) {
                    c3563M69467.m8164(this);
                }
                this.f10931 = 4;
            }
            if (this.f10930.f2370) {
                m6949(c3563, c35633, 1, this.f9176);
            }
        } else if (c09946 != null) {
            C3563 c3563M69468 = AbstractC2841.m6946(c09945);
            if (c3563M69468 != null) {
                AbstractC2841.m6945(c35633, c3563M69468, this.f10930.f2357[2].m3348());
                m6949(c35632, c35633, 1, c2995);
                if (this.f10930.f2370) {
                    m6949(c3563, c35633, 1, this.f9176);
                }
                if (this.f10933 == 3) {
                    C0425 c042519 = this.f10930;
                    if (c042519.f2362 > 0.0f) {
                        C0650 c0650 = c042519.f2415;
                        if (c0650.f10933 == 3) {
                            c0650.f10924.f13353.add(c2995);
                            arrayList2.add(this.f10930.f2415.f10924);
                            c2995.f13350 = this;
                        }
                    }
                }
            }
        } else {
            C0994 c09947 = c0994Arr2[3];
            if (c09947.f4392 != null) {
                C3563 c3563M69469 = AbstractC2841.m6946(c09947);
                if (c3563M69469 != null) {
                    AbstractC2841.m6945(c35632, c3563M69469, -this.f10930.f2357[3].m3348());
                    m6949(c35633, c35632, -1, c2995);
                    if (this.f10930.f2370) {
                        m6949(c3563, c35633, 1, this.f9176);
                    }
                }
            } else {
                C0994 c09948 = c0994Arr2[4];
                if (c09948.f4392 != null) {
                    C3563 c3563M694610 = AbstractC2841.m6946(c09948);
                    if (c3563M694610 != null) {
                        AbstractC2841.m6945(c3563, c3563M694610, 0);
                        m6949(c35633, c3563, -1, this.f9176);
                        m6949(c35632, c35633, 1, c2995);
                    }
                } else if (!(c042517 instanceof AbstractC1133) && (c04253 = c042517.f2367) != null) {
                    AbstractC2841.m6945(c35633, c04253.f2361.f10932, c042517.m1993());
                    m6949(c35632, c35633, 1, c2995);
                    if (this.f10930.f2370) {
                        m6949(c3563, c35633, 1, this.f9176);
                    }
                    if (this.f10933 == 3) {
                        C0425 c042520 = this.f10930;
                        if (c042520.f2362 > 0.0f) {
                            C0650 c06502 = c042520.f2415;
                            if (c06502.f10933 == 3) {
                                c06502.f10924.f13353.add(c2995);
                                arrayList2.add(this.f10930.f2415.f10924);
                                c2995.f13350 = this;
                            }
                        }
                    }
                }
            }
        }
        if (arrayList2.size() == 0) {
            c2995.f13348 = true;
        }
    }
}
