package x;

import android.view.ViewGroup;

/* JADX INFO: loaded from: classes.dex */
public final class d extends ViewGroup.MarginLayoutParams {

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

    /* JADX INFO: renamed from: B, reason: collision with root package name */
    public String f18334B;

    /* JADX INFO: renamed from: C, reason: collision with root package name */
    public int f18335C;
    public float D;

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

    /* JADX INFO: renamed from: F, reason: collision with root package name */
    public int f18337F;

    /* JADX INFO: renamed from: G, reason: collision with root package name */
    public int f18338G;
    public int H;

    /* JADX INFO: renamed from: I, reason: collision with root package name */
    public int f18339I;

    /* JADX INFO: renamed from: J, reason: collision with root package name */
    public int f18340J;

    /* JADX INFO: renamed from: K, reason: collision with root package name */
    public int f18341K;

    /* JADX INFO: renamed from: L, reason: collision with root package name */
    public int f18342L;

    /* JADX INFO: renamed from: M, reason: collision with root package name */
    public int f18343M;

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

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

    /* JADX INFO: renamed from: P, reason: collision with root package name */
    public int f18346P;

    /* JADX INFO: renamed from: Q, reason: collision with root package name */
    public int f18347Q;

    /* JADX INFO: renamed from: R, reason: collision with root package name */
    public int f18348R;

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

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

    /* JADX INFO: renamed from: U, reason: collision with root package name */
    public String f18351U;

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

    /* JADX INFO: renamed from: W, reason: collision with root package name */
    public boolean f18353W;
    public boolean X;

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

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

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

    /* JADX INFO: renamed from: a0, reason: collision with root package name */
    public int f18357a0;

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

    /* JADX INFO: renamed from: b0, reason: collision with root package name */
    public int f18359b0;

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

    /* JADX INFO: renamed from: c0, reason: collision with root package name */
    public int f18361c0;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public int f18362d;

    /* JADX INFO: renamed from: d0, reason: collision with root package name */
    public int f18363d0;

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

    /* JADX INFO: renamed from: e0, reason: collision with root package name */
    public int f18365e0;

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

    /* JADX INFO: renamed from: f0, reason: collision with root package name */
    public int f18367f0;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public int f18368g;

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

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public int f18370h;

    /* JADX INFO: renamed from: h0, reason: collision with root package name */
    public int f18371h0;
    public int i;

    /* JADX INFO: renamed from: i0, reason: collision with root package name */
    public int f18372i0;

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

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

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public int f18375k;

    /* JADX INFO: renamed from: k0, reason: collision with root package name */
    public v.d f18376k0;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public int f18377l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public int f18378m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public int f18379n;

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

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public int f18381p;

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

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public int f18383r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public int f18384s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public int f18385t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public int f18386u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public int f18387v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public int f18388w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public int f18389x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public int f18390y;

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

    public final void a() {
        this.f18354Y = false;
        this.f18352V = true;
        this.f18353W = true;
        int i = ((ViewGroup.MarginLayoutParams) this).width;
        if (i == -2 && this.f18349S) {
            this.f18352V = false;
            if (this.H == 0) {
                this.H = 1;
            }
        }
        int i5 = ((ViewGroup.MarginLayoutParams) this).height;
        if (i5 == -2 && this.f18350T) {
            this.f18353W = false;
            if (this.f18339I == 0) {
                this.f18339I = 1;
            }
        }
        if (i == 0 || i == -1) {
            this.f18352V = false;
            if (i == 0 && this.H == 1) {
                ((ViewGroup.MarginLayoutParams) this).width = -2;
                this.f18349S = true;
            }
        }
        if (i5 == 0 || i5 == -1) {
            this.f18353W = false;
            if (i5 == 0 && this.f18339I == 1) {
                ((ViewGroup.MarginLayoutParams) this).height = -2;
                this.f18350T = true;
            }
        }
        if (this.f18360c == -1.0f && this.f18356a == -1 && this.f18358b == -1) {
            return;
        }
        this.f18354Y = true;
        this.f18352V = true;
        this.f18353W = true;
        if (!(this.f18376k0 instanceof v.h)) {
            this.f18376k0 = new v.h();
        }
        ((v.h) this.f18376k0).B(this.f18348R);
    }

