package i3;

import V2.AbstractC0696m3;
import android.content.Context;
import com.revenuecat.purchases.subscriberattributes.SubscriberAttributeKt;
import g3.AbstractC2060b;
import h3.C2167o4;
import j$.time.Instant;
import j$.time.ZoneOffset;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import m3.AbstractC2467b;
import org.json.JSONArray;
import org.json.JSONObject;
import w4.C3137A;
import x4.AbstractC3229F;
import x4.AbstractC3251q;

/* JADX INFO: loaded from: classes.dex */
public final class w extends C4.j implements J4.e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public AtomicInteger f19032a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public Object f19033b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public Object f19034c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public Object f19035d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public Object f19036e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public Object f19037f;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public Map f19038j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public Map f19039k;
    public Map l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public Object f19040m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public Object f19041n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public Set f19042o;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public Object f19043p;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public LinkedHashMap f19044q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public int f19045r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public int f19046s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public int f19047t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public int f19048u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final /* synthetic */ J f19049v;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public w(J j4, A4.d dVar) {
        super(2, dVar);
        this.f19049v = j4;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new w(this.f19049v, dVar);
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((w) create((V4.C) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:103:0x04aa A[Catch: all -> 0x0104, TRY_LEAVE, TryCatch #1 {all -> 0x0104, blocks: (B:281:0x09e3, B:283:0x09f0, B:285:0x09f7, B:319:0x0aac, B:289:0x0a0d, B:292:0x0a1c, B:294:0x0a2a, B:296:0x0a35, B:298:0x0a4d, B:305:0x0a74, B:308:0x0a7d, B:310:0x0a87, B:312:0x0a8e, B:314:0x0a98, B:318:0x0aa7, B:320:0x0abc, B:321:0x0ac6, B:323:0x0acc, B:324:0x0ae2, B:325:0x0afd, B:327:0x0b03, B:328:0x0b0d, B:331:0x0b28, B:12:0x00bf, B:17:0x0158, B:20:0x01ce, B:23:0x0235, B:26:0x029d, B:29:0x02f9, B:96:0x0483, B:101:0x0490, B:103:0x04aa, B:109:0x04d6, B:111:0x04e3, B:113:0x04e9, B:117:0x04f3, B:119:0x04fd, B:121:0x0503, B:166:0x05d3, B:124:0x0513, B:126:0x051f, B:129:0x0531, B:131:0x053d, B:135:0x054c, B:137:0x0552, B:138:0x055a, B:140:0x0562, B:142:0x0568, B:145:0x0578, B:147:0x0584, B:151:0x0593, B:153:0x0599, B:154:0x05a2, B:155:0x05ad, B:157:0x05b3, B:161:0x05bd, B:163:0x05c7, B:165:0x05cd, B:167:0x05e4, B:171:0x0610, B:180:0x0672, B:182:0x0678, B:188:0x06a4, B:32:0x033f, B:37:0x039f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:170:0x060e A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:180:0x0672 A[Catch: all -> 0x0104, TRY_ENTER, TryCatch #1 {all -> 0x0104, blocks: (B:281:0x09e3, B:283:0x09f0, B:285:0x09f7, B:319:0x0aac, B:289:0x0a0d, B:292:0x0a1c, B:294:0x0a2a, B:296:0x0a35, B:298:0x0a4d, B:305:0x0a74, B:308:0x0a7d, B:310:0x0a87, B:312:0x0a8e, B:314:0x0a98, B:318:0x0aa7, B:320:0x0abc, B:321:0x0ac6, B:323:0x0acc, B:324:0x0ae2, B:325:0x0afd, B:327:0x0b03, B:328:0x0b0d, B:331:0x0b28, B:12:0x00bf, B:17:0x0158, B:20:0x01ce, B:23:0x0235, B:26:0x029d, B:29:0x02f9, B:96:0x0483, B:101:0x0490, B:103:0x04aa, B:109:0x04d6, B:111:0x04e3, B:113:0x04e9, B:117:0x04f3, B:119:0x04fd, B:121:0x0503, B:166:0x05d3, B:124:0x0513, B:126:0x051f, B:129:0x0531, B:131:0x053d, B:135:0x054c, B:137:0x0552, B:138:0x055a, B:140:0x0562, B:142:0x0568, B:145:0x0578, B:147:0x0584, B:151:0x0593, B:153:0x0599, B:154:0x05a2, B:155:0x05ad, B:157:0x05b3, B:161:0x05bd, B:163:0x05c7, B:165:0x05cd, B:167:0x05e4, B:171:0x0610, B:180:0x0672, B:182:0x0678, B:188:0x06a4, B:32:0x033f, B:37:0x039f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:193:0x06cf A[Catch: all -> 0x0068, LOOP:6: B:191:0x06c9->B:193:0x06cf, LOOP_END, TryCatch #5 {all -> 0x0068, blocks: (B:7:0x004d, B:269:0x08e6, B:270:0x0915, B:272:0x091b, B:273:0x0944, B:274:0x094e, B:276:0x0954, B:277:0x098c, B:246:0x084a, B:205:0x0737, B:209:0x0749, B:214:0x075e, B:216:0x076c, B:219:0x0781, B:221:0x0795, B:223:0x07a0, B:225:0x07aa, B:227:0x07bf, B:230:0x07c8, B:242:0x080a, B:186:0x06a1, B:190:0x06ac, B:191:0x06c9, B:193:0x06cf, B:194:0x06f5, B:196:0x06fe, B:202:0x070b, B:207:0x0741, B:176:0x065f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:196:0x06fe A[Catch: all -> 0x0068, TryCatch #5 {all -> 0x0068, blocks: (B:7:0x004d, B:269:0x08e6, B:270:0x0915, B:272:0x091b, B:273:0x0944, B:274:0x094e, B:276:0x0954, B:277:0x098c, B:246:0x084a, B:205:0x0737, B:209:0x0749, B:214:0x075e, B:216:0x076c, B:219:0x0781, B:221:0x0795, B:223:0x07a0, B:225:0x07aa, B:227:0x07bf, B:230:0x07c8, B:242:0x080a, B:186:0x06a1, B:190:0x06ac, B:191:0x06c9, B:193:0x06cf, B:194:0x06f5, B:196:0x06fe, B:202:0x070b, B:207:0x0741, B:176:0x065f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:198:0x0704 A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:202:0x070b A[Catch: all -> 0x0068, TryCatch #5 {all -> 0x0068, blocks: (B:7:0x004d, B:269:0x08e6, B:270:0x0915, B:272:0x091b, B:273:0x0944, B:274:0x094e, B:276:0x0954, B:277:0x098c, B:246:0x084a, B:205:0x0737, B:209:0x0749, B:214:0x075e, B:216:0x076c, B:219:0x0781, B:221:0x0795, B:223:0x07a0, B:225:0x07aa, B:227:0x07bf, B:230:0x07c8, B:242:0x080a, B:186:0x06a1, B:190:0x06ac, B:191:0x06c9, B:193:0x06cf, B:194:0x06f5, B:196:0x06fe, B:202:0x070b, B:207:0x0741, B:176:0x065f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:207:0x0741 A[Catch: all -> 0x0068, TryCatch #5 {all -> 0x0068, blocks: (B:7:0x004d, B:269:0x08e6, B:270:0x0915, B:272:0x091b, B:273:0x0944, B:274:0x094e, B:276:0x0954, B:277:0x098c, B:246:0x084a, B:205:0x0737, B:209:0x0749, B:214:0x075e, B:216:0x076c, B:219:0x0781, B:221:0x0795, B:223:0x07a0, B:225:0x07aa, B:227:0x07bf, B:230:0x07c8, B:242:0x080a, B:186:0x06a1, B:190:0x06ac, B:191:0x06c9, B:193:0x06cf, B:194:0x06f5, B:196:0x06fe, B:202:0x070b, B:207:0x0741, B:176:0x065f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:209:0x0749 A[Catch: all -> 0x0068, TRY_LEAVE, TryCatch #5 {all -> 0x0068, blocks: (B:7:0x004d, B:269:0x08e6, B:270:0x0915, B:272:0x091b, B:273:0x0944, B:274:0x094e, B:276:0x0954, B:277:0x098c, B:246:0x084a, B:205:0x0737, B:209:0x0749, B:214:0x075e, B:216:0x076c, B:219:0x0781, B:221:0x0795, B:223:0x07a0, B:225:0x07aa, B:227:0x07bf, B:230:0x07c8, B:242:0x080a, B:186:0x06a1, B:190:0x06ac, B:191:0x06c9, B:193:0x06cf, B:194:0x06f5, B:196:0x06fe, B:202:0x070b, B:207:0x0741, B:176:0x065f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:214:0x075e A[Catch: all -> 0x0068, TRY_ENTER, TryCatch #5 {all -> 0x0068, blocks: (B:7:0x004d, B:269:0x08e6, B:270:0x0915, B:272:0x091b, B:273:0x0944, B:274:0x094e, B:276:0x0954, B:277:0x098c, B:246:0x084a, B:205:0x0737, B:209:0x0749, B:214:0x075e, B:216:0x076c, B:219:0x0781, B:221:0x0795, B:223:0x07a0, B:225:0x07aa, B:227:0x07bf, B:230:0x07c8, B:242:0x080a, B:186:0x06a1, B:190:0x06ac, B:191:0x06c9, B:193:0x06cf, B:194:0x06f5, B:196:0x06fe, B:202:0x070b, B:207:0x0741, B:176:0x065f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:238:0x07f5  */
    /* JADX WARN: Removed duplicated region for block: B:241:0x0808  */
    /* JADX WARN: Removed duplicated region for block: B:268:0x08db  */
    /* JADX WARN: Removed duplicated region for block: B:272:0x091b A[Catch: all -> 0x0068, LOOP:3: B:270:0x0915->B:272:0x091b, LOOP_END, TryCatch #5 {all -> 0x0068, blocks: (B:7:0x004d, B:269:0x08e6, B:270:0x0915, B:272:0x091b, B:273:0x0944, B:274:0x094e, B:276:0x0954, B:277:0x098c, B:246:0x084a, B:205:0x0737, B:209:0x0749, B:214:0x075e, B:216:0x076c, B:219:0x0781, B:221:0x0795, B:223:0x07a0, B:225:0x07aa, B:227:0x07bf, B:230:0x07c8, B:242:0x080a, B:186:0x06a1, B:190:0x06ac, B:191:0x06c9, B:193:0x06cf, B:194:0x06f5, B:196:0x06fe, B:202:0x070b, B:207:0x0741, B:176:0x065f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:276:0x0954 A[Catch: all -> 0x0068, LOOP:4: B:274:0x094e->B:276:0x0954, LOOP_END, TryCatch #5 {all -> 0x0068, blocks: (B:7:0x004d, B:269:0x08e6, B:270:0x0915, B:272:0x091b, B:273:0x0944, B:274:0x094e, B:276:0x0954, B:277:0x098c, B:246:0x084a, B:205:0x0737, B:209:0x0749, B:214:0x075e, B:216:0x076c, B:219:0x0781, B:221:0x0795, B:223:0x07a0, B:225:0x07aa, B:227:0x07bf, B:230:0x07c8, B:242:0x080a, B:186:0x06a1, B:190:0x06ac, B:191:0x06c9, B:193:0x06cf, B:194:0x06f5, B:196:0x06fe, B:202:0x070b, B:207:0x0741, B:176:0x065f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:280:0x09d8  */
    /* JADX WARN: Removed duplicated region for block: B:283:0x09f0 A[Catch: all -> 0x0104, TryCatch #1 {all -> 0x0104, blocks: (B:281:0x09e3, B:283:0x09f0, B:285:0x09f7, B:319:0x0aac, B:289:0x0a0d, B:292:0x0a1c, B:294:0x0a2a, B:296:0x0a35, B:298:0x0a4d, B:305:0x0a74, B:308:0x0a7d, B:310:0x0a87, B:312:0x0a8e, B:314:0x0a98, B:318:0x0aa7, B:320:0x0abc, B:321:0x0ac6, B:323:0x0acc, B:324:0x0ae2, B:325:0x0afd, B:327:0x0b03, B:328:0x0b0d, B:331:0x0b28, B:12:0x00bf, B:17:0x0158, B:20:0x01ce, B:23:0x0235, B:26:0x029d, B:29:0x02f9, B:96:0x0483, B:101:0x0490, B:103:0x04aa, B:109:0x04d6, B:111:0x04e3, B:113:0x04e9, B:117:0x04f3, B:119:0x04fd, B:121:0x0503, B:166:0x05d3, B:124:0x0513, B:126:0x051f, B:129:0x0531, B:131:0x053d, B:135:0x054c, B:137:0x0552, B:138:0x055a, B:140:0x0562, B:142:0x0568, B:145:0x0578, B:147:0x0584, B:151:0x0593, B:153:0x0599, B:154:0x05a2, B:155:0x05ad, B:157:0x05b3, B:161:0x05bd, B:163:0x05c7, B:165:0x05cd, B:167:0x05e4, B:171:0x0610, B:180:0x0672, B:182:0x0678, B:188:0x06a4, B:32:0x033f, B:37:0x039f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:287:0x09fd  */
    /* JADX WARN: Removed duplicated region for block: B:300:0x0a53 A[PHI: r0 r4 r14 r15 r17 r51
      0x0a53: PHI (r0v67 java.lang.String) = (r0v69 java.lang.String), (r0v74 java.lang.String), (r0v74 java.lang.String) binds: [B:306:0x0a79, B:297:0x0a4b, B:299:0x0a51] A[DONT_GENERATE, DONT_INLINE]
      0x0a53: PHI (r4v75 java.lang.String) = (r4v76 java.lang.String), (r4v79 java.lang.String), (r4v79 java.lang.String) binds: [B:306:0x0a79, B:297:0x0a4b, B:299:0x0a51] A[DONT_GENERATE, DONT_INLINE]
      0x0a53: PHI (r14v35 java.lang.Object) = (r14v36 java.lang.Object), (r14v37 java.lang.Object), (r14v37 java.lang.Object) binds: [B:306:0x0a79, B:297:0x0a4b, B:299:0x0a51] A[DONT_GENERATE, DONT_INLINE]
      0x0a53: PHI (r15v37 java.lang.String) = (r15v38 java.lang.String), (r15v39 java.lang.String), (r15v39 java.lang.String) binds: [B:306:0x0a79, B:297:0x0a4b, B:299:0x0a51] A[DONT_GENERATE, DONT_INLINE]
      0x0a53: PHI (r17v16 java.util.Map) = (r17v17 java.util.Map), (r17v21 java.util.Map), (r17v21 java.util.Map) binds: [B:306:0x0a79, B:297:0x0a4b, B:299:0x0a51] A[DONT_GENERATE, DONT_INLINE]
      0x0a53: PHI (r51v19 org.json.JSONArray) = (r51v20 org.json.JSONArray), (r51v22 org.json.JSONArray), (r51v22 org.json.JSONArray) binds: [B:306:0x0a79, B:297:0x0a4b, B:299:0x0a51] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:323:0x0acc A[Catch: all -> 0x0104, LOOP:1: B:321:0x0ac6->B:323:0x0acc, LOOP_END, TryCatch #1 {all -> 0x0104, blocks: (B:281:0x09e3, B:283:0x09f0, B:285:0x09f7, B:319:0x0aac, B:289:0x0a0d, B:292:0x0a1c, B:294:0x0a2a, B:296:0x0a35, B:298:0x0a4d, B:305:0x0a74, B:308:0x0a7d, B:310:0x0a87, B:312:0x0a8e, B:314:0x0a98, B:318:0x0aa7, B:320:0x0abc, B:321:0x0ac6, B:323:0x0acc, B:324:0x0ae2, B:325:0x0afd, B:327:0x0b03, B:328:0x0b0d, B:331:0x0b28, B:12:0x00bf, B:17:0x0158, B:20:0x01ce, B:23:0x0235, B:26:0x029d, B:29:0x02f9, B:96:0x0483, B:101:0x0490, B:103:0x04aa, B:109:0x04d6, B:111:0x04e3, B:113:0x04e9, B:117:0x04f3, B:119:0x04fd, B:121:0x0503, B:166:0x05d3, B:124:0x0513, B:126:0x051f, B:129:0x0531, B:131:0x053d, B:135:0x054c, B:137:0x0552, B:138:0x055a, B:140:0x0562, B:142:0x0568, B:145:0x0578, B:147:0x0584, B:151:0x0593, B:153:0x0599, B:154:0x05a2, B:155:0x05ad, B:157:0x05b3, B:161:0x05bd, B:163:0x05c7, B:165:0x05cd, B:167:0x05e4, B:171:0x0610, B:180:0x0672, B:182:0x0678, B:188:0x06a4, B:32:0x033f, B:37:0x039f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:327:0x0b03 A[Catch: all -> 0x0104, LOOP:2: B:325:0x0afd->B:327:0x0b03, LOOP_END, TryCatch #1 {all -> 0x0104, blocks: (B:281:0x09e3, B:283:0x09f0, B:285:0x09f7, B:319:0x0aac, B:289:0x0a0d, B:292:0x0a1c, B:294:0x0a2a, B:296:0x0a35, B:298:0x0a4d, B:305:0x0a74, B:308:0x0a7d, B:310:0x0a87, B:312:0x0a8e, B:314:0x0a98, B:318:0x0aa7, B:320:0x0abc, B:321:0x0ac6, B:323:0x0acc, B:324:0x0ae2, B:325:0x0afd, B:327:0x0b03, B:328:0x0b0d, B:331:0x0b28, B:12:0x00bf, B:17:0x0158, B:20:0x01ce, B:23:0x0235, B:26:0x029d, B:29:0x02f9, B:96:0x0483, B:101:0x0490, B:103:0x04aa, B:109:0x04d6, B:111:0x04e3, B:113:0x04e9, B:117:0x04f3, B:119:0x04fd, B:121:0x0503, B:166:0x05d3, B:124:0x0513, B:126:0x051f, B:129:0x0531, B:131:0x053d, B:135:0x054c, B:137:0x0552, B:138:0x055a, B:140:0x0562, B:142:0x0568, B:145:0x0578, B:147:0x0584, B:151:0x0593, B:153:0x0599, B:154:0x05a2, B:155:0x05ad, B:157:0x05b3, B:161:0x05bd, B:163:0x05c7, B:165:0x05cd, B:167:0x05e4, B:171:0x0610, B:180:0x0672, B:182:0x0678, B:188:0x06a4, B:32:0x033f, B:37:0x039f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:330:0x0b27  */
    /* JADX WARN: Removed duplicated region for block: B:331:0x0b28 A[Catch: all -> 0x0104, TRY_LEAVE, TryCatch #1 {all -> 0x0104, blocks: (B:281:0x09e3, B:283:0x09f0, B:285:0x09f7, B:319:0x0aac, B:289:0x0a0d, B:292:0x0a1c, B:294:0x0a2a, B:296:0x0a35, B:298:0x0a4d, B:305:0x0a74, B:308:0x0a7d, B:310:0x0a87, B:312:0x0a8e, B:314:0x0a98, B:318:0x0aa7, B:320:0x0abc, B:321:0x0ac6, B:323:0x0acc, B:324:0x0ae2, B:325:0x0afd, B:327:0x0b03, B:328:0x0b0d, B:331:0x0b28, B:12:0x00bf, B:17:0x0158, B:20:0x01ce, B:23:0x0235, B:26:0x029d, B:29:0x02f9, B:96:0x0483, B:101:0x0490, B:103:0x04aa, B:109:0x04d6, B:111:0x04e3, B:113:0x04e9, B:117:0x04f3, B:119:0x04fd, B:121:0x0503, B:166:0x05d3, B:124:0x0513, B:126:0x051f, B:129:0x0531, B:131:0x053d, B:135:0x054c, B:137:0x0552, B:138:0x055a, B:140:0x0562, B:142:0x0568, B:145:0x0578, B:147:0x0584, B:151:0x0593, B:153:0x0599, B:154:0x05a2, B:155:0x05ad, B:157:0x05b3, B:161:0x05bd, B:163:0x05c7, B:165:0x05cd, B:167:0x05e4, B:171:0x0610, B:180:0x0672, B:182:0x0678, B:188:0x06a4, B:32:0x033f, B:37:0x039f), top: B:338:0x001e }] */
    /* JADX WARN: Removed duplicated region for block: B:344:0x0750 A[EXC_TOP_SPLITTER, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:362:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:62:0x03f7  */
    /* JADX WARN: Removed duplicated region for block: B:67:0x0413  */
    /* JADX WARN: Removed duplicated region for block: B:71:0x041e A[Catch: all -> 0x03dd, TRY_ENTER, TryCatch #6 {all -> 0x03dd, blocks: (B:49:0x03ce, B:63:0x03f9, B:71:0x041e, B:79:0x043b, B:82:0x0445, B:92:0x045d, B:99:0x0488), top: B:346:0x03ce }] */
    /* JADX WARN: Removed duplicated region for block: B:75:0x0434  */
    /* JADX WARN: Removed duplicated region for block: B:78:0x0439 A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:81:0x0443 A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:87:0x0455 A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:90:0x045a  */
    /* JADX WARN: Removed duplicated region for block: B:92:0x045d A[Catch: all -> 0x03dd, TRY_ENTER, TRY_LEAVE, TryCatch #6 {all -> 0x03dd, blocks: (B:49:0x03ce, B:63:0x03f9, B:71:0x041e, B:79:0x043b, B:82:0x0445, B:92:0x045d, B:99:0x0488), top: B:346:0x03ce }] */
    /* JADX WARN: Removed duplicated region for block: B:98:0x0486  */
    /* JADX WARN: Type inference failed for: r17v0 */
    /* JADX WARN: Type inference failed for: r17v1 */
    /* JADX WARN: Type inference failed for: r17v10 */
    /* JADX WARN: Type inference failed for: r17v13 */
    /* JADX WARN: Type inference failed for: r17v2 */
    /* JADX WARN: Type inference failed for: r17v24 */
    /* JADX WARN: Type inference failed for: r17v3 */
    /* JADX WARN: Type inference failed for: r17v7 */
    /* JADX WARN: Type inference failed for: r17v8 */
    /* JADX WARN: Type inference failed for: r2v0, types: [B4.a, java.lang.Object] */
    /* JADX WARN: Type inference failed for: r2v1 */
    /* JADX WARN: Type inference failed for: r2v2, types: [java.util.concurrent.atomic.AtomicInteger] */
    /* JADX WARN: Type inference failed for: r2v27, types: [java.util.concurrent.atomic.AtomicInteger] */
    /* JADX WARN: Type inference failed for: r2v3 */
    /* JADX WARN: Type inference failed for: r2v38 */
    /* JADX WARN: Type inference failed for: r2v39 */
    /* JADX WARN: Type inference failed for: r2v40 */
    /* JADX WARN: Type inference failed for: r2v41, types: [java.util.concurrent.atomic.AtomicInteger] */
    /* JADX WARN: Type inference failed for: r2v43 */
    /* JADX WARN: Type inference failed for: r2v47 */
    /* JADX WARN: Type inference failed for: r2v5 */
    /* JADX WARN: Type inference failed for: r2v57 */
    /* JADX WARN: Type inference failed for: r2v58 */
    /* JADX WARN: Type inference failed for: r2v59 */
    /* JADX WARN: Type inference failed for: r2v60 */
    /* JADX WARN: Type inference failed for: r2v62 */
    /* JADX WARN: Type inference failed for: r2v63 */
    /* JADX WARN: Type inference failed for: r3v0, types: [int] */
    /* JADX WARN: Type inference failed for: r3v1 */
    /* JADX WARN: Type inference failed for: r3v144 */
    /* JADX WARN: Type inference failed for: r3v175, types: [java.util.concurrent.atomic.AtomicInteger] */
    /* JADX WARN: Type inference failed for: r3v178 */
    /* JADX WARN: Type inference failed for: r9v10, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r9v14, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r9v31 */
    /* JADX WARN: Type inference failed for: r9v32 */
    /* JADX WARN: Type inference failed for: r9v33, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r9v34 */
    /* JADX WARN: Type inference failed for: r9v35 */
    /* JADX WARN: Type inference failed for: r9v36, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r9v37 */
    /* JADX WARN: Type inference failed for: r9v38 */
    /* JADX WARN: Type inference failed for: r9v39 */
    /* JADX WARN: Type inference failed for: r9v40 */
    /* JADX WARN: Type inference failed for: r9v41, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r9v42 */
    /* JADX WARN: Type inference failed for: r9v43 */
    /* JADX WARN: Type inference failed for: r9v44 */
    /* JADX WARN: Type inference failed for: r9v47 */
    /* JADX WARN: Type inference failed for: r9v48 */
    /* JADX WARN: Type inference failed for: r9v49 */
    /* JADX WARN: Type inference failed for: r9v50 */
    /* JADX WARN: Type inference failed for: r9v51 */
    /* JADX WARN: Type inference failed for: r9v52 */
    /* JADX WARN: Type inference failed for: r9v53 */
    /* JADX WARN: Type inference failed for: r9v54 */
    /* JADX WARN: Type inference failed for: r9v55 */
    /* JADX WARN: Type inference failed for: r9v56 */
    /* JADX WARN: Type inference failed for: r9v57 */
    /* JADX WARN: Type inference failed for: r9v58 */
    /* JADX WARN: Type inference failed for: r9v59 */
    /* JADX WARN: Type inference failed for: r9v60 */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) throws Throwable {
        AtomicInteger atomicInteger;
        Instant instantNow;
        C3137A c3137a;
        String str;
        String str2;
        String str3;
        String str4;
        JSONArray jSONArrayS;
        String str5;
        Instant instant;
        JSONObject jSONObject;
        String str6;
        AtomicInteger atomicInteger2;
        Object objJ;
        Instant instant2;
        JSONArray jSONArray;
        String str7;
        String str8;
        String str9;
        Object obj2;
        String str10;
        boolean z6;
        boolean z7;
        int i6;
        int i7;
        JSONArray jSONArray2;
        AtomicInteger atomicInteger3;
        Instant instant3;
        Object objF;
        LinkedHashMap linkedHashMap;
        LinkedHashMap linkedHashMap2;
        int length;
        int i8;
        int i9;
        int i10;
        String str11;
        String str12;
        Instant instant4;
        String str13;
        String str14;
        ?? r9;
        int i11;
        String str15;
        Instant instant5;
        String str16;
        JSONArray jSONArray3;
        AtomicInteger atomicInteger4;
        Instant instant6;
        int i12;
        Object objD;
        AtomicInteger atomicInteger5;
        Object objD2;
        AtomicInteger atomicInteger6;
        String str17;
        String str18;
        Instant instant7;
        JSONObject jSONObjectOptJSONObject;
        Instant instantN;
        Instant instantN2;
        JSONObject jSONObjectOptJSONObject2;
        Map map;
        Map map2;
        ?? r92;
        Map map3;
        Map map4;
        ?? r93;
        Map linkedHashMap3;
        Iterator it;
        int i13;
        JSONArray jSONArray4;
        Object objO;
        Map map5;
        Map map6;
        ?? r94;
        Map map7;
        Map map8;
        ?? r95;
        Instant instant8;
        int i14;
        Map mapQ;
        ?? r17;
        Set setG0;
        Map map9;
        Map map10;
        String str19;
        String str20;
        Set linkedHashSet;
        String str21;
        String str22;
        Map map11;
        Map map12;
        Map map13;
        Object objL;
        Map map14;
        JSONArray jSONArray5;
        Set set;
        int i15;
        Map map15;
        Object objK;
        int i16;
        Map map16;
        Map map17;
        int i17;
        String str23;
        String str24;
        String str25;
        String str26;
        Map map18;
        Map map19;
        ?? r96;
        AtomicInteger atomicInteger7;
        Map map20;
        Map map21;
        Map map22;
        ?? r97;
        ?? r22;
        Map map23;
        ?? r98;
        ?? r23;
        Iterator it2;
        String str27;
        Iterator it3;
        v vVar;
        int i18;
        Set set2;
        int i19;
        String str28;
        Instant instant9;
        Map map24;
        String str29;
        JSONArray jSONArray6;
        Map map25;
        Map map26;
        Map map27;
        ?? r99;
        ?? r24;
        Map map28;
        Map map29;
        LinkedHashMap linkedHashMap4;
        ?? r910;
        Iterator it4;
        Context context;
        JSONArray jSONArray7;
        Map map30;
        String str30;
        Object obj3;
        String str31;
        String str32;
        String str33;
        ?? r25 = B4.a.f492a;
        ?? r32 = this.f19048u;
        C3137A c3137a2 = C3137A.f25453a;
        String str34 = "progress";
        try {
            try {
            } catch (Throwable th) {
                th = th;
                r25 = r32;
            }
        } catch (Throwable th2) {
            th = th2;
        }
        switch (r32) {
            case 0:
                AbstractC2467b.l(obj);
                AtomicInteger atomicIntegerB = J.b(this.f19049v, EnumC2273g.f18932b);
                try {
                    instantNow = Instant.now();
                    c3137a = c3137a2;
                    String string = instantNow.toString();
                    kotlin.jvm.internal.o.g(string, "toString(...)");
                    str = "toString(...)";
                    J j4 = this.f19049v;
                    str2 = "delta";
                    K k6 = j4.f18889a;
                    str3 = SubscriberAttributeKt.JSON_NAME_KEY;
                    str4 = "sortDate";
                    jSONArrayS = J.s(j4, k6.f18895a.getString("continue_watching_payload", null));
                    J j6 = this.f19049v;
                    Instant instantW = J.w(j6, j6.f18889a.a());
                    str5 = (instantW == null || jSONArrayS.length() == 0) ? "full" : str2;
                    if (instantW == null) {
                        instant = instantW;
                        jSONObject = null;
                        str6 = string;
                        atomicInteger2 = atomicIntegerB;
                        str8 = "traktId";
                        if (instant != null) {
                        }
                        z6 = true;
                        if (instant == null) {
                        }
                        i6 = 1;
                        if (jSONObject != null) {
                        }
                        if (z7) {
                        }
                        if (z7) {
                        }
                        LinkedHashMap linkedHashMap5 = new LinkedHashMap();
                        if (kotlin.jvm.internal.o.c(str28, str2)) {
                        }
                        while (r0.hasNext()) {
                        }
                        List listX0 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap5.values());
                        JSONArray jSONArray8 = new JSONArray();
                        it4 = listX0.iterator();
                        while (it4.hasNext()) {
                        }
                        Object obj4 = AbstractC2060b.f16469a;
                        String string2 = jSONArray8.toString();
                        kotlin.jvm.internal.o.g(string2, str);
                        String strF = AbstractC2060b.f(string2);
                        this.f19049v.f18889a.c(str29, strF);
                        context = AbstractC0696m3.f7937d0;
                        if (context == null) {
                        }
                        J.h(this.f19049v, EnumC2273g.f18932b, r32);
                        return c3137a;
                    }
                    J j7 = this.f19049v;
                    this.f19032a = atomicIntegerB;
                    this.f19033b = instantNow;
                    this.f19034c = string;
                    this.f19035d = jSONArrayS;
                    this.f19036e = instantW;
                    this.f19037f = str5;
                    atomicInteger = atomicIntegerB;
                    try {
                        this.f19048u = 1;
                        objJ = J.j(j7, this);
                        if (objJ != r25) {
                            instant2 = instantW;
                            jSONArray = jSONArrayS;
                            str7 = string;
                            atomicInteger2 = atomicInteger;
                            try {
                                Instant instant10 = instant2;
                                jSONObject = (JSONObject) objJ;
                                instant = instant10;
                                JSONArray jSONArray9 = jSONArray;
                                str6 = str7;
                                jSONArrayS = jSONArray9;
                                str8 = "traktId";
                                if (instant != null) {
                                    obj2 = "tv";
                                    J j8 = this.f19049v;
                                    kotlin.jvm.internal.o.e(jSONObject);
                                    str10 = "type";
                                    str9 = "movie";
                                    if (!J.a(j8, jSONObject, instant, "playback", new String[]{"paused_at", "updated_at"})) {
                                        z6 = false;
                                    }
                                    if (instant == null) {
                                        J j9 = this.f19049v;
                                        kotlin.jvm.internal.o.e(jSONObject);
                                        z7 = z6;
                                        if (!J.a(j9, jSONObject, instant, "episodes", new String[]{"watched_at"})) {
                                            i6 = 0;
                                            if (jSONObject != null && instant != null) {
                                                jSONObject.optJSONObject("playback");
                                                jSONObject.optJSONObject("episodes");
                                            }
                                            if (z7 && i6 == 0 && jSONArrayS.length() > 0) {
                                                J.h(this.f19049v, EnumC2273g.f18932b, atomicInteger2);
                                                return c3137a;
                                            }
                                            i7 = (z7 || i6 != 0) ? 1 : 0;
                                            if (i7 != 0) {
                                                Instant instant11 = instant;
                                                jSONArray2 = new JSONArray();
                                                atomicInteger3 = atomicInteger2;
                                                instant3 = instant11;
                                                linkedHashMap = new LinkedHashMap();
                                                linkedHashMap2 = new LinkedHashMap();
                                                length = jSONArray2.length();
                                                i8 = i7;
                                                i9 = i6;
                                                i10 = 0;
                                                int i20 = 0;
                                                int i21 = 0;
                                                while (i10 < length) {
                                                }
                                                String str35 = str9;
                                                str11 = str34;
                                                str12 = str35;
                                                instant4 = instant3;
                                                str13 = str5;
                                                AbstractC3251q.m0(linkedHashMap2.entrySet(), "; ", null, null, new C2167o4(10), 22);
                                                if (i9 == 0) {
                                                }
                                                str14 = "episode";
                                                r9 = r25;
                                                i11 = i8;
                                                str15 = str13;
                                                instant5 = instant4;
                                                str16 = "show";
                                                if (i11 == 0) {
                                                }
                                                jSONArray3 = new JSONArray();
                                                atomicInteger4 = atomicInteger3;
                                                instant6 = instantNow;
                                                i12 = i9;
                                                r93 = r9;
                                                map4 = linkedHashMap;
                                                map3 = linkedHashMap2;
                                                LinkedHashMap linkedHashMapR = J.r(this.f19049v, jSONArray3);
                                                linkedHashMap3 = new LinkedHashMap(AbstractC3229F.u(linkedHashMapR.size()));
                                                it = linkedHashMapR.entrySet().iterator();
                                                Map map31 = map4;
                                                while (it.hasNext()) {
                                                }
                                                Map map32 = map31;
                                                J.v(this.f19049v, map3, linkedHashMapR);
                                                if (i11 == 0) {
                                                }
                                                LinkedHashMap linkedHashMap52 = new LinkedHashMap();
                                                if (kotlin.jvm.internal.o.c(str28, str2)) {
                                                }
                                                while (r0.hasNext()) {
                                                }
                                                List listX02 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap52.values());
                                                JSONArray jSONArray82 = new JSONArray();
                                                it4 = listX02.iterator();
                                                while (it4.hasNext()) {
                                                }
                                                Object obj42 = AbstractC2060b.f16469a;
                                                String string22 = jSONArray82.toString();
                                                kotlin.jvm.internal.o.g(string22, str);
                                                String strF2 = AbstractC2060b.f(string22);
                                                this.f19049v.f18889a.c(str29, strF2);
                                                context = AbstractC0696m3.f7937d0;
                                                if (context == null) {
                                                }
                                                J.h(this.f19049v, EnumC2273g.f18932b, r32);
                                                return c3137a;
                                            }
                                            J j10 = this.f19049v;
                                            this.f19032a = atomicInteger2;
                                            this.f19033b = instantNow;
                                            this.f19034c = str6;
                                            this.f19035d = jSONArrayS;
                                            this.f19036e = instant;
                                            this.f19037f = str5;
                                            this.f19045r = i6;
                                            this.f19046s = i7;
                                            this.f19048u = 2;
                                            Instant instant12 = instant;
                                            objF = J.F(j10, "https://api.trakt.tv/sync/playback?extended=full,images", 0, this, 6);
                                            if (objF != r25) {
                                                atomicInteger3 = atomicInteger2;
                                                instant3 = instant12;
                                                jSONArray2 = (JSONArray) objF;
                                                linkedHashMap = new LinkedHashMap();
                                                linkedHashMap2 = new LinkedHashMap();
                                                length = jSONArray2.length();
                                                i8 = i7;
                                                i9 = i6;
                                                i10 = 0;
                                                int i202 = 0;
                                                int i212 = 0;
                                                while (i10 < length) {
                                                    int i22 = length;
                                                    JSONObject jSONObject2 = jSONArray2.getJSONObject(i10);
                                                    String str36 = str5;
                                                    JSONArray jSONArray10 = jSONArray2;
                                                    double dOptDouble = jSONObject2.optDouble(str34, 0.0d);
                                                    int i23 = i10;
                                                    if (dOptDouble <= 0.0d || dOptDouble >= 100.0d) {
                                                        String str37 = str9;
                                                        str17 = str34;
                                                        str18 = str37;
                                                        instant7 = instant3;
                                                        if (jSONObject2.has("show") && jSONObject2.has("episode") && i202 < 24) {
                                                            i202++;
                                                            JSONObject jSONObjectOptJSONObject3 = jSONObject2.optJSONObject("show");
                                                            if (jSONObjectOptJSONObject3 != null && (jSONObjectOptJSONObject = jSONObjectOptJSONObject3.optJSONObject("ids")) != null) {
                                                                jSONObjectOptJSONObject.optInt("trakt", 0);
                                                            }
                                                        }
                                                    } else {
                                                        J j11 = this.f19049v;
                                                        AtomicLong atomicLong = J.f18885e;
                                                        j11.getClass();
                                                        Instant instantN3 = J.N(jSONObject2);
                                                        if (instantN3 == null) {
                                                            if (jSONObject2.has("show") && jSONObject2.has("episode") && i202 < 24) {
                                                                i202++;
                                                                JSONObject jSONObjectOptJSONObject4 = jSONObject2.optJSONObject("show");
                                                                if (jSONObjectOptJSONObject4 != null && (jSONObjectOptJSONObject2 = jSONObjectOptJSONObject4.optJSONObject("ids")) != null) {
                                                                    jSONObjectOptJSONObject2.optInt("trakt", 0);
                                                                }
                                                            }
                                                            String str38 = str9;
                                                            str17 = str34;
                                                            str18 = str38;
                                                            instant7 = instant3;
                                                        } else {
                                                            String str39 = str9;
                                                            str17 = str34;
                                                            str18 = str39;
                                                            if (jSONObject2.has(str18)) {
                                                                instant7 = instant3;
                                                                int iOptInt = jSONObject2.getJSONObject(str18).getJSONObject("ids").optInt("trakt", 0);
                                                                if (iOptInt != 0) {
                                                                    JSONObject jSONObject3 = (JSONObject) linkedHashMap.get(C4.g.a(iOptInt));
                                                                    if (jSONObject3 != null) {
                                                                        this.f19049v.getClass();
                                                                        instantN2 = J.N(jSONObject3);
                                                                    } else {
                                                                        instantN2 = null;
                                                                    }
                                                                    if (jSONObject3 == null || instantN2 == null || instantN3.isAfter(instantN2)) {
                                                                        linkedHashMap.put(C4.g.a(iOptInt), jSONObject2);
                                                                    }
                                                                }
                                                            } else {
                                                                instant7 = instant3;
                                                                if (jSONObject2.has("show") && jSONObject2.has("episode")) {
                                                                    int iOptInt2 = jSONObject2.getJSONObject("show").getJSONObject("ids").optInt("trakt", 0);
                                                                    if (iOptInt2 != 0) {
                                                                        JSONObject jSONObject4 = (JSONObject) linkedHashMap2.get(C4.g.a(iOptInt2));
                                                                        if (jSONObject4 != null) {
                                                                            this.f19049v.getClass();
                                                                            instantN = J.N(jSONObject4);
                                                                        } else {
                                                                            instantN = null;
                                                                        }
                                                                        if (jSONObject4 == null || instantN == null || instantN3.isAfter(instantN)) {
                                                                            linkedHashMap2.put(C4.g.a(iOptInt2), jSONObject2);
                                                                        }
                                                                    }
                                                                } else {
                                                                    C4.g.a(i212);
                                                                    i212++;
                                                                }
                                                            }
                                                        }
                                                    }
                                                    i10 = i23 + 1;
                                                    String str40 = str17;
                                                    str9 = str18;
                                                    str34 = str40;
                                                    length = i22;
                                                    str5 = str36;
                                                    jSONArray2 = jSONArray10;
                                                    instant3 = instant7;
                                                }
                                                String str352 = str9;
                                                str11 = str34;
                                                str12 = str352;
                                                instant4 = instant3;
                                                str13 = str5;
                                                AbstractC3251q.m0(linkedHashMap2.entrySet(), "; ", null, null, new C2167o4(10), 22);
                                                if (i9 == 0 && instant4 == null) {
                                                    ZoneOffset zoneOffset = ZoneOffset.UTC;
                                                    Instant instant13 = instantNow.atZone(zoneOffset).o().minusDays(30L).atStartOfDay(zoneOffset).toInstant();
                                                    J j12 = this.f19049v;
                                                    this.f19032a = atomicInteger3;
                                                    this.f19033b = instantNow;
                                                    this.f19034c = str6;
                                                    this.f19035d = jSONArrayS;
                                                    instant5 = instant4;
                                                    this.f19036e = instant5;
                                                    str15 = str13;
                                                    this.f19037f = str15;
                                                    this.f19038j = linkedHashMap;
                                                    this.f19039k = linkedHashMap2;
                                                    this.f19045r = i9;
                                                    str14 = "episode";
                                                    i11 = i8;
                                                    this.f19046s = i11;
                                                    str16 = "show";
                                                    this.f19048u = 3;
                                                    AtomicLong atomicLong2 = J.f18885e;
                                                    objD2 = j12.D("https://api.trakt.tv/sync/history/shows?extended=full,images", instant13, Integer.MAX_VALUE, this);
                                                    ?? r911 = r25;
                                                    if (objD2 == r911) {
                                                        return r911;
                                                    }
                                                    atomicInteger6 = atomicInteger3;
                                                    instant6 = instantNow;
                                                    i12 = i9;
                                                    r92 = r911;
                                                    map2 = linkedHashMap;
                                                    map = linkedHashMap2;
                                                    jSONArray3 = (JSONArray) objD2;
                                                    atomicInteger4 = atomicInteger6;
                                                    r93 = r92;
                                                    map4 = map2;
                                                    map3 = map;
                                                    LinkedHashMap linkedHashMapR2 = J.r(this.f19049v, jSONArray3);
                                                    linkedHashMap3 = new LinkedHashMap(AbstractC3229F.u(linkedHashMapR2.size()));
                                                    it = linkedHashMapR2.entrySet().iterator();
                                                    Map map312 = map4;
                                                    while (it.hasNext()) {
                                                    }
                                                    Map map322 = map312;
                                                    J.v(this.f19049v, map3, linkedHashMapR2);
                                                    if (i11 == 0) {
                                                    }
                                                    LinkedHashMap linkedHashMap522 = new LinkedHashMap();
                                                    if (kotlin.jvm.internal.o.c(str28, str2)) {
                                                    }
                                                    while (r0.hasNext()) {
                                                    }
                                                    List listX022 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap522.values());
                                                    JSONArray jSONArray822 = new JSONArray();
                                                    it4 = listX022.iterator();
                                                    while (it4.hasNext()) {
                                                    }
                                                    Object obj422 = AbstractC2060b.f16469a;
                                                    String string222 = jSONArray822.toString();
                                                    kotlin.jvm.internal.o.g(string222, str);
                                                    String strF22 = AbstractC2060b.f(string222);
                                                    this.f19049v.f18889a.c(str29, strF22);
                                                    context = AbstractC0696m3.f7937d0;
                                                    if (context == null) {
                                                    }
                                                    J.h(this.f19049v, EnumC2273g.f18932b, r32);
                                                    return c3137a;
                                                }
                                                str14 = "episode";
                                                r9 = r25;
                                                i11 = i8;
                                                str15 = str13;
                                                instant5 = instant4;
                                                str16 = "show";
                                                if (i11 == 0 && !linkedHashMap2.isEmpty()) {
                                                    J j13 = this.f19049v;
                                                    this.f19032a = atomicInteger3;
                                                    this.f19033b = instantNow;
                                                    this.f19034c = str6;
                                                    this.f19035d = jSONArrayS;
                                                    this.f19036e = instant5;
                                                    this.f19037f = str15;
                                                    this.f19038j = linkedHashMap;
                                                    this.f19039k = linkedHashMap2;
                                                    this.f19045r = i9;
                                                    this.f19046s = i11;
                                                    this.f19048u = 4;
                                                    AtomicLong atomicLong3 = J.f18885e;
                                                    objD = j13.D("https://api.trakt.tv/sync/history/shows?extended=full,images", instant5, Integer.MAX_VALUE, this);
                                                    if (objD == r9) {
                                                        return r9;
                                                    }
                                                    atomicInteger5 = atomicInteger3;
                                                    instant6 = instantNow;
                                                    i12 = i9;
                                                    r94 = r9;
                                                    map6 = linkedHashMap;
                                                    map5 = linkedHashMap2;
                                                    jSONArray3 = (JSONArray) objD;
                                                    atomicInteger4 = atomicInteger5;
                                                    r93 = r94;
                                                    map4 = map6;
                                                    map3 = map5;
                                                    LinkedHashMap linkedHashMapR22 = J.r(this.f19049v, jSONArray3);
                                                    linkedHashMap3 = new LinkedHashMap(AbstractC3229F.u(linkedHashMapR22.size()));
                                                    it = linkedHashMapR22.entrySet().iterator();
                                                    Map map3122 = map4;
                                                    while (it.hasNext()) {
                                                    }
                                                    Map map3222 = map3122;
                                                    J.v(this.f19049v, map3, linkedHashMapR22);
                                                    if (i11 == 0) {
                                                        if (i13 != 0) {
                                                        }
                                                    } else if (i13 != 0) {
                                                    }
                                                    LinkedHashMap linkedHashMap5222 = new LinkedHashMap();
                                                    if (kotlin.jvm.internal.o.c(str28, str2)) {
                                                    }
                                                    while (r0.hasNext()) {
                                                    }
                                                    List listX0222 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap5222.values());
                                                    JSONArray jSONArray8222 = new JSONArray();
                                                    it4 = listX0222.iterator();
                                                    while (it4.hasNext()) {
                                                    }
                                                    Object obj4222 = AbstractC2060b.f16469a;
                                                    String string2222 = jSONArray8222.toString();
                                                    kotlin.jvm.internal.o.g(string2222, str);
                                                    String strF222 = AbstractC2060b.f(string2222);
                                                    this.f19049v.f18889a.c(str29, strF222);
                                                    context = AbstractC0696m3.f7937d0;
                                                    if (context == null) {
                                                    }
                                                    J.h(this.f19049v, EnumC2273g.f18932b, r32);
                                                    return c3137a;
                                                }
                                                jSONArray3 = new JSONArray();
                                                atomicInteger4 = atomicInteger3;
                                                instant6 = instantNow;
                                                i12 = i9;
                                                r93 = r9;
                                                map4 = linkedHashMap;
                                                map3 = linkedHashMap2;
                                                LinkedHashMap linkedHashMapR222 = J.r(this.f19049v, jSONArray3);
                                                linkedHashMap3 = new LinkedHashMap(AbstractC3229F.u(linkedHashMapR222.size()));
                                                it = linkedHashMapR222.entrySet().iterator();
                                                Map map31222 = map4;
                                                while (it.hasNext()) {
                                                    Object next = it.next();
                                                    linkedHashMap3.put(((Map.Entry) next).getKey(), (Instant) ((w4.k) ((Map.Entry) next).getValue()).f25469a);
                                                    it = it;
                                                    map31222 = map31222;
                                                }
                                                Map map32222 = map31222;
                                                J.v(this.f19049v, map3, linkedHashMapR222);
                                                i13 = ((i11 == 0 || map3.isEmpty()) && i12 == 0) ? 0 : 1;
                                                if (i13 != 0) {
                                                    J j14 = this.f19049v;
                                                    this.f19032a = atomicInteger4;
                                                    this.f19033b = instant6;
                                                    this.f19034c = str6;
                                                    this.f19035d = jSONArrayS;
                                                    this.f19036e = instant5;
                                                    this.f19037f = str15;
                                                    this.f19038j = map32222;
                                                    this.f19039k = map3;
                                                    this.l = linkedHashMap3;
                                                    this.f19045r = i12;
                                                    this.f19046s = i11;
                                                    this.f19047t = i13;
                                                    this.f19048u = 5;
                                                    objO = J.o(j14, this);
                                                    atomicInteger7 = atomicInteger4;
                                                    r96 = r93;
                                                    map19 = map3;
                                                    map18 = map32222;
                                                    if (objO == r93) {
                                                        return r93;
                                                    }
                                                    jSONArray4 = (JSONArray) objO;
                                                    r25 = atomicInteger7;
                                                    r95 = r96;
                                                    map8 = map19;
                                                    map7 = map18;
                                                    Map map33 = linkedHashMap3;
                                                    instant8 = instant6;
                                                    JSONArray jSONArray11 = jSONArray4;
                                                    i14 = i12;
                                                    if (i13 != 0) {
                                                        mapQ = J.q(this.f19049v, jSONArray11);
                                                    } else {
                                                        try {
                                                            mapQ = x4.z.f26066a;
                                                        } catch (Throwable th3) {
                                                            th = th3;
                                                            r17 = r25;
                                                            r25 = r17;
                                                        }
                                                    }
                                                    try {
                                                        setG0 = AbstractC3251q.G0(map8.keySet());
                                                        if (i11 == 0) {
                                                            kotlin.jvm.internal.o.e(instant5);
                                                            map9 = map33;
                                                            int length2 = jSONArrayS.length();
                                                            map10 = map8;
                                                            int i24 = 0;
                                                            while (i24 < length2) {
                                                                int i25 = length2;
                                                                JSONObject jSONObjectOptJSONObject5 = jSONArrayS.optJSONObject(i24);
                                                                if (jSONObjectOptJSONObject5 == null) {
                                                                    i17 = i24;
                                                                    str26 = str8;
                                                                    str24 = str10;
                                                                    str23 = str12;
                                                                    str25 = str4;
                                                                } else {
                                                                    i17 = i24;
                                                                    String str41 = str10;
                                                                    str23 = str12;
                                                                    String strOptString = jSONObjectOptJSONObject5.optString(str41);
                                                                    str24 = str41;
                                                                    Object obj5 = obj2;
                                                                    if (kotlin.jvm.internal.o.c(strOptString, obj5)) {
                                                                        obj2 = obj5;
                                                                        String str42 = str11;
                                                                        if (jSONObjectOptJSONObject5.optInt(str42, 0) > 0) {
                                                                            str11 = str42;
                                                                            str26 = str8;
                                                                            int iOptInt3 = jSONObjectOptJSONObject5.optInt(str26, 0);
                                                                            if (iOptInt3 != 0) {
                                                                                J j15 = this.f19049v;
                                                                                str25 = str4;
                                                                                String strOptString2 = jSONObjectOptJSONObject5.optString(str25);
                                                                                AtomicLong atomicLong4 = J.f18885e;
                                                                                j15.getClass();
                                                                                Instant instantM = J.M(strOptString2);
                                                                                if (instantM != null && !instantM.isBefore(instant5)) {
                                                                                    setG0.add(C4.g.a(iOptInt3));
                                                                                }
                                                                            } else {
                                                                                str25 = str4;
                                                                            }
                                                                        } else {
                                                                            str11 = str42;
                                                                        }
                                                                    } else {
                                                                        obj2 = obj5;
                                                                    }
                                                                    str25 = str4;
                                                                    str26 = str8;
                                                                }
                                                                str4 = str25;
                                                                str8 = str26;
                                                                str12 = str23;
                                                                str10 = str24;
                                                                i24 = i17 + 1;
                                                                length2 = i25;
                                                            }
                                                        } else {
                                                            map9 = map33;
                                                            map10 = map8;
                                                        }
                                                        String str43 = str8;
                                                        str19 = str10;
                                                        str20 = str12;
                                                        String str44 = str4;
                                                        linkedHashSet = new LinkedHashSet();
                                                        str21 = str43;
                                                        LinkedHashMap linkedHashMap6 = new LinkedHashMap();
                                                        if (i14 == 0) {
                                                            str22 = str44;
                                                            map11 = map9;
                                                            map12 = linkedHashMap6;
                                                            map13 = map10;
                                                            r23 = r25;
                                                            r98 = r95;
                                                            map23 = map7;
                                                            Map map34 = mapQ;
                                                            Instant instant14 = instant8;
                                                            String str45 = str6;
                                                            Instant instant15 = instant5;
                                                            linkedHashSet.size();
                                                            Set setJ0 = AbstractC3251q.j0(linkedHashSet, setG0);
                                                            linkedHashSet.removeAll(setG0);
                                                            setJ0.isEmpty();
                                                            AbstractC3251q.j0(linkedHashSet, setG0).isEmpty();
                                                            LinkedHashMap linkedHashMap7 = new LinkedHashMap();
                                                            it2 = map23.entrySet().iterator();
                                                            while (it2.hasNext()) {
                                                            }
                                                            str27 = str3;
                                                            it3 = map13.entrySet().iterator();
                                                            while (it3.hasNext()) {
                                                            }
                                                            Set set3 = linkedHashSet;
                                                            vVar = new v(set3, e5.j.a(3), this.f19049v, instant14, map12, instant15, map11, map34, new ConcurrentHashMap(), linkedHashMap7, null);
                                                            this.f19032a = r23;
                                                            this.f19033b = str45;
                                                            this.f19034c = jSONArrayS;
                                                            this.f19035d = instant15;
                                                            this.f19036e = str15;
                                                            this.f19037f = set3;
                                                            this.f19038j = linkedHashMap7;
                                                            this.f19039k = null;
                                                            this.l = null;
                                                            this.f19040m = null;
                                                            this.f19041n = null;
                                                            this.f19042o = null;
                                                            this.f19043p = null;
                                                            this.f19044q = null;
                                                            this.f19045r = i14;
                                                            this.f19046s = i11;
                                                            this.f19048u = 8;
                                                            if (V4.E.k(vVar, this) == r98) {
                                                            }
                                                        } else {
                                                            if (instant5 == null) {
                                                                J j16 = this.f19049v;
                                                                this.f19032a = r25;
                                                                this.f19033b = instant8;
                                                                this.f19034c = str6;
                                                                this.f19035d = jSONArrayS;
                                                                this.f19036e = instant5;
                                                                this.f19037f = str15;
                                                                str22 = str44;
                                                                this.f19038j = map7;
                                                                this.f19039k = map10;
                                                                this.l = map9;
                                                                this.f19040m = mapQ;
                                                                this.f19041n = setG0;
                                                                this.f19042o = linkedHashSet;
                                                                this.f19043p = linkedHashMap6;
                                                                this.f19045r = i14;
                                                                this.f19046s = i11;
                                                                this.f19048u = 6;
                                                                objK = J.k(j16, 30, this);
                                                                if (objK == r95) {
                                                                    return r95;
                                                                }
                                                                i16 = i11;
                                                                map16 = mapQ;
                                                                map17 = map9;
                                                                r22 = r25;
                                                                r97 = r95;
                                                                map22 = linkedHashMap6;
                                                                map21 = map10;
                                                                map20 = map7;
                                                                J.i(this.f19049v, (JSONArray) objK, linkedHashSet, map22);
                                                                linkedHashSet.addAll(map17.keySet());
                                                                Map map35 = map16;
                                                                map15 = map17;
                                                                mapQ = map35;
                                                                r24 = r22;
                                                                r99 = r97;
                                                                map27 = map22;
                                                                map26 = map21;
                                                                map25 = map20;
                                                                Map map36 = map27;
                                                                map13 = map26;
                                                                map12 = map36;
                                                                map11 = map15;
                                                                i11 = i16;
                                                                r23 = r24;
                                                                r98 = r99;
                                                                map23 = map25;
                                                                Map map342 = mapQ;
                                                                Instant instant142 = instant8;
                                                                String str452 = str6;
                                                                Instant instant152 = instant5;
                                                                linkedHashSet.size();
                                                                Set setJ02 = AbstractC3251q.j0(linkedHashSet, setG0);
                                                                linkedHashSet.removeAll(setG0);
                                                                setJ02.isEmpty();
                                                                AbstractC3251q.j0(linkedHashSet, setG0).isEmpty();
                                                                LinkedHashMap linkedHashMap72 = new LinkedHashMap();
                                                                it2 = map23.entrySet().iterator();
                                                                while (it2.hasNext()) {
                                                                    JSONObject jSONObject5 = (JSONObject) ((Map.Entry) it2.next()).getValue();
                                                                    String str46 = str20;
                                                                    JSONObject jSONObject6 = jSONObject5.getJSONObject(str46);
                                                                    J j17 = this.f19049v;
                                                                    kotlin.jvm.internal.o.e(jSONObject6);
                                                                    JSONObject jSONObjectC = J.c(j17, jSONObject6, jSONObject5);
                                                                    String str47 = str3;
                                                                    linkedHashMap72.put(jSONObjectC.getString(str47), jSONObjectC);
                                                                    str20 = str46;
                                                                    str3 = str47;
                                                                }
                                                                str27 = str3;
                                                                it3 = map13.entrySet().iterator();
                                                                while (it3.hasNext()) {
                                                                    JSONObject jSONObject7 = (JSONObject) ((Map.Entry) it3.next()).getValue();
                                                                    String str48 = str16;
                                                                    JSONObject jSONObject8 = jSONObject7.getJSONObject(str48);
                                                                    Iterator it5 = it3;
                                                                    String str49 = str14;
                                                                    JSONObject jSONObject9 = jSONObject7.getJSONObject(str49);
                                                                    Set set4 = linkedHashSet;
                                                                    J j18 = this.f19049v;
                                                                    kotlin.jvm.internal.o.e(jSONObject8);
                                                                    kotlin.jvm.internal.o.e(jSONObject9);
                                                                    JSONObject jSONObjectD = J.d(j18, jSONObject8, jSONObject9, jSONObject7);
                                                                    linkedHashMap72.put(jSONObjectD.getString(str27), jSONObjectD);
                                                                    it3 = it5;
                                                                    str16 = str48;
                                                                    str14 = str49;
                                                                    linkedHashSet = set4;
                                                                }
                                                                Set set32 = linkedHashSet;
                                                                vVar = new v(set32, e5.j.a(3), this.f19049v, instant142, map12, instant152, map11, map342, new ConcurrentHashMap(), linkedHashMap72, null);
                                                                this.f19032a = r23;
                                                                this.f19033b = str452;
                                                                this.f19034c = jSONArrayS;
                                                                this.f19035d = instant152;
                                                                this.f19036e = str15;
                                                                this.f19037f = set32;
                                                                this.f19038j = linkedHashMap72;
                                                                this.f19039k = null;
                                                                this.l = null;
                                                                this.f19040m = null;
                                                                this.f19041n = null;
                                                                this.f19042o = null;
                                                                this.f19043p = null;
                                                                this.f19044q = null;
                                                                this.f19045r = i14;
                                                                this.f19046s = i11;
                                                                this.f19048u = 8;
                                                                if (V4.E.k(vVar, this) == r98) {
                                                                    return r98;
                                                                }
                                                                i18 = i11;
                                                                set2 = set32;
                                                                i19 = i14;
                                                                str28 = str15;
                                                                instant9 = instant152;
                                                                map24 = linkedHashMap72;
                                                                r32 = r23;
                                                                str29 = str452;
                                                                jSONArray6 = jSONArrayS;
                                                                LinkedHashMap linkedHashMap52222 = new LinkedHashMap();
                                                                if (kotlin.jvm.internal.o.c(str28, str2)) {
                                                                    int length3 = jSONArray6.length();
                                                                    int i26 = 0;
                                                                    while (i26 < length3) {
                                                                        JSONObject jSONObjectOptJSONObject6 = jSONArray6.optJSONObject(i26);
                                                                        if (jSONObjectOptJSONObject6 == null) {
                                                                            jSONArray7 = jSONArray6;
                                                                            map30 = map24;
                                                                            str30 = str22;
                                                                            str33 = str21;
                                                                            obj3 = obj2;
                                                                            str32 = str19;
                                                                        } else {
                                                                            String strOptString3 = jSONObjectOptJSONObject6.optString(str27);
                                                                            kotlin.jvm.internal.o.e(strOptString3);
                                                                            if (!S4.p.Q0(strOptString3)) {
                                                                                if (i18 == 0) {
                                                                                    str32 = str19;
                                                                                    obj3 = obj2;
                                                                                    if (kotlin.jvm.internal.o.c(jSONObjectOptJSONObject6.optString(str32), obj3)) {
                                                                                        jSONArray7 = jSONArray6;
                                                                                        str31 = str11;
                                                                                        if (jSONObjectOptJSONObject6.optInt(str31, 0) > 0) {
                                                                                            kotlin.jvm.internal.o.e(instant9);
                                                                                            J j19 = this.f19049v;
                                                                                            map30 = map24;
                                                                                            str30 = str22;
                                                                                            String strOptString4 = jSONObjectOptJSONObject6.optString(str30);
                                                                                            AtomicLong atomicLong5 = J.f18885e;
                                                                                            j19.getClass();
                                                                                            Instant instantM2 = J.M(strOptString4);
                                                                                            if (instantM2 == null || instantM2.isBefore(instant9)) {
                                                                                                str11 = str31;
                                                                                                str33 = str21;
                                                                                            }
                                                                                        } else {
                                                                                            map30 = map24;
                                                                                            str30 = str22;
                                                                                        }
                                                                                    } else {
                                                                                        jSONArray7 = jSONArray6;
                                                                                        map30 = map24;
                                                                                        str30 = str22;
                                                                                        str31 = str11;
                                                                                    }
                                                                                } else {
                                                                                    jSONArray7 = jSONArray6;
                                                                                    map30 = map24;
                                                                                    str30 = str22;
                                                                                    obj3 = obj2;
                                                                                    str31 = str11;
                                                                                    str32 = str19;
                                                                                }
                                                                                if (i18 == 0 || jSONObjectOptJSONObject6.optInt(str31, 0) <= 0) {
                                                                                    if (i19 != 0 && kotlin.jvm.internal.o.c(jSONObjectOptJSONObject6.optString(str32), obj3) && jSONObjectOptJSONObject6.optInt(str31, 0) == 0) {
                                                                                        str11 = str31;
                                                                                        str33 = str21;
                                                                                        int iOptInt4 = jSONObjectOptJSONObject6.optInt(str33, 0);
                                                                                        if (iOptInt4 == 0 || !set2.contains(C4.g.a(iOptInt4))) {
                                                                                        }
                                                                                    } else {
                                                                                        str11 = str31;
                                                                                        str33 = str21;
                                                                                    }
                                                                                    linkedHashMap52222.put(strOptString3, jSONObjectOptJSONObject6);
                                                                                }
                                                                            }
                                                                        }
                                                                        i26++;
                                                                        str21 = str33;
                                                                        str22 = str30;
                                                                        obj2 = obj3;
                                                                        str19 = str32;
                                                                        map24 = map30;
                                                                        jSONArray6 = jSONArray7;
                                                                    }
                                                                }
                                                                for (Map.Entry entry : map24.entrySet()) {
                                                                    linkedHashMap52222.put((String) entry.getKey(), (JSONObject) entry.getValue());
                                                                }
                                                                List listX02222 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap52222.values());
                                                                JSONArray jSONArray82222 = new JSONArray();
                                                                it4 = listX02222.iterator();
                                                                while (it4.hasNext()) {
                                                                    jSONArray82222.put((JSONObject) it4.next());
                                                                }
                                                                Object obj42222 = AbstractC2060b.f16469a;
                                                                String string22222 = jSONArray82222.toString();
                                                                kotlin.jvm.internal.o.g(string22222, str);
                                                                String strF2222 = AbstractC2060b.f(string22222);
                                                                this.f19049v.f18889a.c(str29, strF2222);
                                                                context = AbstractC0696m3.f7937d0;
                                                                if (context == null) {
                                                                    context.getSharedPreferences("debridstream_app_progress_cache", 0).edit().putString("trakt_continue_watching_json", strF2222).apply();
                                                                    break;
                                                                }
                                                                J.h(this.f19049v, EnumC2273g.f18932b, r32);
                                                                return c3137a;
                                                            }
                                                            str22 = str44;
                                                            J j20 = this.f19049v;
                                                            this.f19032a = r25;
                                                            this.f19033b = instant8;
                                                            this.f19034c = str6;
                                                            this.f19035d = jSONArrayS;
                                                            this.f19036e = instant5;
                                                            this.f19037f = str15;
                                                            r17 = r25;
                                                            try {
                                                                this.f19038j = map7;
                                                                this.f19039k = map10;
                                                                this.l = map9;
                                                                this.f19040m = jSONArray11;
                                                                this.f19041n = mapQ;
                                                                this.f19042o = setG0;
                                                                this.f19043p = linkedHashSet;
                                                                this.f19044q = linkedHashMap6;
                                                                this.f19045r = i14;
                                                                this.f19046s = i11;
                                                                this.f19048u = 7;
                                                                objL = J.l(j20, instant5, this);
                                                                if (objL == r95) {
                                                                    return r95;
                                                                }
                                                                map14 = mapQ;
                                                                jSONArray5 = jSONArray11;
                                                                set = linkedHashSet;
                                                                i15 = i11;
                                                                map15 = map9;
                                                                r910 = r95;
                                                                linkedHashMap4 = linkedHashMap6;
                                                                r17 = r17;
                                                                map29 = map10;
                                                                map28 = map7;
                                                                Instant instant16 = instant8;
                                                                J.i(this.f19049v, (JSONArray) objL, set, linkedHashMap4);
                                                                set.addAll(J.p(this.f19049v, jSONArray5, instant5));
                                                                instant8 = instant16;
                                                                mapQ = map14;
                                                                r24 = r17;
                                                                i16 = i15;
                                                                linkedHashSet = set;
                                                                r99 = r910;
                                                                map27 = linkedHashMap4;
                                                                map26 = map29;
                                                                map25 = map28;
                                                                Map map362 = map27;
                                                                map13 = map26;
                                                                map12 = map362;
                                                                map11 = map15;
                                                                i11 = i16;
                                                                r23 = r24;
                                                                r98 = r99;
                                                                map23 = map25;
                                                                Map map3422 = mapQ;
                                                                Instant instant1422 = instant8;
                                                                String str4522 = str6;
                                                                Instant instant1522 = instant5;
                                                                linkedHashSet.size();
                                                                Set setJ022 = AbstractC3251q.j0(linkedHashSet, setG0);
                                                                linkedHashSet.removeAll(setG0);
                                                                setJ022.isEmpty();
                                                                AbstractC3251q.j0(linkedHashSet, setG0).isEmpty();
                                                                LinkedHashMap linkedHashMap722 = new LinkedHashMap();
                                                                it2 = map23.entrySet().iterator();
                                                                while (it2.hasNext()) {
                                                                }
                                                                str27 = str3;
                                                                it3 = map13.entrySet().iterator();
                                                                while (it3.hasNext()) {
                                                                }
                                                                Set set322 = linkedHashSet;
                                                                vVar = new v(set322, e5.j.a(3), this.f19049v, instant1422, map12, instant1522, map11, map3422, new ConcurrentHashMap(), linkedHashMap722, null);
                                                                this.f19032a = r23;
                                                                this.f19033b = str4522;
                                                                this.f19034c = jSONArrayS;
                                                                this.f19035d = instant1522;
                                                                this.f19036e = str15;
                                                                this.f19037f = set322;
                                                                this.f19038j = linkedHashMap722;
                                                                this.f19039k = null;
                                                                this.l = null;
                                                                this.f19040m = null;
                                                                this.f19041n = null;
                                                                this.f19042o = null;
                                                                this.f19043p = null;
                                                                this.f19044q = null;
                                                                this.f19045r = i14;
                                                                this.f19046s = i11;
                                                                this.f19048u = 8;
                                                                if (V4.E.k(vVar, this) == r98) {
                                                                }
                                                            } catch (Throwable th4) {
                                                                th = th4;
                                                                r25 = r17;
                                                                J.h(this.f19049v, EnumC2273g.f18932b, r25);
                                                                throw th;
                                                            }
                                                        }
                                                    } catch (Throwable th5) {
                                                        th = th5;
                                                    }
                                                } else {
                                                    jSONArray4 = new JSONArray();
                                                    r25 = atomicInteger4;
                                                    r95 = r93;
                                                    map8 = map3;
                                                    map7 = map32222;
                                                    Map map332 = linkedHashMap3;
                                                    instant8 = instant6;
                                                    JSONArray jSONArray112 = jSONArray4;
                                                    i14 = i12;
                                                    if (i13 != 0) {
                                                    }
                                                    setG0 = AbstractC3251q.G0(map8.keySet());
                                                    if (i11 == 0) {
                                                    }
                                                    String str432 = str8;
                                                    str19 = str10;
                                                    str20 = str12;
                                                    String str442 = str4;
                                                    linkedHashSet = new LinkedHashSet();
                                                    str21 = str432;
                                                    LinkedHashMap linkedHashMap62 = new LinkedHashMap();
                                                    if (i14 == 0) {
                                                    }
                                                }
                                            }
                                        }
                                    } else {
                                        z7 = z6;
                                    }
                                    i6 = 1;
                                    if (jSONObject != null) {
                                        jSONObject.optJSONObject("playback");
                                        jSONObject.optJSONObject("episodes");
                                    }
                                    if (z7) {
                                    }
                                    if (z7) {
                                        if (i7 != 0) {
                                        }
                                    }
                                    LinkedHashMap linkedHashMap522222 = new LinkedHashMap();
                                    if (kotlin.jvm.internal.o.c(str28, str2)) {
                                    }
                                    while (r0.hasNext()) {
                                    }
                                    List listX022222 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap522222.values());
                                    JSONArray jSONArray822222 = new JSONArray();
                                    it4 = listX022222.iterator();
                                    while (it4.hasNext()) {
                                    }
                                    Object obj422222 = AbstractC2060b.f16469a;
                                    String string222222 = jSONArray822222.toString();
                                    kotlin.jvm.internal.o.g(string222222, str);
                                    String strF22222 = AbstractC2060b.f(string222222);
                                    this.f19049v.f18889a.c(str29, strF22222);
                                    context = AbstractC0696m3.f7937d0;
                                    if (context == null) {
                                    }
                                    J.h(this.f19049v, EnumC2273g.f18932b, r32);
                                    return c3137a;
                                }
                                str9 = "movie";
                                obj2 = "tv";
                                str10 = "type";
                                z6 = true;
                                if (instant == null) {
                                }
                                i6 = 1;
                                if (jSONObject != null) {
                                }
                                if (z7) {
                                }
                                if (z7) {
                                }
                                LinkedHashMap linkedHashMap5222222 = new LinkedHashMap();
                                if (kotlin.jvm.internal.o.c(str28, str2)) {
                                }
                                while (r0.hasNext()) {
                                }
                                List listX0222222 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap5222222.values());
                                JSONArray jSONArray8222222 = new JSONArray();
                                it4 = listX0222222.iterator();
                                while (it4.hasNext()) {
                                }
                                Object obj4222222 = AbstractC2060b.f16469a;
                                String string2222222 = jSONArray8222222.toString();
                                kotlin.jvm.internal.o.g(string2222222, str);
                                String strF222222 = AbstractC2060b.f(string2222222);
                                this.f19049v.f18889a.c(str29, strF222222);
                                context = AbstractC0696m3.f7937d0;
                                if (context == null) {
                                }
                                J.h(this.f19049v, EnumC2273g.f18932b, r32);
                                return c3137a;
                            } catch (Throwable th6) {
                                th = th6;
                                r25 = atomicInteger2;
                            }
                        }
                        return r25;
                    } catch (Throwable th7) {
                        th = th7;
                        r25 = atomicInteger;
                    }
                } catch (Throwable th8) {
                    th = th8;
                    atomicInteger = atomicIntegerB;
                }
                r25 = atomicInteger;
                J.h(this.f19049v, EnumC2273g.f18932b, r25);
                throw th;
            case 1:
                String str50 = (String) this.f19037f;
                Instant instant17 = (Instant) this.f19036e;
                JSONArray jSONArray12 = (JSONArray) this.f19035d;
                String str51 = (String) this.f19034c;
                Instant instant18 = (Instant) this.f19033b;
                AtomicInteger atomicInteger8 = this.f19032a;
                AbstractC2467b.l(obj);
                instant2 = instant17;
                instantNow = instant18;
                str3 = SubscriberAttributeKt.JSON_NAME_KEY;
                str4 = "sortDate";
                str7 = str51;
                str2 = "delta";
                jSONArray = jSONArray12;
                str = "toString(...)";
                str5 = str50;
                c3137a = c3137a2;
                atomicInteger2 = atomicInteger8;
                objJ = obj;
                Instant instant102 = instant2;
                jSONObject = (JSONObject) objJ;
                instant = instant102;
                JSONArray jSONArray92 = jSONArray;
                str6 = str7;
                jSONArrayS = jSONArray92;
                str8 = "traktId";
                if (instant != null) {
                }
                z6 = true;
                if (instant == null) {
                }
                i6 = 1;
                if (jSONObject != null) {
                }
                if (z7) {
                }
                if (z7) {
                }
                LinkedHashMap linkedHashMap52222222 = new LinkedHashMap();
                if (kotlin.jvm.internal.o.c(str28, str2)) {
                }
                while (r0.hasNext()) {
                }
                List listX02222222 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap52222222.values());
                JSONArray jSONArray82222222 = new JSONArray();
                it4 = listX02222222.iterator();
                while (it4.hasNext()) {
                }
                Object obj42222222 = AbstractC2060b.f16469a;
                String string22222222 = jSONArray82222222.toString();
                kotlin.jvm.internal.o.g(string22222222, str);
                String strF2222222 = AbstractC2060b.f(string22222222);
                this.f19049v.f18889a.c(str29, strF2222222);
                context = AbstractC0696m3.f7937d0;
                if (context == null) {
                }
                J.h(this.f19049v, EnumC2273g.f18932b, r32);
                return c3137a;
            case 2:
                int i27 = this.f19046s;
                int i28 = this.f19045r;
                String str52 = (String) this.f19037f;
                Instant instant19 = (Instant) this.f19036e;
                JSONArray jSONArray13 = (JSONArray) this.f19035d;
                String str53 = (String) this.f19034c;
                Instant instant20 = (Instant) this.f19033b;
                atomicInteger3 = this.f19032a;
                AbstractC2467b.l(obj);
                str = "toString(...)";
                str5 = str52;
                str9 = "movie";
                obj2 = "tv";
                str10 = "type";
                i6 = i28;
                instantNow = instant20;
                str8 = "traktId";
                i7 = i27;
                c3137a = c3137a2;
                instant3 = instant19;
                str2 = "delta";
                str6 = str53;
                str4 = "sortDate";
                jSONArrayS = jSONArray13;
                str3 = SubscriberAttributeKt.JSON_NAME_KEY;
                objF = obj;
                jSONArray2 = (JSONArray) objF;
                linkedHashMap = new LinkedHashMap();
                linkedHashMap2 = new LinkedHashMap();
                length = jSONArray2.length();
                i8 = i7;
                i9 = i6;
                i10 = 0;
                int i2022 = 0;
                int i2122 = 0;
                while (i10 < length) {
                }
                String str3522 = str9;
                str11 = str34;
                str12 = str3522;
                instant4 = instant3;
                str13 = str5;
                AbstractC3251q.m0(linkedHashMap2.entrySet(), "; ", null, null, new C2167o4(10), 22);
                if (i9 == 0) {
                }
                str14 = "episode";
                r9 = r25;
                i11 = i8;
                str15 = str13;
                instant5 = instant4;
                str16 = "show";
                if (i11 == 0) {
                }
                jSONArray3 = new JSONArray();
                atomicInteger4 = atomicInteger3;
                instant6 = instantNow;
                i12 = i9;
                r93 = r9;
                map4 = linkedHashMap;
                map3 = linkedHashMap2;
                LinkedHashMap linkedHashMapR2222 = J.r(this.f19049v, jSONArray3);
                linkedHashMap3 = new LinkedHashMap(AbstractC3229F.u(linkedHashMapR2222.size()));
                it = linkedHashMapR2222.entrySet().iterator();
                Map map312222 = map4;
                while (it.hasNext()) {
                }
                Map map322222 = map312222;
                J.v(this.f19049v, map3, linkedHashMapR2222);
                if (i11 == 0) {
                }
                LinkedHashMap linkedHashMap522222222 = new LinkedHashMap();
                if (kotlin.jvm.internal.o.c(str28, str2)) {
                }
                while (r0.hasNext()) {
                }
                List listX022222222 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap522222222.values());
                JSONArray jSONArray822222222 = new JSONArray();
                it4 = listX022222222.iterator();
                while (it4.hasNext()) {
                }
                Object obj422222222 = AbstractC2060b.f16469a;
                String string222222222 = jSONArray822222222.toString();
                kotlin.jvm.internal.o.g(string222222222, str);
                String strF22222222 = AbstractC2060b.f(string222222222);
                this.f19049v.f18889a.c(str29, strF22222222);
                context = AbstractC0696m3.f7937d0;
                if (context == null) {
                }
                J.h(this.f19049v, EnumC2273g.f18932b, r32);
                return c3137a;
            case 3:
                int i29 = this.f19046s;
                i12 = this.f19045r;
                Map map37 = this.f19039k;
                Map map38 = this.f19038j;
                String str54 = (String) this.f19037f;
                Instant instant21 = (Instant) this.f19036e;
                JSONArray jSONArray14 = (JSONArray) this.f19035d;
                String str55 = (String) this.f19034c;
                Instant instant22 = (Instant) this.f19033b;
                AtomicInteger atomicInteger9 = this.f19032a;
                AbstractC2467b.l(obj);
                r92 = r25;
                atomicInteger6 = atomicInteger9;
                instant6 = instant22;
                str10 = "type";
                map = map37;
                str = "toString(...)";
                instant5 = instant21;
                str4 = "sortDate";
                jSONArrayS = jSONArray14;
                str8 = "traktId";
                str2 = "delta";
                str6 = str55;
                obj2 = "tv";
                map2 = map38;
                str3 = SubscriberAttributeKt.JSON_NAME_KEY;
                str15 = str54;
                str16 = "show";
                str14 = "episode";
                str11 = "progress";
                str12 = "movie";
                i11 = i29;
                objD2 = obj;
                c3137a = c3137a2;
                jSONArray3 = (JSONArray) objD2;
                atomicInteger4 = atomicInteger6;
                r93 = r92;
                map4 = map2;
                map3 = map;
                LinkedHashMap linkedHashMapR22222 = J.r(this.f19049v, jSONArray3);
                linkedHashMap3 = new LinkedHashMap(AbstractC3229F.u(linkedHashMapR22222.size()));
                it = linkedHashMapR22222.entrySet().iterator();
                Map map3122222 = map4;
                while (it.hasNext()) {
                }
                Map map3222222 = map3122222;
                J.v(this.f19049v, map3, linkedHashMapR22222);
                if (i11 == 0) {
                }
                LinkedHashMap linkedHashMap5222222222 = new LinkedHashMap();
                if (kotlin.jvm.internal.o.c(str28, str2)) {
                }
                while (r0.hasNext()) {
                }
                List listX0222222222 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap5222222222.values());
                JSONArray jSONArray8222222222 = new JSONArray();
                it4 = listX0222222222.iterator();
                while (it4.hasNext()) {
                }
                Object obj4222222222 = AbstractC2060b.f16469a;
                String string2222222222 = jSONArray8222222222.toString();
                kotlin.jvm.internal.o.g(string2222222222, str);
                String strF222222222 = AbstractC2060b.f(string2222222222);
                this.f19049v.f18889a.c(str29, strF222222222);
                context = AbstractC0696m3.f7937d0;
                if (context == null) {
                }
                J.h(this.f19049v, EnumC2273g.f18932b, r32);
                return c3137a;
            case 4:
                int i30 = this.f19046s;
                i12 = this.f19045r;
                Map map39 = this.f19039k;
                Map map40 = this.f19038j;
                String str56 = (String) this.f19037f;
                Instant instant23 = (Instant) this.f19036e;
                JSONArray jSONArray15 = (JSONArray) this.f19035d;
                String str57 = (String) this.f19034c;
                Instant instant24 = (Instant) this.f19033b;
                AtomicInteger atomicInteger10 = this.f19032a;
                AbstractC2467b.l(obj);
                r94 = r25;
                atomicInteger5 = atomicInteger10;
                instant6 = instant24;
                str10 = "type";
                map5 = map39;
                str = "toString(...)";
                instant5 = instant23;
                str4 = "sortDate";
                jSONArrayS = jSONArray15;
                str8 = "traktId";
                str2 = "delta";
                str6 = str57;
                obj2 = "tv";
                map6 = map40;
                str3 = SubscriberAttributeKt.JSON_NAME_KEY;
                str15 = str56;
                str16 = "show";
                str14 = "episode";
                str11 = "progress";
                str12 = "movie";
                i11 = i30;
                objD = obj;
                c3137a = c3137a2;
                jSONArray3 = (JSONArray) objD;
                atomicInteger4 = atomicInteger5;
                r93 = r94;
                map4 = map6;
                map3 = map5;
                LinkedHashMap linkedHashMapR222222 = J.r(this.f19049v, jSONArray3);
                linkedHashMap3 = new LinkedHashMap(AbstractC3229F.u(linkedHashMapR222222.size()));
                it = linkedHashMapR222222.entrySet().iterator();
                Map map31222222 = map4;
                while (it.hasNext()) {
                }
                Map map32222222 = map31222222;
                J.v(this.f19049v, map3, linkedHashMapR222222);
                if (i11 == 0) {
                }
                LinkedHashMap linkedHashMap52222222222 = new LinkedHashMap();
                if (kotlin.jvm.internal.o.c(str28, str2)) {
                }
                while (r0.hasNext()) {
                }
                List listX02222222222 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap52222222222.values());
                JSONArray jSONArray82222222222 = new JSONArray();
                it4 = listX02222222222.iterator();
                while (it4.hasNext()) {
                }
                Object obj42222222222 = AbstractC2060b.f16469a;
                String string22222222222 = jSONArray82222222222.toString();
                kotlin.jvm.internal.o.g(string22222222222, str);
                String strF2222222222 = AbstractC2060b.f(string22222222222);
                this.f19049v.f18889a.c(str29, strF2222222222);
                context = AbstractC0696m3.f7937d0;
                if (context == null) {
                }
                J.h(this.f19049v, EnumC2273g.f18932b, r32);
                return c3137a;
            case 5:
                int i31 = this.f19047t;
                int i32 = this.f19046s;
                int i33 = this.f19045r;
                Map map41 = this.l;
                Map map42 = this.f19039k;
                Map map43 = this.f19038j;
                String str58 = (String) this.f19037f;
                Instant instant25 = (Instant) this.f19036e;
                JSONArray jSONArray16 = (JSONArray) this.f19035d;
                String str59 = (String) this.f19034c;
                Instant instant26 = (Instant) this.f19033b;
                AtomicInteger atomicInteger11 = this.f19032a;
                AbstractC2467b.l(obj);
                str16 = "show";
                str14 = "episode";
                i11 = i32;
                i13 = i31;
                i12 = i33;
                map18 = map43;
                c3137a = c3137a2;
                str4 = "sortDate";
                str = "toString(...)";
                linkedHashMap3 = map41;
                instant5 = instant25;
                jSONArrayS = jSONArray16;
                str2 = "delta";
                obj2 = "tv";
                str10 = "type";
                map19 = map42;
                str6 = str59;
                str11 = "progress";
                str12 = "movie";
                str3 = SubscriberAttributeKt.JSON_NAME_KEY;
                str15 = str58;
                objO = obj;
                str8 = "traktId";
                r96 = r25;
                atomicInteger7 = atomicInteger11;
                instant6 = instant26;
                jSONArray4 = (JSONArray) objO;
                r25 = atomicInteger7;
                r95 = r96;
                map8 = map19;
                map7 = map18;
                Map map3322 = linkedHashMap3;
                instant8 = instant6;
                JSONArray jSONArray1122 = jSONArray4;
                i14 = i12;
                if (i13 != 0) {
                }
                setG0 = AbstractC3251q.G0(map8.keySet());
                if (i11 == 0) {
                }
                String str4322 = str8;
                str19 = str10;
                str20 = str12;
                String str4422 = str4;
                linkedHashSet = new LinkedHashSet();
                str21 = str4322;
                LinkedHashMap linkedHashMap622 = new LinkedHashMap();
                if (i14 == 0) {
                }
                break;
            case 6:
                int i34 = this.f19046s;
                int i35 = this.f19045r;
                i16 = i34;
                Map map44 = (Map) this.f19043p;
                Set set5 = this.f19042o;
                Set set6 = (Set) this.f19041n;
                Map map45 = (Map) this.f19040m;
                Map map46 = this.l;
                Map map47 = this.f19039k;
                Map map48 = this.f19038j;
                String str60 = (String) this.f19037f;
                Instant instant27 = (Instant) this.f19036e;
                JSONArray jSONArray17 = (JSONArray) this.f19035d;
                String str61 = (String) this.f19034c;
                Instant instant28 = (Instant) this.f19033b;
                AtomicInteger atomicInteger12 = this.f19032a;
                AbstractC2467b.l(obj);
                str14 = "episode";
                str19 = "type";
                map22 = map44;
                map16 = map45;
                c3137a = c3137a2;
                str3 = SubscriberAttributeKt.JSON_NAME_KEY;
                str15 = str60;
                instant8 = instant28;
                str20 = "movie";
                map20 = map48;
                i14 = i35;
                obj2 = "tv";
                linkedHashSet = set5;
                setG0 = set6;
                str2 = "delta";
                str = "toString(...)";
                instant5 = instant27;
                str6 = str61;
                str16 = "show";
                str11 = "progress";
                map17 = map46;
                str22 = "sortDate";
                jSONArrayS = jSONArray17;
                map21 = map47;
                str21 = "traktId";
                r97 = r25;
                r22 = atomicInteger12;
                objK = obj;
                J.i(this.f19049v, (JSONArray) objK, linkedHashSet, map22);
                linkedHashSet.addAll(map17.keySet());
                Map map352 = map16;
                map15 = map17;
                mapQ = map352;
                r24 = r22;
                r99 = r97;
                map27 = map22;
                map26 = map21;
                map25 = map20;
                Map map3622 = map27;
                map13 = map26;
                map12 = map3622;
                map11 = map15;
                i11 = i16;
                r23 = r24;
                r98 = r99;
                map23 = map25;
                Map map34222 = mapQ;
                Instant instant14222 = instant8;
                String str45222 = str6;
                Instant instant15222 = instant5;
                linkedHashSet.size();
                Set setJ0222 = AbstractC3251q.j0(linkedHashSet, setG0);
                linkedHashSet.removeAll(setG0);
                setJ0222.isEmpty();
                AbstractC3251q.j0(linkedHashSet, setG0).isEmpty();
                LinkedHashMap linkedHashMap7222 = new LinkedHashMap();
                it2 = map23.entrySet().iterator();
                while (it2.hasNext()) {
                }
                str27 = str3;
                it3 = map13.entrySet().iterator();
                while (it3.hasNext()) {
                }
                Set set3222 = linkedHashSet;
                vVar = new v(set3222, e5.j.a(3), this.f19049v, instant14222, map12, instant15222, map11, map34222, new ConcurrentHashMap(), linkedHashMap7222, null);
                this.f19032a = r23;
                this.f19033b = str45222;
                this.f19034c = jSONArrayS;
                this.f19035d = instant15222;
                this.f19036e = str15;
                this.f19037f = set3222;
                this.f19038j = linkedHashMap7222;
                this.f19039k = null;
                this.l = null;
                this.f19040m = null;
                this.f19041n = null;
                this.f19042o = null;
                this.f19043p = null;
                this.f19044q = null;
                this.f19045r = i14;
                this.f19046s = i11;
                this.f19048u = 8;
                if (V4.E.k(vVar, this) == r98) {
                }
                break;
            case 7:
                int i36 = this.f19046s;
                int i37 = this.f19045r;
                LinkedHashMap linkedHashMap8 = this.f19044q;
                Set set7 = (Set) this.f19043p;
                Set set8 = this.f19042o;
                Map map49 = (Map) this.f19041n;
                JSONArray jSONArray18 = (JSONArray) this.f19040m;
                Map map50 = this.l;
                Map map51 = this.f19039k;
                Map map52 = this.f19038j;
                String str62 = (String) this.f19037f;
                Instant instant29 = (Instant) this.f19036e;
                JSONArray jSONArray19 = (JSONArray) this.f19035d;
                String str63 = (String) this.f19034c;
                Instant instant30 = (Instant) this.f19033b;
                AtomicInteger atomicInteger13 = this.f19032a;
                AbstractC2467b.l(obj);
                str16 = "show";
                jSONArray5 = jSONArray18;
                str22 = "sortDate";
                jSONArrayS = jSONArray19;
                r17 = atomicInteger13;
                set = set7;
                str = "toString(...)";
                instant5 = instant29;
                map29 = map51;
                obj2 = "tv";
                setG0 = set8;
                str2 = "delta";
                str6 = str63;
                map28 = map52;
                str20 = "movie";
                i14 = i37;
                i15 = i36;
                str11 = "progress";
                map14 = map49;
                str3 = SubscriberAttributeKt.JSON_NAME_KEY;
                str15 = str62;
                str19 = "type";
                linkedHashMap4 = linkedHashMap8;
                c3137a = c3137a2;
                instant8 = instant30;
                str14 = "episode";
                map15 = map50;
                str21 = "traktId";
                r910 = r25;
                objL = obj;
                Instant instant162 = instant8;
                J.i(this.f19049v, (JSONArray) objL, set, linkedHashMap4);
                set.addAll(J.p(this.f19049v, jSONArray5, instant5));
                instant8 = instant162;
                mapQ = map14;
                r24 = r17;
                i16 = i15;
                linkedHashSet = set;
                r99 = r910;
                map27 = linkedHashMap4;
                map26 = map29;
                map25 = map28;
                Map map36222 = map27;
                map13 = map26;
                map12 = map36222;
                map11 = map15;
                i11 = i16;
                r23 = r24;
                r98 = r99;
                map23 = map25;
                Map map342222 = mapQ;
                Instant instant142222 = instant8;
                String str452222 = str6;
                Instant instant152222 = instant5;
                linkedHashSet.size();
                Set setJ02222 = AbstractC3251q.j0(linkedHashSet, setG0);
                linkedHashSet.removeAll(setG0);
                setJ02222.isEmpty();
                AbstractC3251q.j0(linkedHashSet, setG0).isEmpty();
                LinkedHashMap linkedHashMap72222 = new LinkedHashMap();
                it2 = map23.entrySet().iterator();
                while (it2.hasNext()) {
                }
                str27 = str3;
                it3 = map13.entrySet().iterator();
                while (it3.hasNext()) {
                }
                Set set32222 = linkedHashSet;
                vVar = new v(set32222, e5.j.a(3), this.f19049v, instant142222, map12, instant152222, map11, map342222, new ConcurrentHashMap(), linkedHashMap72222, null);
                this.f19032a = r23;
                this.f19033b = str452222;
                this.f19034c = jSONArrayS;
                this.f19035d = instant152222;
                this.f19036e = str15;
                this.f19037f = set32222;
                this.f19038j = linkedHashMap72222;
                this.f19039k = null;
                this.l = null;
                this.f19040m = null;
                this.f19041n = null;
                this.f19042o = null;
                this.f19043p = null;
                this.f19044q = null;
                this.f19045r = i14;
                this.f19046s = i11;
                this.f19048u = 8;
                if (V4.E.k(vVar, this) == r98) {
                }
                break;
            case 8:
                int i38 = this.f19046s;
                int i39 = this.f19045r;
                Map map53 = this.f19038j;
                set2 = (Set) this.f19037f;
                str28 = (String) this.f19036e;
                instant9 = (Instant) this.f19035d;
                i18 = i38;
                JSONArray jSONArray20 = (JSONArray) this.f19034c;
                String str64 = (String) this.f19033b;
                i19 = i39;
                AtomicInteger atomicInteger14 = this.f19032a;
                AbstractC2467b.l(obj);
                c3137a = c3137a2;
                str22 = "sortDate";
                str11 = "progress";
                str21 = "traktId";
                str2 = "delta";
                str = "toString(...)";
                str27 = SubscriberAttributeKt.JSON_NAME_KEY;
                obj2 = "tv";
                str19 = "type";
                map24 = map53;
                r32 = atomicInteger14;
                str29 = str64;
                jSONArray6 = jSONArray20;
                LinkedHashMap linkedHashMap522222222222 = new LinkedHashMap();
                if (kotlin.jvm.internal.o.c(str28, str2)) {
                }
                while (r0.hasNext()) {
                }
                List listX022222222222 = AbstractC3251q.x0(new C2279m(this.f19049v, 1), linkedHashMap522222222222.values());
                JSONArray jSONArray822222222222 = new JSONArray();
                it4 = listX022222222222.iterator();
                while (it4.hasNext()) {
                }
                Object obj422222222222 = AbstractC2060b.f16469a;
                String string222222222222 = jSONArray822222222222.toString();
                kotlin.jvm.internal.o.g(string222222222222, str);
                String strF22222222222 = AbstractC2060b.f(string222222222222);
                this.f19049v.f18889a.c(str29, strF22222222222);
                context = AbstractC0696m3.f7937d0;
                if (context == null) {
                }
                J.h(this.f19049v, EnumC2273g.f18932b, r32);
                return c3137a;
            default:
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
    }
}
