package com.google.crypto.tink.shaded.protobuf;

import androidx.datastore.preferences.protobuf.C0426d;
import d5.AbstractC0844a;
import java.util.Iterator;

/* JADX INFO: renamed from: com.google.crypto.tink.shaded.protobuf.g, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public class C0741g extends AbstractC0742h {

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final byte[] f10494t;

    public C0741g(byte[] bArr) {
        this.f10498q = 0;
        bArr.getClass();
        this.f10494t = bArr;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.AbstractC0742h
    public byte a(int i) {
        return this.f10494t[i];
    }

    public final boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof AbstractC0742h) || size() != ((AbstractC0742h) obj).size()) {
            return false;
        }
        if (size() == 0) {
            return true;
        }
        if (!(obj instanceof C0741g)) {
            return obj.equals(this);
        }
        C0741g c0741g = (C0741g) obj;
        int i = this.f10498q;
        int i5 = c0741g.f10498q;
        if (i != 0 && i5 != 0 && i != i5) {
            return false;
        }
        int size = size();
        if (size > c0741g.size()) {
            throw new IllegalArgumentException("Length too large: " + size + size());
        }
        if (size > c0741g.size()) {
            StringBuilder sbO = AbstractC0844a.o(size, "Ran off end of other: 0, ", ", ");
            sbO.append(c0741g.size());
            throw new IllegalArgumentException(sbO.toString());
        }
        int iH = h() + size;
        int iH2 = h();
        int iH3 = c0741g.h();
        while (iH2 < iH) {
            if (this.f10494t[iH2] != c0741g.f10494t[iH3]) {
                return false;
            }
            iH2++;
            iH3++;
        }
        return true;
    }

    @Override // com.google.crypto.tink.shaded.protobuf.AbstractC0742h
    public void f(int i, byte[] bArr) {
        System.arraycopy(this.f10494t, 0, bArr, 0, i);
    }

    public int h() {
        return 0;
    }

    public byte i(int i) {
        return this.f10494t[i];
    }

    @Override // java.lang.Iterable
    public final Iterator iterator() {
        return new C0426d(this);
    }

    @Override // com.google.crypto.tink.shaded.protobuf.AbstractC0742h
    public int size() {
        return this.f10494t.length;
    }
}
