package defpackage;

/* JADX INFO: renamed from: ˑᵱ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C2131 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public int f8448;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public int f8449;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final boolean f8450;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final byte[] f8451;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public C2131 f8452;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public boolean f8453;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public C2131 f8454;

    public C2131() {
        this.f8451 = new byte[8192];
        this.f8450 = true;
        this.f8453 = false;
    }

    public C2131(byte[] bArr, int i, int i2, boolean z) {
        this.f8451 = bArr;
        this.f8448 = i;
        this.f8449 = i2;
        this.f8453 = z;
        this.f8450 = false;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final void m5639(C2131 c2131) {
        c2131.f8452 = this;
        c2131.f8454 = this.f8454;
        this.f8454.f8452 = c2131;
        this.f8454 = c2131;
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final C2131 m5640() {
        this.f8453 = true;
        return new C2131(this.f8451, this.f8448, this.f8449, true);
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final C2131 m5641() {
        C2131 c2131 = this.f8454;
        C2131 c21312 = c2131 != this ? c2131 : null;
        C2131 c21313 = this.f8452;
        c21313.f8454 = c2131;
        this.f8454.f8452 = c21313;
        this.f8454 = null;
        this.f8452 = null;
        return c21312;
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final void m5642(C2131 c2131, int i) {
        byte[] bArr = c2131.f8451;
        if (!c2131.f8450) {
            ᵕᵩʽᵲ.ᵪᵹᵥᵻ("only owner can write");
            return;
        }
        int i2 = c2131.f8449;
        int i3 = i2 + i;
        if (i3 > 8192) {
            if (c2131.f8453) {
                ᵷᵝˎ.ᵷᵺʾᵖ();
                return;
            }
            int i4 = c2131.f8448;
            if (i3 - i4 > 8192) {
                ᵷᵝˎ.ᵷᵺʾᵖ();
                return;
            } else {
                AbstractC3761.m8425(i4, i2, bArr, bArr);
                c2131.f8449 -= c2131.f8448;
                c2131.f8448 = 0;
            }
        }
        int i5 = c2131.f8449;
        int i6 = this.f8448;
        System.arraycopy(this.f8451, i6, bArr, i5, (i6 + i) - i6);
        c2131.f8449 += i;
        this.f8448 += i;
    }
}
