package defpackage;

import org.tukaani.xz.CorruptedInputException;

/* renamed from: ᵜʕˈ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C2790 {

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final byte[] f10752;

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

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

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public int f10755 = 0;

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public int f10748 = 0;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public int f10750 = 0;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public int f10749 = 0;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public int f10754 = 0;

    public C2790(int i, C0471 c0471) {
        this.f10753 = i;
        byte[] bArrMo2066 = c0471.mo2066(i);
        this.f10752 = bArrMo2066;
        bArrMo2066[i - 1] = 0;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m6882(int i, int i2) throws CorruptedInputException {
        int i3;
        if (i < 0 || i >= this.f10748) {
            throw new CorruptedInputException();
        }
        int iMin = Math.min(this.f10750 - this.f10755, i2);
        this.f10749 = i2 - iMin;
        this.f10754 = i;
        int i4 = (this.f10755 - i) - 1;
        byte[] bArr = this.f10752;
        if (i4 < 0) {
            int i5 = this.f10753;
            int i6 = i4 + i5;
            int iMin2 = Math.min(i5 - i6, iMin);
            System.arraycopy(bArr, i6, bArr, this.f10755, iMin2);
            this.f10755 += iMin2;
            iMin -= iMin2;
            if (iMin == 0) {
                return;
            } else {
                i4 = 0;
            }
        }
        do {
            int iMin3 = Math.min(iMin, this.f10755 - i4);
            System.arraycopy(bArr, i4, bArr, this.f10755, iMin3);
            i3 = this.f10755 + iMin3;
            this.f10755 = i3;
            iMin -= iMin3;
        } while (iMin > 0);
        if (this.f10748 < i3) {
            this.f10748 = i3;
        }
    }
}
