package defpackage;

import defpackage.fe4;
import java.util.Iterator;
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\u0010\u0000\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;", "", "Lfd4;", "content", "Le6a;", "<anonymous>", "(Lj77;Ljava/lang/Object;)V"}, k = 3, mv = {2, 0, 0})
@DebugMetadata(c = "io.ktor.client.plugins.HttpSend$Plugin$install$1", f = "HttpSend.kt", i = {0}, l = {84, 85}, m = "invokeSuspend", n = {"$this$intercept"}, s = {"L$0"})
@vx8
final class he4 extends SuspendLambda implements ir3<j77<Object, fd4>, Object, Continuation<? super e6a>, Object> {
    public int a;
    public /* synthetic */ j77 b;
    public /* synthetic */ Object c;
    public final /* synthetic */ fe4 d;
    public final /* synthetic */ ta4 e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public he4(fe4 fe4Var, ta4 ta4Var, Continuation continuation) {
        super(3, continuation);
        this.d = fe4Var;
        this.e = ta4Var;
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:20:0x0078, code lost:
    
        if (r1.h((defpackage.ua4) r9, r8) == r0) goto L21;
     */
    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        j77 j77Var;
        ck1 ck1Var = ck1.a;
        int i = this.a;
        if (i == 0) {
            s38.b(obj);
            j77Var = this.b;
            Object obj2 = this.c;
            if (!(obj2 instanceof vy6)) {
                throw new IllegalStateException(n89.bj("\n|Fail to prepare request body for sending. \n|The body type is: " + iw7.a.getOrCreateKotlinClass(obj2.getClass()) + ", with Content-Type: " + vc4.d((tc4) j77Var.a) + ".\n|\n|If you expect serialized body, please check that you have installed the corresponding plugin(like `ContentNegotiation`) and set `Content-Type` header.").toString());
            }
            fd4 fd4Var = (fd4) j77Var.a;
            fd4Var.getClass();
            fd4Var.d = obj2;
            fd4Var.b(null);
            fe4 fe4Var = this.d;
            fe4Var.getClass();
            jg8 bVar = new fe4.b(this.e);
            Iterator it = y41.bb(fe4Var.a).iterator();
            while (it.hasNext()) {
                bVar = new fe4.c((ir3) it.next(), bVar);
            }
            fd4 fd4Var2 = (fd4) j77Var.a;
            this.b = j77Var;
            this.a = 1;
            obj = bVar.a(fd4Var2, this);
            if (obj != ck1Var) {
            }
            return ck1Var;
        }
        if (i != 1) {
            if (i != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            s38.b(obj);
            return e6a.a;
        }
        j77Var = this.b;
        s38.b(obj);
        this.b = null;
        this.a = 2;
    }
}
