package com.ss.android.ugc.aweme.ftc.pages;

import X.0CC;
import X.0CD;
import X.1Bk;
import X.1Bn;
import X.2Pr;
import X.8gF;
import X.AnonymousClass5CV;
import X.AnonymousClass6FB;
import X.AnonymousClass6FE;
import X.AnonymousClass6FF;
import X.AnonymousClass6QD;
import X.C030758v;
import X.C06835Nh;
import X.C16305jw;
import X.C30366Fu;
import X.C30376Fv;
import X.C33246Qw;
import X.FWb;
import X.LsC;
import X.Ltg;
import X.M12;
import android.graphics.Bitmap;
import android.view.View;
import androidx.fragment.app.Fragment;
import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent;
import com.bytedance.covode.number.Covode;
import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer;
import com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel;
import java.util.HashMap;
import kotlin.h.b.n;

public final class FTCChooseCoverActivity extends Ltg implements C30366Fu, C16305jw {
    public static final String LJFF = FTCChooseCoverActivity.class.getSimpleName();
    public static final AnonymousClass6FF LJI = new AnonymousClass6FF((byte) 0);
    public VideoPublishEditModel LIZLLL;
    public AnonymousClass5CV LJ;
    public final 1Bn<C06835Nh> LJII = new 1Bn<>();
    public final 1Bn<Bitmap> LJIIIIZZ = new 1Bn<>();
    public final 1Bn<Boolean> LJIIIZ = new 1Bn<>();
    public HashMap LJIIJ;

    public final View g_(int i) {
        if (this.LJIIJ == null) {
            this.LJIIJ = new HashMap();
        }
        View view = (View) this.LJIIJ.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        this.LJIIJ.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity, X.Ltg, android.app.Activity] */
    public final void onPause() {
        8gF.LIZJ(this);
        FTCChooseCoverActivity.super.onPause();
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity, X.Ltg, android.app.Activity] */
    public final void onResume() {
        8gF.LIZIZ(this);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity", "onResume", true);
        FTCChooseCoverActivity.super.onResume();
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity", "onResume", false);
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity, X.1oX, android.app.Activity] */
    public final void onStart() {
        8gF.LIZ(this);
        FTCChooseCoverActivity.super.onStart();
    }

    public final void onWindowFocusChanged(boolean z) {
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity", "onWindowFocusChanged", true);
        FTCChooseCoverActivity.super.onWindowFocusChanged(z);
    }

    public final 1Bn<C06835Nh> LIZIZ() {
        return this.LJII;
    }

    public final VideoPublishEditModel LIZJ() {
        VideoPublishEditModel videoPublishEditModel = this.LIZLLL;
        if (videoPublishEditModel == null) {
            n.LIZ("");
        }
        return videoPublishEditModel;
    }

    public final void finish() {
        FTCChooseCoverActivity.super.finish();
        overridePendingTransition(2130771990, 2130771991);
    }

    private final FTCChooseCoverFragment LJII() {
        Fragment LIZ = getSupportFragmentManager().LIZ("cover");
        if (!(LIZ instanceof FTCChooseCoverFragment)) {
            LIZ = null;
        }
        return (FTCChooseCoverFragment) LIZ;
    }

    public final C030758v LIZ() {
        AnonymousClass5CV r0 = this.LJ;
        if (r0 == null) {
            n.LIZ("");
        }
        C030758v r02 = r0.LJJI;
        n.LIZIZ(r02, "");
        return r02;
    }

    static {
        Covode.recordClassIndex(82673);
        C33246Qw.LIZ.LIZ();
        AnonymousClass6QD.LIZ.LIZ();
        AnonymousClass6QD.LIZIZ();
    }

