package k9; import java.util.Iterator; import java.util.concurrent.CancellationException; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public abstract /* synthetic */ class a2 { public static final y a(u1 u1Var) { return new x1(u1Var); } public static /* synthetic */ y b(u1 u1Var, int i10, Object obj) { if ((i10 & 1) != 0) { u1Var = null; } return y1.a(u1Var); } public static final void c(v8.g gVar, CancellationException cancellationException) { u1 u1Var = (u1) gVar.get(u1.T); if (u1Var == null) { return; } u1Var.z0(cancellationException); } public static final void d(v8.g gVar, CancellationException cancellationException) { i9.b G; u1 u1Var = (u1) gVar.get(u1.T); if (u1Var == null || (G = u1Var.G()) == null) { return; } Iterator it = G.iterator(); while (it.hasNext()) { ((u1) it.next()).z0(cancellationException); } } public static /* synthetic */ void e(v8.g gVar, CancellationException cancellationException, int i10, Object obj) { if ((i10 & 1) != 0) { cancellationException = null; } y1.d(gVar, cancellationException); } public static final b1 f(u1 u1Var, b1 b1Var) { return u1Var.w0(new d1(b1Var)); } public static final void g(u1 u1Var) { if (!u1Var.c()) { throw u1Var.S(); } } public static final void h(v8.g gVar) { u1 u1Var = (u1) gVar.get(u1.T); if (u1Var == null) { return; } y1.h(u1Var); } public static final u1 i(v8.g gVar) { u1 u1Var = (u1) gVar.get(u1.T); if (u1Var != null) { return u1Var; } throw new IllegalStateException(d9.j.l("Current context doesn't contain Job in it: ", gVar).toString()); } }