package com.amplifyframework.api.aws.sigv4;

import dn.p;
import kotlin.Metadata;
import kotlin.coroutines.jvm.internal.f;
import kotlin.coroutines.jvm.internal.l;
import rm.n0;
import rm.y;
import tp.m0;

@f(c = "com.amplifyframework.api.aws.sigv4.AWS4Signer$signBlocking$1", f = "AWS4Signer.kt", l = {62}, m = "invokeSuspend")
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001*\u00020\u0000H\u008a@"}, d2 = {"Ltp/m0;", "Lo6/f;", "Lu6/a;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
/* loaded from: classes4.dex */
final class AWS4Signer$signBlocking$1 extends l implements p {
    final /* synthetic */ n6.c $credentialsProvider;
    final /* synthetic */ u6.a $httpRequest;
    final /* synthetic */ String $serviceName;
    int label;
    final /* synthetic */ AWS4Signer this$0;

    /* JADX INFO: Access modifiers changed from: package-private */
    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public AWS4Signer$signBlocking$1(AWS4Signer aWS4Signer, u6.a aVar, n6.c cVar, String str, vm.d<? super AWS4Signer$signBlocking$1> dVar) {
        super(2, dVar);
        this.this$0 = aWS4Signer;
        this.$httpRequest = aVar;
        this.$credentialsProvider = cVar;
        this.$serviceName = str;
    }

    @Override // kotlin.coroutines.jvm.internal.a
    public final vm.d<n0> create(Object obj, vm.d<?> dVar) {
        return new AWS4Signer$signBlocking$1(this.this$0, this.$httpRequest, this.$credentialsProvider, this.$serviceName, dVar);
    }

    @Override // kotlin.coroutines.jvm.internal.a
    public final Object invokeSuspend(Object obj) {
        Object f10;
        f10 = wm.d.f();
        int i10 = this.label;
        if (i10 == 0) {
            y.b(obj);
            AWS4Signer aWS4Signer = this.this$0;
            u6.a aVar = this.$httpRequest;
            n6.c cVar = this.$credentialsProvider;
            String str = this.$serviceName;
            this.label = 1;
            obj = aWS4Signer.sign(aVar, cVar, str, this);
            if (obj == f10) {
                return f10;
            }
        } else {
            if (i10 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            y.b(obj);
        }
        return obj;
    }

    @Override // dn.p
    public final Object invoke(m0 m0Var, vm.d<? super o6.f> dVar) {
        return ((AWS4Signer$signBlocking$1) create(m0Var, dVar)).invokeSuspend(n0.f34904a);
    }
}