    public final void LJI() {
        FTCChooseCoverFragment LJII2 = LJII();
        if (LJII2 != null && LJII2.LJFF) {
            C30366Fu r0 = LJII2.LIZ;
            if (r0 == null) {
                n.LIZ("");
            }
            Bitmap LJIIL = r0.LIZ().LJIIL();
            if (LJIIL != null) {
                C30366Fu r02 = LJII2.LIZ;
                if (r02 == null) {
                    n.LIZ("");
                }
                LJII2.LIZIZ = (float) r02.LIZ().LJII();
                LJII2.LIZ(2131372733).setVideoCoverFrameView(LJIIL);
                LJIIL.recycle();
            }
        }
    }

    public final void onBackPressed() {
        FTCChooseCoverFragment LJII2 = LJII();
        if (LJII2 != null) {
            AnonymousClass6FB r3 = new AnonymousClass6FB(this);
            M12.LIZ(r3);
            C30366Fu r1 = LJII2.LIZ;
            if (r1 == null) {
                n.LIZ("");
            }
            FWb.LIZIZ.LIZ().LJJIZ().LIZ(!AnonymousClass6FE.LIZ(r1.LIZJ().mVideoCoverStartTm, LJII2.LIZIZ / 1000.0f), (LsC<? super Boolean, 2Pr>) new C30376Fv(LJII2, r3));
        }
    }

    /* JADX WARNING: type inference failed for: r2v0, types: [com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity, X.Ltg, X.19u, android.app.Activity] */
    public final void onDestroy() {
        8gF.LJ(this);
        0CD lifecycle = getLifecycle();
        if (!(lifecycle instanceof 1Bk)) {
            lifecycle = null;
        }
        1Bk r1 = (1Bk) lifecycle;
        if (r1 != null) {
            r1.LIZ(0CC.DESTROYED);
        }
        LIZ().LJJIIZI();
        AnonymousClass5CV r12 = this.LJ;
        if (r12 == null) {
            n.LIZ("");
        }
        r12.LIZIZ();
        FTCChooseCoverActivity.super.onDestroy();
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity, X.Ltg, android.app.Activity] */
    public final void onStop() {
        8gF.LIZLLL(this);
        FTCChooseCoverActivity.super.onStop();
        if (EnterTransitionCrashOptimizer.getContext() != null) {
            try {
                getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
            } catch (Throwable unused) {
            }
        }
        try {
            getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
        } catch (Throwable unused2) {
        }
    }

    public static final /* synthetic */ AnonymousClass5CV LIZ(FTCChooseCoverActivity fTCChooseCoverActivity) {
        AnonymousClass5CV r1 = fTCChooseCoverActivity.LJ;
        if (r1 == null) {
            n.LIZ("");
        }
        return r1;
    }

    public static final /* synthetic */ VideoPublishEditModel LIZIZ(FTCChooseCoverActivity fTCChooseCoverActivity) {
        VideoPublishEditModel videoPublishEditModel = fTCChooseCoverActivity.LIZLLL;
        if (videoPublishEditModel == null) {
            n.LIZ("");
        }
        return videoPublishEditModel;
    }

