package z7;

/* JADX INFO: loaded from: classes.dex */
public final class h {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f19394a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f19395b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public int f19396c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public int f19397d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public P6.h f19398e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public P6.h f19399f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public a f19400g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public a f19401h;
    public C4.f i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public C7.a f19402j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public int f19403k;

    public static void c(h hVar, byte[] bArr, int i, int i5) {
        hVar.getClass();
        hVar.f19399f = new f(i, i5);
        hVar.f19398e = new g(bArr, i, i5);
    }

    public final c a(String str) {
        P6.g.e(str, "data");
        int i = this.f19394a;
        A7.a aVar = new A7.a(this.f19395b, this.f19396c, false);
        int i5 = this.f19397d;
        A7.a aVar2 = new A7.a();
        aVar2.f460a = i;
        U6.c cVar = new U6.c(0, i / 2, 1);
        if (cVar.isEmpty()) {
            throw new IllegalArgumentException("Cannot coerce value to an empty range: " + cVar + '.');
        }
        if (i5 < 0) {
            i5 = 0;
        } else {
            int i8 = cVar.f6798r;
            if (i5 > i8) {
                i5 = i8;
            }
        }
        aVar2.f461b = i5;
        return new c(str, i, aVar, aVar2, this.i, this.f19402j, this.f19403k, new e(this, 1), new e(this, 0));
    }

    public final int b() {
        Integer num = 1 >= this.f19394a ? null : 1;
        if (num != null) {
            return num.intValue();
        }
        return 0;
    }

    public final void d(int i) {
        if (i < 1) {
            i = 1;
        }
        this.f19394a = i;
        int iB = b();
        Integer numValueOf = Integer.valueOf(iB);
        if (iB < 0) {
            numValueOf = null;
        }
        this.f19397d = numValueOf != null ? numValueOf.intValue() : b();
    }
}
