package y;

/* loaded from: classes.dex */
public final class r0 implements c0 {

    /* renamed from: a, reason: collision with root package name */
    private final b f51358a;

    /* loaded from: classes.dex */
    public static final class a extends q0 {

        /* renamed from: c, reason: collision with root package name */
        private int f51359c;

        public /* synthetic */ a(Object obj, d0 d0Var, int i10, kotlin.jvm.internal.k kVar) {
            this(obj, d0Var, i10);
        }

        public final int d() {
            return this.f51359c;
        }

        public boolean equals(Object obj) {
            if (obj == this) {
                return true;
            }
            if (!(obj instanceof a)) {
                return false;
            }
            a aVar = (a) obj;
            return kotlin.jvm.internal.t.b(aVar.b(), b()) && kotlin.jvm.internal.t.b(aVar.a(), a()) && t.c(aVar.f51359c, this.f51359c);
        }

        public int hashCode() {
            Object b10 = b();
            return ((((b10 != null ? b10.hashCode() : 0) * 31) + t.d(this.f51359c)) * 31) + a().hashCode();
        }

        public /* synthetic */ a(Object obj, d0 d0Var, int i10, int i11, kotlin.jvm.internal.k kVar) {
            this(obj, (i11 & 2) != 0 ? f0.e() : d0Var, (i11 & 4) != 0 ? t.f51392a.a() : i10, null);
        }

        private a(Object obj, d0 d0Var, int i10) {
            super(obj, d0Var, null);
            this.f51359c = i10;
        }
    }

    /* loaded from: classes.dex */
    public static final class b extends s0 {
        public b() {
            super(null);
        }

        public a f(Object obj, int i10) {
            a aVar = new a(obj, null, 0, 6, null);
            c().t(i10, aVar);
            return aVar;
        }
    }

    public r0(b bVar) {
        this.f51358a = bVar;
    }

    @Override // y.c0, y.i
    /* renamed from: f, reason: merged with bridge method [inline-methods] */
    public c2 a(q1 q1Var) {
        long[] jArr;
        int[] iArr;
        long[] jArr2;
        int[] iArr2;
        int i10;
        androidx.collection.x xVar = new androidx.collection.x(this.f51358a.c().e() + 2);
        androidx.collection.y yVar = new androidx.collection.y(this.f51358a.c().e());
        androidx.collection.y c10 = this.f51358a.c();
        int[] iArr3 = c10.f1339b;
        Object[] objArr = c10.f1340c;
        long[] jArr3 = c10.f1338a;
        int length = jArr3.length - 2;
        if (length >= 0) {
            int i11 = 0;
            while (true) {
                long j10 = jArr3[i11];
                if ((((~j10) << 7) & j10 & (-9187201950435737472L)) != -9187201950435737472L) {
                    int i12 = 8;
                    int i13 = 8 - ((~(i11 - length)) >>> 31);
                    int i14 = 0;
                    while (i14 < i13) {
                        if ((255 & j10) < 128) {
                            int i15 = (i11 << 3) + i14;
                            int i16 = iArr3[i15];
                            a aVar = (a) objArr[i15];
                            xVar.f(i16);
                            jArr2 = jArr3;
                            iArr2 = iArr3;
                            yVar.t(i16, new b2((q) q1Var.a().invoke(aVar.b()), aVar.a(), aVar.d(), null));
                            i10 = 8;
                        } else {
                            jArr2 = jArr3;
                            iArr2 = iArr3;
                            i10 = i12;
                        }
                        j10 >>= i10;
                        i14++;
                        i12 = i10;
                        jArr3 = jArr2;
                        iArr3 = iArr2;
                    }
                    jArr = jArr3;
                    iArr = iArr3;
                    if (i13 != i12) {
                        break;
                    }
                } else {
                    jArr = jArr3;
                    iArr = iArr3;
                }
                if (i11 == length) {
                    break;
                }
                i11++;
                jArr3 = jArr;
                iArr3 = iArr;
            }
        }
        if (!this.f51358a.c().a(0)) {
            xVar.e(0, 0);
        }
        if (!this.f51358a.c().a(this.f51358a.b())) {
            xVar.f(this.f51358a.b());
        }
        xVar.l();
        return new c2(xVar, yVar, this.f51358a.b(), this.f51358a.a(), f0.e(), t.f51392a.a(), null);
    }
}
