package com.strmr.ps.ui.splash;

import android.content.Intent;
import android.util.Log;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import com.strmr.ps.MainActivity;
import com.strmr.ps.R;
import com.strmr.ps.background.TraktSyncWorker;
import com.strmr.ps.data.local.entity.TraktAccount;
import com.strmr.ps.data.model.UpdateCheckResult;
import com.strmr.ps.data.model.UpdateInfo;
import com.strmr.ps.data.repository.PreferencesRepository;
import com.strmr.ps.data.supabase.SettingsSyncManager;
import com.strmr.ps.ui.auth.DeviceLinkActivity;
import com.strmr.ps.ui.mobile.MobileMainActivity;
import com.strmr.ps.ui.profile.ProfilePickerActivity;
import com.strmr.ps.util.PlatformUtils;
import defpackage.ak1;
import defpackage.cc9;
import defpackage.ck1;
import defpackage.cr4;
import defpackage.e00;
import defpackage.e6a;
import defpackage.eq;
import defpackage.fx4;
import defpackage.gr3;
import defpackage.h32;
import defpackage.io6;
import defpackage.k9a;
import defpackage.l9a;
import defpackage.m02;
import defpackage.m12;
import defpackage.n89;
import defpackage.pba;
import defpackage.qo9;
import defpackage.r22;
import defpackage.s38;
import defpackage.sc2;
import defpackage.vx;
import defpackage.wg8;
import defpackage.wj0;
import java.util.List;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.Boxing;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lak1;", "Le6a;", "<anonymous>", "(Lak1;)V"}, k = 3, mv = {2, 0, 0})
@DebugMetadata(c = "com.strmr.ps.ui.splash.SyncSplashActivity$onCreate$2", f = "SyncSplashActivity.kt", i = {0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 12}, l = {167, 205, 211, 235, 251, 285, 286, 293, 313, 320, 336, 373, 385, 390}, m = "invokeSuspend", n = {"$this$launch", "messageJob", "messageJob", "accountDeferred", "accessToken", "messageJob", "accountDeferred", "accessToken", "sessionValid", "authPermanentlyInvalid", "messageJob", "accountDeferred", "messageJob", "accountDeferred", "messageJob", "messageJob", "messageJob", "account", "messageJob", "account", "messageJob", "account", "messageJob", "cwDeadlineMs", "messageJob", "messageJob"}, s = {"L$0", "L$1", "L$0", "L$1", "L$2", "L$0", "L$1", "L$2", "I$0", "I$1", "L$0", "L$1", "L$0", "L$1", "L$0", "L$0", "L$0", "L$1", "L$0", "L$1", "L$0", "L$1", "L$0", "J$0", "L$0", "L$0"})
final class q extends SuspendLambda implements gr3<ak1, Continuation<? super e6a>, Object> {
    public Object a;
    public String b;
    public int c;
    public long d;
    public int e;
    public /* synthetic */ Object f;
    public final /* synthetic */ SyncSplashActivity i;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public q(SyncSplashActivity syncSplashActivity, Continuation continuation) {
        super(2, continuation);
        this.i = syncSplashActivity;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Continuation create(Object obj, Continuation continuation) {
        q qVar = new q(this.i, continuation);
        qVar.f = obj;
        return qVar;
    }

    @Override // defpackage.gr3
    public final Object invoke(Object obj, Object obj2) {
        return ((q) create((ak1) obj, (Continuation) obj2)).invokeSuspend(e6a.a);
    }

    /* JADX WARN: Code restructure failed: missing block: B:172:0x03d2, code lost:
    
        if (r0 == r7) goto L251;
     */
    /* JADX WARN: Code restructure failed: missing block: B:208:0x0475, code lost:
    
        if (com.strmr.ps.ui.splash.SyncSplashActivity.e(r1, r32) == r7) goto L251;
     */
    /* JADX WARN: Code restructure failed: missing block: B:215:0x049b, code lost:
    
        if (com.strmr.ps.ui.splash.SyncSplashActivity.e(r1, r32) == r7) goto L251;
     */
    /* JADX WARN: Code restructure failed: missing block: B:250:0x0554, code lost:
    
        if (r0 != r7) goto L252;
     */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:103:0x0279 A[Catch: Exception -> 0x02e4, TRY_ENTER, TryCatch #12 {Exception -> 0x02e4, blocks: (B:110:0x02b1, B:105:0x0282, B:107:0x028e, B:86:0x023e, B:92:0x0250, B:103:0x0279), top: B:292:0x023e }] */
    /* JADX WARN: Removed duplicated region for block: B:117:0x02e9  */
    /* JADX WARN: Removed duplicated region for block: B:119:0x02f0 A[Catch: Exception -> 0x02e0, TryCatch #10 {Exception -> 0x02e0, blocks: (B:112:0x02d1, B:119:0x02f0, B:121:0x02f6, B:123:0x0300, B:127:0x0306, B:148:0x0371, B:149:0x0376), top: B:289:0x001c }] */
    /* JADX WARN: Removed duplicated region for block: B:133:0x032a  */
    /* JADX WARN: Removed duplicated region for block: B:134:0x032b A[Catch: Exception -> 0x0355, TryCatch #9 {Exception -> 0x0355, blocks: (B:131:0x0324, B:134:0x032b, B:136:0x032f, B:139:0x0357, B:141:0x035b, B:143:0x0363, B:146:0x036b, B:147:0x0370), top: B:288:0x0324 }] */
    /* JADX WARN: Removed duplicated region for block: B:169:0x03b9 A[PHI: r0 r5 r10 r13
      0x03b9: PHI (r0v10 java.lang.Object) = (r0v9 java.lang.Object), (r0v148 java.lang.Object) binds: [B:167:0x03b5, B:21:0x009e] A[DONT_GENERATE, DONT_INLINE]
      0x03b9: PHI (r5v7 ??) = (r5v59 ??), (r5v30 ??) binds: [B:167:0x03b5, B:21:0x009e] A[DONT_GENERATE, DONT_INLINE]
      0x03b9: PHI (r10v8 ??) = (r10v51 ??), (r10v38 ??) binds: [B:167:0x03b5, B:21:0x009e] A[DONT_GENERATE, DONT_INLINE]
      0x03b9: PHI (r13v8 java.lang.String) = (r13v5 java.lang.String), (r13v36 java.lang.String) binds: [B:167:0x03b5, B:21:0x009e] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:171:0x03bd  */
    /* JADX WARN: Removed duplicated region for block: B:175:0x03d8 A[PHI: r0 r5 r10 r13
      0x03d8: PHI (r0v15 com.strmr.ps.data.local.entity.TraktAccount) = (r0v11 com.strmr.ps.data.local.entity.TraktAccount), (r0v17 com.strmr.ps.data.local.entity.TraktAccount) binds: [B:170:0x03bb, B:174:0x03d6] A[DONT_GENERATE, DONT_INLINE]
      0x03d8: PHI (r5v8 ??) = (r5v57 ??), (r5v58 ??) binds: [B:170:0x03bb, B:174:0x03d6] A[DONT_GENERATE, DONT_INLINE]
      0x03d8: PHI (r10v9 ??) = (r10v49 ??), (r10v50 ??) binds: [B:170:0x03bb, B:174:0x03d6] A[DONT_GENERATE, DONT_INLINE]
      0x03d8: PHI (r13v9 java.lang.String) = (r13v8 java.lang.String), (r13v10 java.lang.String) binds: [B:170:0x03bb, B:174:0x03d6] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:176:0x03da  */
    /* JADX WARN: Removed duplicated region for block: B:186:0x0402  */
    /* JADX WARN: Removed duplicated region for block: B:191:0x042a  */
    /* JADX WARN: Removed duplicated region for block: B:192:0x042c  */
    /* JADX WARN: Removed duplicated region for block: B:204:0x0457  */
    /* JADX WARN: Removed duplicated region for block: B:205:0x0459  */
    /* JADX WARN: Removed duplicated region for block: B:212:0x047f  */
    /* JADX WARN: Removed duplicated region for block: B:219:0x04a8  */
    /* JADX WARN: Removed duplicated region for block: B:238:0x0501 A[PHI: r1 r5 r10 r13
      0x0501: PHI (r1v29 ??) = (r1v73 ??), (r1v74 ??), (r1v75 ??), (r1v76 ??), (r1v77 ??) binds: [B:218:0x04a6, B:220:0x04b0, B:230:0x04eb, B:233:0x04ef, B:15:0x005c] A[DONT_GENERATE, DONT_INLINE]
      0x0501: PHI (r5v14 ??) = (r5v46 ??), (r5v47 ??), (r5v48 ??), (r5v49 ??), (r5v35 ??) binds: [B:218:0x04a6, B:220:0x04b0, B:230:0x04eb, B:233:0x04ef, B:15:0x005c] A[DONT_GENERATE, DONT_INLINE]
      0x0501: PHI (r10v16 long) = (r10v14 long), (r10v14 long), (r10v14 long), (r10v15 long), (r10v41 long) binds: [B:218:0x04a6, B:220:0x04b0, B:230:0x04eb, B:233:0x04ef, B:15:0x005c] A[DONT_GENERATE, DONT_INLINE]
      0x0501: PHI (r13v15 java.lang.String) = 
      (r13v13 java.lang.String)
      (r13v13 java.lang.String)
      (r13v13 java.lang.String)
      (r13v14 java.lang.String)
      (r13v41 java.lang.String)
     binds: [B:218:0x04a6, B:220:0x04b0, B:230:0x04eb, B:233:0x04ef, B:15:0x005c] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:243:0x0521 A[PHI: r1 r5
      0x0521: PHI (r1v31 ??) = (r1v69 ??), (r1v70 ??), (r1v71 ??), (r1v72 ??) binds: [B:239:0x0508, B:241:0x051e, B:245:0x0524, B:10:0x0046] A[DONT_GENERATE, DONT_INLINE]
      0x0521: PHI (r5v16 ??) = (r5v43 ??), (r5v44 ??), (r5v45 ??), (r5v37 ??) binds: [B:239:0x0508, B:241:0x051e, B:245:0x0524, B:10:0x0046] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:249:0x053c A[PHI: r0 r5 r8
      0x053c: PHI (r0v40 ??) = (r0v165 ??), (r0v166 ??) binds: [B:247:0x0539, B:7:0x0031] A[DONT_GENERATE, DONT_INLINE]
      0x053c: PHI (r5v17 ??) = (r5v42 ??), (r5v38 ??) binds: [B:247:0x0539, B:7:0x0031] A[DONT_GENERATE, DONT_INLINE]
      0x053c: PHI (r8v15 ??) = (r8v14 ??), (r8v36 ??) binds: [B:247:0x0539, B:7:0x0031] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:261:0x0585  */
    /* JADX WARN: Removed duplicated region for block: B:277:0x0258 A[EXC_TOP_SPLITTER, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:294:0x050a A[EXC_TOP_SPLITTER, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:50:0x0161  */
    /* JADX WARN: Removed duplicated region for block: B:56:0x0186  */
    /* JADX WARN: Removed duplicated region for block: B:77:0x021a A[Catch: Exception -> 0x0236, TryCatch #7 {Exception -> 0x0236, blocks: (B:75:0x0214, B:77:0x021a, B:84:0x023a, B:85:0x023d), top: B:285:0x0214 }] */
    /* JADX WARN: Removed duplicated region for block: B:84:0x023a A[Catch: Exception -> 0x0236, TryCatch #7 {Exception -> 0x0236, blocks: (B:75:0x0214, B:77:0x021a, B:84:0x023a, B:85:0x023d), top: B:285:0x0214 }] */
    /* JADX WARN: Removed duplicated region for block: B:88:0x0249  */
    /* JADX WARN: Type inference failed for: r0v105 */
    /* JADX WARN: Type inference failed for: r0v107 */
    /* JADX WARN: Type inference failed for: r0v165 */
    /* JADX WARN: Type inference failed for: r0v166 */
    /* JADX WARN: Type inference failed for: r0v168 */
    /* JADX WARN: Type inference failed for: r0v169 */
    /* JADX WARN: Type inference failed for: r0v39, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r0v40, types: [fx4] */
    /* JADX WARN: Type inference failed for: r10v0 */
    /* JADX WARN: Type inference failed for: r10v1 */
    /* JADX WARN: Type inference failed for: r10v10 */
    /* JADX WARN: Type inference failed for: r10v11 */
    /* JADX WARN: Type inference failed for: r10v12, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r10v2 */
    /* JADX WARN: Type inference failed for: r10v22 */
    /* JADX WARN: Type inference failed for: r10v23 */
    /* JADX WARN: Type inference failed for: r10v25 */
    /* JADX WARN: Type inference failed for: r10v26, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r10v28 */
    /* JADX WARN: Type inference failed for: r10v3 */
    /* JADX WARN: Type inference failed for: r10v30 */
    /* JADX WARN: Type inference failed for: r10v31 */
    /* JADX WARN: Type inference failed for: r10v32 */
    /* JADX WARN: Type inference failed for: r10v35 */
    /* JADX WARN: Type inference failed for: r10v38 */
    /* JADX WARN: Type inference failed for: r10v39 */
    /* JADX WARN: Type inference failed for: r10v4 */
    /* JADX WARN: Type inference failed for: r10v40 */
    /* JADX WARN: Type inference failed for: r10v42 */
    /* JADX WARN: Type inference failed for: r10v43 */
    /* JADX WARN: Type inference failed for: r10v44 */
    /* JADX WARN: Type inference failed for: r10v45 */
    /* JADX WARN: Type inference failed for: r10v46 */
    /* JADX WARN: Type inference failed for: r10v47 */
    /* JADX WARN: Type inference failed for: r10v48 */
    /* JADX WARN: Type inference failed for: r10v49 */
    /* JADX WARN: Type inference failed for: r10v5, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r10v50 */
    /* JADX WARN: Type inference failed for: r10v51 */
    /* JADX WARN: Type inference failed for: r10v52 */
    /* JADX WARN: Type inference failed for: r10v53 */
    /* JADX WARN: Type inference failed for: r10v54 */
    /* JADX WARN: Type inference failed for: r10v55 */
    /* JADX WARN: Type inference failed for: r10v56 */
    /* JADX WARN: Type inference failed for: r10v57 */
    /* JADX WARN: Type inference failed for: r10v58 */
    /* JADX WARN: Type inference failed for: r10v59 */
    /* JADX WARN: Type inference failed for: r10v6 */
    /* JADX WARN: Type inference failed for: r10v60 */
    /* JADX WARN: Type inference failed for: r10v61 */
    /* JADX WARN: Type inference failed for: r10v62 */
    /* JADX WARN: Type inference failed for: r10v63 */
    /* JADX WARN: Type inference failed for: r10v64 */
    /* JADX WARN: Type inference failed for: r10v65 */
    /* JADX WARN: Type inference failed for: r10v66 */
    /* JADX WARN: Type inference failed for: r10v67 */
    /* JADX WARN: Type inference failed for: r10v68 */
    /* JADX WARN: Type inference failed for: r10v69 */
    /* JADX WARN: Type inference failed for: r10v7 */
    /* JADX WARN: Type inference failed for: r10v70 */
    /* JADX WARN: Type inference failed for: r10v71 */
    /* JADX WARN: Type inference failed for: r10v8, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r10v9, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r1v10 */
    /* JADX WARN: Type inference failed for: r1v27, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r1v28 */
    /* JADX WARN: Type inference failed for: r1v29, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r1v30 */
    /* JADX WARN: Type inference failed for: r1v31 */
    /* JADX WARN: Type inference failed for: r1v36, types: [android.content.Context, com.strmr.ps.ui.splash.SyncSplashActivity] */
    /* JADX WARN: Type inference failed for: r1v66, types: [fx4] */
    /* JADX WARN: Type inference failed for: r1v68, types: [fx4] */
    /* JADX WARN: Type inference failed for: r1v69 */
    /* JADX WARN: Type inference failed for: r1v70 */
    /* JADX WARN: Type inference failed for: r1v71 */
    /* JADX WARN: Type inference failed for: r1v72 */
    /* JADX WARN: Type inference failed for: r1v73 */
    /* JADX WARN: Type inference failed for: r1v74 */
    /* JADX WARN: Type inference failed for: r1v75 */
    /* JADX WARN: Type inference failed for: r1v76 */
    /* JADX WARN: Type inference failed for: r1v77 */
    /* JADX WARN: Type inference failed for: r1v78 */
    /* JADX WARN: Type inference failed for: r2v1, types: [r22] */
    /* JADX WARN: Type inference failed for: r2v2 */
    /* JADX WARN: Type inference failed for: r2v25, types: [android.content.Intent] */
    /* JADX WARN: Type inference failed for: r2v3 */
    /* JADX WARN: Type inference failed for: r2v31 */
    /* JADX WARN: Type inference failed for: r2v48 */
    /* JADX WARN: Type inference failed for: r2v49 */
    /* JADX WARN: Type inference failed for: r5v0, types: [java.lang.String] */
    /* JADX WARN: Type inference failed for: r5v1 */
    /* JADX WARN: Type inference failed for: r5v10 */
    /* JADX WARN: Type inference failed for: r5v11 */
    /* JADX WARN: Type inference failed for: r5v12 */
    /* JADX WARN: Type inference failed for: r5v13 */
    /* JADX WARN: Type inference failed for: r5v14 */
    /* JADX WARN: Type inference failed for: r5v15 */
    /* JADX WARN: Type inference failed for: r5v16 */
    /* JADX WARN: Type inference failed for: r5v17 */
    /* JADX WARN: Type inference failed for: r5v18, types: [int] */
    /* JADX WARN: Type inference failed for: r5v19 */
    /* JADX WARN: Type inference failed for: r5v2 */
    /* JADX WARN: Type inference failed for: r5v24 */
    /* JADX WARN: Type inference failed for: r5v25, types: [java.lang.String, kotlin.coroutines.Continuation] */
    /* JADX WARN: Type inference failed for: r5v26 */
    /* JADX WARN: Type inference failed for: r5v3 */
    /* JADX WARN: Type inference failed for: r5v30 */
    /* JADX WARN: Type inference failed for: r5v31 */
    /* JADX WARN: Type inference failed for: r5v32 */
    /* JADX WARN: Type inference failed for: r5v33 */
    /* JADX WARN: Type inference failed for: r5v34 */
    /* JADX WARN: Type inference failed for: r5v35 */
    /* JADX WARN: Type inference failed for: r5v36 */
    /* JADX WARN: Type inference failed for: r5v37 */
    /* JADX WARN: Type inference failed for: r5v38 */
    /* JADX WARN: Type inference failed for: r5v39 */
    /* JADX WARN: Type inference failed for: r5v4 */
    /* JADX WARN: Type inference failed for: r5v41 */
    /* JADX WARN: Type inference failed for: r5v42 */
    /* JADX WARN: Type inference failed for: r5v43 */
    /* JADX WARN: Type inference failed for: r5v44 */
    /* JADX WARN: Type inference failed for: r5v45 */
    /* JADX WARN: Type inference failed for: r5v46 */
    /* JADX WARN: Type inference failed for: r5v47 */
    /* JADX WARN: Type inference failed for: r5v48 */
    /* JADX WARN: Type inference failed for: r5v49 */
    /* JADX WARN: Type inference failed for: r5v5 */
    /* JADX WARN: Type inference failed for: r5v50 */
    /* JADX WARN: Type inference failed for: r5v51 */
    /* JADX WARN: Type inference failed for: r5v52 */
    /* JADX WARN: Type inference failed for: r5v53 */
    /* JADX WARN: Type inference failed for: r5v54 */
    /* JADX WARN: Type inference failed for: r5v55 */
    /* JADX WARN: Type inference failed for: r5v56 */
    /* JADX WARN: Type inference failed for: r5v57 */
    /* JADX WARN: Type inference failed for: r5v58 */
    /* JADX WARN: Type inference failed for: r5v59 */
    /* JADX WARN: Type inference failed for: r5v6 */
    /* JADX WARN: Type inference failed for: r5v60 */
    /* JADX WARN: Type inference failed for: r5v61 */
    /* JADX WARN: Type inference failed for: r5v62 */
    /* JADX WARN: Type inference failed for: r5v63 */
    /* JADX WARN: Type inference failed for: r5v64 */
    /* JADX WARN: Type inference failed for: r5v65 */
    /* JADX WARN: Type inference failed for: r5v66 */
    /* JADX WARN: Type inference failed for: r5v67 */
    /* JADX WARN: Type inference failed for: r5v68 */
    /* JADX WARN: Type inference failed for: r5v7 */
    /* JADX WARN: Type inference failed for: r5v8 */
    /* JADX WARN: Type inference failed for: r5v9 */
    /* JADX WARN: Type inference failed for: r8v0 */
    /* JADX WARN: Type inference failed for: r8v1 */
    /* JADX WARN: Type inference failed for: r8v14 */
    /* JADX WARN: Type inference failed for: r8v15, types: [java.lang.Object, java.util.concurrent.CancellationException, kotlin.coroutines.Continuation] */
    /* JADX WARN: Type inference failed for: r8v18 */
    /* JADX WARN: Type inference failed for: r8v2 */
    /* JADX WARN: Type inference failed for: r8v21 */
    /* JADX WARN: Type inference failed for: r8v24 */
    /* JADX WARN: Type inference failed for: r8v3 */
    /* JADX WARN: Type inference failed for: r8v36 */
    /* JADX WARN: Type inference failed for: r8v39 */
    /* JADX WARN: Type inference failed for: r8v4 */
    /* JADX WARN: Type inference failed for: r8v40 */
    /* JADX WARN: Type inference failed for: r8v41 */
    /* JADX WARN: Type inference failed for: r8v42 */
    /* JADX WARN: Type inference failed for: r8v43 */
    /* JADX WARN: Type inference failed for: r8v44 */
    /* JADX WARN: Type inference failed for: r8v45 */
    /* JADX WARN: Type inference failed for: r8v7 */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$UnknownArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) throws Throwable {
        ?? r10;
        ?? r8;
        ?? r5;
        ?? r82;
        ?? r102;
        ?? r103;
        String str;
        ?? r52;
        ?? r2;
        Object objAb;
        ?? r104;
        ?? r53;
        ?? r22;
        ?? r105;
        ?? r83;
        ?? r54;
        ?? r106;
        ?? r55;
        TraktAccount traktAccount;
        Object objF;
        ?? r107;
        ?? r56;
        Object objF2;
        ?? r108;
        ?? r57;
        ?? r109;
        ?? r58;
        ?? r1;
        ?? r1010;
        ?? r59;
        boolean zBooleanValue;
        boolean z;
        ?? r510;
        long jCurrentTimeMillis;
        ?? r511;
        ?? r12;
        long jCurrentTimeMillis2;
        i iVar;
        ?? r512;
        ?? r13;
        ?? r84;
        ?? r513;
        ?? r0;
        Object objF3;
        ?? r514;
        ak1 ak1Var;
        fx4 fx4VarC;
        Object objF4;
        UpdateCheckResult.UpdateAvailable updateAvailable;
        r22 r22Var;
        char c;
        pba pbaVar;
        cc9 cc9Var;
        Class cls;
        Throwable th;
        boolean z2;
        fx4 fx4Var;
        r22 r22Var2;
        String str2;
        String str3;
        cc9 cc9Var2;
        int i;
        r22 r22Var3;
        String message;
        boolean z3;
        ?? r02;
        ?? r1011;
        r22 r22Var4;
        Class cls2;
        Object objF5;
        r22 r22Var5;
        String str4;
        fx4 fx4Var2;
        r22 r22Var6;
        ?? r1012;
        int i2;
        SettingsSyncManager.b bVar;
        e6a e6aVar = e6a.a;
        ck1 ck1Var = ck1.a;
        ?? r85 = 4;
        char c2 = 4;
        ?? r1013 = 3;
        ?? r1014 = 3;
        ?? r515 = "SyncSplashActivity";
        String str5 = null;
        try {
            try {
            } catch (Exception e) {
                e = e;
            }
        } catch (Exception e2) {
            e = e2;
        }
        switch (this.e) {
            case 0:
                s38.b(obj);
                ak1Var = (ak1) this.f;
                fx4VarC = wj0.c(ak1Var, null, null, new n(this.i, null), 3);
                SyncSplashActivity syncSplashActivity = this.i;
                TextView textView = syncSplashActivity.s;
                if (textView == null) {
                    cr4.n("statusText");
                    throw null;
                }
                textView.setText(syncSplashActivity.getString(R.string.checking_for_updates));
                SyncSplashActivity syncSplashActivity2 = this.i;
                this.f = ak1Var;
                this.a = fx4VarC;
                this.e = 1;
                objF4 = SyncSplashActivity.f(syncSplashActivity2, this);
                if (objF4 != ck1Var) {
                    fx4 fx4Var3 = fx4VarC;
                    updateAvailable = (UpdateCheckResult.UpdateAvailable) objF4;
                    if (updateAvailable == null) {
                        fx4Var3.h(null);
                        updateAvailable.isForced();
                        SyncSplashActivity syncSplashActivity3 = this.i;
                        UpdateInfo updateInfo = updateAvailable.getUpdateInfo();
                        l9a l9aVar = syncSplashActivity3.m;
                        if (l9aVar == null) {
                            cr4.n("updateDialogFactory");
                            throw null;
                        }
                        k9a k9aVarA = l9aVar.a(syncSplashActivity3, updateInfo, syncSplashActivity3, new wg8(syncSplashActivity3, c2));
                        k9aVarA.show();
                        syncSplashActivity3.ab = k9aVarA;
                        return e6aVar;
                    }
                    m12 m12Var = sc2.a;
                    r22 r22VarA = wj0.a(ak1Var, m02.c, new k(this.i, null), 2);
                    String strE = this.i.i().e();
                    pba pbaVarO = e00.a(this.i.i().a).o();
                    String str6 = pbaVarO != null ? pbaVarO.b : null;
                    this.i.i().f();
                    if (strE == null || str6 == null) {
                        str = null;
                        str5 = "SyncSplashActivity";
                        r52 = 268468224;
                        r2 = r22VarA;
                        r103 = fx4Var3;
                        this.f = r103;
                        this.a = str;
                        this.b = str;
                        this.e = 6;
                        objAb = r2.ab(this);
                        r55 = r52;
                        r106 = r103;
                        if (objAb != ck1Var) {
                            traktAccount = (TraktAccount) objAb;
                            r56 = r55;
                            r107 = r106;
                            if (traktAccount != null) {
                                m12 m12Var2 = sc2.a;
                                m02 m02Var = m02.c;
                                j jVar = new j(this.i, null);
                                this.f = r106;
                                this.e = 7;
                                objF = wj0.f(m02Var, jVar, this);
                                r57 = r55;
                                r108 = r106;
                            } else {
                                if (traktAccount != null) {
                                    SyncSplashActivity syncSplashActivity4 = this.i;
                                    TextView textView2 = syncSplashActivity4.s;
                                    if (textView2 == null) {
                                        cr4.n("statusText");
                                        throw null;
                                    }
                                    textView2.setText(syncSplashActivity4.getString(R.string.sync_skip_no_trakt));
                                    ProgressBar progressBar = this.i.r;
                                    if (progressBar == null) {
                                        cr4.n("progressBar");
                                        throw null;
                                    }
                                    progressBar.setProgress(100);
                                    r58 = r56;
                                    r109 = r107;
                                    r1 = r109;
                                    r510 = r58;
                                    jCurrentTimeMillis = 5000 + System.currentTimeMillis();
                                    r12 = r1;
                                    r511 = r510;
                                    if (traktAccount != null) {
                                        long jCurrentTimeMillis3 = jCurrentTimeMillis - System.currentTimeMillis();
                                        r12 = r1;
                                        r511 = r510;
                                        if (jCurrentTimeMillis3 <= 0) {
                                            jCurrentTimeMillis2 = jCurrentTimeMillis - System.currentTimeMillis();
                                            r13 = r12;
                                            r512 = r511;
                                            if (jCurrentTimeMillis2 <= 0) {
                                                try {
                                                    iVar = new i(this.i, null);
                                                    this.f = r12;
                                                    this.a = null;
                                                    this.e = 12;
                                                    r13 = r12;
                                                    r512 = r511;
                                                } catch (Exception e3) {
                                                    e = e3;
                                                    Log.w(str5, "Failed to pre-load watch status", e);
                                                    r13 = r12;
                                                    r512 = r511;
                                                }
                                                if (qo9.c(jCurrentTimeMillis2, iVar, this) != ck1Var) {
                                                    ?? r03 = r13;
                                                    this.f = r03;
                                                    r84 = 0;
                                                    this.a = null;
                                                    this.e = 13;
                                                    r0 = r03;
                                                    r513 = r512;
                                                    if (h32.a(300L, this) != ck1Var) {
                                                        r0.h(r84);
                                                        m12 m12Var3 = sc2.a;
                                                        m02 m02Var2 = m02.c;
                                                        l lVar = new l(this.i, r84);
                                                        this.f = r84;
                                                        this.e = 14;
                                                        objF3 = wj0.f(m02Var2, lVar, this);
                                                        r514 = r513;
                                                    }
                                                }
                                                break;
                                            }
                                        } else {
                                            TextView textView3 = this.i.s;
                                            if (textView3 == null) {
                                                cr4.n("statusText");
                                                throw null;
                                            }
                                            textView3.setText("Loading...");
                                            PreferencesRepository preferencesRepository = this.i.n;
                                            if (preferencesRepository == null) {
                                                cr4.n("preferencesRepository");
                                                throw null;
                                            }
                                            try {
                                                g gVar = new g(System.currentTimeMillis() - preferencesRepository.getLastTraktSyncAtMs() < 300000, this.i, null);
                                                this.f = r1;
                                                this.a = null;
                                                this.d = jCurrentTimeMillis;
                                                this.e = 11;
                                                r12 = r1;
                                                r511 = r510;
                                                if (qo9.c(jCurrentTimeMillis3, gVar, this) != ck1Var) {
                                                }
                                            } catch (Exception e4) {
                                                e = e4;
                                                Log.w(str5, "Failed to pre-load Continue Watching", e);
                                                r12 = r1;
                                                r511 = r510;
                                            }
                                        }
                                    }
                                    return e6aVar;
                                }
                                m12 m12Var4 = sc2.a;
                                m02 m02Var3 = m02.c;
                                m mVar = new m(this.i, null);
                                this.f = r107;
                                this.a = traktAccount;
                                this.e = 8;
                                objF2 = wj0.f(m02Var3, mVar, this);
                                r59 = r56;
                                r1010 = r107;
                                if (objF2 != ck1Var) {
                                    zBooleanValue = ((Boolean) objF2).booleanValue();
                                    z = traktAccount.getLastSyncAt() == null;
                                    if (zBooleanValue || !z) {
                                        if (!z) {
                                            TextView textView4 = this.i.s;
                                            if (textView4 == null) {
                                                cr4.n("statusText");
                                                throw null;
                                            }
                                            textView4.setText("Syncing library...");
                                            System.currentTimeMillis();
                                            SyncSplashActivity syncSplashActivity5 = this.i;
                                            this.f = r1010;
                                            this.a = traktAccount;
                                            this.e = 10;
                                            r58 = r59;
                                            r109 = r1010;
                                            break;
                                        } else {
                                            TextView textView5 = this.i.s;
                                            if (textView5 == null) {
                                                cr4.n("statusText");
                                                throw null;
                                            }
                                            textView5.setText("Setting up your library...");
                                            System.currentTimeMillis();
                                            SyncSplashActivity syncSplashActivity6 = this.i;
                                            this.f = r1010;
                                            this.a = traktAccount;
                                            this.e = 9;
                                            r58 = r59;
                                            r109 = r1010;
                                            break;
                                        }
                                        jCurrentTimeMillis = 5000 + System.currentTimeMillis();
                                        r12 = r1;
                                        r511 = r510;
                                        if (traktAccount != null) {
                                        }
                                        return e6aVar;
                                    }
                                    TextView textView6 = this.i.s;
                                    if (textView6 == null) {
                                        cr4.n("statusText");
                                        throw null;
                                    }
                                    textView6.setText("Loading...");
                                    ProgressBar progressBar2 = this.i.r;
                                    if (progressBar2 == null) {
                                        cr4.n("progressBar");
                                        throw null;
                                    }
                                    progressBar2.setProgress(100);
                                    TraktSyncWorker.a.b(this.i);
                                    r58 = r59;
                                    r109 = r1010;
                                    r1 = r109;
                                    r510 = r58;
                                    jCurrentTimeMillis = 5000 + System.currentTimeMillis();
                                    r12 = r1;
                                    r511 = r510;
                                    if (traktAccount != null) {
                                    }
                                    return e6aVar;
                                }
                            }
                        }
                    } else {
                        TextView textView7 = this.i.s;
                        if (textView7 == null) {
                            cr4.n("statusText");
                            throw null;
                        }
                        textView7.setText("Syncing cloud settings...");
                        try {
                            pbaVar = new pba(strE, str6, null, null, 3600L, "bearer", null, 396);
                            try {
                                cc9Var = this.i.q;
                            } catch (Exception e5) {
                                e = e5;
                                r22Var = r22VarA;
                                str5 = "SyncSplashActivity";
                            }
                        } catch (Exception e6) {
                            e = e6;
                            r22Var = r22VarA;
                            str5 = "SyncSplashActivity";
                        }
                        if (cc9Var != null) {
                            vx vxVarA = e00.a(cc9Var);
                            this.f = fx4Var3;
                            this.a = r22VarA;
                            this.b = strE;
                            this.e = 2;
                            r22Var = r22VarA;
                            cls = DeviceLinkActivity.class;
                            th = null;
                            str5 = "SyncSplashActivity";
                            z2 = false;
                            try {
                            } catch (Exception e7) {
                                e = e7;
                                c = 32768;
                                r82 = r22Var;
                                r5 = c;
                                r102 = fx4Var3;
                            }
                            if (vx.b.a(vxVarA, pbaVar, true, null, this, 4) != ck1Var) {
                                fx4Var = fx4Var3;
                                r22Var2 = r22Var;
                                str2 = strE;
                                try {
                                    cc9Var2 = this.i.q;
                                } catch (Exception e8) {
                                    e = e8;
                                    str3 = str2;
                                    r1014 = fx4Var;
                                    r22Var3 = r22Var2;
                                    try {
                                        Log.w(str5, "Session refresh failed", e);
                                        message = e.getMessage();
                                        if (message == null) {
                                            message = "";
                                        }
                                        if (n89.l(message, "Invalid Refresh Token", z2)) {
                                            try {
                                                if (n89.l(message, "Already Used", z2) || n89.l(message, "expired", z2) || n89.l(message, "User not found", z2)) {
                                                    Log.w(str5, "Session permanently invalid — account may have been deleted.");
                                                    r02 = z2;
                                                    z3 = true;
                                                    r22Var4 = r22Var3;
                                                    r1011 = r1014;
                                                } else {
                                                    Log.w(str5, "Session refresh failed (transient) — skipping cloud sync.");
                                                    boolean z4 = z2;
                                                    z3 = z4 ? 1 : 0;
                                                    r02 = z4;
                                                    r22Var4 = r22Var3;
                                                    r1011 = r1014;
                                                }
                                            } catch (Exception e9) {
                                                e = e9;
                                                r8 = r22Var3;
                                                r10 = r1014;
                                                r5 = 268468224;
                                                r82 = r8;
                                                r102 = r10;
                                            }
                                        }
                                    } catch (Exception e10) {
                                        e = e10;
                                        r515 = 268468224;
                                        r82 = r22Var3;
                                        r5 = r515;
                                        r102 = r1014;
                                    }
                                    return e6aVar;
                                }
                                if (cc9Var2 != null) {
                                    cr4.n("supabaseClient");
                                    throw th;
                                }
                                vx vxVarA2 = e00.a(cc9Var2);
                                this.f = fx4Var;
                                this.a = r22Var2;
                                this.b = str2;
                                this.c = 1;
                                this.e = 3;
                                if (vxVarA2.j(this) != ck1Var) {
                                    i = 1;
                                    r22Var6 = r22Var2;
                                    fx4Var2 = fx4Var;
                                    str3 = str2;
                                    r1011 = fx4Var2;
                                    z3 = z2;
                                    r02 = i;
                                    r22Var4 = r22Var6;
                                    if (!z3 && this.i.i().h()) {
                                        Log.w(str5, "Clearing local data and redirecting to device link.");
                                        m12 m12Var5 = sc2.a;
                                        m02 m02Var4 = m02.c;
                                        ?? r516 = th;
                                        e eVar = new e(this.i, r516);
                                        this.f = r1011;
                                        this.a = r22Var4;
                                        this.b = r516;
                                        this.e = 4;
                                        r22Var3 = r22Var4;
                                        r1014 = r1011;
                                        if (wj0.f(m02Var4, eVar, this) == ck1Var) {
                                        }
                                        this.i.i().b();
                                        Toast.makeText(this.i, "Your session has expired. Please link your device again.", 1).show();
                                        Intent intent = new Intent(this.i, (Class<?>) cls);
                                        intent.setFlags(268468224);
                                        this.i.startActivity(intent);
                                        this.i.finish();
                                        return e6aVar;
                                    }
                                    cls2 = cls;
                                    r53 = 268468224;
                                    i2 = 268468224;
                                    r22 = r22Var4;
                                    r104 = r1011;
                                    if (r02 != 0) {
                                        cc9 cc9Var3 = this.i.q;
                                        if (cc9Var3 == null) {
                                            cr4.n("supabaseClient");
                                            throw null;
                                        }
                                        pba pbaVarO2 = e00.a(cc9Var3).o();
                                        if (pbaVarO2 != null && (str4 = pbaVarO2.a) != null) {
                                            str3 = str4;
                                        }
                                        m12 m12Var6 = sc2.a;
                                        m02 m02Var5 = m02.c;
                                        p pVar = new p(this.i, str3, null);
                                        this.f = r1011;
                                        this.a = r22Var4;
                                        this.b = null;
                                        this.e = 5;
                                        objF5 = wj0.f(m02Var5, pVar, this);
                                        if (objF5 != ck1Var) {
                                            r22Var5 = r22Var4;
                                            r1012 = r1011;
                                            try {
                                                bVar = (SettingsSyncManager.b) objF5;
                                            } catch (Exception e11) {
                                                e = e11;
                                                r5 = i2;
                                                r82 = r22Var5;
                                                r102 = r1012;
                                                Boxing.boxInt(Log.e(str5, "Failed to sync cloud settings", e));
                                                r54 = r5;
                                                r83 = r82;
                                                r105 = r102;
                                            }
                                            if (!(bVar instanceof SettingsSyncManager.b.c)) {
                                                r54 = i2;
                                                r83 = r22Var5;
                                                r105 = r1012;
                                            } else {
                                                if (bVar instanceof SettingsSyncManager.b.a) {
                                                    Log.w(str5, "Account deleted from dashboard — redirecting to device link.");
                                                    Toast.makeText(this.i, "Your account was deleted. Please link your device again.", 1).show();
                                                    Intent intent2 = new Intent(this.i, (Class<?>) cls2);
                                                    intent2.setFlags(i2);
                                                    this.i.startActivity(intent2);
                                                    this.i.finish();
                                                    return e6aVar;
                                                }
                                                if (bVar instanceof SettingsSyncManager.b.C0105b) {
                                                    Log.w(str5, "Cloud settings sync failed");
                                                    r54 = i2;
                                                    r83 = r22Var5;
                                                    r105 = r1012;
                                                } else {
                                                    if (bVar != null) {
                                                        throw new io6();
                                                    }
                                                    Log.w(str5, "Cloud settings sync timed out (3s) — continuing");
                                                    r54 = i2;
                                                    r83 = r22Var5;
                                                    r105 = r1012;
                                                }
                                            }
                                            r22 = r83;
                                            r53 = r54;
                                            r104 = r105;
                                        }
                                    }
                                    str = null;
                                    r2 = r22;
                                    r52 = r53;
                                    r103 = r104;
                                    this.f = r103;
                                    this.a = str;
                                    this.b = str;
                                    this.e = 6;
                                    objAb = r2.ab(this);
                                    r55 = r52;
                                    r106 = r103;
                                    if (objAb != ck1Var) {
                                    }
                                }
                            }
                            break;
                        } else {
                            r22Var = r22VarA;
                            str5 = "SyncSplashActivity";
                            c = 32768;
                            try {
                                cr4.n("supabaseClient");
                                throw null;
                            } catch (Exception e12) {
                                e = e12;
                            }
                        }
                        c = 32768;
                        r82 = r22Var;
                        r5 = c;
                        r102 = fx4Var3;
                        Boxing.boxInt(Log.e(str5, "Failed to sync cloud settings", e));
                        r54 = r5;
                        r83 = r82;
                        r105 = r102;
                        r22 = r83;
                        r53 = r54;
                        r104 = r105;
                        str = null;
                        r2 = r22;
                        r52 = r53;
                        r103 = r104;
                        this.f = r103;
                        this.a = str;
                        this.b = str;
                        this.e = 6;
                        objAb = r2.ab(this);
                        r55 = r52;
                        r106 = r103;
                        if (objAb != ck1Var) {
                        }
                    }
                    break;
                }
                return ck1Var;
            case 1:
                fx4VarC = (fx4) this.a;
                ak1Var = (ak1) this.f;
                s38.b(obj);
                objF4 = obj;
                fx4 fx4Var32 = fx4VarC;
                updateAvailable = (UpdateCheckResult.UpdateAvailable) objF4;
                if (updateAvailable == null) {
                }
                break;
            case 2:
                String str7 = this.b;
                r22 r22Var7 = (r22) this.a;
                fx4 fx4Var4 = (fx4) this.f;
                try {
                    s38.b(obj);
                    str2 = str7;
                    cls = DeviceLinkActivity.class;
                    th = null;
                    z2 = false;
                    str5 = "SyncSplashActivity";
                    r22Var2 = r22Var7;
                    fx4Var = fx4Var4;
                    cc9Var2 = this.i.q;
                    if (cc9Var2 != null) {
                    }
                } catch (Exception e13) {
                    e = e13;
                    r85 = r22Var7;
                    r1013 = fx4Var4;
                    str5 = "SyncSplashActivity";
                    r8 = r85;
                    r10 = r1013;
                    r5 = 268468224;
                    r82 = r8;
                    r102 = r10;
                    break;
                }
                break;
            case 3:
                int i3 = this.c;
                str2 = this.b;
                r22 r22Var8 = (r22) this.a;
                fx4 fx4Var5 = (fx4) this.f;
                try {
                    s38.b(obj);
                    cls = DeviceLinkActivity.class;
                    th = null;
                    z2 = false;
                    str5 = "SyncSplashActivity";
                    i = i3;
                    r22Var6 = r22Var8;
                    fx4Var2 = fx4Var5;
                    str3 = str2;
                    r1011 = fx4Var2;
                    z3 = z2;
                    r02 = i;
                    r22Var4 = r22Var6;
                } catch (Exception e14) {
                    e = e14;
                    cls = DeviceLinkActivity.class;
                    str3 = str2;
                    th = null;
                    z2 = false;
                    r1014 = fx4Var5;
                    str5 = "SyncSplashActivity";
                    r22Var3 = r22Var8;
                    Log.w(str5, "Session refresh failed", e);
                    message = e.getMessage();
                    if (message == null) {
                    }
                    if (n89.l(message, "Invalid Refresh Token", z2)) {
                    }
                    return e6aVar;
                }
                if (!z3) {
                    cls2 = cls;
                    r53 = 268468224;
                    i2 = 268468224;
                    r22 = r22Var4;
                    r104 = r1011;
                    if (r02 != 0) {
                    }
                    str = null;
                    r2 = r22;
                    r52 = r53;
                    r103 = r104;
                    this.f = r103;
                    this.a = str;
                    this.b = str;
                    this.e = 6;
                    objAb = r2.ab(this);
                    r55 = r52;
                    r106 = r103;
                    if (objAb != ck1Var) {
                    }
                    return ck1Var;
                }
                return e6aVar;
            case 4:
                r22 r22Var9 = (r22) this.a;
                fx4 fx4Var6 = (fx4) this.f;
                s38.b(obj);
                cls = DeviceLinkActivity.class;
                str5 = "SyncSplashActivity";
                r22Var3 = r22Var9;
                r1014 = fx4Var6;
                this.i.i().b();
                Toast.makeText(this.i, "Your session has expired. Please link your device again.", 1).show();
                Intent intent3 = new Intent(this.i, (Class<?>) cls);
                intent3.setFlags(268468224);
                this.i.startActivity(intent3);
                this.i.finish();
                return e6aVar;
            case 5:
                r22 r22Var10 = (r22) this.a;
                fx4 fx4Var7 = (fx4) this.f;
                s38.b(obj);
                objF5 = obj;
                cls2 = DeviceLinkActivity.class;
                str5 = "SyncSplashActivity";
                i2 = 268468224;
                r22Var5 = r22Var10;
                r1012 = fx4Var7;
                bVar = (SettingsSyncManager.b) objF5;
                if (!(bVar instanceof SettingsSyncManager.b.c)) {
                }
                r22 = r83;
                r53 = r54;
                r104 = r105;
                str = null;
                r2 = r22;
                r52 = r53;
                r103 = r104;
                this.f = r103;
                this.a = str;
                this.b = str;
                this.e = 6;
                objAb = r2.ab(this);
                r55 = r52;
                r106 = r103;
                if (objAb != ck1Var) {
                }
                return ck1Var;
            case 6:
                fx4 fx4Var8 = (fx4) this.f;
                s38.b(obj);
                r106 = fx4Var8;
                str5 = "SyncSplashActivity";
                r55 = 268468224;
                objAb = obj;
                traktAccount = (TraktAccount) objAb;
                r56 = r55;
                r107 = r106;
                if (traktAccount != null) {
                }
                return ck1Var;
            case 7:
                fx4 fx4Var9 = (fx4) this.f;
                s38.b(obj);
                r108 = fx4Var9;
                str5 = "SyncSplashActivity";
                r57 = 268468224;
                objF = obj;
                traktAccount = (TraktAccount) objF;
                r56 = r57;
                r107 = r108;
                if (traktAccount != null) {
                }
                break;
            case 8:
                traktAccount = (TraktAccount) this.a;
                fx4 fx4Var10 = (fx4) this.f;
                s38.b(obj);
                r1010 = fx4Var10;
                str5 = "SyncSplashActivity";
                r59 = 268468224;
                objF2 = obj;
                zBooleanValue = ((Boolean) objF2).booleanValue();
                if (traktAccount.getLastSyncAt() == null) {
                }
                if (zBooleanValue) {
                    if (!z) {
                    }
                    jCurrentTimeMillis = 5000 + System.currentTimeMillis();
                    r12 = r1;
                    r511 = r510;
                    if (traktAccount != null) {
                    }
                }
                return e6aVar;
            case 9:
            case 10:
                traktAccount = (TraktAccount) this.a;
                fx4 fx4Var11 = (fx4) this.f;
                s38.b(obj);
                str5 = "SyncSplashActivity";
                r510 = 268468224;
                r1 = fx4Var11;
                jCurrentTimeMillis = 5000 + System.currentTimeMillis();
                r12 = r1;
                r511 = r510;
                if (traktAccount != null) {
                }
                return e6aVar;
            case 11:
                jCurrentTimeMillis = this.d;
                r1 = (fx4) this.f;
                try {
                    s38.b(obj);
                    str5 = "SyncSplashActivity";
                    r511 = 268468224;
                    r12 = r1;
                } catch (Exception e15) {
                    e = e15;
                    str5 = "SyncSplashActivity";
                    r510 = 268468224;
                    Log.w(str5, "Failed to pre-load Continue Watching", e);
                    r12 = r1;
                    r511 = r510;
                }
                jCurrentTimeMillis2 = jCurrentTimeMillis - System.currentTimeMillis();
                r13 = r12;
                r512 = r511;
                if (jCurrentTimeMillis2 <= 0) {
                }
                return e6aVar;
            case 12:
                r12 = (fx4) this.f;
                try {
                    s38.b(obj);
                    r512 = 268468224;
                    r13 = r12;
                } catch (Exception e16) {
                    e = e16;
                    str5 = "SyncSplashActivity";
                    r511 = 268468224;
                    Log.w(str5, "Failed to pre-load watch status", e);
                    r13 = r12;
                    r512 = r511;
                }
                ?? r032 = r13;
                this.f = r032;
                r84 = 0;
                this.a = null;
                this.e = 13;
                r0 = r032;
                r513 = r512;
                if (h32.a(300L, this) != ck1Var) {
                }
                return ck1Var;
            case 13:
                fx4 fx4Var12 = (fx4) this.f;
                s38.b(obj);
                r84 = 0;
                r513 = 268468224;
                r0 = fx4Var12;
                r0.h(r84);
                m12 m12Var32 = sc2.a;
                m02 m02Var22 = m02.c;
                l lVar2 = new l(this.i, r84);
                this.f = r84;
                this.e = 14;
                objF3 = wj0.f(m02Var22, lVar2, this);
                r514 = r513;
                break;
            case 14:
                s38.b(obj);
                objF3 = obj;
                r514 = 268468224;
                if (((List) objF3).size() <= 1) {
                    Class cls3 = PlatformUtils.a.a(this.i) ? MainActivity.class : MobileMainActivity.class;
                    eq.a = true;
                    ?? r14 = this.i;
                    ?? intent4 = new Intent(this.i, (Class<?>) cls3);
                    intent4.setFlags(r514);
                    r14.startActivity(intent4);
                    this.i.finish();
                } else {
                    PreferencesRepository preferencesRepository2 = this.i.n;
                    if (preferencesRepository2 == null) {
                        cr4.n("preferencesRepository");
                        throw null;
                    }
                    if (preferencesRepository2.getShowProfilePickerOnStart()) {
                        this.i.startActivity(new Intent(this.i, (Class<?>) ProfilePickerActivity.class));
                        this.i.finish();
                    }
                }
                return e6aVar;
            default:
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
    }
}
