package com.ss.android.ugc.aweme.tools.draft.viewmodel;

import X.0Bt;
import X.1Bn;
import X.2Pr;
import X.3ip;
import X.4r1;
import X.8dd;
import X.AnonymousClass743;
import X.AnonymousClass74J;
import X.C35526Zq;
import X.C39956gz;
import X.C39966h0;
import X.C39976h1;
import X.C42016kJ;
import X.C42616lH;
import X.C42646lK;
import X.C43426ma;
import X.C49676wf;
import X.C527473w;
import X.Cof;
import X.Cv9;
import X.Cwu;
import X.DAj;
import X.FWb;
import X.LsC;
import X.TSt;
import com.bytedance.covode.number.Covode;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import kotlin.h.b.n;

public final class DraftViewModel extends 0Bt {
    public final String LIZ = "DraftViewModel";
    public final Set<AnonymousClass743> LIZIZ = new HashSet();
    public final List<AnonymousClass74J> LIZJ = new ArrayList();
    public final 1Bn<Boolean> LIZLLL = new 1Bn<>();
    public final 1Bn<Cwu<C42016kJ, Boolean>> LJ = new 1Bn<>();
    public final 1Bn<C42016kJ> LJFF = new 1Bn<>();
    public final 1Bn<C42646lK> LJI = new 1Bn<>();
    public final C42616lH LJII = new C42616lH();
    public final Cv9 LJIIIIZZ = DAj.LIZ(8dd.LIZ);
    public boolean LJIIIZ;
    public boolean LJIIJ;
    public boolean LJIIJJI;
    public boolean LJIIL;

    static {
        Covode.recordClassIndex(119678);
    }

    public final void LIZIZ() {
        this.LJIIIZ = false;
        this.LJIIJ = false;
        this.LJIIJJI = false;
        this.LJIIL = false;
        this.LIZJ.clear();
        this.LJII.LIZ();
    }

    public final void onCleared() {
        DraftViewModel.super.onCleared();
        C35526Zq.LIZ(this.LIZ + " -> onCleared: ");
    }

