package defpackage;

import android.view.View;
import java.util.Arrays;

/* renamed from: ᵨᵨᵞ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C3751 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public boolean f13992;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public Object f13993;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public int f13994;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final /* synthetic */ int f13995 = 1;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public int f13996;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public boolean f13997;

    public C3751() {
        m8374();
    }

    public C3751(int i) {
        this.f13996 = i;
        byte[] bArr = new byte[131];
        this.f13993 = bArr;
        bArr[2] = 1;
    }

    public C3751(C4659 c4659) {
        this.f13993 = c4659;
    }

    public String toString() {
        switch (this.f13995) {
            case 1:
                return "AnchorInfo{mPosition=" + this.f13996 + ", mCoordinate=" + this.f13994 + ", mLayoutFromEnd=" + this.f13997 + ", mValid=" + this.f13992 + '}';
            default:
                return super.toString();
        }
    }

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public void m8372(int i) {
        this.f13997 |= i > 0;
        this.f13996 += i;
    }

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public void m8373(int i) {
        ᵛᵾˏ.ᵿʗᵝʽ(!this.f13997);
        boolean z = i == this.f13996;
        this.f13997 = z;
        if (z) {
            this.f13994 = 3;
            this.f13992 = false;
        }
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public void m8374() {
        switch (this.f13995) {
            case 1:
                this.f13996 = -1;
                this.f13994 = Integer.MIN_VALUE;
                this.f13997 = false;
                this.f13992 = false;
                break;
            default:
                this.f13997 = false;
                this.f13992 = false;
                break;
        }
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public void m8375(View view, int i) {
        AbstractC4987 abstractC4987 = (AbstractC4987) this.f13993;
        int iMo1112 = Integer.MIN_VALUE == abstractC4987.f18521 ? 0 : abstractC4987.mo1112() - abstractC4987.f18521;
        if (iMo1112 >= 0) {
            boolean z = this.f13997;
            AbstractC4987 abstractC49872 = (AbstractC4987) this.f13993;
            if (z) {
                int iMo1120 = abstractC49872.mo1120(view);
                AbstractC4987 abstractC49873 = (AbstractC4987) this.f13993;
                this.f13994 = (Integer.MIN_VALUE != abstractC49873.f18521 ? abstractC49873.mo1112() - abstractC49873.f18521 : 0) + iMo1120;
            } else {
                this.f13994 = abstractC49872.mo1111(view);
            }
            this.f13996 = i;
            return;
        }
        this.f13996 = i;
        boolean z2 = this.f13997;
        AbstractC4987 abstractC49874 = (AbstractC4987) this.f13993;
        if (!z2) {
            int iMo1111 = abstractC49874.mo1111(view);
            int iMo1122 = iMo1111 - ((AbstractC4987) this.f13993).mo1122();
            this.f13994 = iMo1111;
            if (iMo1122 > 0) {
                int iMo1113 = (((AbstractC4987) this.f13993).mo1113() - Math.min(0, (((AbstractC4987) this.f13993).mo1113() - iMo1112) - ((AbstractC4987) this.f13993).mo1120(view))) - (((AbstractC4987) this.f13993).mo1115(view) + iMo1111);
                if (iMo1113 < 0) {
                    this.f13994 -= Math.min(iMo1122, -iMo1113);
                    return;
                }
                return;
            }
            return;
        }
        int iMo11132 = (abstractC49874.mo1113() - iMo1112) - ((AbstractC4987) this.f13993).mo1120(view);
        this.f13994 = ((AbstractC4987) this.f13993).mo1113() - iMo11132;
        if (iMo11132 > 0) {
            int iMo1115 = this.f13994 - ((AbstractC4987) this.f13993).mo1115(view);
            int iMo11222 = ((AbstractC4987) this.f13993).mo1122();
            int iMin = iMo1115 - (Math.min(((AbstractC4987) this.f13993).mo1111(view) - iMo11222, 0) + iMo11222);
            if (iMin < 0) {
                this.f13994 = Math.min(iMo11132, -iMin) + this.f13994;
            }
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public void m8376(byte[] bArr, int i, int i2) {
        if (this.f13997) {
            int i3 = i2 - i;
            byte[] bArr2 = (byte[]) this.f13993;
            int length = bArr2.length;
            int i4 = this.f13994 + i3;
            if (length < i4) {
                this.f13993 = Arrays.copyOf(bArr2, i4 * 2);
            }
            System.arraycopy(bArr, i, (byte[]) this.f13993, this.f13994, i3);
            this.f13994 += i3;
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public void m8377() {
        boolean z = this.f13997;
        AbstractC4987 abstractC4987 = (AbstractC4987) this.f13993;
        this.f13994 = z ? abstractC4987.mo1113() : abstractC4987.mo1122();
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public boolean m8378(int i) {
        if (!this.f13997) {
            return false;
        }
        this.f13994 -= i;
        this.f13997 = false;
        this.f13992 = true;
        return true;
    }
}
