package defpackage;

import java.util.UUID;

/* renamed from: ᵠᵪ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractC3145 implements InterfaceC1242 {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final UUID f11952;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public Thread f11953;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final AbstractC3145 f11954;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public final String f11955;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final String f11956;

    public AbstractC3145(String str, UUID uuid, String str2, C2226 c2226) {
        this.f11955 = str;
        this.f11954 = null;
        this.f11952 = uuid;
        this.f11956 = str2;
        c2226.getClass();
        this.f11953 = Thread.currentThread();
    }

    public AbstractC3145(String str, AbstractC3145 abstractC3145, C2226 c2226) {
        this.f11955 = str;
        this.f11954 = abstractC3145;
        this.f11952 = abstractC3145.f11952;
        this.f11956 = abstractC3145.f11956;
        this.f11953 = Thread.currentThread();
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static String m7505(UUID uuid) {
        return "tk-trace-id: ".concat(String.valueOf(Long.toString(uuid.getLeastSignificantBits() >>> 1, 36)));
    }

    @Override // java.io.Closeable, java.lang.AutoCloseable
    public final void close() {
        C2226 c2226M7498 = AbstractC3134.m7498();
        InterfaceC1242 interfaceC1242 = c2226M7498.f8744;
        String str = this.f11955;
        if (interfaceC1242 == null) {
            throw new C5222(AbstractC3915.m8592(new StringBuilder(str.length() + 101), "Tried to end [", str, "], but no trace was active. This is caused by mismatched or missing calls to beginSpan."));
        }
        if (this == interfaceC1242) {
            AbstractC3134.m7497(c2226M7498, ((AbstractC3145) interfaceC1242).f11954);
            this.f11953 = null;
            return;
        }
        String str2 = ((AbstractC3145) interfaceC1242).f11955;
        StringBuilder sb = new StringBuilder(str.length() + 79 + str2.length() + 1);
        AbstractC4486.m9560(sb, "Tried to end span ", str, ", but that span is not the current span. The current span is ", str2);
        sb.append(".");
        throw new C5222(sb.toString());
    }

    /* JADX WARN: Code restructure failed: missing block: B:37:0x00b1, code lost:
    
        r9 = r9.f15609;
        r15 = java.lang.Integer.valueOf(r13);
     */
    /* JADX WARN: Code restructure failed: missing block: B:38:0x00bb, code lost:
    
        if (r9.containsKey(r15) != false) goto L130;
     */
    /* JADX WARN: Code restructure failed: missing block: B:39:0x00bd, code lost:
    
        ((defpackage.C4176) r1.f13174).f15609.put(r15, new defpackage.C4176(r7, 1073741824));
     */
    /* JADX WARN: Code restructure failed: missing block: B:40:0x00cb, code lost:
    
        if (r14 == null) goto L133;
     */
    /* JADX WARN: Code restructure failed: missing block: B:41:0x00cd, code lost:
    
        r14.f15606 = (defpackage.C4176) r1.f13174;
     */
    /* JADX WARN: Code restructure failed: missing block: B:43:0x00de, code lost:
    
        if (r14 == null) goto L45;
     */
    /* JADX WARN: Code restructure failed: missing block: B:44:0x00e0, code lost:
    
        r14.f15606 = (defpackage.C4176) r1.f13174;
     */
    /* JADX WARN: Code restructure failed: missing block: B:45:0x00e6, code lost:
    
        r1.f13178 = r7;
        r1.f13176++;
        r1.m8031();
     */
    /* JADX WARN: Removed duplicated region for block: B:109:0x02ce A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:140:0x020f A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:24:0x0073  */
    /* JADX WARN: Removed duplicated region for block: B:76:0x020e  */
    /* JADX WARN: Removed duplicated region for block: B:98:0x026e  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.String toString() {
        /*
            Method dump skipped, instructions count: 757
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.AbstractC3145.toString():java.lang.String");
    }
}
