package defpackage;

import java.util.concurrent.ExecutionException;

/* renamed from: ᵢᵴˁʾ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C3301 implements InterfaceC2070, InterfaceC3964, InterfaceC2605 {

    /* renamed from: ˀᵗᵝᵭ, reason: contains not printable characters */
    public Exception f12359;

    /* renamed from: ᵡˎ, reason: contains not printable characters */
    public boolean f12360;

    /* renamed from: ᵡⁱᵥ, reason: contains not printable characters */
    public int f12361;

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

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

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final Object f12364 = new Object();

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public int f12365;

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

    public C3301(int i, C3921 c3921) {
        this.f12362 = i;
        this.f12366 = c3921;
    }

    @Override // defpackage.InterfaceC3964
    /* renamed from: ˎˑː */
    public final void mo6878(Exception exc) {
        synchronized (this.f12364) {
            this.f12363++;
            this.f12359 = exc;
            m7685();
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m7685() {
        int i = this.f12365;
        int i2 = this.f12363;
        int i3 = i + i2 + this.f12361;
        int i4 = this.f12362;
        if (i3 == i4) {
            Exception exc = this.f12359;
            C3921 c3921 = this.f12366;
            if (exc == null) {
                if (this.f12360) {
                    c3921.m8711();
                    return;
                } else {
                    c3921.m8716(null);
                    return;
                }
            }
            int length = String.valueOf(i2).length();
            StringBuilder sb = new StringBuilder(String.valueOf(i4).length() + length + 8 + 24);
            sb.append(i2);
            sb.append(" out of ");
            sb.append(i4);
            sb.append(" underlying tasks failed");
            c3921.m8712(new ExecutionException(sb.toString(), this.f12359));
        }
    }

    @Override // defpackage.InterfaceC2070
    /* renamed from: ᵴᵳ */
    public final void mo2916(Object obj) {
        synchronized (this.f12364) {
            this.f12365++;
            m7685();
        }
    }

    @Override // defpackage.InterfaceC2605
    /* renamed from: ᵶᵷᵕ */
    public final void mo6554() {
        synchronized (this.f12364) {
            this.f12361++;
            this.f12360 = true;
            m7685();
        }
    }
}
