package com.unity3d.services.core.domain.task; import c9.p; import d9.j; import java.util.concurrent.CancellationException; import kotlin.coroutines.jvm.internal.f; import kotlin.coroutines.jvm.internal.l; import s8.n; import s8.o; import s8.v; import v8.d; @f(c = "com.unity3d.services.core.domain.task.InitializeStateRetry$doWork$2", f = "InitializeStateRetry.kt", l = {}, m = "invokeSuspend") /* loaded from: classes2.dex */ final class InitializeStateRetry$doWork$2 extends l implements p { int label; InitializeStateRetry$doWork$2(d dVar) { super(2, dVar); } @Override // kotlin.coroutines.jvm.internal.a public final d create(Object obj, d dVar) { j.e(dVar, "completion"); return new InitializeStateRetry$doWork$2(dVar); } @Override // c9.p public final Object invoke(Object obj, Object obj2) { return ((InitializeStateRetry$doWork$2) create(obj, (d) obj2)).invokeSuspend(v.f14109a); } @Override // kotlin.coroutines.jvm.internal.a public final Object invokeSuspend(Object obj) { Object b10; w8.d.c(); if (this.label != 0) { throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } o.b(obj); try { n.a aVar = n.f14096b; b10 = n.b(v.f14109a); } catch (CancellationException e10) { throw e10; } catch (Throwable th) { n.a aVar2 = n.f14096b; b10 = n.b(o.a(th)); } if (n.g(b10)) { b10 = n.b(b10); } else { Throwable d10 = n.d(b10); if (d10 != null) { b10 = n.b(o.a(d10)); } } return n.a(b10); } }