    /* JADX WARN: Removed duplicated region for block: B:17:0x0048  */
    /* JADX WARN: Removed duplicated region for block: B:20:0x004f  */
    /* JADX WARN: Removed duplicated region for block: B:23:0x0056  */
    /* JADX WARN: Removed duplicated region for block: B:26:0x005c  */
    /* JADX WARN: Removed duplicated region for block: B:29:0x0062  */
    /* JADX WARN: Removed duplicated region for block: B:36:0x0074  */
    /* JADX WARN: Removed duplicated region for block: B:37:0x007c  */
    @Override // android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.LayoutParams
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void resolveLayoutDirection(int i) {
        int i5;
        int i8;
        int i9;
        int i10;
        int i11 = ((ViewGroup.MarginLayoutParams) this).leftMargin;
        int i12 = ((ViewGroup.MarginLayoutParams) this).rightMargin;
        super.resolveLayoutDirection(i);
        boolean z8 = false;
        boolean z9 = 1 == getLayoutDirection();
        this.f18361c0 = -1;
        this.f18363d0 = -1;
        this.f18357a0 = -1;
        this.f18359b0 = -1;
        this.f18365e0 = this.f18385t;
        this.f18367f0 = this.f18387v;
        float f3 = this.f18391z;
        this.f18369g0 = f3;
        int i13 = this.f18356a;
        this.f18371h0 = i13;
        int i14 = this.f18358b;
        this.f18372i0 = i14;
        float f7 = this.f18360c;
        this.f18374j0 = f7;
        if (z9) {
            int i15 = this.f18381p;
            if (i15 != -1) {
                this.f18361c0 = i15;
            } else {
                int i16 = this.f18382q;
                if (i16 != -1) {
                    this.f18363d0 = i16;
                }
                i5 = this.f18383r;
                if (i5 != -1) {
                    this.f18359b0 = i5;
                    z8 = true;
                }
                i8 = this.f18384s;
                if (i8 != -1) {
                    this.f18357a0 = i8;
                    z8 = true;
                }
                i9 = this.f18389x;
                if (i9 != -1) {
                    this.f18367f0 = i9;
                }
                i10 = this.f18390y;
                if (i10 != -1) {
                    this.f18365e0 = i10;
                }
                if (z8) {
                    this.f18369g0 = 1.0f - f3;
                }
                if (this.f18354Y && this.f18348R == 1) {
                    if (f7 == -1.0f) {
                        this.f18374j0 = 1.0f - f7;
                        this.f18371h0 = -1;
                        this.f18372i0 = -1;
                    } else if (i13 != -1) {
                        this.f18372i0 = i13;
                        this.f18371h0 = -1;
                        this.f18374j0 = -1.0f;
                    } else if (i14 != -1) {
                        this.f18371h0 = i14;
                        this.f18372i0 = -1;
                        this.f18374j0 = -1.0f;
                    }
                }
            }
            z8 = true;
            i5 = this.f18383r;
            if (i5 != -1) {
            }
            i8 = this.f18384s;
            if (i8 != -1) {
            }
            i9 = this.f18389x;
            if (i9 != -1) {
            }
            i10 = this.f18390y;
            if (i10 != -1) {
            }
            if (z8) {
            }
            if (this.f18354Y) {
                if (f7 == -1.0f) {
                }
            }
        } else {
            int i17 = this.f18381p;
            if (i17 != -1) {
                this.f18359b0 = i17;
            }
            int i18 = this.f18382q;
            if (i18 != -1) {
                this.f18357a0 = i18;
            }
            int i19 = this.f18383r;
            if (i19 != -1) {
                this.f18361c0 = i19;
            }
            int i20 = this.f18384s;
            if (i20 != -1) {
                this.f18363d0 = i20;
            }
            int i21 = this.f18389x;
            if (i21 != -1) {
                this.f18365e0 = i21;
            }
            int i22 = this.f18390y;
            if (i22 != -1) {
                this.f18367f0 = i22;
            }
        }
        if (this.f18383r == -1 && this.f18384s == -1 && this.f18382q == -1 && this.f18381p == -1) {
            int i23 = this.f18366f;
            if (i23 != -1) {
                this.f18361c0 = i23;
                if (((ViewGroup.MarginLayoutParams) this).rightMargin <= 0 && i12 > 0) {
                    ((ViewGroup.MarginLayoutParams) this).rightMargin = i12;
                }
            } else {
                int i24 = this.f18368g;
                if (i24 != -1) {
                    this.f18363d0 = i24;
                    if (((ViewGroup.MarginLayoutParams) this).rightMargin <= 0 && i12 > 0) {
                        ((ViewGroup.MarginLayoutParams) this).rightMargin = i12;
                    }
                }
            }
            int i25 = this.f18362d;
            if (i25 != -1) {
                this.f18357a0 = i25;
                if (((ViewGroup.MarginLayoutParams) this).leftMargin > 0 || i11 <= 0) {
                    return;
                }
                ((ViewGroup.MarginLayoutParams) this).leftMargin = i11;
                return;
            }
            int i26 = this.f18364e;
            if (i26 != -1) {
                this.f18359b0 = i26;
                if (((ViewGroup.MarginLayoutParams) this).leftMargin > 0 || i11 <= 0) {
                    return;
                }
                ((ViewGroup.MarginLayoutParams) this).leftMargin = i11;
            }
        }
    }
}
