package K;

import T0.C0596g;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public T.p f3769a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public T.p f3770b;

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

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

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

    /* JADX WARN: Removed duplicated region for block: B:31:0x006b  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void a(Z0.y yVar) {
        T.p pVar;
        this.f3773e = false;
        T.p pVar2 = this.f3769a;
        if (yVar.equals(pVar2 != null ? (Z0.y) pVar2.f6346c : null)) {
            return;
        }
        C0596g c0596g = yVar.f9136a;
        String str = c0596g.f6510b;
        T.p pVar3 = this.f3769a;
        if (kotlin.jvm.internal.o.c(str, pVar3 != null ? ((Z0.y) pVar3.f6346c).f9136a.f6510b : null)) {
            T.p pVar4 = this.f3769a;
            if (pVar4 != null) {
                pVar4.f6346c = yVar;
                return;
            }
            return;
        }
        this.f3769a = new T.p(16, this.f3769a, yVar);
        this.f3770b = null;
        int length = c0596g.f6510b.length() + this.f3771c;
        this.f3771c = length;
        if (length > 100000) {
            T.p pVar5 = this.f3769a;
            if ((pVar5 != null ? (T.p) pVar5.f6345b : null) == null) {
                return;
            }
            while (true) {
                if (pVar5 == null) {
                    pVar = null;
                } else {
                    T.p pVar6 = (T.p) pVar5.f6345b;
                    if (pVar6 != null) {
                        pVar = (T.p) pVar6.f6345b;
                    }
                }
                if (pVar == null) {
                    break;
                } else {
                    pVar5 = (T.p) pVar5.f6345b;
                }
            }
            if (pVar5 != null) {
                pVar5.f6345b = null;
            }
        }
    }
}
