package com.vinfast.companion.car.screen;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes15.dex */
@kotlin.Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\n"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {2, 2, 0}, xi = 48)
@kotlin.coroutines.jvm.internal.DebugMetadata(c = "com.vinfast.companion.car.screen.SingleSelectSearchScreen$onGetTemplate$1", f = "SingleSelectSearchScreen.kt", l = {127, 131}, m = "invokeSuspend", v = 1)
final class SingleSelectSearchScreen$onGetTemplate$1 extends kotlin.coroutines.jvm.internal.SuspendLambda implements kotlin.jvm.functions.Function2<kotlinx.coroutines.CoroutineScope, kotlin.coroutines.Continuation<? super kotlin.Unit>, java.lang.Object> {
    java.lang.Object n;
    int o;
    final /* synthetic */ com.vinfast.companion.car.screen.SingleSelectSearchScreen p;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    SingleSelectSearchScreen$onGetTemplate$1(com.vinfast.companion.car.screen.SingleSelectSearchScreen singleSelectSearchScreen, kotlin.coroutines.Continuation continuation) {
        super(2, continuation);
        this.p = singleSelectSearchScreen;
    }

    public final kotlin.coroutines.Continuation create(java.lang.Object obj, kotlin.coroutines.Continuation continuation) {
        return new com.vinfast.companion.car.screen.SingleSelectSearchScreen$onGetTemplate$1(this.p, continuation);
    }

    /* JADX WARN: Code restructure failed: missing block: B:20:0x0062, code lost:
    
        if (r0.M(r9) == r1) goto L21;
     */
    /*
        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 r10) {
        /*
            r9 = this;
            java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.g()
            int r0 = r9.o
            r2 = 2
            r3 = 1
            if (r0 == 0) goto L25
            if (r0 == r3) goto L1e
            if (r0 != r2) goto L16
            java.lang.Object r9 = r9.n
            java.lang.Exception r9 = (java.lang.Exception) r9
            kotlin.ResultKt.b(r10)
            goto L65
        L16:
            java.lang.IllegalStateException r9 = new java.lang.IllegalStateException
            java.lang.String r10 = "call to 'resume' before 'invoke' with coroutine"
            r9.<init>(r10)
            throw r9
        L1e:
            kotlin.ResultKt.b(r10)     // Catch: java.lang.Exception -> L22
            goto L33
        L22:
            r0 = move-exception
            r10 = r0
            goto L54
        L25:
            kotlin.ResultKt.b(r10)
            com.vinfast.companion.car.screen.SingleSelectSearchScreen r10 = r9.p     // Catch: java.lang.Exception -> L22
            r9.o = r3     // Catch: java.lang.Exception -> L22
            java.lang.Object r10 = r10.K(r9)     // Catch: java.lang.Exception -> L22
            if (r10 != r1) goto L33
            goto L64
        L33:
            r4 = r10
            java.util.List r4 = (java.util.List) r4     // Catch: java.lang.Exception -> L22
            com.vinfast.companion.car.screen.SingleSelectSearchScreen r10 = r9.p     // Catch: java.lang.Exception -> L22
            com.vinfast.companion.core.extensions.validity.Validity$Valid r3 = new com.vinfast.companion.core.extensions.validity.Validity$Valid     // Catch: java.lang.Exception -> L22
            r7 = 2
            r8 = 0
            r5 = 0
            r3.<init>(r4, r5, r7, r8)     // Catch: java.lang.Exception -> L22
            r10.L(r3)     // Catch: java.lang.Exception -> L22
            com.vinfast.companion.car.screen.SingleSelectSearchScreen r10 = r9.p     // Catch: java.lang.Exception -> L22
            kotlinx.coroutines.flow.MutableStateFlow r0 = com.vinfast.companion.car.screen.SingleSelectSearchScreen.A(r10)     // Catch: java.lang.Exception -> L22
            java.lang.Object r0 = r0.getValue()     // Catch: java.lang.Exception -> L22
            java.lang.String r0 = (java.lang.String) r0     // Catch: java.lang.Exception -> L22
            com.vinfast.companion.car.screen.SingleSelectSearchScreen.z(r10, r0)     // Catch: java.lang.Exception -> L22
            goto L65
        L54:
            com.vinfast.companion.car.screen.SingleSelectSearchScreen r0 = r9.p
            java.lang.Object r10 = kotlin.coroutines.jvm.internal.SpillingKt.a(r10)
            r9.n = r10
            r9.o = r2
            java.lang.Object r9 = com.vinfast.companion.car.screen.SingleSelectSearchScreen.B(r0, r9)
            if (r9 != r1) goto L65
        L64:
            return r1
        L65:
            kotlin.Unit r9 = kotlin.Unit.a
            return r9
        */
        throw new UnsupportedOperationException("Method not decompiled: com.vinfast.companion.car.screen.SingleSelectSearchScreen$onGetTemplate$1.invokeSuspend(java.lang.Object):java.lang.Object");
    }

    public final java.lang.Object invoke(kotlinx.coroutines.CoroutineScope coroutineScope, kotlin.coroutines.Continuation continuation) {
        return create(coroutineScope, continuation).invokeSuspend(kotlin.Unit.a);
    }
}
