package com.vinfast.companion.mqttkit.source;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.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.mqttkit.source.MqttCredentialsProvider$scheduleNextRefresh$1", f = "MqttCredentialsProvider.kt", l = {125, 127}, m = "invokeSuspend", v = 1)
final class MqttCredentialsProvider$scheduleNextRefresh$1 extends kotlin.coroutines.jvm.internal.SuspendLambda implements kotlin.jvm.functions.Function2<kotlinx.coroutines.CoroutineScope, kotlin.coroutines.Continuation<? super kotlin.Unit>, java.lang.Object> {
    int n;
    final /* synthetic */ long o;
    final /* synthetic */ com.vinfast.companion.mqttkit.source.MqttCredentialsProvider p;
    final /* synthetic */ java.lang.String q;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    MqttCredentialsProvider$scheduleNextRefresh$1(long j, com.vinfast.companion.mqttkit.source.MqttCredentialsProvider mqttCredentialsProvider, java.lang.String str, kotlin.coroutines.Continuation continuation) {
        super(2, continuation);
        this.o = j;
        this.p = mqttCredentialsProvider;
        this.q = str;
    }

    public final kotlin.coroutines.Continuation create(java.lang.Object obj, kotlin.coroutines.Continuation continuation) {
        return new com.vinfast.companion.mqttkit.source.MqttCredentialsProvider$scheduleNextRefresh$1(this.o, this.p, this.q, continuation);
    }

    /* JADX WARN: Code restructure failed: missing block: B:14:0x0046, code lost:
    
        if (r7.f(r1, r6) == r0) goto L15;
     */
    /*
        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 r7) {
        /*
            r6 = this;
            java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.g()
            int r1 = r6.n
            r2 = 2
            r3 = 1
            if (r1 == 0) goto L1e
            if (r1 == r3) goto L1a
            if (r1 != r2) goto L12
            kotlin.ResultKt.b(r7)
            goto L49
        L12:
            java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
            java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
            r6.<init>(r7)
            throw r6
        L1a:
            kotlin.ResultKt.b(r7)
            goto L2c
        L1e:
            kotlin.ResultKt.b(r7)
            long r4 = r6.o
            r6.n = r3
            java.lang.Object r7 = kotlinx.coroutines.DelayKt.b(r4, r6)
            if (r7 != r0) goto L2c
            goto L48
        L2c:
            timber.log.Timber$Forest r7 = timber.log.Timber.a
            java.lang.String r1 = "[MQTT]"
            timber.log.Timber$Tree r7 = r7.t(r1)
            r1 = 0
            java.lang.Object[] r1 = new java.lang.Object[r1]
            java.lang.String r3 = "⏱️ SCHEDULE NEXT REFRESH"
            r7.j(r3, r1)
            com.vinfast.companion.mqttkit.source.MqttCredentialsProvider r7 = r6.p
            java.lang.String r1 = r6.q
            r6.n = r2
            java.lang.Object r6 = com.vinfast.companion.mqttkit.source.MqttCredentialsProvider.b(r7, r1, r6)
            if (r6 != r0) goto L49
        L48:
            return r0
        L49:
            kotlin.Unit r6 = kotlin.Unit.a
            return r6
        */
        throw new UnsupportedOperationException("Method not decompiled: com.vinfast.companion.mqttkit.source.MqttCredentialsProvider$scheduleNextRefresh$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);
    }
}
