package r7;

import java.io.IOException;

/* JADX INFO: loaded from: classes.dex */
public abstract class q {
    public static int a(int i, int i5, int i8) throws IOException {
        if ((i5 & 8) != 0) {
            i--;
        }
        if (i8 <= i) {
            return i - i8;
        }
        throw new IOException(I1.a.o("PROTOCOL_ERROR padding ", i8, i, " > remaining length "));
    }
}
