package g2;

import java.io.IOException;
import java.util.Objects;

/* JADX INFO: compiled from: DERBMPString.java */
/* JADX INFO: loaded from: classes.dex */
public class l0 extends s {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    private final char[] f4721e;

    l0(char[] cArr) {
        Objects.requireNonNull(cArr, "'string' cannot be null");
        this.f4721e = cArr;
    }

    @Override // g2.s
    protected boolean h(s sVar) {
        if (sVar instanceof l0) {
            return i2.a.b(this.f4721e, ((l0) sVar).f4721e);
        }
        return false;
    }

    @Override // g2.m
    public int hashCode() {
        return i2.a.f(this.f4721e);
    }

    @Override // g2.s
    void i(q qVar, boolean z2) throws IOException {
        int length = this.f4721e.length;
        if (z2) {
            qVar.f(30);
        }
        qVar.r(length * 2);
        byte[] bArr = new byte[8];
        int i3 = length & (-4);
        int i4 = 0;
        while (i4 < i3) {
            char[] cArr = this.f4721e;
            char c3 = cArr[i4];
            char c4 = cArr[i4 + 1];
            char c5 = cArr[i4 + 2];
            char c6 = cArr[i4 + 3];
            i4 += 4;
            bArr[0] = (byte) (c3 >> '\b');
            bArr[1] = (byte) c3;
            bArr[2] = (byte) (c4 >> '\b');
            bArr[3] = (byte) c4;
            bArr[4] = (byte) (c5 >> '\b');
            bArr[5] = (byte) c5;
            bArr[6] = (byte) (c6 >> '\b');
            bArr[7] = (byte) c6;
            qVar.g(bArr, 0, 8);
        }
        if (i4 < length) {
            int i5 = 0;
            do {
                char c7 = this.f4721e[i4];
                i4++;
                int i6 = i5 + 1;
                bArr[i5] = (byte) (c7 >> '\b');
                i5 = i6 + 1;
                bArr[i6] = (byte) c7;
            } while (i4 < length);
            qVar.g(bArr, 0, i5);
        }
    }

    @Override // g2.s
    int j() {
        return y1.a(this.f4721e.length * 2) + 1 + (this.f4721e.length * 2);
    }

    @Override // g2.s
    boolean m() {
        return false;
    }

    public String p() {
        return new String(this.f4721e);
    }

    public String toString() {
        return p();
    }
}
