package E;

import F.C0167v;
import F.H;
import G0.p0;
import G0.q0;
import java.util.List;

/* JADX INFO: loaded from: classes.dex */
public final class s implements H {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Object f1073b;

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final h1.m f1075d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final List f1076e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final long f1077f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final Object f1078g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final C0167v f1079h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public final int f1080i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final int f1081j;

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

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public int f1083m = Integer.MIN_VALUE;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final long f1084n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public long f1085o;

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

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

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public boolean f1088r;

    public s(int i6, Object obj, int i7, int i8, h1.m mVar, int i9, int i10, List list, long j4, Object obj2, C0167v c0167v, long j6, int i11, int i12) {
        this.f1072a = i6;
        this.f1073b = obj;
        this.f1074c = i7;
        this.f1075d = mVar;
        this.f1076e = list;
        this.f1077f = j4;
        this.f1078g = obj2;
        this.f1079h = c0167v;
        this.f1080i = i11;
        this.f1081j = i12;
        int size = list.size();
        int iMax = 0;
        for (int i13 = 0; i13 < size; i13++) {
            iMax = Math.max(iMax, ((q0) list.get(i13)).f1999b);
        }
        this.f1082k = iMax;
        int i14 = i8 + iMax;
        this.l = i14 >= 0 ? i14 : 0;
        this.f1084n = (((long) this.f1074c) << 32) | (((long) iMax) & 4294967295L);
        this.f1085o = 0L;
        this.f1086p = -1;
        this.f1087q = -1;
    }

    @Override // F.H
    public final int a() {
        return this.f1076e.size();
    }

    @Override // F.H
    public final int b() {
        return this.l;
    }

    @Override // F.H
    public final int c() {
        return this.f1081j;
    }

    @Override // F.H
    public final Object d(int i6) {
        return ((q0) this.f1076e.get(i6)).S();
    }

    @Override // F.H
    public final boolean e() {
        return true;
    }

    @Override // F.H
    public final void f() {
        this.f1088r = true;
    }

    @Override // F.H
    public final void g(int i6, int i7, int i8) {
        k(i6, 0, i7, i8, -1, -1);
    }

    @Override // F.H
    public final int getIndex() {
        return this.f1072a;
    }

    @Override // F.H
    public final Object getKey() {
        return this.f1073b;
    }

    @Override // F.H
    public final long h(int i6) {
        return this.f1085o;
    }

    @Override // F.H
    public final int i() {
        return this.f1080i;
    }

    public final void j(p0 p0Var) {
        if (this.f1083m == Integer.MIN_VALUE) {
            A.b.a("position() should be called first");
        }
        List list = this.f1076e;
        int size = list.size();
        for (int i6 = 0; i6 < size; i6++) {
            q0 q0Var = (q0) list.get(i6);
            int i7 = q0Var.f1999b;
            long j4 = this.f1085o;
            this.f1079h.a(i6, this.f1073b);
            p0.G(p0Var, q0Var, h1.j.c(j4, this.f1077f));
        }
    }

    public final void k(int i6, int i7, int i8, int i9, int i10, int i11) {
        this.f1083m = i9;
        if (this.f1075d == h1.m.f16629b) {
            i7 = (i8 - i7) - this.f1074c;
        }
        this.f1085o = (((long) i7) << 32) | (((long) i6) & 4294967295L);
        this.f1086p = i10;
        this.f1087q = i11;
    }
}
