package p463.p473.p474.p475;

import p463.p473.p474.InterfaceC7147;
import p463.p473.p480.InterfaceC7159;

/* JADX INFO: renamed from: ޒ.ؠ.֏.ބ.֏, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public abstract class AbstractC7149 implements InterfaceC7147, InterfaceC7159 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final byte[] f20701;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public int f20702;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public long f20703;

    public AbstractC7149() {
        this.f20701 = new byte[4];
        this.f20702 = 0;
    }

    public AbstractC7149(AbstractC7149 abstractC7149) {
        this.f20701 = new byte[4];
        m10509(abstractC7149);
    }

    @Override // p463.p473.p474.InterfaceC7146
    /* JADX INFO: renamed from: ֏ */
    public void mo10497() {
        this.f20703 = 0L;
        this.f20702 = 0;
        int i = 0;
        while (true) {
            byte[] bArr = this.f20701;
            if (i >= bArr.length) {
                return;
            }
            bArr[i] = 0;
            i++;
        }
    }

    @Override // p463.p473.p474.InterfaceC7146
    /* JADX INFO: renamed from: ֏ */
    public void mo10498(byte b) {
        byte[] bArr = this.f20701;
        int i = this.f20702;
        int i2 = i + 1;
        this.f20702 = i2;
        bArr[i] = b;
        if (i2 == bArr.length) {
            mo10510(bArr, 0);
            this.f20702 = 0;
        }
        this.f20703++;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public abstract void mo10508(long j);

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m10509(AbstractC7149 abstractC7149) {
        byte[] bArr = abstractC7149.f20701;
        System.arraycopy(bArr, 0, this.f20701, 0, bArr.length);
        this.f20702 = abstractC7149.f20702;
        this.f20703 = abstractC7149.f20703;
    }

    @Override // p463.p473.p474.InterfaceC7146
    /* JADX INFO: renamed from: ֏ */
    public void mo10499(byte[] bArr, int i, int i2) {
        int i3 = 0;
        int iMax = Math.max(0, i2);
        if (this.f20702 != 0) {
            int i4 = 0;
            while (true) {
                if (i4 >= iMax) {
                    i3 = i4;
                    break;
                }
                byte[] bArr2 = this.f20701;
                int i5 = this.f20702;
                int i6 = i5 + 1;
                this.f20702 = i6;
                int i7 = i4 + 1;
                bArr2[i5] = bArr[i4 + i];
                if (i6 == 4) {
                    mo10510(bArr2, 0);
                    this.f20702 = 0;
                    i3 = i7;
                    break;
                }
                i4 = i7;
            }
        }
        int i8 = ((iMax - i3) & (-4)) + i3;
        while (i3 < i8) {
            mo10510(bArr, i + i3);
            i3 += 4;
        }
        while (i3 < iMax) {
            byte[] bArr3 = this.f20701;
            int i9 = this.f20702;
            this.f20702 = i9 + 1;
            bArr3[i9] = bArr[i3 + i];
            i3++;
        }
        this.f20703 += (long) iMax;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public abstract void mo10510(byte[] bArr, int i);

    @Override // p463.p473.p474.InterfaceC7147
    /* JADX INFO: renamed from: ނ */
    public int mo10502() {
        return 64;
    }

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public void m10511() {
        long j = this.f20703 << 3;
        byte b = -128;
        while (true) {
            mo10498(b);
            if (this.f20702 == 0) {
                mo10508(j);
                mo10512();
                return;
            }
            b = 0;
        }
    }

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public abstract void mo10512();
}
