package android.support.v7.widget;

/* JADX INFO: compiled from: RtlSpacingHelper.java */
/* JADX INFO: loaded from: classes.dex */
class l0 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private int f1068a = 0;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private int f1069b = 0;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private int f1070c = Integer.MIN_VALUE;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private int f1071d = Integer.MIN_VALUE;

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

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    private int f1073f = 0;
    private boolean g = false;
    private boolean h = false;

    l0() {
    }

    public int a() {
        return this.g ? this.f1068a : this.f1069b;
    }

    public int b() {
        return this.f1068a;
    }

    public int c() {
        return this.f1069b;
    }

    public int d() {
        return this.g ? this.f1069b : this.f1068a;
    }

    public void e(int i, int i2) {
        this.h = false;
        if (i != Integer.MIN_VALUE) {
            this.f1072e = i;
            this.f1068a = i;
        }
        if (i2 != Integer.MIN_VALUE) {
            this.f1073f = i2;
            this.f1069b = i2;
        }
    }

    public void f(boolean z) {
        if (z == this.g) {
            return;
        }
        this.g = z;
        if (!this.h) {
            this.f1068a = this.f1072e;
            this.f1069b = this.f1073f;
            return;
        }
        if (z) {
            int i = this.f1071d;
            if (i == Integer.MIN_VALUE) {
                i = this.f1072e;
            }
            this.f1068a = i;
            int i2 = this.f1070c;
            if (i2 == Integer.MIN_VALUE) {
                i2 = this.f1073f;
            }
            this.f1069b = i2;
            return;
        }
        int i3 = this.f1070c;
        if (i3 == Integer.MIN_VALUE) {
            i3 = this.f1072e;
        }
        this.f1068a = i3;
        int i4 = this.f1071d;
        if (i4 == Integer.MIN_VALUE) {
            i4 = this.f1073f;
        }
        this.f1069b = i4;
    }

    public void g(int i, int i2) {
        this.f1070c = i;
        this.f1071d = i2;
        this.h = true;
        if (this.g) {
            if (i2 != Integer.MIN_VALUE) {
                this.f1068a = i2;
            }
            if (i != Integer.MIN_VALUE) {
                this.f1069b = i;
                return;
            }
            return;
        }
        if (i != Integer.MIN_VALUE) {
            this.f1068a = i;
        }
        if (i2 != Integer.MIN_VALUE) {
            this.f1069b = i2;
        }
    }
}