    /* JADX WARNING: type inference failed for: r8v0, types: [com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity, X.1hK, X.Ltg, X.19u, android.app.Activity] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void onCreate(android.os.Bundle r22) {
        /*
            r21 = this;
            r8 = r21
            r15 = r8
            r7 = r22
            X.8gF.LIZ(r8, r7)
            java.lang.String r6 = "com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity"
            java.lang.String r5 = "onCreate"
            r4 = 1
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r6, r5, r4)
            com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity.super.onCreate(r7)
            android.view.Window r1 = r8.getWindow()
            r0 = 128(0x80, float:1.794E-43)
            r1.addFlags(r0)
            android.view.Window r1 = r8.getWindow()
            r0 = 32
            r1.setSoftInputMode(r0)
            r0 = 2131558484(0x7f0d0054, float:1.8742285E38)
            r15.setContentView(r0)
            boolean r0 = X.3QF.LIZ(r15)
            if (r0 != 0) goto L_0x0039
            r0 = r15
            android.view.Window r0 = r0.getWindow()
            X.3P4.LIZ(r0)
        L_0x0039:
            X.FWb r0 = X.FWb.LIZIZ
            X.7CX r0 = r0.LIZ()
            r0.LJIL()
            android.content.Intent r0 = r8.getIntent()
            java.lang.String r3 = ""
            kotlin.h.b.n.LIZIZ(r0, r3)
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = X.C30466Ge.LIZ(r0)
            r15.LIZLLL = r0
            X.6F9 r0 = new X.6F9
            r0.<init>(r15)
            java.lang.String r1 = "FTCChooseCoverActivity.initData"
            X.AnonymousClass54U.LIZ((java.lang.String) r1, (X.Ls2<X.2Pr>) r0)
            X.6F7 r0 = new X.6F7
            r0.<init>(r15)
            X.AnonymousClass54U.LIZIZ(r1, r0)
            X.5CV r0 = r15.LJ
            if (r0 != 0) goto L_0x006a
            kotlin.h.b.n.LIZ(r3)
        L_0x006a:
            r2 = 2
            r0.LIZ((int) r2)
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x0075
            kotlin.h.b.n.LIZ(r3)
        L_0x0075:
            boolean r0 = r0.notUseCanvasSize()
            r1 = 0
            if (r0 == 0) goto L_0x03ca
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x0083
            kotlin.h.b.n.LIZ(r3)
        L_0x0083:
            int[] r0 = X.AnonymousClass673.LIZJ(r0)
            r9 = r0[r1]
            r10 = r0[r4]
        L_0x008b:
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r12 = r15.LIZLLL
            if (r12 != 0) goto L_0x0092
            kotlin.h.b.n.LIZ(r3)
        L_0x0092:
            r11 = 30
            r0 = 4
            dmt.av.video.VEPreviewParams r2 = X.AnonymousClass5ON.LIZ((com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel) r12, (int) r2, (int) r11, (int) r1, (int) r0)
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x00a0
            kotlin.h.b.n.LIZ(r3)
        L_0x00a0:
            boolean r0 = r0.notUseCanvasSize()
            if (r0 == 0) goto L_0x03b0
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x00ad
            kotlin.h.b.n.LIZ(r3)
        L_0x00ad:
            int[] r11 = X.AnonymousClass673.LIZJ(r0)
            r0 = r11[r1]
            r2.setCanvasWidth(r0)
            r0 = r11[r4]
            r2.setCanvasHeight(r0)
        L_0x00bb:
            X.1Bn r12 = new X.1Bn
            r12.<init>()
            r12.setValue(r2)
            X.1Bn r4 = new X.1Bn
            r4.<init>()
            dmt.av.video.VEPreviewMusicParams r11 = new dmt.av.video.VEPreviewMusicParams
            r11.<init>()
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x00d4
            kotlin.h.b.n.LIZ(r3)
        L_0x00d4:
            boolean r0 = r0.isFastImport
            r11.LJIIIZ = r0
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x00df
            kotlin.h.b.n.LIZ(r3)
        L_0x00df:
            java.lang.String r0 = r0.mMusicPath
            r11.LIZ = r0
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x00ea
            kotlin.h.b.n.LIZ(r3)
        L_0x00ea:
            int r0 = r0.mMusicStart
            r11.LIZIZ = r0
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x00f5
            kotlin.h.b.n.LIZ(r3)
        L_0x00f5:
            java.lang.String r13 = r0.mMusicPath
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x00fe
            kotlin.h.b.n.LIZ(r3)
        L_0x00fe:
            X.M12.LIZ(r0)
            int r0 = X.OAv.LIZ(r13)
            r11.LIZJ = r0
            X.6nl r0 = X.C44156nl.LIZ()
            X.OZG r13 = r0.LIZ
            if (r13 == 0) goto L_0x03aa
            int r0 = r13.getShootDuration()
            if (r0 <= 0) goto L_0x03aa
            int r14 = r11.LIZJ
            int r0 = r13.getShootDuration()
            int r14 = r14 - r0
            int r14 = java.lang.Math.abs(r14)
            r0 = 1000(0x3e8, float:1.401E-42)
            if (r14 < r0) goto L_0x03aa
            int r0 = r13.getShootDuration()
            r11.LIZLLL = r0
        L_0x012a:
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x0131
            kotlin.h.b.n.LIZ(r3)
        L_0x0131:
            float r0 = r0.musicVolume
            r11.LJ = r0
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x013c
            kotlin.h.b.n.LIZ(r3)
        L_0x013c:
            java.lang.String r0 = r0.musicId
            r11.LJFF = r0
            if (r13 == 0) goto L_0x03a7
            java.lang.String r0 = r13.musicName
        L_0x0144:
            r11.LJI = r0
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x014d
            kotlin.h.b.n.LIZ(r3)
        L_0x014d:
            float r0 = r0.previewStartTime
            r11.LJII = r0
            r4.setValue(r11)
            X.5F0 r14 = new X.5F0
            r14.<init>()
            X.5DY r11 = new X.5DY
            r11.<init>()
            X.5CV r0 = r15.LJ
            if (r0 != 0) goto L_0x0165
            kotlin.h.b.n.LIZ(r3)
        L_0x0165:
            X.56n r0 = r0.LJJIJIIJIL
            int r13 = r0.LJ()
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x0172
            kotlin.h.b.n.LIZ(r3)
        L_0x0172:
            X.58H r0 = X.Oli.LIZ(r13, r0)
            if (r0 == 0) goto L_0x017b
            r11.setValue(r0)
        L_0x017b:
            X.5CV r0 = r15.LJ
            if (r0 != 0) goto L_0x0182
            kotlin.h.b.n.LIZ(r3)
        L_0x0182:
            r0.LJI = r12
            X.5CV r0 = r15.LJ
            if (r0 != 0) goto L_0x018b
            kotlin.h.b.n.LIZ(r3)
        L_0x018b:
            r0.LJII = r4
            X.5CV r0 = r15.LJ
            if (r0 != 0) goto L_0x0194
            kotlin.h.b.n.LIZ(r3)
        L_0x0194:
            r0.LJIIJ = r14
            X.5CV r4 = r15.LJ
            if (r4 != 0) goto L_0x019d
            kotlin.h.b.n.LIZ(r3)
        L_0x019d:
            X.1Bn r0 = new X.1Bn
            r0.<init>()
            r4.LJIIIIZZ = r0
            X.5CV r4 = r15.LJ
            if (r4 != 0) goto L_0x01ab
            kotlin.h.b.n.LIZ(r3)
        L_0x01ab:
            X.1Bn<X.5Nh> r0 = r15.LJII
            r4.LJIIIZ = r0
            X.5CV r4 = r15.LJ
            if (r4 != 0) goto L_0x01b6
            kotlin.h.b.n.LIZ(r3)
        L_0x01b6:
            java.util.ArrayList r0 = new java.util.ArrayList
            r0.<init>()
            r4.LIZ((java.util.ArrayList<com.ss.android.ugc.aweme.effect.EffectPointModel>) r0)
            X.5CV r0 = r15.LJ
            if (r0 != 0) goto L_0x01c5
            kotlin.h.b.n.LIZ(r3)
        L_0x01c5:
            r0.LJIIJJI = r11
            X.5DY r13 = new X.5DY
            r13.<init>()
            X.1Bn r12 = new X.1Bn
            r12.<init>()
            X.5CV r0 = r15.LJ
            if (r0 != 0) goto L_0x01d8
            kotlin.h.b.n.LIZ(r3)
        L_0x01d8:
            r0.LJIILIIL = r12
            X.5CV r0 = r15.LJ
            if (r0 != 0) goto L_0x01e1
            kotlin.h.b.n.LIZ(r3)
        L_0x01e1:
            r0.LJIIL = r13
            X.5CV r4 = r15.LJ
            if (r4 != 0) goto L_0x01ea
            kotlin.h.b.n.LIZ(r3)
        L_0x01ea:
            X.1Bn r0 = new X.1Bn
            r0.<init>()
            r4.LJIILJJIL = r0
            X.5CV r4 = r15.LJ
            if (r4 != 0) goto L_0x01f8
            kotlin.h.b.n.LIZ(r3)
        L_0x01f8:
            X.1Bn r0 = new X.1Bn
            r0.<init>()
            r4.LJIILL = r0
            X.5CV r4 = r15.LJ
            if (r4 != 0) goto L_0x0206
            kotlin.h.b.n.LIZ(r3)
        L_0x0206:
            X.1Bn r0 = new X.1Bn
            r0.<init>()
            r4.LJIILLIIL = r0
            X.5CV r4 = r15.LJ
            if (r4 != 0) goto L_0x0214
            kotlin.h.b.n.LIZ(r3)
        L_0x0214:
            X.1Bn r0 = new X.1Bn
            r0.<init>()
            r4.LIZ((X.1Bn<java.lang.Boolean>) r0)
            X.0CD r4 = r8.getLifecycle()
            boolean r0 = r4 instanceof X.1Bk
            if (r0 != 0) goto L_0x0225
            r4 = 0
        L_0x0225:
            X.1Bk r4 = (X.1Bk) r4
            if (r4 == 0) goto L_0x022e
            X.0CC r0 = X.0CC.STARTED
            r4.LIZ(r0)
        L_0x022e:
            X.5CV r11 = r15.LJ
            if (r11 != 0) goto L_0x0235
            kotlin.h.b.n.LIZ(r3)
        L_0x0235:
            r15 = r15
            r0 = 2131368784(0x7f0a1b50, float:1.8357528E38)
            android.view.View r4 = r15.g_(r0)
            android.view.SurfaceView r4 = (android.view.SurfaceView) r4
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x0246
            kotlin.h.b.n.LIZ(r3)
        L_0x0246:
            r11.LIZIZ(r15, r15, r4, r0)
            X.596 r4 = new X.596
            r4.<init>(r15, r2)
            java.lang.String r0 = "FTCChooseCoverActivity#setReverseVideo"
            X.AnonymousClass54U.LIZ((java.lang.String) r0, (X.Ls2<X.2Pr>) r4)
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x025a
            kotlin.h.b.n.LIZ(r3)
        L_0x025a:
            java.util.ArrayList r0 = r0.getEffectList()
            if (r0 == 0) goto L_0x027d
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x0267
            kotlin.h.b.n.LIZ(r3)
        L_0x0267:
            java.util.ArrayList r2 = r0.getEffectList()
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x0272
            kotlin.h.b.n.LIZ(r3)
        L_0x0272:
            boolean r0 = r0.isReverse()
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0)
            X.AnonymousClass58G.LIZ(r2, r14, r0)
        L_0x027d:
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x0284
            kotlin.h.b.n.LIZ(r3)
        L_0x0284:
            com.ss.android.ugc.aweme.audiorecord.AudioRecorderParam r0 = r0.veAudioRecorderParam
            if (r0 == 0) goto L_0x0294
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x028f
            kotlin.h.b.n.LIZ(r3)
        L_0x028f:
            com.ss.android.ugc.aweme.audiorecord.AudioRecorderParam r0 = r0.veAudioRecorderParam
            r12.setValue(r0)
        L_0x0294:
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x029b
            kotlin.h.b.n.LIZ(r3)
        L_0x029b:
            com.ss.android.ugc.aweme.shortvideo.edit.audioeffect.AudioEffectParam r0 = r0.veAudioEffectParam
            if (r0 == 0) goto L_0x03a4
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x02a6
            kotlin.h.b.n.LIZ(r3)
        L_0x02a6:
            com.ss.android.ugc.aweme.shortvideo.edit.audioeffect.AudioEffectParam r0 = r0.veAudioEffectParam
            if (r0 != 0) goto L_0x02ad
            kotlin.h.b.n.LIZIZ()
        L_0x02ad:
            r0.setShowErrorToast(r1)
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x02b7
            kotlin.h.b.n.LIZ(r3)
        L_0x02b7:
            com.ss.android.ugc.aweme.shortvideo.edit.audioeffect.AudioEffectParam r2 = r0.veAudioEffectParam
            if (r2 != 0) goto L_0x02be
            kotlin.h.b.n.LIZIZ()
        L_0x02be:
            r0 = 0
            r2.setPreprocessResult(r0)
            X.57k r4 = X.C026957j.LJII
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x02cb
            kotlin.h.b.n.LIZ(r3)
        L_0x02cb:
            com.ss.android.ugc.aweme.shortvideo.edit.audioeffect.AudioEffectParam r2 = r0.veAudioEffectParam
            r0 = 1
            X.57j r0 = r4.LIZ(r0, r2)
            r13.setValue(r0)
        L_0x02d5:
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r2 = r15.LIZLLL
            if (r2 != 0) goto L_0x02dc
            kotlin.h.b.n.LIZ(r3)
        L_0x02dc:
            X.FWb r0 = X.FWb.LIZIZ
            X.7CX r0 = r0.LIZ()
            X.6jC r0 = r0.LJIJI()
            X.MYu r0 = r0.LIZLLL()
            com.ss.android.ugc.aweme.filter.FilterBean r11 = X.C30456Gd.LIZ((com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel) r2, (X.MYu) r0)
            X.3Ev r4 = new X.3Ev
            r4.<init>()
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x02fa
            kotlin.h.b.n.LIZ(r3)
        L_0x02fa:
            float r0 = r0.mSelectedFilterIntensity
            r4.element = r0
            float r2 = r4.element
            r0 = -1082130432(0xffffffffbf800000, float:-1.0)
            int r0 = (r2 > r0 ? 1 : (r2 == r0 ? 0 : -1))
            if (r0 != 0) goto L_0x030b
            r0 = 1061997773(0x3f4ccccd, float:0.8)
            r4.element = r0
        L_0x030b:
            X.597 r2 = new X.597
            r2.<init>(r15, r11, r4)
            java.lang.String r0 = "FTCChooseCoverActivity#setFilter"
            X.AnonymousClass54U.LIZ((java.lang.String) r0, (X.Ls2<X.2Pr>) r2)
            r0 = 2131368784(0x7f0a1b50, float:1.8357528E38)
            android.view.View r0 = r15.g_(r0)
            X.C30326Fq.LIZ(r0, r9, r10)
            java.lang.String r9 = "cover"
            if (r7 != 0) goto L_0x0387
        L_0x0323:
            com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverFragment r2 = new com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverFragment
            r2.<init>()
            X.0AA r0 = r8.getSupportFragmentManager()
            X.0AP r4 = r0.LIZ()
            r0 = 2131366972(0x7f0a143c, float:1.8353853E38)
            r4.LIZ(r0, r2, r9)
            r4.LIZJ()
        L_0x0339:
            X.1Bn<java.lang.Boolean> r4 = r15.LJIIIZ
            X.6F8 r0 = new X.6F8
            r0.<init>(r15)
            r4.observe(r15, r0)
            X.1Bn<android.graphics.Bitmap> r4 = r15.LJIIIIZZ
            X.6FA r0 = new X.6FA
            r0.<init>(r15)
            r4.observe(r15, r0)
            X.1Bn<java.lang.Boolean> r0 = r15.LJIIIZ
            r2.LIZLLL = r0
            X.1Bn<android.graphics.Bitmap> r0 = r15.LJIIIIZZ
            r2.LIZJ = r0
            X.0AA r8 = r8.getSupportFragmentManager()
            X.6FX r14 = new X.6FX
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r7 = r15.LIZLLL
            if (r7 != 0) goto L_0x0362
            kotlin.h.b.n.LIZ(r3)
        L_0x0362:
            X.5CV r4 = r15.LJ
            if (r4 != 0) goto L_0x0369
            kotlin.h.b.n.LIZ(r3)
        L_0x0369:
            X.6FC r3 = new X.6FC
            r3.<init>(r15)
            X.6FD r0 = new X.6FD
            r0.<init>(r15)
            r17 = r7
            r18 = r4
            r19 = r3
            r20 = r0
            r16 = r2
            r14.<init>(r15, r16, r17, r18, r19, r20)
            r8.LIZ(r14, r1)
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r6, r5, r1)
            return
        L_0x0387:
            X.0AA r0 = r8.getSupportFragmentManager()
            androidx.fragment.app.Fragment r0 = r0.LIZ(r9)
            boolean r0 = r0 instanceof com.ss.android.ugc.aweme.shortvideo.vechoosecover.VEChooseVideoCoverFragment
            if (r0 != 0) goto L_0x0394
            goto L_0x0323
        L_0x0394:
            X.0AA r0 = r8.getSupportFragmentManager()
            androidx.fragment.app.Fragment r2 = r0.LIZ(r9)
            java.lang.String r0 = "null cannot be cast to non-null type com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverFragment"
            java.util.Objects.requireNonNull(r2, r0)
            com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverFragment r2 = (com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverFragment) r2
            goto L_0x0339
        L_0x03a4:
            r0 = 1
            goto L_0x02d5
        L_0x03a7:
            r0 = 0
            goto L_0x0144
        L_0x03aa:
            int r0 = r11.LIZJ
            r11.LIZLLL = r0
            goto L_0x012a
        L_0x03b0:
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x03b7
            kotlin.h.b.n.LIZ(r3)
        L_0x03b7:
            int r0 = r0.mVideoCanvasWidth
            r2.setCanvasWidth(r0)
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x03c3
            kotlin.h.b.n.LIZ(r3)
        L_0x03c3:
            int r0 = r0.mVideoCanvasHeight
            r2.setCanvasHeight(r0)
            goto L_0x00bb
        L_0x03ca:
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x03d1
            kotlin.h.b.n.LIZ(r3)
        L_0x03d1:
            int r0 = r0.mVideoCanvasWidth
            if (r0 <= 0) goto L_0x03f4
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x03dc
            kotlin.h.b.n.LIZ(r3)
        L_0x03dc:
            int r0 = r0.mVideoCanvasHeight
            if (r0 <= 0) goto L_0x03f4
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x03e7
            kotlin.h.b.n.LIZ(r3)
        L_0x03e7:
            int r9 = r0.mVideoCanvasWidth
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x03f0
            kotlin.h.b.n.LIZ(r3)
        L_0x03f0:
            int r10 = r0.mVideoCanvasHeight
            goto L_0x008b
        L_0x03f4:
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x03fb
            kotlin.h.b.n.LIZ(r3)
        L_0x03fb:
            int r9 = r0.videoWidth()
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x0406
            kotlin.h.b.n.LIZ(r3)
        L_0x0406:
            int r10 = r0.videoHeight()
            if (r10 == 0) goto L_0x040e
            if (r9 != 0) goto L_0x008b
        L_0x040e:
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x0415
            kotlin.h.b.n.LIZ(r3)
        L_0x0415:
            int r0 = r0.getOriginal()
            if (r0 != 0) goto L_0x043f
            com.ss.android.ugc.aweme.services.video.IVideoConfigService r0 = X.NtX.LJIILJJIL
        L_0x041d:
            kotlin.h.b.n.LIZIZ(r0, r3)
            int r9 = r0.getVideoWidth()
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r15.LIZLLL
            if (r0 != 0) goto L_0x042b
            kotlin.h.b.n.LIZ(r3)
        L_0x042b:
            int r0 = r0.getOriginal()
            if (r0 != 0) goto L_0x043c
            com.ss.android.ugc.aweme.services.video.IVideoConfigService r0 = X.NtX.LJIILJJIL
        L_0x0433:
            kotlin.h.b.n.LIZIZ(r0, r3)
            int r10 = r0.getVideoHeight()
            goto L_0x008b
        L_0x043c:
            com.ss.android.ugc.aweme.services.video.IVideoConfigService r0 = X.NtX.LJIILIIL
            goto L_0x0433
        L_0x043f:
            com.ss.android.ugc.aweme.services.video.IVideoConfigService r0 = X.NtX.LJIILIIL
            goto L_0x041d
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.ftc.pages.FTCChooseCoverActivity.onCreate(android.os.Bundle):void");
    }
}