    /* JADX WARNING: Removed duplicated region for block: B:3:0x000c  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final boolean LIZ() {
        /*
            r4 = this;
            java.util.List<X.74J> r0 = r4.LIZJ
            java.util.Iterator r3 = r0.iterator()
        L_0x0006:
            boolean r0 = r3.hasNext()
            if (r0 == 0) goto L_0x0024
            java.lang.Object r2 = r3.next()
            X.74J r2 = (X.AnonymousClass74J) r2
            int r1 = r2.LIZ()
            r0 = 101(0x65, float:1.42E-43)
            if (r1 == r0) goto L_0x0022
            int r1 = r2.LIZ()
            r0 = 106(0x6a, float:1.49E-43)
            if (r1 != r0) goto L_0x0006
        L_0x0022:
            r0 = 0
            return r0
        L_0x0024:
            r0 = 1
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.tools.draft.viewmodel.DraftViewModel.LIZ():boolean");
    }

    public final void LIZ(ArrayList<AnonymousClass743> arrayList) {
        Iterator<AnonymousClass743> it = arrayList.iterator();
        while (it.hasNext()) {
            AnonymousClass743 next = it.next();
            if (next instanceof C527473w) {
                LIZ(next);
                LIZIZ(next);
            }
            this.LIZJ.remove(next);
        }
        if (LIZ()) {
            this.LIZJ.clear();
        }
        3ip.LIZ(this.LIZLLL, true);
    }

    public final void LIZIZ(AnonymousClass743 r9) {
        boolean z;
        boolean z2;
        boolean z3;
        int indexOf = this.LIZJ.indexOf(r9);
        if (indexOf > 0) {
            int i = indexOf - 1;
            boolean z4 = false;
            if (this.LIZJ.get(i).LIZ() == 102) {
                z = true;
            } else {
                z = false;
            }
            if (indexOf == this.LIZJ.size() - 1) {
                z2 = true;
            } else {
                z2 = false;
            }
            int i2 = indexOf + 1;
            if (i2 >= this.LIZJ.size() || this.LIZJ.get(i2).LIZ() != 102) {
                z3 = false;
            } else {
                z3 = true;
            }
            if (i2 < this.LIZJ.size() && this.LIZJ.get(i2).LIZ() == 108) {
                z4 = true;
            }
            if (!z) {
                return;
            }
            if (z2 || z3 || z4) {
                List<AnonymousClass74J> list = this.LIZJ;
                list.remove(list.get(i));
            }
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:57:0x01aa, code lost:
        if (r10.get(6) == r2.get(6)) goto L_0x0065;
     */
    /* JADX WARNING: Removed duplicated region for block: B:20:0x007c  */
    /* JADX WARNING: Removed duplicated region for block: B:23:0x0081  */
    /* JADX WARNING: Removed duplicated region for block: B:36:0x00bc  */
    /* JADX WARNING: Removed duplicated region for block: B:45:0x0127  */
    /* JADX WARNING: Removed duplicated region for block: B:53:0x018b  */
    /* JADX WARNING: Removed duplicated region for block: B:87:0x0129 A[SYNTHETIC] */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    private final void LIZ(java.util.List<X.C526773p> r29) {
        /*
            r28 = this;
            r6 = r28
            boolean r0 = r29.isEmpty()
            if (r0 == 0) goto L_0x0009
            return
        L_0x0009:
            java.util.List<X.74J> r0 = r6.LIZJ
            int r0 = r0.size()
            r12 = 0
            if (r0 != 0) goto L_0x001c
            X.748 r1 = new X.748
            r1.<init>(r12)
            java.util.List<X.74J> r0 = r6.LIZJ
            r0.add(r1)
        L_0x001c:
            java.util.List<X.74J> r0 = r6.LIZJ
            int r0 = r0.size()
            r5 = 1
            if (r0 <= r5) goto L_0x002f
            java.util.List<X.74J> r1 = r6.LIZJ
            int r0 = r1.size()
            int r0 = r0 - r5
            r1.remove(r0)
        L_0x002f:
            java.util.Iterator r15 = r29.iterator()
        L_0x0033:
            boolean r0 = r15.hasNext()
            if (r0 == 0) goto L_0x027c
            java.lang.Object r8 = r15.next()
            X.73p r8 = (X.C526773p) r8
            X.746 r9 = new X.746
            r9.<init>(r12)
            boolean r0 = r6.LJIIIZ
            r7 = 6
            java.lang.String r4 = ""
            if (r0 != 0) goto L_0x01ae
            X.73n r0 = r8.LIZIZ
            long r0 = r0.LJFF
            java.util.Calendar r10 = java.util.Calendar.getInstance()
            kotlin.h.b.n.LIZIZ(r10, r4)
            long r2 = java.lang.System.currentTimeMillis()
            r10.setTimeInMillis(r2)
            long r13 = r10.getTimeInMillis()
            int r2 = (r13 > r0 ? 1 : (r13 == r0 ? 0 : -1))
            if (r2 >= 0) goto L_0x018e
        L_0x0065:
            r0 = 2131832280(0x7f112dd8, float:1.929761E38)
            r9.LIZJ = r0
            r6.LJIIIZ = r5
        L_0x006c:
            java.util.List<X.74J> r0 = r6.LIZJ
            r0.add(r9)
            r4 = 1
        L_0x0072:
            X.73n r0 = r8.LIZIZ
            java.lang.String r0 = r0.LJ
            int r0 = r0.length()
            if (r0 <= 0) goto L_0x018b
            r0 = 1
        L_0x007d:
            r2 = 101(0x65, float:1.42E-43)
            if (r0 == 0) goto L_0x009c
            java.util.List<X.74J> r1 = r6.LIZJ
            int r0 = r1.size()
            int r0 = r0 - r5
            java.lang.Object r3 = r1.get(r0)
            X.74J r3 = (X.AnonymousClass74J) r3
            int r1 = r3.LIZ()
            if (r1 == r2) goto L_0x0147
            r0 = 102(0x66, float:1.43E-43)
            if (r1 == r0) goto L_0x0172
            r0 = 105(0x69, float:1.47E-43)
            if (r1 == r0) goto L_0x0130
        L_0x009c:
            r0 = 0
        L_0x009d:
            if (r4 != 0) goto L_0x00d3
            if (r0 != 0) goto L_0x00d3
            X.73n r0 = r8.LIZIZ
            java.lang.String r0 = r0.LIZLLL
            int r0 = r0.length()
            if (r0 <= 0) goto L_0x00d3
            java.util.List<X.74J> r1 = r6.LIZJ
            int r0 = r1.size()
            int r0 = r0 - r5
            java.lang.Object r3 = r1.get(r0)
            X.74J r3 = (X.AnonymousClass74J) r3
            boolean r0 = r3 instanceof X.C527473w
            if (r0 == 0) goto L_0x00d3
            r1 = r3
            X.73w r1 = (X.C527473w) r1
            java.lang.String r0 = r1.LJI
            int r0 = r0.length()
            if (r0 <= 0) goto L_0x00d3
            r1.LJIIJJI = r12
            java.util.List<X.74J> r1 = r6.LIZJ
            int r0 = r1.size()
            int r0 = r0 - r5
            r1.set(r0, r3)
        L_0x00d3:
            X.73w r3 = new X.73w
            r17 = 101(0x65, float:1.42E-43)
            java.lang.String r11 = r8.LIZ
            X.73n r0 = r8.LIZIZ
            java.lang.String r10 = r0.LIZJ
            X.73o r0 = r8.LIZJ
            long r0 = r0.LIZJ
            X.73n r4 = r8.LIZIZ
            java.lang.String r9 = r4.LIZLLL
            X.73n r4 = r8.LIZIZ
            java.lang.String r7 = r4.LJ
            X.73n r4 = r8.LIZIZ
            java.lang.String r4 = r4.LIZ
            X.73n r8 = r8.LIZIZ
            java.util.List<com.ss.android.ugc.aweme.creative.model.publish.AVTextExtraStruct> r8 = r8.LIZIZ
            r26 = 0
            r27 = 1792(0x700, float:2.511E-42)
            r16 = r3
            r18 = r11
            r19 = r10
            r20 = r0
            r22 = r9
            r23 = r7
            r24 = r4
            r25 = r8
            r16.<init>(r17, r18, r19, r20, r22, r23, r24, r25, r26, r27)
            int r0 = r3.LJIIIIZZ
            if (r0 != r2) goto L_0x0129
            java.util.List<X.74J> r0 = r6.LIZJ
            int r0 = r0.size()
            if (r0 <= 0) goto L_0x0129
            java.util.List<X.74J> r1 = r6.LIZJ
            int r0 = r1.size()
            int r0 = r0 - r5
            java.lang.Object r0 = r1.get(r0)
            X.74J r0 = (X.AnonymousClass74J) r0
            int r0 = r0.LIZ()
            if (r0 != r2) goto L_0x0129
            r3.LJIIL = r5
        L_0x0129:
            java.util.List<X.74J> r0 = r6.LIZJ
            r0.add(r3)
            goto L_0x0033
        L_0x0130:
            X.742 r1 = new X.742
            r1.<init>()
            X.73n r0 = r8.LIZIZ
            java.lang.String r0 = r0.LIZLLL
            r1.LIZ(r0)
            java.lang.String r0 = r8.LIZ
            r1.LIZIZ(r0)
            java.util.List<X.74J> r0 = r6.LIZJ
            r0.add(r1)
            goto L_0x0188
        L_0x0147:
            java.lang.String r0 = "null cannot be cast to non-null type com.ss.android.ugc.aweme.tools.draft.entity.DraftDetails"
            java.util.Objects.requireNonNull(r3, r0)
            X.743 r3 = (X.AnonymousClass743) r3
            java.lang.String r1 = r3.LJII
            X.73n r0 = r8.LIZIZ
            java.lang.String r0 = r0.LJ
            boolean r0 = kotlin.h.b.n.LIZ(r1, r0)
            r0 = r0 ^ r5
            if (r0 == 0) goto L_0x009c
            X.742 r1 = new X.742
            r1.<init>()
            X.73n r0 = r8.LIZIZ
            java.lang.String r0 = r0.LIZLLL
            r1.LIZ(r0)
            java.lang.String r0 = r8.LIZ
            r1.LIZIZ(r0)
            java.util.List<X.74J> r0 = r6.LIZJ
            r0.add(r1)
            goto L_0x0188
        L_0x0172:
            X.742 r1 = new X.742
            r1.<init>()
            X.73n r0 = r8.LIZIZ
            java.lang.String r0 = r0.LIZLLL
            r1.LIZ(r0)
            java.lang.String r0 = r8.LIZ
            r1.LIZIZ(r0)
            java.util.List<X.74J> r0 = r6.LIZJ
            r0.add(r1)
        L_0x0188:
            r0 = 1
            goto L_0x009d
        L_0x018b:
            r0 = 0
            goto L_0x007d
        L_0x018e:
            java.util.Calendar r2 = java.util.Calendar.getInstance()
            kotlin.h.b.n.LIZIZ(r2, r4)
            r2.setTimeInMillis(r0)
            int r1 = r10.get(r5)
            int r0 = r2.get(r5)
            if (r1 != r0) goto L_0x01ae
            int r1 = r10.get(r7)
            int r0 = r2.get(r7)
            if (r1 != r0) goto L_0x01ae
            goto L_0x0065
        L_0x01ae:
            boolean r0 = r6.LJIIJ
            r11 = 7
            if (r0 != 0) goto L_0x01ef
            X.73n r0 = r8.LIZIZ
            long r2 = r0.LJFF
            java.util.Calendar r13 = java.util.Calendar.getInstance()
            kotlin.h.b.n.LIZIZ(r13, r4)
            long r0 = java.lang.System.currentTimeMillis()
            r13.setTimeInMillis(r0)
            java.util.Calendar r10 = java.util.Calendar.getInstance()
            kotlin.h.b.n.LIZIZ(r10, r4)
            r10.setTimeInMillis(r2)
            int r2 = r13.get(r7)
            int r0 = r10.get(r7)
            int r2 = r2 - r0
            int r1 = r13.get(r5)
            int r0 = r10.get(r5)
            if (r1 != r0) goto L_0x01ef
            if (r2 <= 0) goto L_0x01ef
            if (r2 >= r11) goto L_0x01ef
            r0 = 2131832281(0x7f112dd9, float:1.9297611E38)
            r9.LIZJ = r0
            r6.LJIIJ = r5
            goto L_0x006c
        L_0x01ef:
            boolean r0 = r6.LJIIJJI
            r10 = 30
            if (r0 != 0) goto L_0x0231
            X.73n r0 = r8.LIZIZ
            long r2 = r0.LJFF
            java.util.Calendar r13 = java.util.Calendar.getInstance()
            kotlin.h.b.n.LIZIZ(r13, r4)
            long r0 = java.lang.System.currentTimeMillis()
            r13.setTimeInMillis(r0)
            java.util.Calendar r14 = java.util.Calendar.getInstance()
            kotlin.h.b.n.LIZIZ(r14, r4)
            r14.setTimeInMillis(r2)
            int r2 = r13.get(r7)
            int r0 = r14.get(r7)
            int r2 = r2 - r0
            int r1 = r13.get(r5)
            int r0 = r14.get(r5)
            if (r1 != r0) goto L_0x0231
            if (r2 < r11) goto L_0x0231
            if (r2 >= r10) goto L_0x0231
            r0 = 2131832279(0x7f112dd7, float:1.9297607E38)
            r9.LIZJ = r0
            r6.LJIIJJI = r5
            goto L_0x006c
        L_0x0231:
            boolean r0 = r6.LJIIL
            if (r0 != 0) goto L_0x0279
            X.73n r0 = r8.LIZIZ
            long r2 = r0.LJFF
            java.util.Calendar r11 = java.util.Calendar.getInstance()
            kotlin.h.b.n.LIZIZ(r11, r4)
            long r0 = java.lang.System.currentTimeMillis()
            r11.setTimeInMillis(r0)
            java.util.Calendar r13 = java.util.Calendar.getInstance()
            kotlin.h.b.n.LIZIZ(r13, r4)
            r13.setTimeInMillis(r2)
            int r2 = r11.get(r7)
            int r0 = r13.get(r7)
            int r2 = r2 - r0
            int r1 = r11.get(r5)
            int r0 = r13.get(r5)
            if (r1 != r0) goto L_0x0266
            if (r2 >= r10) goto L_0x0270
        L_0x0266:
            int r1 = r13.get(r5)
            int r0 = r11.get(r5)
            if (r1 >= r0) goto L_0x0279
        L_0x0270:
            r0 = 2131832278(0x7f112dd6, float:1.9297605E38)
            r9.LIZJ = r0
            r6.LJIIL = r5
            goto L_0x006c
        L_0x0279:
            r4 = 0
            goto L_0x0072
        L_0x027c:
            java.util.List<X.74J> r1 = r6.LIZJ
            X.749 r0 = new X.749
            r0.<init>(r12)
            r1.add(r0)
            X.1Bn<java.lang.Boolean> r1 = r6.LIZLLL
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r5)
            X.3ip.LIZ(r1, r0)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.tools.draft.viewmodel.DraftViewModel.LIZ(java.util.List):void");
    }

    public final void LIZ(AnonymousClass743 r6) {
        int indexOf = this.LIZJ.indexOf(r6);
        if (indexOf < 0) {
            C35526Zq.LIZ(this.LIZ + " -> deleteMusicHeader -> draftList.size = " + this.LIZJ.size());
            FWb.LIZIZ.LIZ();
        } else if (indexOf != 0 && r6.LJII.length() != 0) {
            int i = indexOf - 1;
            if (this.LIZJ.get(i).LIZ() == 103) {
                AnonymousClass74J r2 = this.LIZJ.get(i);
                if (indexOf != this.LIZJ.size() - 1) {
                    int i2 = indexOf + 1;
                    if (this.LIZJ.get(i2).LIZ() == 101) {
                        if (this.LIZJ.get(i2).LIZ() == 101) {
                            AnonymousClass74J r1 = this.LIZJ.get(i2);
                            Objects.requireNonNull(r1, "null cannot be cast to non-null type com.ss.android.ugc.aweme.tools.draft.entity.DraftCommonDetails");
                            AnonymousClass743 r12 = (AnonymousClass743) r1;
                            if (r12.LJI.length() == 0 || (!n.LIZ(r12.LJI, r6.LJI))) {
                                this.LIZJ.remove(r2);
                                return;
                            }
                            return;
                        }
                        return;
                    }
                }
                this.LIZJ.remove(r2);
            }
        }
    }

    public final Object LIZ(String str, 4r1<? super 2Pr> r10) {
        C42016kJ LIZ2 = this.LJII.LIZ(str);
        if (LIZ2 == null) {
            C35526Zq.LIZ("deleteAwemeDraft -> draft ie null");
            TSt.LIZ("queryNull -> deleteAwemeDraft");
            return 2Pr.LIZ;
        }
        this.LJII.LIZIZ(str);
        C49676wf LJIILL = C43426ma.LIZ.LJIILL();
        String LJIJI = LIZ2.LJIJI();
        n.LIZIZ(LJIJI, "");
        LJIILL.LIZ(LJIJI);
        Object LIZ3 = FWb.LIZIZ.LIZ().LIZJ().LIZ().LIZ(new C39956gz(LIZ2, new C39976h1("user_click"), false, (LsC) null, 28), (4r1<? super C39966h0>) r10);
        if (LIZ3 != Cof.COROUTINE_SUSPENDED) {
            LIZ3 = 2Pr.LIZ;
        }
        if (LIZ3 == Cof.COROUTINE_SUSPENDED) {
            return LIZ3;
        }
        return 2Pr.LIZ;
    }

    /* JADX WARNING: Removed duplicated region for block: B:11:0x0031  */
    /* JADX WARNING: Removed duplicated region for block: B:13:0x003d  */
    /* JADX WARNING: Removed duplicated region for block: B:17:0x0055  */
    /* JADX WARNING: Removed duplicated region for block: B:7:0x001f  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final java.lang.Object LIZ(X.C525573d r16, X.4r1<? super X.2Pr> r17) {
        /*
            r15 = this;
            r2 = r15
            r3 = r17
            boolean r0 = r3 instanceof X.AnonymousClass741
            if (r0 == 0) goto L_0x004f
            r5 = r3
            X.741 r5 = (X.AnonymousClass741) r5
            int r0 = r5.label
            r1 = -2147483648(0xffffffff80000000, float:-0.0)
            r0 = r0 & r1
            if (r0 == 0) goto L_0x004f
            int r0 = r5.label
            int r0 = r0 - r1
            r5.label = r0
        L_0x0016:
            java.lang.Object r4 = r5.result
            X.Cof r3 = X.Cof.COROUTINE_SUSPENDED
            int r0 = r5.label
            r1 = 1
            if (r0 == 0) goto L_0x003d
            if (r0 != r1) goto L_0x00f2
            java.lang.Object r2 = r5.L$0
            com.ss.android.ugc.aweme.tools.draft.viewmodel.DraftViewModel r2 = (com.ss.android.ugc.aweme.tools.draft.viewmodel.DraftViewModel) r2
            X.2th.LIZ(r4)
        L_0x0028:
            java.util.List r4 = (java.util.List) r4
            boolean r0 = r4.isEmpty()
            r3 = 0
            if (r0 == 0) goto L_0x0055
            X.1Bn<java.lang.Boolean> r1 = r2.LIZLLL
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r3)
            X.3ip.LIZ(r1, r0)
            X.2Pr r0 = X.2Pr.LIZ
            return r0
        L_0x003d:
            X.2th.LIZ(r4)
            X.73k r0 = X.C526273k.LIZLLL
            r5.L$0 = r2
            r5.label = r1
            r1 = r16
            java.lang.Object r4 = r0.LIZ(r1, r5)
            if (r4 != r3) goto L_0x0028
            return r3
        L_0x004f:
            X.741 r5 = new X.741
            r5.<init>(r2, r3)
            goto L_0x0016
        L_0x0055:
            boolean r0 = X.AnonymousClass745.LIZ()
            if (r0 == 0) goto L_0x00c2
            boolean r0 = r4.isEmpty()
            if (r0 != 0) goto L_0x00ef
            java.util.List<X.74J> r0 = r2.LIZJ
            int r0 = r0.size()
            if (r0 != 0) goto L_0x0087
            X.748 r1 = new X.748
            r1.<init>(r3)
            java.util.List<X.74J> r0 = r2.LIZJ
            r0.add(r1)
            java.util.List<X.74J> r1 = r2.LIZJ
            X.749 r0 = new X.749
            r0.<init>(r3)
            r1.add(r0)
            java.util.List<X.74J> r1 = r2.LIZJ
            X.747 r0 = new X.747
            r0.<init>(r3)
            r1.add(r0)
        L_0x0087:
            java.util.Iterator r5 = r4.iterator()
        L_0x008b:
            boolean r0 = r5.hasNext()
            if (r0 == 0) goto L_0x00c6
            java.lang.Object r4 = r5.next()
            X.73p r4 = (X.C526773p) r4
            java.util.List<X.74J> r3 = r2.LIZJ
            int r0 = r3.size()
            int r1 = r0 + -2
            X.744 r6 = new X.744
            r7 = 106(0x6a, float:1.49E-43)
            java.lang.String r8 = r4.LIZ
            X.73n r0 = r4.LIZIZ
            java.lang.String r9 = r0.LIZJ
            X.73o r0 = r4.LIZJ
            long r10 = r0.LIZJ
            X.73n r0 = r4.LIZIZ
            java.lang.String r12 = r0.LIZLLL
            java.lang.String r13 = X.C526173j.LIZ((X.C526773p) r4)
            r0 = 64
            r0 = r6
            r14 = 64
            r6.<init>(r7, r8, r9, r10, r12, r13, r14)
            r3.add(r1, r0)
            r0 = 1
            goto L_0x008b
        L_0x00c2:
            r2.LIZ((java.util.List<X.C526773p>) r4)
            goto L_0x00ef
        L_0x00c6:
            java.lang.StringBuilder r1 = new java.lang.StringBuilder
            r1.<init>()
            java.lang.String r0 = r2.LIZ
            r1.append(r0)
            java.lang.String r0 = " -> dealDraftViewInfosForNewUI: draftList.size = "
            r1.append(r0)
            java.util.List<X.74J> r0 = r2.LIZJ
            int r0 = r0.size()
            r1.append(r0)
            java.lang.String r0 = r1.toString()
            X.C35526Zq.LIZ((java.lang.String) r0)
            X.1Bn<java.lang.Boolean> r1 = r2.LIZLLL
            r0 = 1
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0)
            X.3ip.LIZ(r1, r0)
        L_0x00ef:
            X.2Pr r0 = X.2Pr.LIZ
            return r0
        L_0x00f2:
            java.lang.IllegalStateException r1 = new java.lang.IllegalStateException
            java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
            r1.<init>(r0)
            throw r1
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.tools.draft.viewmodel.DraftViewModel.LIZ(X.73d, X.4r1):java.lang.Object");
    }

    /* JADX WARNING: Removed duplicated region for block: B:14:0x0043  */
    /* JADX WARNING: Removed duplicated region for block: B:37:0x00bc A[Catch:{ all -> 0x00e8 }] */
    /* JADX WARNING: Removed duplicated region for block: B:45:0x00e5 A[Catch:{ all -> 0x00ed }] */
    /* JADX WARNING: Removed duplicated region for block: B:7:0x001e  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final java.lang.Object LIZ(X.AnonymousClass743 r10, X.C530675c r11, X.4r1<? super X.2Pr> r12) {
        /*
            r9 = this;
            boolean r0 = r12 instanceof X.C527673y
            if (r0 == 0) goto L_0x002a
            r6 = r12
            X.73y r6 = (X.C527673y) r6
            int r0 = r6.label
            r1 = -2147483648(0xffffffff80000000, float:-0.0)
            r0 = r0 & r1
            if (r0 == 0) goto L_0x002a
            int r0 = r6.label
            int r0 = r0 - r1
            r6.label = r0
        L_0x0013:
            java.lang.Object r1 = r6.result
            X.Cof r7 = X.Cof.COROUTINE_SUSPENDED
            int r0 = r6.label
            r5 = 2
            r8 = 0
            r2 = 1
            if (r0 == 0) goto L_0x0043
            if (r0 == r2) goto L_0x0038
            if (r0 != r5) goto L_0x0030
            java.lang.Object r3 = r6.L$1
            java.lang.Object r4 = r6.L$0
            com.ss.android.ugc.aweme.tools.draft.viewmodel.DraftViewModel r4 = (com.ss.android.ugc.aweme.tools.draft.viewmodel.DraftViewModel) r4
            goto L_0x00cc
        L_0x002a:
            X.73y r6 = new X.73y
            r6.<init>(r9, r12)
            goto L_0x0013
        L_0x0030:
            java.lang.IllegalStateException r1 = new java.lang.IllegalStateException
            java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
            r1.<init>(r0)
            throw r1
        L_0x0038:
            java.lang.Object r3 = r6.L$2
            java.lang.Object r11 = r6.L$1
            X.75c r11 = (X.C530675c) r11
            java.lang.Object r4 = r6.L$0
            com.ss.android.ugc.aweme.tools.draft.viewmodel.DraftViewModel r4 = (com.ss.android.ugc.aweme.tools.draft.viewmodel.DraftViewModel) r4
            goto L_0x00b5
        L_0x0043:
            X.2th.LIZ(r1)
            java.lang.StringBuilder r1 = new java.lang.StringBuilder
            r1.<init>()
            java.lang.String r0 = r9.LIZ
            r1.append(r0)
            java.lang.String r0 = ": updateSticker -> creationId = "
            r1.append(r0)
            java.lang.String r0 = r10.LIZJ
            r1.append(r0)
            java.lang.String r0 = r1.toString()
            X.C35526Zq.LIZ((java.lang.String) r0)
            X.6lH r1 = r9.LJII
            java.lang.String r0 = r10.LIZJ
            X.6kJ r3 = r1.LIZ(r0)
            if (r3 != 0) goto L_0x0078
            java.lang.String r0 = "updateSticker -> draft is null"
            X.C35526Zq.LIZ((java.lang.String) r0)
            java.lang.String r0 = "queryNull -> updateSticker"
            X.TSt.LIZ(r0)
            X.2Pr r0 = X.2Pr.LIZ
            return r0
        L_0x0078:
            X.6kK r0 = r3.LJJJJZ
            boolean r0 = r0.LJLLI
            if (r0 != 0) goto L_0x0086
            X.1Bn<X.6kJ> r0 = r9.LJFF
            X.3ip.LIZ(r0, r3)
            X.2Pr r0 = X.2Pr.LIZ
            return r0
        L_0x0086:
            X.6lB r0 = X.C530675c.LIZIZ
            java.util.List r1 = r0.LIZ(r3)
            if (r1 == 0) goto L_0x0094
            boolean r0 = r1.isEmpty()
            if (r0 == 0) goto L_0x00a4
        L_0x0094:
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r2)
            X.Cwu r1 = X.CwZ.LIZ(r3, r0)
            X.1Bn<X.Cwu<X.6kJ, java.lang.Boolean>> r0 = r9.LJ
            X.3ip.LIZ(r0, r1)
            X.2Pr r0 = X.2Pr.LIZ
            return r0
        L_0x00a4:
            r6.L$0 = r9     // Catch:{ all -> 0x00ea }
            r6.L$1 = r11     // Catch:{ all -> 0x00ea }
            r6.L$2 = r3     // Catch:{ all -> 0x00ea }
            r6.label = r2     // Catch:{ all -> 0x00ea }
            java.lang.Object r1 = r11.LIZ(r1, r6)     // Catch:{ all -> 0x00ea }
            if (r1 != r7) goto L_0x00b3
            return r7
        L_0x00b3:
            r4 = r9
            goto L_0x00b8
        L_0x00b5:
            X.2th.LIZ(r1)     // Catch:{ all -> 0x00e8 }
        L_0x00b8:
            java.util.List r1 = (java.util.List) r1     // Catch:{ all -> 0x00e8 }
            if (r1 == 0) goto L_0x0118
            r6.L$0 = r4     // Catch:{ all -> 0x00e8 }
            r6.L$1 = r3     // Catch:{ all -> 0x00e8 }
            r0 = 0
            r6.L$2 = r0     // Catch:{ all -> 0x00e8 }
            r6.label = r5     // Catch:{ all -> 0x00e8 }
            java.lang.Object r1 = X.C530675c.LIZ(r11, r1, r6)     // Catch:{ all -> 0x00e8 }
            if (r1 != r7) goto L_0x00cf
            goto L_0x00e7
        L_0x00cc:
            X.2th.LIZ(r1)     // Catch:{ all -> 0x00ed }
        L_0x00cf:
            java.lang.Boolean r1 = (java.lang.Boolean) r1     // Catch:{ all -> 0x00ed }
            boolean r0 = r1.booleanValue()     // Catch:{ all -> 0x00ed }
            if (r0 == 0) goto L_0x00e5
        L_0x00d7:
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r2)     // Catch:{ all -> 0x00ed }
            X.Cwu r1 = X.CwZ.LIZ(r3, r0)     // Catch:{ all -> 0x00ed }
            X.1Bn<X.Cwu<X.6kJ, java.lang.Boolean>> r0 = r4.LJ     // Catch:{ all -> 0x00ed }
            X.3ip.LIZ(r0, r1)     // Catch:{ all -> 0x00ed }
            goto L_0x0118
        L_0x00e5:
            r2 = 0
            goto L_0x00d7
        L_0x00e7:
            return r7
        L_0x00e8:
            r2 = move-exception
            goto L_0x00ee
        L_0x00ea:
            r2 = move-exception
            r4 = r9
            goto L_0x00ee
        L_0x00ed:
            r2 = move-exception
        L_0x00ee:
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r8)
            X.Cwu r1 = X.CwZ.LIZ(r3, r0)
            X.1Bn<X.Cwu<X.6kJ, java.lang.Boolean>> r0 = r4.LJ
            X.3ip.LIZ(r0, r1)
            java.lang.StringBuilder r1 = new java.lang.StringBuilder
            r1.<init>()
            java.lang.String r0 = r4.LIZ
            r1.append(r0)
            java.lang.String r0 = " : refreshDraftList , updateEffect --- resumeWithException : "
            r1.append(r0)
            java.lang.String r0 = X.C35526Zq.LIZIZ((java.lang.Throwable) r2)
            r1.append(r0)
            java.lang.String r0 = r1.toString()
            X.C35526Zq.LIZIZ((java.lang.String) r0)
        L_0x0118:
            X.2Pr r0 = X.2Pr.LIZ
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.tools.draft.viewmodel.DraftViewModel.LIZ(X.743, X.75c, X.4r1):java.lang.Object");
    }
}
