package d3;

import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

/* JADX INFO: renamed from: d3.o0, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0809o0 extends FutureTask implements Comparable {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final long f12080q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final boolean f12081r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final String f12082s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final /* synthetic */ C0815q0 f12083t;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0809o0(C0815q0 c0815q0, Runnable runnable, boolean z8, String str) {
        super(runnable, null);
        this.f12083t = c0815q0;
        long andIncrement = C0815q0.f12104A.getAndIncrement();
        this.f12080q = andIncrement;
        this.f12082s = str;
        this.f12081r = z8;
        if (andIncrement == Long.MAX_VALUE) {
            Z z9 = ((C0817r0) c0815q0.f5146q).f12150y;
            C0817r0.k(z9);
            z9.f11875v.b("Tasks index overflow");
        }
    }

    @Override // java.lang.Comparable
    public final int compareTo(Object obj) {
        C0809o0 c0809o0 = (C0809o0) obj;
        boolean z8 = c0809o0.f12081r;
        boolean z9 = this.f12081r;
        if (z9 != z8) {
            return !z9 ? 1 : -1;
        }
        long j8 = this.f12080q;
        long j9 = c0809o0.f12080q;
        if (j8 < j9) {
            return -1;
        }
        if (j8 > j9) {
            return 1;
        }
        Z z10 = ((C0817r0) this.f12083t.f5146q).f12150y;
        C0817r0.k(z10);
        z10.f11876w.c(Long.valueOf(j8), "Two tasks share the same index. index");
        return 0;
    }

    @Override // java.util.concurrent.FutureTask
    public final void setException(Throwable th) {
        Z z8 = ((C0817r0) this.f12083t.f5146q).f12150y;
        C0817r0.k(z8);
        z8.f11875v.c(th, this.f12082s);
        super.setException(th);
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0809o0(C0815q0 c0815q0, Callable callable, boolean z8) {
        super(callable);
        this.f12083t = c0815q0;
        long andIncrement = C0815q0.f12104A.getAndIncrement();
        this.f12080q = andIncrement;
        this.f12082s = "Task exception on worker thread";
        this.f12081r = z8;
        if (andIncrement == Long.MAX_VALUE) {
            Z z9 = ((C0817r0) c0815q0.f5146q).f12150y;
            C0817r0.k(z9);
            z9.f11875v.b("Tasks index overflow");
        }
    }
}
