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/ServiceCenter;"}, k = 3, mv = {2, 2, 0}, xi = 48)
@kotlin.coroutines.jvm.internal.DebugMetadata(c = "com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider$getServiceCenterByLocation$1", f = "BookingServiceRepositoryProvider.kt", l = {27, 34}, m = "invokeSuspend", v = 1)
@kotlin.jvm.internal.SourceDebugExtension
final class BookingServiceRepositoryProvider$getServiceCenterByLocation$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.ServiceCenter>>, 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.BookingServiceRepositoryProvider r;
    final /* synthetic */ java.lang.String s;
    final /* synthetic */ java.lang.String t;
    final /* synthetic */ java.lang.Double u;
    final /* synthetic */ java.lang.Double v;
    final /* synthetic */ java.lang.Integer[] w;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    BookingServiceRepositoryProvider$getServiceCenterByLocation$1(com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider bookingServiceRepositoryProvider, java.lang.String str, java.lang.String str2, java.lang.Double d, java.lang.Double d2, java.lang.Integer[] numArr, kotlin.coroutines.Continuation continuation) {
        super(2, continuation);
        this.r = bookingServiceRepositoryProvider;
        this.s = str;
        this.t = str2;
        this.u = d;
        this.v = d2;
        this.w = numArr;
    }

    /* 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.BookingServiceRepositoryProvider$getServiceCenterByLocation$1 bookingServiceRepositoryProvider$getServiceCenterByLocation$1 = new com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider$getServiceCenterByLocation$1(this.r, this.s, this.t, this.u, this.v, this.w, continuation);
        bookingServiceRepositoryProvider$getServiceCenterByLocation$1.q = obj;
        return bookingServiceRepositoryProvider$getServiceCenterByLocation$1;
    }

    /* JADX WARN: Code restructure failed: missing block: B:21:0x0096, code lost:
    
        if (r0.emit(r2, 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 r13) {
        /*
            r12 = this;
            java.lang.Object r0 = r12.q
            kotlinx.coroutines.flow.FlowCollector r0 = (kotlinx.coroutines.flow.FlowCollector) r0
            java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.g()
            int r2 = r12.p
            r3 = 2
            r4 = 1
            if (r2 == 0) goto L2c
            if (r2 == r4) goto L27
            if (r2 != r3) goto L1f
            java.lang.Object r0 = r12.o
            java.util.List r0 = (java.util.List) r0
            java.lang.Object r12 = r12.n
            com.vinfast.companion.core.base.BaseResponse r12 = (com.vinfast.companion.core.base.BaseResponse) r12
            kotlin.ResultKt.b(r13)
            goto L99
        L1f:
            java.lang.IllegalStateException r12 = new java.lang.IllegalStateException
            java.lang.String r13 = "call to 'resume' before 'invoke' with coroutine"
            r12.<init>(r13)
            throw r12
        L27:
            kotlin.ResultKt.b(r13)
            r11 = r12
            goto L4b
        L2c:
            kotlin.ResultKt.b(r13)
            com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider r13 = r12.r
            com.vinfast.companion.serviceskit.data.api.BookingServiceApi r5 = com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider.p(r13)
            java.lang.String r6 = r12.s
            java.lang.String r7 = r12.t
            java.lang.Double r8 = r12.u
            java.lang.Double r9 = r12.v
            java.lang.Integer[] r10 = r12.w
            r12.q = r0
            r12.p = r4
            r11 = r12
            java.lang.Object r13 = r5.I(r6, r7, r8, r9, r10, r11)
            if (r13 != r1) goto L4b
            goto L98
        L4b:
            com.vinfast.companion.core.base.BaseResponse r13 = (com.vinfast.companion.core.base.BaseResponse) r13
            java.lang.Object r12 = r13.a()
            java.util.List r12 = (java.util.List) r12
            if (r12 == 0) goto L7a
            java.util.ArrayList r2 = new java.util.ArrayList
            r4 = 10
            int r4 = kotlin.collections.CollectionsKt.z(r12, r4)
            r2.<init>(r4)
            java.util.Iterator r12 = r12.iterator()
        L64:
            boolean r4 = r12.hasNext()
            if (r4 == 0) goto L7e
            java.lang.Object r4 = r12.next()
            com.vinfast.companion.serviceskit.domain.response.ServiceCenterDto r4 = (com.vinfast.companion.serviceskit.domain.response.ServiceCenterDto) r4
            com.vinfast.companion.serviceskit.domain.model.ServiceCenter$CREATOR r5 = com.vinfast.companion.serviceskit.domain.model.ServiceCenter.INSTANCE
            com.vinfast.companion.serviceskit.domain.model.ServiceCenter r4 = r5.a(r4)
            r2.add(r4)
            goto L64
        L7a:
            java.util.List r2 = kotlin.collections.CollectionsKt.o()
        L7e:
            java.lang.Object r12 = kotlin.coroutines.jvm.internal.SpillingKt.a(r0)
            r11.q = r12
            java.lang.Object r12 = kotlin.coroutines.jvm.internal.SpillingKt.a(r13)
            r11.n = r12
            java.lang.Object r12 = kotlin.coroutines.jvm.internal.SpillingKt.a(r2)
            r11.o = r12
            r11.p = r3
            java.lang.Object r12 = r0.emit(r2, r11)
            if (r12 != r1) goto L99
        L98:
            return r1
        L99:
            kotlin.Unit r12 = kotlin.Unit.a
            return r12
        */
        throw new UnsupportedOperationException("Method not decompiled: com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider$getServiceCenterByLocation$1.invokeSuspend(java.lang.Object):java.lang.Object");
    }
}
