package com.tencent.mm.plugin.wepkg.model;

import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.ArrayList;
import java.util.List;

public class WepkgCrossProcessTask extends BaseWepkgProcessTask {
    public static final Creator<WepkgCrossProcessTask> CREATOR = new 1();
    public int Cn;
    public Runnable hww;
    public WepkgVersion uWY;
    public List<WepkgVersion> uWZ;
    public WePkgDiffInfo uXa;
    public WepkgPreloadFile uXb;
    public List<WepkgPreloadFile> uXc;
    public String uXd;

    /* synthetic */ WepkgCrossProcessTask(Parcel parcel, byte b) {
        this(parcel);
    }

    public WepkgCrossProcessTask() {
        AppMethodBeat.i(63531);
        this.Cn = -1;
        this.uWY = new WepkgVersion();
        this.uWZ = new ArrayList();
        this.uXa = new WePkgDiffInfo();
        this.uXb = new WepkgPreloadFile();
        this.uXc = new ArrayList();
        AppMethodBeat.o(63531);
    }

    private WepkgCrossProcessTask(Parcel parcel) {
        AppMethodBeat.i(63532);
        g(parcel);
        AppMethodBeat.o(63532);
    }

    public final void asP() {
        /*
        r11 = this;
        r0 = 0;
        r10 = 3;
        r9 = 2;
        r2 = 0;
        r3 = 1;
        r1 = 63533; // 0xf82d float:8.9029E-41 double:3.13895E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.i(r1);
        r1 = r11.Cn;
        switch(r1) {
            case 1001: goto L_0x001a;
            case 1002: goto L_0x001e;
            case 2002: goto L_0x00a5;
            case 2003: goto L_0x0292;
            case 2004: goto L_0x0505;
            case 2005: goto L_0x0536;
            case 2006: goto L_0x0556;
            case 3001: goto L_0x0028;
            case 3002: goto L_0x0518;
            case 3003: goto L_0x0044;
            case 3004: goto L_0x0056;
            case 3005: goto L_0x0074;
            case 3006: goto L_0x008e;
            case 3007: goto L_0x0543;
            case 3008: goto L_0x05ab;
            case 3009: goto L_0x0600;
            case 4001: goto L_0x01ca;
            case 4002: goto L_0x0273;
            case 4003: goto L_0x04ce;
            case 4004: goto L_0x04e3;
            case 4005: goto L_0x064f;
            case 4006: goto L_0x06b7;
            default: goto L_0x0010;
        };
    L_0x0010:
        r11.wM();
        r0 = 63533; // 0xf82d float:8.9029E-41 double:3.13895E-319;
        com.tencent.matrix.trace.core.AppMethodBeat.o(r0);
        return;
    L_0x001a:
        r0 = r11;
    L_0x001b:
        r0.csN = r3;
        goto L_0x0010;
    L_0x001e:
        r0 = com.tencent.mm.m.g.Nv();
        r3 = r0.Ni();
        r0 = r11;
        goto L_0x001b;
    L_0x0028:
        r1 = r11.uWY;
        if (r1 == 0) goto L_0x0010;
    L_0x002c:
        r1 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r2 = r11.uWY;
        r2 = r2.eBS;
        r1 = r1.ahF(r2);
        if (r1 == 0) goto L_0x0041;
    L_0x003a:
        r0 = r11.uWY;
        r0.a(r1);
        r0 = r11;
        goto L_0x001b;
    L_0x0041:
        r11.uWY = r0;
        goto L_0x0010;
    L_0x0044:
        r0 = r11.uWY;
        if (r0 == 0) goto L_0x0010;
    L_0x0048:
        r0 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r1 = r11.uWY;
        r1 = r1.eBS;
        r3 = r0.ahH(r1);
        r0 = r11;
        goto L_0x001b;
    L_0x0056:
        r0 = r11.uWY;
        if (r0 == 0) goto L_0x0010;
    L_0x005a:
        r1 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r0 = r11.uWY;
        r2 = r0.eBS;
        r0 = r11.uWY;
        r3 = r0.uXG;
        r0 = r11.uWY;
        r4 = r0.uXH;
        r0 = r11.uWY;
        r6 = r0.uXI;
        r3 = r1.a(r2, r3, r4, r6);
        r0 = r11;
        goto L_0x001b;
    L_0x0074:
        r0 = r11.uWY;
        if (r0 == 0) goto L_0x0010;
    L_0x0078:
        r0 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r1 = r11.uWY;
        r1 = r1.eBS;
        r2 = r11.uWY;
        r2 = r2.gSP;
        r3 = r11.uWY;
        r3 = r3.uXM;
        r3 = r0.B(r1, r2, r3);
        r0 = r11;
        goto L_0x001b;
    L_0x008e:
        r0 = r11.uWY;
        if (r0 == 0) goto L_0x0010;
    L_0x0092:
        r0 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r1 = r11.uWY;
        r1 = r1.eBS;
        r2 = r11.uWY;
        r2 = r2.uXN;
        r3 = r0.bP(r1, r2);
        r0 = r11;
        goto L_0x001b;
    L_0x00a5:
        r0 = r11.uWY;
        if (r0 == 0) goto L_0x0010;
    L_0x00a9:
        r0 = r11.uWY;
        r0 = r0.eBS;
        r0 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r0);
        if (r0 != 0) goto L_0x0010;
    L_0x00b3:
        r0 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r1 = r11.uWY;
        r4 = new com.tencent.mm.plugin.wepkg.b.e;
        r4.<init>();
        r5 = r1.eBS;
        r4.field_pkgId = r5;
        r5 = r1.appId;
        r4.field_appId = r5;
        r5 = r1.version;
        r4.field_version = r5;
        r5 = r1.gSP;
        r4.field_pkgPath = r5;
        r5 = r1.uXG;
        r4.field_disableWvCache = r5;
        r6 = r1.uXH;
        r4.field_clearPkgTime = r6;
        r6 = r1.uXI;
        r4.field_checkIntervalTime = r6;
        r5 = r1.uXJ;
        r4.field_packMethod = r5;
        r5 = r1.cSx;
        r4.field_domain = r5;
        r5 = r1.cvZ;
        r4.field_md5 = r5;
        r5 = r1.downloadUrl;
        r4.field_downloadUrl = r5;
        r5 = r1.uXK;
        r4.field_pkgSize = r5;
        r5 = r1.uWQ;
        r4.field_downloadNetType = r5;
        r6 = r1.uXL;
        r4.field_nextCheckTime = r6;
        r6 = r1.createTime;
        r4.field_createTime = r6;
        r5 = r1.charset;
        r4.field_charset = r5;
        r5 = r1.uXM;
        r4.field_bigPackageReady = r5;
        r5 = r1.uXN;
        r4.field_preloadFilesReady = r5;
        r5 = r1.uXO;
        r4.field_preloadFilesAtomic = r5;
        r5 = r1.uXP;
        r4.field_totalDownloadCount = r5;
        r1 = r1.cTb;
        r4.field_downloadTriggerType = r1;
        r1 = r11.uXa;
        r0.a(r4, r1);
        r0 = r11.uXc;
        r0 = com.tencent.mm.sdk.platformtools.bo.ek(r0);
        if (r0 != 0) goto L_0x01c7;
    L_0x011f:
        r0 = r11.uXc;
        r1 = r0.iterator();
    L_0x0125:
        r0 = r1.hasNext();
        if (r0 == 0) goto L_0x01c7;
    L_0x012b:
        r0 = r1.next();
        r0 = (com.tencent.mm.plugin.wepkg.model.WepkgPreloadFile) r0;
        if (r0 == 0) goto L_0x0125;
    L_0x0133:
        r4 = com.tencent.mm.plugin.wepkg.b.d.dgo();
        r5 = new com.tencent.mm.plugin.wepkg.b.c;
        r5.<init>();
        r6 = r0.key;
        r5.field_key = r6;
        r6 = r0.eBS;
        r5.field_pkgId = r6;
        r6 = r0.version;
        r5.field_version = r6;
        r6 = r0.filePath;
        r5.field_filePath = r6;
        r6 = r0.uXe;
        r5.field_rid = r6;
        r6 = r0.mimeType;
        r5.field_mimeType = r6;
        r6 = r0.cvZ;
        r5.field_md5 = r6;
        r6 = r0.downloadUrl;
        r5.field_downloadUrl = r6;
        r6 = r0.size;
        r5.field_size = r6;
        r6 = r0.uWQ;
        r5.field_downloadNetType = r6;
        r6 = r0.uXr;
        r5.field_completeDownload = r6;
        r6 = r0.createTime;
        r5.field_createTime = r6;
        r0 = r4.hrm;
        if (r0 == 0) goto L_0x0125;
    L_0x0170:
        r0 = r5.field_pkgId;
        r6 = r5.field_rid;
        r0 = r4.hu(r0, r6);
        if (r0 != 0) goto L_0x01a3;
    L_0x017a:
        r6 = com.tencent.mm.plugin.wepkg.utils.d.aNY();
        r5.field_createTime = r6;
        r0 = r4.b(r5);
        r4 = "MicroMsg.Wepkg.WepkgPreloadFilesStorage";
        r6 = "insertPreloadFile pkgid:%s, version:%s, rid:%s, ret:%s";
        r7 = 4;
        r7 = new java.lang.Object[r7];
        r8 = r5.field_pkgId;
        r7[r2] = r8;
        r8 = r5.field_version;
        r7[r3] = r8;
        r5 = r5.field_rid;
        r7[r9] = r5;
        r0 = java.lang.Boolean.valueOf(r0);
        r7[r10] = r0;
        com.tencent.mm.sdk.platformtools.ab.i(r4, r6, r7);
        goto L_0x0125;
    L_0x01a3:
        r0 = r4.a(r5);
        r4 = "MicroMsg.Wepkg.WepkgPreloadFilesStorage";
        r6 = "relacePreloadFile pkgid:%s, version:%s, rid:%s, ret:%s";
        r7 = 4;
        r7 = new java.lang.Object[r7];
        r8 = r5.field_pkgId;
        r7[r2] = r8;
        r8 = r5.field_version;
        r7[r3] = r8;
        r5 = r5.field_rid;
        r7[r9] = r5;
        r0 = java.lang.Boolean.valueOf(r0);
        r7[r10] = r0;
        com.tencent.mm.sdk.platformtools.ab.i(r4, r6, r7);
        goto L_0x0125;
    L_0x01c7:
        r0 = r11;
        goto L_0x001b;
    L_0x01ca:
        r1 = r11.uWY;
        if (r1 == 0) goto L_0x0010;
    L_0x01ce:
        r1 = r11.uWY;
        r1 = r1.eBS;
        r1 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r1);
        if (r1 != 0) goto L_0x0010;
    L_0x01d8:
        r1 = com.tencent.mm.plugin.wepkg.b.d.dgo();
        r4 = r11.uWY;
        r4 = r4.eBS;
        r5 = r1.hrm;
        if (r5 != 0) goto L_0x01ef;
    L_0x01e4:
        r5 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r4);
        if (r5 == 0) goto L_0x01ef;
    L_0x01ea:
        r11.uXc = r0;
        r0 = r11;
        goto L_0x001b;
    L_0x01ef:
        r5 = "select * from %s where %s=? and %s=0";
        r6 = new java.lang.Object[r10];
        r7 = "WepkgPreloadFiles";
        r6[r2] = r7;
        r7 = "pkgId";
        r6[r3] = r7;
        r7 = "completeDownload";
        r6[r9] = r7;
        r5 = java.lang.String.format(r5, r6);
        r6 = new java.lang.String[r3];
        r6[r2] = r4;
        r1 = r1.rawQuery(r5, r6);
        r4 = "MicroMsg.Wepkg.WepkgPreloadFilesStorage";
        r6 = "getNeedDownloadPreLoadFileList queryStr:%s";
        r7 = new java.lang.Object[r3];
        r7[r2] = r5;
        com.tencent.mm.sdk.platformtools.ab.i(r4, r6, r7);
        if (r1 != 0) goto L_0x0228;
    L_0x021e:
        r1 = "MicroMsg.Wepkg.WepkgPreloadFilesStorage";
        r2 = "cursor is null";
        com.tencent.mm.sdk.platformtools.ab.i(r1, r2);
        goto L_0x01ea;
    L_0x0228:
        r4 = r1.moveToFirst();
        if (r4 == 0) goto L_0x0265;
    L_0x022e:
        r0 = new java.util.ArrayList;
        r0.<init>();
    L_0x0233:
        r4 = new com.tencent.mm.plugin.wepkg.model.WepkgPreloadFile;
        r4.<init>();
        r5 = new com.tencent.mm.plugin.wepkg.b.c;
        r5.<init>();
        r5.d(r1);
        r4.a(r5);
        r0.add(r4);
        r4 = r1.moveToNext();
        if (r4 != 0) goto L_0x0233;
    L_0x024c:
        r1.close();
        r1 = "MicroMsg.Wepkg.WepkgPreloadFilesStorage";
        r4 = "record list size:%s";
        r5 = new java.lang.Object[r3];
        r6 = r0.size();
        r6 = java.lang.Integer.valueOf(r6);
        r5[r2] = r6;
        com.tencent.mm.sdk.platformtools.ab.i(r1, r4, r5);
        goto L_0x01ea;
    L_0x0265:
        r1.close();
        r1 = "MicroMsg.Wepkg.WepkgPreloadFilesStorage";
        r2 = "no record";
        com.tencent.mm.sdk.platformtools.ab.i(r1, r2);
        goto L_0x01ea;
    L_0x0273:
        r0 = r11.uXb;
        if (r0 == 0) goto L_0x0010;
    L_0x0277:
        r0 = com.tencent.mm.plugin.wepkg.b.d.dgo();
        r1 = r11.uXb;
        r1 = r1.eBS;
        r2 = r11.uXb;
        r2 = r2.uXe;
        r3 = r11.uXb;
        r3 = r3.filePath;
        r4 = r11.uXb;
        r4 = r4.uXr;
        r3 = r0.h(r1, r2, r3, r4);
        r0 = r11;
        goto L_0x001b;
    L_0x0292:
        r1 = r11.uWY;
        if (r1 == 0) goto L_0x0010;
    L_0x0296:
        r4 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r1 = r4.hrm;
        if (r1 != 0) goto L_0x0317;
    L_0x029e:
        r1 = r0;
    L_0x029f:
        r4 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r1);
        if (r4 == 0) goto L_0x070a;
    L_0x02a5:
        r1 = com.tencent.mm.plugin.wepkg.b.d.dgo();
        r4 = r1.hrm;
        if (r4 != 0) goto L_0x0403;
    L_0x02ad:
        r1 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r0);
        if (r1 == 0) goto L_0x0311;
    L_0x02b3:
        r1 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r4 = r1.hrm;
        if (r4 == 0) goto L_0x0311;
    L_0x02bb:
        r4 = "update %s set %s=0";
        r5 = new java.lang.Object[r9];
        r6 = "WepkgVersion";
        r5[r2] = r6;
        r6 = "autoDownloadCount";
        r5[r3] = r6;
        r4 = java.lang.String.format(r4, r5);
        r5 = "WepkgVersion";
        r4 = r1.hY(r5, r4);
        r5 = "MicroMsg.Wepkg.WepkgVersionStorage";
        r6 = "WepkgVersionRecord resetAutoDownloadCount ret:%s";
        r7 = new java.lang.Object[r3];
        r4 = java.lang.Boolean.valueOf(r4);
        r7[r2] = r4;
        com.tencent.mm.sdk.platformtools.ab.i(r5, r6, r7);
        r4 = "update %s set %s=0";
        r5 = new java.lang.Object[r9];
        r6 = "WepkgPreloadFiles";
        r5[r2] = r6;
        r6 = "autoDownloadCount";
        r5[r3] = r6;
        r4 = java.lang.String.format(r4, r5);
        r5 = "WepkgPreloadFiles";
        r1 = r1.hY(r5, r4);
        r4 = "MicroMsg.Wepkg.WepkgVersionStorage";
        r5 = "WepkgPreloadFilesRecord resetAutoDownloadCount ret:%s";
        r3 = new java.lang.Object[r3];
        r1 = java.lang.Boolean.valueOf(r1);
        r3[r2] = r1;
        com.tencent.mm.sdk.platformtools.ab.i(r4, r5, r3);
    L_0x0311:
        r1 = r11.uWY;
        r1.eBS = r0;
        goto L_0x0010;
    L_0x0317:
        r1 = "select * from %s where %s=0 and %s=1 and %s<1 and %s<?";
        r5 = 5;
        r5 = new java.lang.Object[r5];
        r6 = "WepkgVersion";
        r5[r2] = r6;
        r6 = "bigPackageReady";
        r5[r3] = r6;
        r6 = "preloadFilesAtomic";
        r5[r9] = r6;
        r6 = "autoDownloadCount";
        r5[r10] = r6;
        r6 = 4;
        r7 = "packageDownloadCount";
        r5[r6] = r7;
        r1 = java.lang.String.format(r1, r5);
        r5 = new java.lang.String[r3];
        r6 = "3";
        r5[r2] = r6;
        r5 = r4.rawQuery(r1, r5);
        if (r5 != 0) goto L_0x034b;
    L_0x0348:
        r1 = r0;
        goto L_0x029f;
    L_0x034b:
        r1 = r5.moveToFirst();
        if (r1 == 0) goto L_0x0387;
    L_0x0351:
        r1 = r5.getCount();
        if (r1 <= r3) goto L_0x0710;
    L_0x0357:
        r1 = r1 + -1;
        r1 = com.tencent.mm.sdk.platformtools.bo.gV(r1, r2);
    L_0x035d:
        r5.move(r1);
        r1 = new com.tencent.mm.plugin.wepkg.b.e;
        r1.<init>();
        r1.d(r5);
        r5.close();
        r5 = r1.field_pkgId;
        r4.ahI(r5);
        r4 = "MicroMsg.Wepkg.WepkgVersionStorage";
        r5 = "randomNeedDownloadPkgid exist record in DB, pkgid:%s, version:%s, bigPackageReady:false, preloadFilesAtomic:true";
        r6 = new java.lang.Object[r9];
        r7 = r1.field_pkgId;
        r6[r2] = r7;
        r7 = r1.field_version;
        r6[r3] = r7;
        com.tencent.mm.sdk.platformtools.ab.i(r4, r5, r6);
        r1 = r1.field_pkgId;
        goto L_0x029f;
    L_0x0387:
        r5.close();
        r1 = "select * from %s where %s=0 and %s<1 and %s<?";
        r5 = 4;
        r5 = new java.lang.Object[r5];
        r6 = "WepkgVersion";
        r5[r2] = r6;
        r6 = "bigPackageReady";
        r5[r3] = r6;
        r6 = "autoDownloadCount";
        r5[r9] = r6;
        r6 = "packageDownloadCount";
        r5[r10] = r6;
        r1 = java.lang.String.format(r1, r5);
        r5 = new java.lang.String[r3];
        r6 = "3";
        r5[r2] = r6;
        r5 = r4.rawQuery(r1, r5);
        if (r5 != 0) goto L_0x03b8;
    L_0x03b5:
        r1 = r0;
        goto L_0x029f;
    L_0x03b8:
        r1 = r5.moveToFirst();
        if (r1 == 0) goto L_0x03f4;
    L_0x03be:
        r1 = r5.getCount();
        if (r1 <= r3) goto L_0x070d;
    L_0x03c4:
        r1 = r1 + -1;
        r1 = com.tencent.mm.sdk.platformtools.bo.gV(r1, r2);
    L_0x03ca:
        r5.move(r1);
        r1 = new com.tencent.mm.plugin.wepkg.b.e;
        r1.<init>();
        r1.d(r5);
        r5.close();
        r5 = r1.field_pkgId;
        r4.ahI(r5);
        r4 = "MicroMsg.Wepkg.WepkgVersionStorage";
        r5 = "randomNeedDownloadPkgid exist record in DB, pkgid:%s, version:%s, bigPackageReady:false, preloadFilesAtomic:false";
        r6 = new java.lang.Object[r9];
        r7 = r1.field_pkgId;
        r6[r2] = r7;
        r7 = r1.field_version;
        r6[r3] = r7;
        com.tencent.mm.sdk.platformtools.ab.i(r4, r5, r6);
        r1 = r1.field_pkgId;
        goto L_0x029f;
    L_0x03f4:
        r5.close();
        r1 = "MicroMsg.Wepkg.WepkgVersionStorage";
        r4 = "randomNeedDownloadPkgid no download record in DB";
        com.tencent.mm.sdk.platformtools.ab.i(r1, r4);
        r1 = r0;
        goto L_0x029f;
    L_0x0403:
        r4 = "select * from %s where %s=0 and %s<1 and %s<?";
        r5 = 4;
        r5 = new java.lang.Object[r5];
        r6 = "WepkgPreloadFiles";
        r5[r2] = r6;
        r6 = "completeDownload";
        r5[r3] = r6;
        r6 = "autoDownloadCount";
        r5[r9] = r6;
        r6 = "fileDownloadCount";
        r5[r10] = r6;
        r4 = java.lang.String.format(r4, r5);
        r5 = new java.lang.String[r3];
        r6 = "3";
        r5[r2] = r6;
        r4 = r1.rawQuery(r4, r5);
        if (r4 == 0) goto L_0x02ad;
    L_0x042e:
        r5 = r4.moveToFirst();
        if (r5 == 0) goto L_0x04c0;
    L_0x0434:
        r0 = r4.getCount();
        if (r0 <= r3) goto L_0x0707;
    L_0x043a:
        r0 = r0 + -1;
        r0 = com.tencent.mm.sdk.platformtools.bo.gV(r0, r2);
    L_0x0440:
        r4.move(r0);
        r0 = new com.tencent.mm.plugin.wepkg.b.c;
        r0.<init>();
        r0.d(r4);
        r4.close();
        r4 = r0.field_pkgId;
        r5 = r0.field_rid;
        r6 = r1.hrm;
        if (r6 == 0) goto L_0x0462;
    L_0x0456:
        r6 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r4);
        if (r6 != 0) goto L_0x0462;
    L_0x045c:
        r6 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r5);
        if (r6 == 0) goto L_0x047d;
    L_0x0462:
        r1 = "MicroMsg.Wepkg.WepkgPreloadFilesStorage";
        r4 = "randomNeedDownloadPkgid exist record in DB, pkgid:%s, version:%s, rid:%s";
        r5 = new java.lang.Object[r10];
        r6 = r0.field_pkgId;
        r5[r2] = r6;
        r6 = r0.field_version;
        r5[r3] = r6;
        r6 = r0.field_rid;
        r5[r9] = r6;
        com.tencent.mm.sdk.platformtools.ab.i(r1, r4, r5);
        r0 = r0.field_pkgId;
        goto L_0x02ad;
    L_0x047d:
        r6 = "update %s set %s=%s+1 where %s='%s' and %s='%s'";
        r7 = 7;
        r7 = new java.lang.Object[r7];
        r8 = "WepkgPreloadFiles";
        r7[r2] = r8;
        r8 = "autoDownloadCount";
        r7[r3] = r8;
        r8 = "autoDownloadCount";
        r7[r9] = r8;
        r8 = "pkgId";
        r7[r10] = r8;
        r8 = 4;
        r7[r8] = r4;
        r4 = 5;
        r8 = "rid";
        r7[r4] = r8;
        r4 = 6;
        r7[r4] = r5;
        r4 = java.lang.String.format(r6, r7);
        r5 = "WepkgPreloadFiles";
        r1 = r1.hY(r5, r4);
        r4 = "MicroMsg.Wepkg.WepkgPreloadFilesStorage";
        r5 = "WepkgPreloadFilesRecord addAutoDownloadCount ret:%s";
        r6 = new java.lang.Object[r3];
        r1 = java.lang.Boolean.valueOf(r1);
        r6[r2] = r1;
        com.tencent.mm.sdk.platformtools.ab.i(r4, r5, r6);
        goto L_0x0462;
    L_0x04c0:
        r4.close();
        r1 = "MicroMsg.Wepkg.WepkgPreloadFilesStorage";
        r4 = "randomNeedDownloadPkgid no download record in DB";
        com.tencent.mm.sdk.platformtools.ab.i(r1, r4);
        goto L_0x02ad;
    L_0x04ce:
        r0 = r11.uWY;
        if (r0 == 0) goto L_0x0010;
    L_0x04d2:
        r0 = com.tencent.mm.plugin.wepkg.b.d.dgo();
        r1 = r11.uWY;
        r1 = r1.eBS;
        r0 = r0.ahD(r1);
        r11.uXc = r0;
        r0 = r11;
        goto L_0x001b;
    L_0x04e3:
        r1 = r11.uXb;
        if (r1 == 0) goto L_0x0010;
    L_0x04e7:
        r1 = com.tencent.mm.plugin.wepkg.b.d.dgo();
        r2 = r11.uXb;
        r2 = r2.eBS;
        r4 = r11.uXb;
        r4 = r4.uXe;
        r1 = r1.hu(r2, r4);
        if (r1 == 0) goto L_0x0501;
    L_0x04f9:
        r0 = r11.uXb;
        r0.a(r1);
        r0 = r11;
        goto L_0x001b;
    L_0x0501:
        r11.uXb = r0;
        goto L_0x0010;
    L_0x0505:
        r0 = r11.uWY;
        if (r0 == 0) goto L_0x0010;
    L_0x0509:
        r0 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r1 = r11.uWY;
        r1 = r1.eBS;
        r3 = r0.ahJ(r1);
        r0 = r11;
        goto L_0x001b;
    L_0x0518:
        r1 = r11.uWY;
        if (r1 == 0) goto L_0x0010;
    L_0x051c:
        r1 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r2 = r11.uWY;
        r2 = r2.eBS;
        r1 = r1.ahG(r2);
        if (r1 == 0) goto L_0x0532;
    L_0x052a:
        r0 = r11.uWY;
        r0.a(r1);
        r0 = r11;
        goto L_0x001b;
    L_0x0532:
        r11.uWY = r0;
        goto L_0x0010;
    L_0x0536:
        r0 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r0 = r0.dgs();
        r11.uWZ = r0;
        r0 = r11;
        goto L_0x001b;
    L_0x0543:
        r0 = r11.uWY;
        if (r0 == 0) goto L_0x0010;
    L_0x0547:
        r0 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r1 = r11.uWY;
        r1 = r1.eBS;
        r3 = r0.ahK(r1);
        r0 = r11;
        goto L_0x001b;
    L_0x0556:
        r0 = r11.uWY;
        if (r0 == 0) goto L_0x0010;
    L_0x055a:
        r0 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r1 = r11.uWY;
        r1 = r1.eBS;
        r4 = r0.hrm;
        if (r4 == 0) goto L_0x056c;
    L_0x0566:
        r4 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r1);
        if (r4 == 0) goto L_0x0570;
    L_0x056c:
        r11.csN = r2;
        goto L_0x0010;
    L_0x0570:
        r4 = "update %s set %s=%s+1 where %s='%s'";
        r5 = 5;
        r5 = new java.lang.Object[r5];
        r6 = "WepkgVersion";
        r5[r2] = r6;
        r6 = "totalDownloadCount";
        r5[r3] = r6;
        r6 = "totalDownloadCount";
        r5[r9] = r6;
        r6 = "pkgId";
        r5[r10] = r6;
        r6 = 4;
        r5[r6] = r1;
        r1 = java.lang.String.format(r4, r5);
        r4 = "WepkgVersion";
        r0 = r0.hY(r4, r1);
        r1 = "MicroMsg.Wepkg.WepkgVersionStorage";
        r4 = "WepkgVersionRecord addTotalDownloadCount ret:%s";
        r5 = new java.lang.Object[r3];
        r0 = java.lang.Boolean.valueOf(r0);
        r5[r2] = r0;
        com.tencent.mm.sdk.platformtools.ab.i(r1, r4, r5);
        r2 = r3;
        goto L_0x056c;
    L_0x05ab:
        r0 = r11.uWY;
        if (r0 == 0) goto L_0x0010;
    L_0x05af:
        r0 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r1 = r11.uWY;
        r1 = r1.eBS;
        r4 = r0.hrm;
        if (r4 == 0) goto L_0x05c1;
    L_0x05bb:
        r4 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r1);
        if (r4 == 0) goto L_0x05c6;
    L_0x05c1:
        r3 = r2;
    L_0x05c2:
        r11.csN = r3;
        goto L_0x0010;
    L_0x05c6:
        r4 = "update %s set %s=%s+1 where %s='%s'";
        r5 = 5;
        r5 = new java.lang.Object[r5];
        r6 = "WepkgVersion";
        r5[r2] = r6;
        r6 = "packageDownloadCount";
        r5[r3] = r6;
        r6 = "packageDownloadCount";
        r5[r9] = r6;
        r6 = "pkgId";
        r5[r10] = r6;
        r6 = 4;
        r5[r6] = r1;
        r1 = java.lang.String.format(r4, r5);
        r4 = "WepkgVersion";
        r0 = r0.hY(r4, r1);
        r1 = "MicroMsg.Wepkg.WepkgVersionStorage";
        r4 = "WepkgVersionRecord addPackageDownloadCount ret:%s";
        r5 = new java.lang.Object[r3];
        r0 = java.lang.Boolean.valueOf(r0);
        r5[r2] = r0;
        com.tencent.mm.sdk.platformtools.ab.i(r1, r4, r5);
        goto L_0x05c2;
    L_0x0600:
        r0 = r11.uWY;
        if (r0 == 0) goto L_0x0010;
    L_0x0604:
        r0 = com.tencent.mm.plugin.wepkg.b.f.dgp();
        r1 = r11.uWY;
        r1 = r1.eBS;
        r4 = r0.hrm;
        if (r4 == 0) goto L_0x0616;
    L_0x0610:
        r4 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r1);
        if (r4 == 0) goto L_0x061b;
    L_0x0616:
        r3 = r2;
    L_0x0617:
        r11.csN = r3;
        goto L_0x0010;
    L_0x061b:
        r4 = "update %s set %s=0 where %s='%s'";
        r5 = 4;
        r5 = new java.lang.Object[r5];
        r6 = "WepkgVersion";
        r5[r2] = r6;
        r6 = "packageDownloadCount";
        r5[r3] = r6;
        r6 = "pkgId";
        r5[r9] = r6;
        r5[r10] = r1;
        r1 = java.lang.String.format(r4, r5);
        r4 = "WepkgVersion";
        r0 = r0.hY(r4, r1);
        r1 = "MicroMsg.Wepkg.WepkgVersionStorage";
        r4 = "WepkgVersionRecord resetPackageDownloadCount ret:%s";
        r5 = new java.lang.Object[r3];
        r0 = java.lang.Boolean.valueOf(r0);
        r5[r2] = r0;
        com.tencent.mm.sdk.platformtools.ab.i(r1, r4, r5);
        goto L_0x0617;
    L_0x064f:
        r0 = r11.uXb;
        if (r0 == 0) goto L_0x0010;
    L_0x0653:
        r0 = com.tencent.mm.plugin.wepkg.b.d.dgo();
        r1 = r11.uXb;
        r1 = r1.eBS;
        r4 = r11.uXb;
        r4 = r4.uXe;
        r5 = r0.hrm;
        if (r5 == 0) goto L_0x066f;
    L_0x0663:
        r5 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r1);
        if (r5 != 0) goto L_0x066f;
    L_0x0669:
        r5 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r4);
        if (r5 == 0) goto L_0x0674;
    L_0x066f:
        r3 = r2;
    L_0x0670:
        r11.csN = r3;
        goto L_0x0010;
    L_0x0674:
        r5 = "update %s set %s=%s+1 where %s='%s' and %s='%s'";
        r6 = 7;
        r6 = new java.lang.Object[r6];
        r7 = "WepkgPreloadFiles";
        r6[r2] = r7;
        r7 = "fileDownloadCount";
        r6[r3] = r7;
        r7 = "fileDownloadCount";
        r6[r9] = r7;
        r7 = "pkgId";
        r6[r10] = r7;
        r7 = 4;
        r6[r7] = r1;
        r1 = 5;
        r7 = "rid";
        r6[r1] = r7;
        r1 = 6;
        r6[r1] = r4;
        r1 = java.lang.String.format(r5, r6);
        r4 = "WepkgPreloadFiles";
        r0 = r0.hY(r4, r1);
        r1 = "MicroMsg.Wepkg.WepkgPreloadFilesStorage";
        r4 = "WepkgPreloadFilesRecord addFileDownloadCount ret:%s";
        r5 = new java.lang.Object[r3];
        r0 = java.lang.Boolean.valueOf(r0);
        r5[r2] = r0;
        com.tencent.mm.sdk.platformtools.ab.i(r1, r4, r5);
        goto L_0x0670;
    L_0x06b7:
        r0 = r11.uXb;
        if (r0 == 0) goto L_0x0010;
    L_0x06bb:
        r0 = com.tencent.mm.plugin.wepkg.b.d.dgo();
        r1 = r11.uXb;
        r1 = r1.eBS;
        r4 = r0.hrm;
        if (r4 == 0) goto L_0x06cd;
    L_0x06c7:
        r4 = com.tencent.mm.sdk.platformtools.bo.isNullOrNil(r1);
        if (r4 == 0) goto L_0x06d1;
    L_0x06cd:
        r3 = r2;
        r0 = r11;
        goto L_0x001b;
    L_0x06d1:
        r4 = "update %s set %s=0 where %s='%s'";
        r5 = 4;
        r5 = new java.lang.Object[r5];
        r6 = "WepkgPreloadFiles";
        r5[r2] = r6;
        r6 = "fileDownloadCount";
        r5[r3] = r6;
        r6 = "pkgId";
        r5[r9] = r6;
        r5[r10] = r1;
        r1 = java.lang.String.format(r4, r5);
        r4 = "WepkgPreloadFiles";
        r0 = r0.hY(r4, r1);
        r1 = "MicroMsg.Wepkg.WepkgPreloadFilesStorage";
        r4 = "WepkgPreloadFilesRecord resetFileDownloadCount ret:%s";
        r5 = new java.lang.Object[r3];
        r0 = java.lang.Boolean.valueOf(r0);
        r5[r2] = r0;
        com.tencent.mm.sdk.platformtools.ab.i(r1, r4, r5);
        r0 = r11;
        goto L_0x001b;
    L_0x0707:
        r0 = r2;
        goto L_0x0440;
    L_0x070a:
        r0 = r1;
        goto L_0x02ad;
    L_0x070d:
        r1 = r2;
        goto L_0x03ca;
    L_0x0710:
        r1 = r2;
        goto L_0x035d;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.tencent.mm.plugin.wepkg.model.WepkgCrossProcessTask.asP():void");
    }

    public final void asQ() {
        AppMethodBeat.i(63534);
        if (this.hww != null) {
            this.hww.run();
        }
        AppMethodBeat.o(63534);
    }

    public final void m(Parcel parcel) {
        AppMethodBeat.i(63535);
        this.Cn = parcel.readInt();
        this.uWY = (WepkgVersion) parcel.readParcelable(WepkgVersion.class.getClassLoader());
        if (this.uWZ == null) {
            this.uWZ = new ArrayList();
        }
        parcel.readList(this.uWZ, WepkgVersion.class.getClassLoader());
        this.uXb = (WepkgPreloadFile) parcel.readParcelable(WepkgPreloadFile.class.getClassLoader());
        if (this.uXc == null) {
            this.uXc = new ArrayList();
        }
        parcel.readList(this.uXc, WepkgPreloadFile.class.getClassLoader());
        this.uXd = parcel.readString();
        AppMethodBeat.o(63535);
    }

    public final void a(Parcel parcel, int i) {
        AppMethodBeat.i(63536);
        parcel.writeInt(this.Cn);
        parcel.writeParcelable(this.uWY, i);
        parcel.writeList(this.uWZ);
        parcel.writeParcelable(this.uXb, i);
        parcel.writeList(this.uXc);
        parcel.writeString(this.uXd);
        AppMethodBeat.o(63536);
    }

    static {
        AppMethodBeat.i(63537);
        AppMethodBeat.o(63537);
    }
}
