package com.vinfast.companion.serviceskit.data.repository;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes6.dex */
@kotlin.Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00030\u0002H\n"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/flow/FlowCollector;", "Lcom/vinfast/companion/serviceskit/domain/response/gltestdrive/GlTestDriverAppointmentDetails;"}, k = 3, mv = {2, 2, 0}, xi = 48)
@kotlin.coroutines.jvm.internal.DebugMetadata(c = "com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProviderStub$getGLTestDriveDetailById$1", f = "TestDriveRepositoryProviderStub.kt", l = {373, 377}, m = "invokeSuspend", v = 1)
final class TestDriveRepositoryProviderStub$getGLTestDriveDetailById$1 extends kotlin.coroutines.jvm.internal.SuspendLambda implements kotlin.jvm.functions.Function2<kotlinx.coroutines.flow.FlowCollector<? super com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriverAppointmentDetails>, kotlin.coroutines.Continuation<? super kotlin.Unit>, java.lang.Object> {
    java.lang.Object n;
    java.lang.Object o;
    int p;
    private /* synthetic */ java.lang.Object q;
    final /* synthetic */ com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProviderStub r;
    final /* synthetic */ java.lang.String s;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    TestDriveRepositoryProviderStub$getGLTestDriveDetailById$1(com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProviderStub testDriveRepositoryProviderStub, java.lang.String str, kotlin.coroutines.Continuation continuation) {
        super(2, continuation);
        this.r = testDriveRepositoryProviderStub;
        this.s = str;
    }

    /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
    public final java.lang.Object invoke(kotlinx.coroutines.flow.FlowCollector flowCollector, kotlin.coroutines.Continuation continuation) {
        return create(flowCollector, continuation).invokeSuspend(kotlin.Unit.a);
    }

    public final kotlin.coroutines.Continuation create(java.lang.Object obj, kotlin.coroutines.Continuation continuation) {
        com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProviderStub$getGLTestDriveDetailById$1 testDriveRepositoryProviderStub$getGLTestDriveDetailById$1 = new com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProviderStub$getGLTestDriveDetailById$1(this.r, this.s, continuation);
        testDriveRepositoryProviderStub$getGLTestDriveDetailById$1.q = obj;
        return testDriveRepositoryProviderStub$getGLTestDriveDetailById$1;
    }

    /* JADX WARN: Code restructure failed: missing block: B:16:0x0068, code lost:
    
        if (r0.emit(r2, r5) == r1) goto L17;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.Object invokeSuspend(java.lang.Object r6) {
        /*
            r5 = this;
            java.lang.Object r0 = r5.q
            kotlinx.coroutines.flow.FlowCollector r0 = (kotlinx.coroutines.flow.FlowCollector) r0
            java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.g()
            int r2 = r5.p
            r3 = 2
            r4 = 1
            if (r2 == 0) goto L2a
            if (r2 == r4) goto L26
            if (r2 != r3) goto L1e
            java.lang.Object r0 = r5.o
            com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriverAppointmentDetails r0 = (com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriverAppointmentDetails) r0
            java.lang.Object r5 = r5.n
            com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriverAppointmentDetailsDto r5 = (com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriverAppointmentDetailsDto) r5
            kotlin.ResultKt.b(r6)
            goto L6b
        L1e:
            java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
            java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
            r5.<init>(r6)
            throw r5
        L26:
            kotlin.ResultKt.b(r6)
            goto L40
        L2a:
            kotlin.ResultKt.b(r6)
            com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProviderStub r6 = r5.r
            com.vinfast.companion.serviceskit.data.api.TestDriveApi r6 = com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProviderStub.a(r6)
            java.lang.String r2 = r5.s
            r5.q = r0
            r5.p = r4
            java.lang.Object r6 = r6.E(r2, r5)
            if (r6 != r1) goto L40
            goto L6a
        L40:
            com.vinfast.companion.core.base.BaseResponse r6 = (com.vinfast.companion.core.base.BaseResponse) r6
            java.lang.Object r6 = r6.a()
            com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriverAppointmentDetailsDto r6 = (com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriverAppointmentDetailsDto) r6
            if (r6 == 0) goto L6e
            com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriverAppointmentDetails$CREATOR r2 = com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriverAppointmentDetails.INSTANCE
            com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriverAppointmentDetails r2 = r2.a(r6)
            java.lang.Object r4 = kotlin.coroutines.jvm.internal.SpillingKt.a(r0)
            r5.q = r4
            java.lang.Object r6 = kotlin.coroutines.jvm.internal.SpillingKt.a(r6)
            r5.n = r6
            java.lang.Object r6 = kotlin.coroutines.jvm.internal.SpillingKt.a(r2)
            r5.o = r6
            r5.p = r3
            java.lang.Object r5 = r0.emit(r2, r5)
            if (r5 != r1) goto L6b
        L6a:
            return r1
        L6b:
            kotlin.Unit r5 = kotlin.Unit.a
            return r5
        L6e:
            java.lang.NullPointerException r5 = new java.lang.NullPointerException
            java.lang.String r6 = "not found"
            r5.<init>(r6)
            throw r5
        */
        throw new UnsupportedOperationException("Method not decompiled: com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProviderStub$getGLTestDriveDetailById$1.invokeSuspend(java.lang.Object):java.lang.Object");
    }
}
