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\u0012\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u00030\u0002H\n"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/flow/FlowCollector;", "", "Lcom/vinfast/companion/serviceskit/domain/model/gltestdrive/GlServiceCenter;"}, k = 3, mv = {2, 2, 0}, xi = 48)
@kotlin.coroutines.jvm.internal.DebugMetadata(c = "com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProvider$getGlServiceCenters$1", f = "TestDriveRepositoryProvider.kt", l = {209, 215}, m = "invokeSuspend", v = 1)
@kotlin.jvm.internal.SourceDebugExtension
final class TestDriveRepositoryProvider$getGlServiceCenters$1 extends kotlin.coroutines.jvm.internal.SuspendLambda implements kotlin.jvm.functions.Function2<kotlinx.coroutines.flow.FlowCollector<? super java.util.List<? extends com.vinfast.companion.serviceskit.domain.model.gltestdrive.GlServiceCenter>>, 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.TestDriveRepositoryProvider r;
    final /* synthetic */ java.lang.String s;
    final /* synthetic */ java.lang.Double t;
    final /* synthetic */ java.lang.Double u;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    TestDriveRepositoryProvider$getGlServiceCenters$1(com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProvider testDriveRepositoryProvider, java.lang.String str, java.lang.Double d, java.lang.Double d2, kotlin.coroutines.Continuation continuation) {
        super(2, continuation);
        this.r = testDriveRepositoryProvider;
        this.s = str;
        this.t = d;
        this.u = d2;
    }

    /* 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.TestDriveRepositoryProvider$getGlServiceCenters$1 testDriveRepositoryProvider$getGlServiceCenters$1 = new com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProvider$getGlServiceCenters$1(this.r, this.s, this.t, this.u, continuation);
        testDriveRepositoryProvider$getGlServiceCenters$1.q = obj;
        return testDriveRepositoryProvider$getGlServiceCenters$1;
    }

    /* JADX WARN: Code restructure failed: missing block: B:21:0x009a, code lost:
    
        if (r0.emit(r14, r11) == r1) goto L22;
     */
    /*
        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 r15) {
        /*
            r14 = this;
            java.lang.Object r0 = r14.q
            kotlinx.coroutines.flow.FlowCollector r0 = (kotlinx.coroutines.flow.FlowCollector) r0
            java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.g()
            int r2 = r14.p
            r3 = 2
            r4 = 1
            if (r2 == 0) goto L2c
            if (r2 == r4) goto L27
            if (r2 != r3) goto L1f
            java.lang.Object r0 = r14.o
            java.util.List r0 = (java.util.List) r0
            java.lang.Object r14 = r14.n
            com.vinfast.companion.core.base.BaseResponse r14 = (com.vinfast.companion.core.base.BaseResponse) r14
            kotlin.ResultKt.b(r15)
            goto L9d
        L1f:
            java.lang.IllegalStateException r14 = new java.lang.IllegalStateException
            java.lang.String r15 = "call to 'resume' before 'invoke' with coroutine"
            r14.<init>(r15)
            throw r14
        L27:
            kotlin.ResultKt.b(r15)
            r11 = r14
            goto L4b
        L2c:
            kotlin.ResultKt.b(r15)
            com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProvider r15 = r14.r
            com.vinfast.companion.serviceskit.data.api.TestDriveApi r5 = com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProvider.a(r15)
            java.lang.String r6 = r14.s
            java.lang.Double r9 = r14.t
            java.lang.Double r10 = r14.u
            r14.q = r0
            r14.p = r4
            r7 = 0
            r8 = 0
            r12 = 6
            r13 = 0
            r11 = r14
            java.lang.Object r15 = com.vinfast.companion.serviceskit.data.api.TestDriveApi.M(r5, r6, r7, r8, r9, r10, r11, r12, r13)
            if (r15 != r1) goto L4b
            goto L9c
        L4b:
            com.vinfast.companion.core.base.BaseResponse r15 = (com.vinfast.companion.core.base.BaseResponse) r15
            java.lang.Object r14 = r15.a()
            java.util.List r14 = (java.util.List) r14
            if (r14 == 0) goto L7a
            java.util.ArrayList r2 = new java.util.ArrayList
            r4 = 10
            int r4 = kotlin.collections.CollectionsKt.z(r14, r4)
            r2.<init>(r4)
            java.util.Iterator r14 = r14.iterator()
        L64:
            boolean r4 = r14.hasNext()
            if (r4 == 0) goto L7e
            java.lang.Object r4 = r14.next()
            com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriveServiceCenterDto r4 = (com.vinfast.companion.serviceskit.domain.response.gltestdrive.GlTestDriveServiceCenterDto) r4
            com.vinfast.companion.serviceskit.domain.model.gltestdrive.GlServiceCenter$CREATOR r5 = com.vinfast.companion.serviceskit.domain.model.gltestdrive.GlServiceCenter.INSTANCE
            com.vinfast.companion.serviceskit.domain.model.gltestdrive.GlServiceCenter r4 = r5.a(r4)
            r2.add(r4)
            goto L64
        L7a:
            java.util.List r2 = kotlin.collections.CollectionsKt.o()
        L7e:
            java.util.List r14 = kotlin.collections.CollectionsKt.n0(r2)
            java.lang.Object r4 = kotlin.coroutines.jvm.internal.SpillingKt.a(r0)
            r11.q = r4
            java.lang.Object r15 = kotlin.coroutines.jvm.internal.SpillingKt.a(r15)
            r11.n = r15
            java.lang.Object r15 = kotlin.coroutines.jvm.internal.SpillingKt.a(r2)
            r11.o = r15
            r11.p = r3
            java.lang.Object r14 = r0.emit(r14, r11)
            if (r14 != r1) goto L9d
        L9c:
            return r1
        L9d:
            kotlin.Unit r14 = kotlin.Unit.a
            return r14
        */
        throw new UnsupportedOperationException("Method not decompiled: com.vinfast.companion.serviceskit.data.repository.TestDriveRepositoryProvider$getGlServiceCenters$1.invokeSuspend(java.lang.Object):java.lang.Object");
    }
}
