package defpackage;

import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u0004*\u000e\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00020\u00002\u0006\u0010\u0003\u001a\u00020\u0001H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Lj77;", "Ltd4;", "Lua4;", "it", "Le6a;", "<anonymous>", "(Lj77;Ltd4;)V"}, k = 3, mv = {2, 0, 0})
@DebugMetadata(c = "io.ktor.client.plugins.ReceiveError$install$1", f = "HttpCallValidator.kt", i = {0}, l = {149, 151}, m = "invokeSuspend", n = {"$this$intercept"}, s = {"L$0"})
final class dv7 extends SuspendLambda implements ir3<j77<td4, ua4>, td4, Continuation<? super e6a>, Object> {
    public int a;
    public /* synthetic */ j77 b;
    public final /* synthetic */ ir3 c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public dv7(ir3 ir3Var, Continuation continuation) {
        super(3, continuation);
        this.c = ir3Var;
    }

    @Override // defpackage.ir3
    public final Object invoke(Object obj, Object obj2, Object obj3) {
        dv7 dv7Var = new dv7(this.c, (Continuation) obj3);
        dv7Var.b = (j77) obj;
        return dv7Var.invokeSuspend(e6a.a);
    }

    /* JADX WARN: Code restructure failed: missing block: B:16:0x002d, code lost:
    
        if (r5 == r0) goto L20;
     */
    /* JADX WARN: Code restructure failed: missing block: B:19:0x0043, code lost:
    
        if (r5 != r0) goto L21;
     */
    /* JADX WARN: Code restructure failed: missing block: B:20:0x0045, code lost:
    
        return r0;
     */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r1v0, types: [int] */
    /* JADX WARN: Type inference failed for: r1v1, types: [j77] */
    /* JADX WARN: Type inference failed for: r1v6 */
    /* JADX WARN: Type inference failed for: r1v8 */
    /* JADX WARN: Type inference failed for: r1v9 */
    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) throws Throwable {
        ck1 ck1Var = ck1.a;
        ?? r1 = this.a;
        try {
        } catch (Throwable th) {
            ed4 ed4VarE = ((ua4) r1.a).e();
            this.b = null;
            this.a = 2;
            obj = this.c.invoke(ed4VarE, th, this);
        }
        if (r1 == 0) {
            s38.b(obj);
            j77 j77Var = this.b;
            this.b = j77Var;
            this.a = 1;
            Object objG = j77Var.g(this);
            r1 = j77Var;
        } else {
            if (r1 != 1) {
                if (r1 != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                s38.b(obj);
                Throwable th2 = (Throwable) obj;
                if (th2 != null) {
                    throw th2;
                }
                return e6a.a;
            }
            j77 j77Var2 = this.b;
            s38.b(obj);
            r1 = j77Var2;
        }
        return e6a.a;
    }
}
