package g.a;

import java.util.concurrent.CancellationException;

/* JADX INFO: Access modifiers changed from: package-private */
/* JADX INFO: compiled from: Job.kt */
/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class s1 {
    public static final r a(n1 n1Var) {
        return new q1(n1Var);
    }

    public static /* synthetic */ r b(n1 n1Var, int i2, Object obj) {
        if ((i2 & 1) != 0) {
            n1Var = null;
        }
        return r1.a(n1Var);
    }

    public static final void c(f.w.g gVar, CancellationException cancellationException) {
        n1 n1Var = (n1) gVar.get(n1.f4054e);
        if (n1Var != null) {
            n1Var.o(cancellationException);
        }
    }

    public static /* synthetic */ void d(f.w.g gVar, CancellationException cancellationException, int i2, Object obj) {
        if ((i2 & 1) != 0) {
            cancellationException = null;
        }
        r1.c(gVar, cancellationException);
    }

    public static final void e(f.w.g gVar) {
        n1 n1Var = (n1) gVar.get(n1.f4054e);
        if (n1Var != null) {
            r1.f(n1Var);
        }
    }

    public static final void f(n1 n1Var) {
        if (!n1Var.isActive()) {
            throw n1Var.n();
        }
    }
}
