package com.strmr.ps.data.local.dao;

import android.database.Cursor;
import android.os.CancellationSignal;
import androidx.room.RoomDatabase;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.strmr.ps.data.local.dao.InstalledAddonDao;
import com.strmr.ps.data.local.entity.AddonConfigEntity;
import com.strmr.ps.data.local.entity.AddonWithConfigs;
import com.strmr.ps.data.local.entity.InstalledAddonEntity;
import defpackage.e6a;
import defpackage.j43;
import defpackage.mk1;
import defpackage.n58;
import defpackage.oq8;
import defpackage.p58;
import defpackage.pe9;
import defpackage.q2;
import defpackage.rq6;
import defpackage.sp1;
import defpackage.ts;
import defpackage.vo6;
import defpackage.vw2;
import defpackage.xm2;
import defpackage.yn1;
import defpackage.z79;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Callable;
import kotlin.coroutines.Continuation;

/* JADX INFO: loaded from: classes3.dex */
public final class InstalledAddonDao_Impl implements InstalledAddonDao {
    private final RoomDatabase __db;
    private final xm2<InstalledAddonEntity> __insertionAdapterOfInstalledAddonEntity;
    private final oq8 __preparedStmtOfDeleteAddonByInstanceId;
    private final oq8 __preparedStmtOfDeleteAddonsByAddonId;
    private final oq8 __preparedStmtOfDeleteAllAddons;
    private final oq8 __preparedStmtOfSetAddonEnabled;
    private final oq8 __preparedStmtOfUpdateLastUsed;
    private final oq8 __preparedStmtOfUpdatePriority;

    public InstalledAddonDao_Impl(@vo6 RoomDatabase roomDatabase) {
        this.__db = roomDatabase;
        this.__insertionAdapterOfInstalledAddonEntity = new xm2<InstalledAddonEntity>(roomDatabase) { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.1
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "INSERT OR REPLACE INTO `installed_addons` (`instanceId`,`addonId`,`instanceNumber`,`name`,`version`,`description`,`baseUrl`,`manifestUrl`,`configuredUrl`,`isConfigured`,`addonType`,`capabilities`,`debridSupport`,`configFields`,`priority`,`enabled`,`isCustom`,`targetScreen`,`installedAt`,`lastUsedAt`,`catalogsJson`,`resourcesJson`,`isQuickAdd`,`debridInjectionType`,`debridInjectionConfig`,`bundleId`,`bundleUrl`,`bundleVersion`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
            }

            @Override // defpackage.xm2
            public void bind(@vo6 pe9 pe9Var, @vo6 InstalledAddonEntity installedAddonEntity) {
                pe9Var.bindString(1, installedAddonEntity.getInstanceId());
                pe9Var.bindString(2, installedAddonEntity.getAddonId());
                pe9Var.bindLong(3, installedAddonEntity.getInstanceNumber());
                pe9Var.bindString(4, installedAddonEntity.getName());
                if (installedAddonEntity.getVersion() == null) {
                    pe9Var.bindNull(5);
                } else {
                    pe9Var.bindString(5, installedAddonEntity.getVersion());
                }
                if (installedAddonEntity.getDescription() == null) {
                    pe9Var.bindNull(6);
                } else {
                    pe9Var.bindString(6, installedAddonEntity.getDescription());
                }
                pe9Var.bindString(7, installedAddonEntity.getBaseUrl());
                pe9Var.bindString(8, installedAddonEntity.getManifestUrl());
                if (installedAddonEntity.getConfiguredUrl() == null) {
                    pe9Var.bindNull(9);
                } else {
                    pe9Var.bindString(9, installedAddonEntity.getConfiguredUrl());
                }
                pe9Var.bindLong(10, installedAddonEntity.isConfigured() ? 1L : 0L);
                pe9Var.bindString(11, installedAddonEntity.getAddonType());
                pe9Var.bindString(12, installedAddonEntity.getCapabilities());
                if (installedAddonEntity.getDebridSupport() == null) {
                    pe9Var.bindNull(13);
                } else {
                    pe9Var.bindString(13, installedAddonEntity.getDebridSupport());
                }
                if (installedAddonEntity.getConfigFields() == null) {
                    pe9Var.bindNull(14);
                } else {
                    pe9Var.bindString(14, installedAddonEntity.getConfigFields());
                }
                pe9Var.bindLong(15, installedAddonEntity.getPriority());
                pe9Var.bindLong(16, installedAddonEntity.getEnabled() ? 1L : 0L);
                pe9Var.bindLong(17, installedAddonEntity.isCustom() ? 1L : 0L);
                pe9Var.bindString(18, installedAddonEntity.getTargetScreen());
                pe9Var.bindLong(19, installedAddonEntity.getInstalledAt());
                if (installedAddonEntity.getLastUsedAt() == null) {
                    pe9Var.bindNull(20);
                } else {
                    pe9Var.bindLong(20, installedAddonEntity.getLastUsedAt().longValue());
                }
                if (installedAddonEntity.getCatalogsJson() == null) {
                    pe9Var.bindNull(21);
                } else {
                    pe9Var.bindString(21, installedAddonEntity.getCatalogsJson());
                }
                if (installedAddonEntity.getResourcesJson() == null) {
                    pe9Var.bindNull(22);
                } else {
                    pe9Var.bindString(22, installedAddonEntity.getResourcesJson());
                }
                pe9Var.bindLong(23, installedAddonEntity.isQuickAdd() ? 1L : 0L);
                if (installedAddonEntity.getDebridInjectionType() == null) {
                    pe9Var.bindNull(24);
                } else {
                    pe9Var.bindString(24, installedAddonEntity.getDebridInjectionType());
                }
                if (installedAddonEntity.getDebridInjectionConfig() == null) {
                    pe9Var.bindNull(25);
                } else {
                    pe9Var.bindString(25, installedAddonEntity.getDebridInjectionConfig());
                }
                if (installedAddonEntity.getBundleId() == null) {
                    pe9Var.bindNull(26);
                } else {
                    pe9Var.bindString(26, installedAddonEntity.getBundleId());
                }
                if (installedAddonEntity.getBundleUrl() == null) {
                    pe9Var.bindNull(27);
                } else {
                    pe9Var.bindString(27, installedAddonEntity.getBundleUrl());
                }
                if (installedAddonEntity.getBundleVersion() == null) {
                    pe9Var.bindNull(28);
                } else {
                    pe9Var.bindLong(28, installedAddonEntity.getBundleVersion().intValue());
                }
            }
        };
        this.__preparedStmtOfDeleteAddonByInstanceId = new oq8(roomDatabase) { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.2
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "DELETE FROM installed_addons WHERE instanceId = ?";
            }
        };
        this.__preparedStmtOfDeleteAddonsByAddonId = new oq8(roomDatabase) { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.3
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "DELETE FROM installed_addons WHERE addonId = ?";
            }
        };
        this.__preparedStmtOfSetAddonEnabled = new oq8(roomDatabase) { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.4
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "UPDATE installed_addons SET enabled = ? WHERE instanceId = ?";
            }
        };
        this.__preparedStmtOfUpdatePriority = new oq8(roomDatabase) { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.5
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "UPDATE installed_addons SET priority = ? WHERE instanceId = ?";
            }
        };
        this.__preparedStmtOfUpdateLastUsed = new oq8(roomDatabase) { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.6
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "UPDATE installed_addons SET lastUsedAt = ? WHERE instanceId = ?";
            }
        };
        this.__preparedStmtOfDeleteAllAddons = new oq8(roomDatabase) { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.7
            @Override // defpackage.oq8
            @vo6
            public String createQuery() {
                return "DELETE FROM installed_addons";
            }
        };
    }

    /* JADX INFO: Access modifiers changed from: private */
    public void __fetchRelationshipaddonConfigsAscomStrmrPsDataLocalEntityAddonConfigEntity(@vo6 ts<String, ArrayList<AddonConfigEntity>> tsVar) {
        Set setKeySet = tsVar.keySet();
        if (setKeySet.isEmpty()) {
            return;
        }
        if (tsVar.c > 999) {
            ts tsVar2 = new ts(RoomDatabase.MAX_BIND_PARAMETER_CNT);
            int i = tsVar.c;
            int i2 = 0;
            int i3 = 0;
            while (i2 < i) {
                tsVar2.put(tsVar.f(i2), tsVar.j(i2));
                i2++;
                i3++;
                if (i3 == 999) {
                    lambda$__fetchRelationshipaddonConfigsAscomStrmrPsDataLocalEntityAddonConfigEntity$1(tsVar2);
                    tsVar2.clear();
                    i3 = 0;
                }
            }
            if (i3 > 0) {
                lambda$__fetchRelationshipaddonConfigsAscomStrmrPsDataLocalEntityAddonConfigEntity$1(tsVar2);
                return;
            }
            return;
        }
        StringBuilder sbQ = vw2.q("SELECT `instanceId`,`fieldId`,`value` FROM `addon_configs` WHERE `instanceId` IN (");
        int size = setKeySet.size();
        z79.a(sbQ, size);
        sbQ.append(")");
        p58 p58VarD = p58.d(size, sbQ.toString());
        Iterator it = setKeySet.iterator();
        int i4 = 1;
        while (it.hasNext()) {
            p58VarD.bindString(i4, (String) it.next());
            i4++;
        }
        Cursor cursorB = sp1.b(this.__db, p58VarD, false);
        try {
            int iA = yn1.a(cursorB, "instanceId");
            if (iA == -1) {
                return;
            }
            while (cursorB.moveToNext()) {
                ArrayList arrayList = (ArrayList) tsVar.get(cursorB.getString(iA));
                if (arrayList != null) {
                    arrayList.add(new AddonConfigEntity(cursorB.getString(0), cursorB.getString(1), cursorB.getString(2)));
                }
            }
        } finally {
            cursorB.close();
        }
    }

    @vo6
    public static List<Class<?>> getRequiredConverters() {
        return Collections.EMPTY_LIST;
    }

    private /* synthetic */ e6a lambda$__fetchRelationshipaddonConfigsAscomStrmrPsDataLocalEntityAddonConfigEntity$1(ts tsVar) {
        __fetchRelationshipaddonConfigsAscomStrmrPsDataLocalEntityAddonConfigEntity(tsVar);
        return e6a.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public /* synthetic */ Object lambda$replaceAllAddons$0(List list, Continuation continuation) {
        return InstalledAddonDao.DefaultImpls.replaceAllAddons(this, list, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object deleteAddonByInstanceId(final String str, Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.10
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                pe9 pe9VarAcquire = InstalledAddonDao_Impl.this.__preparedStmtOfDeleteAddonByInstanceId.acquire();
                pe9VarAcquire.bindString(1, str);
                try {
                    InstalledAddonDao_Impl.this.__db.beginTransaction();
                    try {
                        pe9VarAcquire.executeUpdateDelete();
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        return e6a.a;
                    } finally {
                        InstalledAddonDao_Impl.this.__db.endTransaction();
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__preparedStmtOfDeleteAddonByInstanceId.release(pe9VarAcquire);
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object deleteAddonsByAddonId(final String str, Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.11
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                pe9 pe9VarAcquire = InstalledAddonDao_Impl.this.__preparedStmtOfDeleteAddonsByAddonId.acquire();
                pe9VarAcquire.bindString(1, str);
                try {
                    InstalledAddonDao_Impl.this.__db.beginTransaction();
                    try {
                        pe9VarAcquire.executeUpdateDelete();
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        return e6a.a;
                    } finally {
                        InstalledAddonDao_Impl.this.__db.endTransaction();
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__preparedStmtOfDeleteAddonsByAddonId.release(pe9VarAcquire);
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object deleteAllAddons(Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.15
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                pe9 pe9VarAcquire = InstalledAddonDao_Impl.this.__preparedStmtOfDeleteAllAddons.acquire();
                try {
                    InstalledAddonDao_Impl.this.__db.beginTransaction();
                    try {
                        pe9VarAcquire.executeUpdateDelete();
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        return e6a.a;
                    } finally {
                        InstalledAddonDao_Impl.this.__db.endTransaction();
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__preparedStmtOfDeleteAllAddons.release(pe9VarAcquire);
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getAddonById(String str, Continuation<? super InstalledAddonEntity> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM installed_addons WHERE addonId = ? LIMIT 1");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<InstalledAddonEntity>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.28
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @rq6
            public InstalledAddonEntity call() throws Exception {
                int iB;
                int iB2;
                int iB3;
                int iB4;
                int iB5;
                int iB6;
                int iB7;
                int iB8;
                int iB9;
                int iB10;
                int iB11;
                int iB12;
                int iB13;
                int iB14;
                AnonymousClass28 anonymousClass28 = this;
                Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, false);
                try {
                    iB = yn1.b(cursorB, "instanceId");
                    iB2 = yn1.b(cursorB, "addonId");
                    iB3 = yn1.b(cursorB, "instanceNumber");
                    iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                    iB5 = yn1.b(cursorB, "version");
                    iB6 = yn1.b(cursorB, "description");
                    iB7 = yn1.b(cursorB, "baseUrl");
                    iB8 = yn1.b(cursorB, "manifestUrl");
                    iB9 = yn1.b(cursorB, "configuredUrl");
                    iB10 = yn1.b(cursorB, "isConfigured");
                    iB11 = yn1.b(cursorB, "addonType");
                    iB12 = yn1.b(cursorB, "capabilities");
                    iB13 = yn1.b(cursorB, "debridSupport");
                    iB14 = yn1.b(cursorB, "configFields");
                } catch (Throwable th) {
                    th = th;
                }
                try {
                    int iB15 = yn1.b(cursorB, "priority");
                    int iB16 = yn1.b(cursorB, "enabled");
                    int iB17 = yn1.b(cursorB, "isCustom");
                    int iB18 = yn1.b(cursorB, "targetScreen");
                    int iB19 = yn1.b(cursorB, "installedAt");
                    int iB20 = yn1.b(cursorB, "lastUsedAt");
                    int iB21 = yn1.b(cursorB, "catalogsJson");
                    int iB22 = yn1.b(cursorB, "resourcesJson");
                    int iB23 = yn1.b(cursorB, "isQuickAdd");
                    int iB24 = yn1.b(cursorB, "debridInjectionType");
                    int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                    int iB26 = yn1.b(cursorB, "bundleId");
                    int iB27 = yn1.b(cursorB, "bundleUrl");
                    int iB28 = yn1.b(cursorB, "bundleVersion");
                    InstalledAddonEntity installedAddonEntity = null;
                    if (cursorB.moveToFirst()) {
                        installedAddonEntity = new InstalledAddonEntity(cursorB.getString(iB), cursorB.getString(iB2), cursorB.getInt(iB3), cursorB.getString(iB4), cursorB.isNull(iB5) ? null : cursorB.getString(iB5), cursorB.isNull(iB6) ? null : cursorB.getString(iB6), cursorB.getString(iB7), cursorB.getString(iB8), cursorB.isNull(iB9) ? null : cursorB.getString(iB9), cursorB.getInt(iB10) != 0, cursorB.getString(iB11), cursorB.getString(iB12), cursorB.isNull(iB13) ? null : cursorB.getString(iB13), cursorB.isNull(iB14) ? null : cursorB.getString(iB14), cursorB.getInt(iB15), cursorB.getInt(iB16) != 0, cursorB.getInt(iB17) != 0, cursorB.getString(iB18), cursorB.getLong(iB19), cursorB.isNull(iB20) ? null : Long.valueOf(cursorB.getLong(iB20)), cursorB.isNull(iB21) ? null : cursorB.getString(iB21), cursorB.isNull(iB22) ? null : cursorB.getString(iB22), cursorB.getInt(iB23) != 0, cursorB.isNull(iB24) ? null : cursorB.getString(iB24), cursorB.isNull(iB25) ? null : cursorB.getString(iB25), cursorB.isNull(iB26) ? null : cursorB.getString(iB26), cursorB.isNull(iB27) ? null : cursorB.getString(iB27), cursorB.isNull(iB28) ? null : Integer.valueOf(cursorB.getInt(iB28)));
                    }
                    cursorB.close();
                    p58VarD.release();
                    return installedAddonEntity;
                } catch (Throwable th2) {
                    th = th2;
                    anonymousClass28 = this;
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getAddonByInstanceId(String str, Continuation<? super InstalledAddonEntity> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM installed_addons WHERE instanceId = ?");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<InstalledAddonEntity>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.26
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @rq6
            public InstalledAddonEntity call() throws Exception {
                int iB;
                int iB2;
                int iB3;
                int iB4;
                int iB5;
                int iB6;
                int iB7;
                int iB8;
                int iB9;
                int iB10;
                int iB11;
                int iB12;
                int iB13;
                int iB14;
                AnonymousClass26 anonymousClass26 = this;
                Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, false);
                try {
                    iB = yn1.b(cursorB, "instanceId");
                    iB2 = yn1.b(cursorB, "addonId");
                    iB3 = yn1.b(cursorB, "instanceNumber");
                    iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                    iB5 = yn1.b(cursorB, "version");
                    iB6 = yn1.b(cursorB, "description");
                    iB7 = yn1.b(cursorB, "baseUrl");
                    iB8 = yn1.b(cursorB, "manifestUrl");
                    iB9 = yn1.b(cursorB, "configuredUrl");
                    iB10 = yn1.b(cursorB, "isConfigured");
                    iB11 = yn1.b(cursorB, "addonType");
                    iB12 = yn1.b(cursorB, "capabilities");
                    iB13 = yn1.b(cursorB, "debridSupport");
                    iB14 = yn1.b(cursorB, "configFields");
                } catch (Throwable th) {
                    th = th;
                }
                try {
                    int iB15 = yn1.b(cursorB, "priority");
                    int iB16 = yn1.b(cursorB, "enabled");
                    int iB17 = yn1.b(cursorB, "isCustom");
                    int iB18 = yn1.b(cursorB, "targetScreen");
                    int iB19 = yn1.b(cursorB, "installedAt");
                    int iB20 = yn1.b(cursorB, "lastUsedAt");
                    int iB21 = yn1.b(cursorB, "catalogsJson");
                    int iB22 = yn1.b(cursorB, "resourcesJson");
                    int iB23 = yn1.b(cursorB, "isQuickAdd");
                    int iB24 = yn1.b(cursorB, "debridInjectionType");
                    int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                    int iB26 = yn1.b(cursorB, "bundleId");
                    int iB27 = yn1.b(cursorB, "bundleUrl");
                    int iB28 = yn1.b(cursorB, "bundleVersion");
                    InstalledAddonEntity installedAddonEntity = null;
                    if (cursorB.moveToFirst()) {
                        installedAddonEntity = new InstalledAddonEntity(cursorB.getString(iB), cursorB.getString(iB2), cursorB.getInt(iB3), cursorB.getString(iB4), cursorB.isNull(iB5) ? null : cursorB.getString(iB5), cursorB.isNull(iB6) ? null : cursorB.getString(iB6), cursorB.getString(iB7), cursorB.getString(iB8), cursorB.isNull(iB9) ? null : cursorB.getString(iB9), cursorB.getInt(iB10) != 0, cursorB.getString(iB11), cursorB.getString(iB12), cursorB.isNull(iB13) ? null : cursorB.getString(iB13), cursorB.isNull(iB14) ? null : cursorB.getString(iB14), cursorB.getInt(iB15), cursorB.getInt(iB16) != 0, cursorB.getInt(iB17) != 0, cursorB.getString(iB18), cursorB.getLong(iB19), cursorB.isNull(iB20) ? null : Long.valueOf(cursorB.getLong(iB20)), cursorB.isNull(iB21) ? null : cursorB.getString(iB21), cursorB.isNull(iB22) ? null : cursorB.getString(iB22), cursorB.getInt(iB23) != 0, cursorB.isNull(iB24) ? null : cursorB.getString(iB24), cursorB.isNull(iB25) ? null : cursorB.getString(iB25), cursorB.isNull(iB26) ? null : cursorB.getString(iB26), cursorB.isNull(iB27) ? null : cursorB.getString(iB27), cursorB.isNull(iB28) ? null : Integer.valueOf(cursorB.getInt(iB28)));
                    }
                    cursorB.close();
                    p58VarD.release();
                    return installedAddonEntity;
                } catch (Throwable th2) {
                    th = th2;
                    anonymousClass26 = this;
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getAddonByInstanceIdWithConfigs(String str, Continuation<? super AddonWithConfigs> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM installed_addons WHERE instanceId = ?");
        return mk1.c(this.__db, true, vw2.f(p58VarD, 1, str), new Callable<AddonWithConfigs>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.21
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @rq6
            public AddonWithConfigs call() throws Exception {
                int i;
                InstalledAddonDao_Impl.this.__db.beginTransaction();
                try {
                    Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, true);
                    try {
                        int iB = yn1.b(cursorB, "instanceId");
                        int iB2 = yn1.b(cursorB, "addonId");
                        int iB3 = yn1.b(cursorB, "instanceNumber");
                        int iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                        int iB5 = yn1.b(cursorB, "version");
                        int iB6 = yn1.b(cursorB, "description");
                        int iB7 = yn1.b(cursorB, "baseUrl");
                        int iB8 = yn1.b(cursorB, "manifestUrl");
                        int iB9 = yn1.b(cursorB, "configuredUrl");
                        int iB10 = yn1.b(cursorB, "isConfigured");
                        int iB11 = yn1.b(cursorB, "addonType");
                        int iB12 = yn1.b(cursorB, "capabilities");
                        int iB13 = yn1.b(cursorB, "debridSupport");
                        int iB14 = yn1.b(cursorB, "configFields");
                        int iB15 = yn1.b(cursorB, "priority");
                        int iB16 = yn1.b(cursorB, "enabled");
                        int iB17 = yn1.b(cursorB, "isCustom");
                        int iB18 = yn1.b(cursorB, "targetScreen");
                        int iB19 = yn1.b(cursorB, "installedAt");
                        int iB20 = yn1.b(cursorB, "lastUsedAt");
                        int iB21 = yn1.b(cursorB, "catalogsJson");
                        int iB22 = yn1.b(cursorB, "resourcesJson");
                        int iB23 = yn1.b(cursorB, "isQuickAdd");
                        int iB24 = yn1.b(cursorB, "debridInjectionType");
                        int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                        int iB26 = yn1.b(cursorB, "bundleId");
                        int iB27 = yn1.b(cursorB, "bundleUrl");
                        int iB28 = yn1.b(cursorB, "bundleVersion");
                        ts tsVar = new ts(0);
                        while (cursorB.moveToNext()) {
                            String string = cursorB.getString(iB);
                            if (tsVar.containsKey(string)) {
                                i = iB12;
                            } else {
                                i = iB12;
                                tsVar.put(string, new ArrayList());
                            }
                            iB12 = i;
                        }
                        int i2 = iB12;
                        cursorB.moveToPosition(-1);
                        InstalledAddonDao_Impl.this.__fetchRelationshipaddonConfigsAscomStrmrPsDataLocalEntityAddonConfigEntity(tsVar);
                        AddonWithConfigs addonWithConfigs = null;
                        if (cursorB.moveToFirst()) {
                            addonWithConfigs = new AddonWithConfigs(new InstalledAddonEntity(cursorB.getString(iB), cursorB.getString(iB2), cursorB.getInt(iB3), cursorB.getString(iB4), cursorB.isNull(iB5) ? null : cursorB.getString(iB5), cursorB.isNull(iB6) ? null : cursorB.getString(iB6), cursorB.getString(iB7), cursorB.getString(iB8), cursorB.isNull(iB9) ? null : cursorB.getString(iB9), cursorB.getInt(iB10) != 0, cursorB.getString(iB11), cursorB.getString(i2), cursorB.isNull(iB13) ? null : cursorB.getString(iB13), cursorB.isNull(iB14) ? null : cursorB.getString(iB14), cursorB.getInt(iB15), cursorB.getInt(iB16) != 0, cursorB.getInt(iB17) != 0, cursorB.getString(iB18), cursorB.getLong(iB19), cursorB.isNull(iB20) ? null : Long.valueOf(cursorB.getLong(iB20)), cursorB.isNull(iB21) ? null : cursorB.getString(iB21), cursorB.isNull(iB22) ? null : cursorB.getString(iB22), cursorB.getInt(iB23) != 0, cursorB.isNull(iB24) ? null : cursorB.getString(iB24), cursorB.isNull(iB25) ? null : cursorB.getString(iB25), cursorB.isNull(iB26) ? null : cursorB.getString(iB26), cursorB.isNull(iB27) ? null : cursorB.getString(iB27), cursorB.isNull(iB28) ? null : Integer.valueOf(cursorB.getInt(iB28))), (ArrayList) tsVar.get(cursorB.getString(iB)));
                        }
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        cursorB.close();
                        p58VarD.release();
                        return addonWithConfigs;
                    } catch (Throwable th) {
                        cursorB.close();
                        p58VarD.release();
                        throw th;
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__db.endTransaction();
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getAddonsByAddonId(String str, Continuation<? super List<InstalledAddonEntity>> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM installed_addons WHERE addonId = ? ORDER BY instanceNumber ASC");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<List<InstalledAddonEntity>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.27
            @Override // java.util.concurrent.Callable
            @vo6
            public List<InstalledAddonEntity> call() throws Exception {
                AnonymousClass27 anonymousClass27;
                int iB;
                int iB2;
                int iB3;
                int iB4;
                int iB5;
                int iB6;
                int iB7;
                int iB8;
                int iB9;
                int iB10;
                int iB11;
                int iB12;
                int iB13;
                int iB14;
                String string;
                int i;
                int i2;
                Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, false);
                try {
                    iB = yn1.b(cursorB, "instanceId");
                    iB2 = yn1.b(cursorB, "addonId");
                    iB3 = yn1.b(cursorB, "instanceNumber");
                    iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                    iB5 = yn1.b(cursorB, "version");
                    iB6 = yn1.b(cursorB, "description");
                    iB7 = yn1.b(cursorB, "baseUrl");
                    iB8 = yn1.b(cursorB, "manifestUrl");
                    iB9 = yn1.b(cursorB, "configuredUrl");
                    iB10 = yn1.b(cursorB, "isConfigured");
                    iB11 = yn1.b(cursorB, "addonType");
                    iB12 = yn1.b(cursorB, "capabilities");
                    iB13 = yn1.b(cursorB, "debridSupport");
                    iB14 = yn1.b(cursorB, "configFields");
                } catch (Throwable th) {
                    th = th;
                    anonymousClass27 = this;
                }
                try {
                    int iB15 = yn1.b(cursorB, "priority");
                    int iB16 = yn1.b(cursorB, "enabled");
                    int iB17 = yn1.b(cursorB, "isCustom");
                    int iB18 = yn1.b(cursorB, "targetScreen");
                    int iB19 = yn1.b(cursorB, "installedAt");
                    int iB20 = yn1.b(cursorB, "lastUsedAt");
                    int iB21 = yn1.b(cursorB, "catalogsJson");
                    int iB22 = yn1.b(cursorB, "resourcesJson");
                    int iB23 = yn1.b(cursorB, "isQuickAdd");
                    int iB24 = yn1.b(cursorB, "debridInjectionType");
                    int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                    int iB26 = yn1.b(cursorB, "bundleId");
                    int iB27 = yn1.b(cursorB, "bundleUrl");
                    int iB28 = yn1.b(cursorB, "bundleVersion");
                    int i3 = iB14;
                    ArrayList arrayList = new ArrayList(cursorB.getCount());
                    while (cursorB.moveToNext()) {
                        String string2 = cursorB.getString(iB);
                        String string3 = cursorB.getString(iB2);
                        int i4 = cursorB.getInt(iB3);
                        String string4 = cursorB.getString(iB4);
                        String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                        String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                        String string7 = cursorB.getString(iB7);
                        String string8 = cursorB.getString(iB8);
                        String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                        boolean z = true;
                        if (cursorB.getInt(iB10) == 0) {
                            z = false;
                        }
                        String string10 = cursorB.getString(iB11);
                        String string11 = cursorB.getString(iB12);
                        String string12 = cursorB.isNull(iB13) ? null : cursorB.getString(iB13);
                        int i5 = i3;
                        if (cursorB.isNull(i5)) {
                            int i6 = iB15;
                            i = iB;
                            i2 = i6;
                            string = null;
                        } else {
                            string = cursorB.getString(i5);
                            int i7 = iB15;
                            i = iB;
                            i2 = i7;
                        }
                        int i8 = cursorB.getInt(i2);
                        int i9 = i2;
                        int i10 = iB16;
                        boolean z2 = cursorB.getInt(i10) != 0;
                        iB16 = i10;
                        int i11 = iB17;
                        boolean z3 = cursorB.getInt(i11) != 0;
                        iB17 = i11;
                        int i12 = iB18;
                        String string13 = cursorB.getString(i12);
                        iB18 = i12;
                        int i13 = iB19;
                        long j = cursorB.getLong(i13);
                        iB19 = i13;
                        int i14 = iB20;
                        Long lValueOf = cursorB.isNull(i14) ? null : Long.valueOf(cursorB.getLong(i14));
                        iB20 = i14;
                        int i15 = iB21;
                        String string14 = cursorB.isNull(i15) ? null : cursorB.getString(i15);
                        iB21 = i15;
                        int i16 = iB22;
                        String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                        iB22 = i16;
                        int i17 = iB23;
                        boolean z4 = cursorB.getInt(i17) != 0;
                        iB23 = i17;
                        int i18 = iB24;
                        String string16 = cursorB.isNull(i18) ? null : cursorB.getString(i18);
                        iB24 = i18;
                        int i19 = iB25;
                        String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                        iB25 = i19;
                        int i20 = iB26;
                        String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                        iB26 = i20;
                        int i21 = iB27;
                        String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                        iB27 = i21;
                        int i22 = iB28;
                        iB28 = i22;
                        arrayList.add(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string, i8, z2, z3, string13, j, lValueOf, string14, string15, z4, string16, string17, string18, string19, cursorB.isNull(i22) ? null : Integer.valueOf(cursorB.getInt(i22))));
                        i3 = i5;
                        iB = i;
                        iB15 = i9;
                    }
                    cursorB.close();
                    p58VarD.release();
                    return arrayList;
                } catch (Throwable th2) {
                    th = th2;
                    anonymousClass27 = this;
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getAddonsByAddonIdWithConfigs(String str, Continuation<? super List<AddonWithConfigs>> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM installed_addons WHERE addonId = ? ORDER BY instanceNumber ASC");
        return mk1.c(this.__db, true, vw2.f(p58VarD, 1, str), new Callable<List<AddonWithConfigs>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.22
            @Override // java.util.concurrent.Callable
            @vo6
            public List<AddonWithConfigs> call() throws Exception {
                int i;
                InstalledAddonDao_Impl.this.__db.beginTransaction();
                try {
                    Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, true);
                    try {
                        int iB = yn1.b(cursorB, "instanceId");
                        int iB2 = yn1.b(cursorB, "addonId");
                        int iB3 = yn1.b(cursorB, "instanceNumber");
                        int iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                        int iB5 = yn1.b(cursorB, "version");
                        int iB6 = yn1.b(cursorB, "description");
                        int iB7 = yn1.b(cursorB, "baseUrl");
                        int iB8 = yn1.b(cursorB, "manifestUrl");
                        int iB9 = yn1.b(cursorB, "configuredUrl");
                        int iB10 = yn1.b(cursorB, "isConfigured");
                        int iB11 = yn1.b(cursorB, "addonType");
                        int iB12 = yn1.b(cursorB, "capabilities");
                        int iB13 = yn1.b(cursorB, "debridSupport");
                        int iB14 = yn1.b(cursorB, "configFields");
                        int iB15 = yn1.b(cursorB, "priority");
                        int iB16 = yn1.b(cursorB, "enabled");
                        int iB17 = yn1.b(cursorB, "isCustom");
                        int iB18 = yn1.b(cursorB, "targetScreen");
                        int iB19 = yn1.b(cursorB, "installedAt");
                        int iB20 = yn1.b(cursorB, "lastUsedAt");
                        int iB21 = yn1.b(cursorB, "catalogsJson");
                        int iB22 = yn1.b(cursorB, "resourcesJson");
                        int iB23 = yn1.b(cursorB, "isQuickAdd");
                        int iB24 = yn1.b(cursorB, "debridInjectionType");
                        int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                        int iB26 = yn1.b(cursorB, "bundleId");
                        int iB27 = yn1.b(cursorB, "bundleUrl");
                        int iB28 = yn1.b(cursorB, "bundleVersion");
                        int i2 = iB13;
                        ts tsVar = new ts(0);
                        while (cursorB.moveToNext()) {
                            String string = cursorB.getString(iB);
                            if (tsVar.containsKey(string)) {
                                i = iB12;
                            } else {
                                i = iB12;
                                tsVar.put(string, new ArrayList());
                            }
                            iB12 = i;
                        }
                        int i3 = iB12;
                        cursorB.moveToPosition(-1);
                        InstalledAddonDao_Impl.this.__fetchRelationshipaddonConfigsAscomStrmrPsDataLocalEntityAddonConfigEntity(tsVar);
                        ArrayList arrayList = new ArrayList(cursorB.getCount());
                        while (cursorB.moveToNext()) {
                            String string2 = cursorB.getString(iB);
                            String string3 = cursorB.getString(iB2);
                            int i4 = cursorB.getInt(iB3);
                            String string4 = cursorB.getString(iB4);
                            String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                            String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                            String string7 = cursorB.getString(iB7);
                            String string8 = cursorB.getString(iB8);
                            String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                            boolean z = cursorB.getInt(iB10) != 0;
                            String string10 = cursorB.getString(iB11);
                            int i5 = i3;
                            String string11 = cursorB.getString(i5);
                            int i6 = iB2;
                            int i7 = i2;
                            String string12 = cursorB.isNull(i7) ? null : cursorB.getString(i7);
                            i2 = i7;
                            int i8 = iB14;
                            String string13 = cursorB.isNull(i8) ? null : cursorB.getString(i8);
                            iB14 = i8;
                            int i9 = iB15;
                            int i10 = cursorB.getInt(i9);
                            iB15 = i9;
                            int i11 = iB16;
                            boolean z2 = cursorB.getInt(i11) != 0;
                            iB16 = i11;
                            int i12 = iB17;
                            boolean z3 = cursorB.getInt(i12) != 0;
                            iB17 = i12;
                            int i13 = iB18;
                            String string14 = cursorB.getString(i13);
                            iB18 = i13;
                            int i14 = iB19;
                            long j = cursorB.getLong(i14);
                            iB19 = i14;
                            int i15 = iB20;
                            Long lValueOf = cursorB.isNull(i15) ? null : Long.valueOf(cursorB.getLong(i15));
                            iB20 = i15;
                            int i16 = iB21;
                            String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                            iB21 = i16;
                            int i17 = iB22;
                            String string16 = cursorB.isNull(i17) ? null : cursorB.getString(i17);
                            iB22 = i17;
                            int i18 = iB23;
                            boolean z4 = cursorB.getInt(i18) != 0;
                            iB23 = i18;
                            int i19 = iB24;
                            String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                            iB24 = i19;
                            int i20 = iB25;
                            String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                            iB25 = i20;
                            int i21 = iB26;
                            String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                            iB26 = i21;
                            int i22 = iB27;
                            String string20 = cursorB.isNull(i22) ? null : cursorB.getString(i22);
                            iB27 = i22;
                            int i23 = iB28;
                            iB28 = i23;
                            arrayList.add(new AddonWithConfigs(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string13, i10, z2, z3, string14, j, lValueOf, string15, string16, z4, string17, string18, string19, string20, cursorB.isNull(i23) ? null : Integer.valueOf(cursorB.getInt(i23))), (ArrayList) tsVar.get(cursorB.getString(iB))));
                            iB2 = i6;
                            iB3 = iB3;
                            iB = iB;
                            i3 = i5;
                        }
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        cursorB.close();
                        p58VarD.release();
                        return arrayList;
                    } catch (Throwable th) {
                        cursorB.close();
                        p58VarD.release();
                        throw th;
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__db.endTransaction();
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getAddonsByBundleId(String str, Continuation<? super List<InstalledAddonEntity>> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM installed_addons WHERE bundleId = ? ORDER BY priority ASC");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<List<InstalledAddonEntity>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.32
            @Override // java.util.concurrent.Callable
            @vo6
            public List<InstalledAddonEntity> call() throws Exception {
                AnonymousClass32 anonymousClass32;
                int iB;
                int iB2;
                int iB3;
                int iB4;
                int iB5;
                int iB6;
                int iB7;
                int iB8;
                int iB9;
                int iB10;
                int iB11;
                int iB12;
                int iB13;
                int iB14;
                String string;
                int i;
                int i2;
                Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, false);
                try {
                    iB = yn1.b(cursorB, "instanceId");
                    iB2 = yn1.b(cursorB, "addonId");
                    iB3 = yn1.b(cursorB, "instanceNumber");
                    iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                    iB5 = yn1.b(cursorB, "version");
                    iB6 = yn1.b(cursorB, "description");
                    iB7 = yn1.b(cursorB, "baseUrl");
                    iB8 = yn1.b(cursorB, "manifestUrl");
                    iB9 = yn1.b(cursorB, "configuredUrl");
                    iB10 = yn1.b(cursorB, "isConfigured");
                    iB11 = yn1.b(cursorB, "addonType");
                    iB12 = yn1.b(cursorB, "capabilities");
                    iB13 = yn1.b(cursorB, "debridSupport");
                    iB14 = yn1.b(cursorB, "configFields");
                } catch (Throwable th) {
                    th = th;
                    anonymousClass32 = this;
                }
                try {
                    int iB15 = yn1.b(cursorB, "priority");
                    int iB16 = yn1.b(cursorB, "enabled");
                    int iB17 = yn1.b(cursorB, "isCustom");
                    int iB18 = yn1.b(cursorB, "targetScreen");
                    int iB19 = yn1.b(cursorB, "installedAt");
                    int iB20 = yn1.b(cursorB, "lastUsedAt");
                    int iB21 = yn1.b(cursorB, "catalogsJson");
                    int iB22 = yn1.b(cursorB, "resourcesJson");
                    int iB23 = yn1.b(cursorB, "isQuickAdd");
                    int iB24 = yn1.b(cursorB, "debridInjectionType");
                    int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                    int iB26 = yn1.b(cursorB, "bundleId");
                    int iB27 = yn1.b(cursorB, "bundleUrl");
                    int iB28 = yn1.b(cursorB, "bundleVersion");
                    int i3 = iB14;
                    ArrayList arrayList = new ArrayList(cursorB.getCount());
                    while (cursorB.moveToNext()) {
                        String string2 = cursorB.getString(iB);
                        String string3 = cursorB.getString(iB2);
                        int i4 = cursorB.getInt(iB3);
                        String string4 = cursorB.getString(iB4);
                        String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                        String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                        String string7 = cursorB.getString(iB7);
                        String string8 = cursorB.getString(iB8);
                        String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                        boolean z = true;
                        if (cursorB.getInt(iB10) == 0) {
                            z = false;
                        }
                        String string10 = cursorB.getString(iB11);
                        String string11 = cursorB.getString(iB12);
                        String string12 = cursorB.isNull(iB13) ? null : cursorB.getString(iB13);
                        int i5 = i3;
                        if (cursorB.isNull(i5)) {
                            int i6 = iB15;
                            i = iB;
                            i2 = i6;
                            string = null;
                        } else {
                            string = cursorB.getString(i5);
                            int i7 = iB15;
                            i = iB;
                            i2 = i7;
                        }
                        int i8 = cursorB.getInt(i2);
                        int i9 = i2;
                        int i10 = iB16;
                        boolean z2 = cursorB.getInt(i10) != 0;
                        iB16 = i10;
                        int i11 = iB17;
                        boolean z3 = cursorB.getInt(i11) != 0;
                        iB17 = i11;
                        int i12 = iB18;
                        String string13 = cursorB.getString(i12);
                        iB18 = i12;
                        int i13 = iB19;
                        long j = cursorB.getLong(i13);
                        iB19 = i13;
                        int i14 = iB20;
                        Long lValueOf = cursorB.isNull(i14) ? null : Long.valueOf(cursorB.getLong(i14));
                        iB20 = i14;
                        int i15 = iB21;
                        String string14 = cursorB.isNull(i15) ? null : cursorB.getString(i15);
                        iB21 = i15;
                        int i16 = iB22;
                        String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                        iB22 = i16;
                        int i17 = iB23;
                        boolean z4 = cursorB.getInt(i17) != 0;
                        iB23 = i17;
                        int i18 = iB24;
                        String string16 = cursorB.isNull(i18) ? null : cursorB.getString(i18);
                        iB24 = i18;
                        int i19 = iB25;
                        String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                        iB25 = i19;
                        int i20 = iB26;
                        String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                        iB26 = i20;
                        int i21 = iB27;
                        String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                        iB27 = i21;
                        int i22 = iB28;
                        iB28 = i22;
                        arrayList.add(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string, i8, z2, z3, string13, j, lValueOf, string14, string15, z4, string16, string17, string18, string19, cursorB.isNull(i22) ? null : Integer.valueOf(cursorB.getInt(i22))));
                        i3 = i5;
                        iB = i;
                        iB15 = i9;
                    }
                    cursorB.close();
                    p58VarD.release();
                    return arrayList;
                } catch (Throwable th2) {
                    th = th2;
                    anonymousClass32 = this;
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public j43<List<InstalledAddonEntity>> getAllAddons() {
        final p58 p58VarD = p58.d(0, "SELECT * FROM installed_addons ORDER BY priority ASC");
        return mk1.a(this.__db, false, new String[]{"installed_addons"}, new Callable<List<InstalledAddonEntity>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.16
            public void finalize() {
                p58VarD.release();
            }

            @Override // java.util.concurrent.Callable
            @vo6
            public List<InstalledAddonEntity> call() throws Exception {
                String string;
                int i;
                int i2;
                Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, false);
                try {
                    int iB = yn1.b(cursorB, "instanceId");
                    int iB2 = yn1.b(cursorB, "addonId");
                    int iB3 = yn1.b(cursorB, "instanceNumber");
                    int iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                    int iB5 = yn1.b(cursorB, "version");
                    int iB6 = yn1.b(cursorB, "description");
                    int iB7 = yn1.b(cursorB, "baseUrl");
                    int iB8 = yn1.b(cursorB, "manifestUrl");
                    int iB9 = yn1.b(cursorB, "configuredUrl");
                    int iB10 = yn1.b(cursorB, "isConfigured");
                    int iB11 = yn1.b(cursorB, "addonType");
                    int iB12 = yn1.b(cursorB, "capabilities");
                    int iB13 = yn1.b(cursorB, "debridSupport");
                    int iB14 = yn1.b(cursorB, "configFields");
                    int iB15 = yn1.b(cursorB, "priority");
                    int iB16 = yn1.b(cursorB, "enabled");
                    int iB17 = yn1.b(cursorB, "isCustom");
                    int iB18 = yn1.b(cursorB, "targetScreen");
                    int iB19 = yn1.b(cursorB, "installedAt");
                    int iB20 = yn1.b(cursorB, "lastUsedAt");
                    int iB21 = yn1.b(cursorB, "catalogsJson");
                    int iB22 = yn1.b(cursorB, "resourcesJson");
                    int iB23 = yn1.b(cursorB, "isQuickAdd");
                    int iB24 = yn1.b(cursorB, "debridInjectionType");
                    int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                    int iB26 = yn1.b(cursorB, "bundleId");
                    int iB27 = yn1.b(cursorB, "bundleUrl");
                    int iB28 = yn1.b(cursorB, "bundleVersion");
                    int i3 = iB14;
                    ArrayList arrayList = new ArrayList(cursorB.getCount());
                    while (cursorB.moveToNext()) {
                        String string2 = cursorB.getString(iB);
                        String string3 = cursorB.getString(iB2);
                        int i4 = cursorB.getInt(iB3);
                        String string4 = cursorB.getString(iB4);
                        String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                        String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                        String string7 = cursorB.getString(iB7);
                        String string8 = cursorB.getString(iB8);
                        String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                        boolean z = true;
                        if (cursorB.getInt(iB10) == 0) {
                            z = false;
                        }
                        String string10 = cursorB.getString(iB11);
                        String string11 = cursorB.getString(iB12);
                        String string12 = cursorB.isNull(iB13) ? null : cursorB.getString(iB13);
                        int i5 = i3;
                        if (cursorB.isNull(i5)) {
                            int i6 = iB15;
                            i = iB;
                            i2 = i6;
                            string = null;
                        } else {
                            string = cursorB.getString(i5);
                            int i7 = iB15;
                            i = iB;
                            i2 = i7;
                        }
                        int i8 = cursorB.getInt(i2);
                        int i9 = i2;
                        int i10 = iB16;
                        boolean z2 = cursorB.getInt(i10) != 0;
                        iB16 = i10;
                        int i11 = iB17;
                        boolean z3 = cursorB.getInt(i11) != 0;
                        iB17 = i11;
                        int i12 = iB18;
                        String string13 = cursorB.getString(i12);
                        iB18 = i12;
                        int i13 = iB19;
                        long j = cursorB.getLong(i13);
                        iB19 = i13;
                        int i14 = iB20;
                        Long lValueOf = cursorB.isNull(i14) ? null : Long.valueOf(cursorB.getLong(i14));
                        iB20 = i14;
                        int i15 = iB21;
                        String string14 = cursorB.isNull(i15) ? null : cursorB.getString(i15);
                        iB21 = i15;
                        int i16 = iB22;
                        String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                        iB22 = i16;
                        int i17 = iB23;
                        boolean z4 = cursorB.getInt(i17) != 0;
                        iB23 = i17;
                        int i18 = iB24;
                        String string16 = cursorB.isNull(i18) ? null : cursorB.getString(i18);
                        iB24 = i18;
                        int i19 = iB25;
                        String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                        iB25 = i19;
                        int i20 = iB26;
                        String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                        iB26 = i20;
                        int i21 = iB27;
                        String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                        iB27 = i21;
                        int i22 = iB28;
                        iB28 = i22;
                        arrayList.add(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string, i8, z2, z3, string13, j, lValueOf, string14, string15, z4, string16, string17, string18, string19, cursorB.isNull(i22) ? null : Integer.valueOf(cursorB.getInt(i22))));
                        i3 = i5;
                        iB = i;
                        iB15 = i9;
                    }
                    return arrayList;
                } finally {
                    cursorB.close();
                }
            }
        });
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getAllAddonsSorted(Continuation<? super List<InstalledAddonEntity>> continuation) {
        final p58 p58VarD = p58.d(0, "SELECT * FROM installed_addons ORDER BY priority ASC");
        return mk1.c(this.__db, false, new CancellationSignal(), new Callable<List<InstalledAddonEntity>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.31
            @Override // java.util.concurrent.Callable
            @vo6
            public List<InstalledAddonEntity> call() throws Exception {
                AnonymousClass31 anonymousClass31;
                int iB;
                int iB2;
                int iB3;
                int iB4;
                int iB5;
                int iB6;
                int iB7;
                int iB8;
                int iB9;
                int iB10;
                int iB11;
                int iB12;
                int iB13;
                int iB14;
                String string;
                int i;
                int i2;
                Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, false);
                try {
                    iB = yn1.b(cursorB, "instanceId");
                    iB2 = yn1.b(cursorB, "addonId");
                    iB3 = yn1.b(cursorB, "instanceNumber");
                    iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                    iB5 = yn1.b(cursorB, "version");
                    iB6 = yn1.b(cursorB, "description");
                    iB7 = yn1.b(cursorB, "baseUrl");
                    iB8 = yn1.b(cursorB, "manifestUrl");
                    iB9 = yn1.b(cursorB, "configuredUrl");
                    iB10 = yn1.b(cursorB, "isConfigured");
                    iB11 = yn1.b(cursorB, "addonType");
                    iB12 = yn1.b(cursorB, "capabilities");
                    iB13 = yn1.b(cursorB, "debridSupport");
                    iB14 = yn1.b(cursorB, "configFields");
                } catch (Throwable th) {
                    th = th;
                    anonymousClass31 = this;
                }
                try {
                    int iB15 = yn1.b(cursorB, "priority");
                    int iB16 = yn1.b(cursorB, "enabled");
                    int iB17 = yn1.b(cursorB, "isCustom");
                    int iB18 = yn1.b(cursorB, "targetScreen");
                    int iB19 = yn1.b(cursorB, "installedAt");
                    int iB20 = yn1.b(cursorB, "lastUsedAt");
                    int iB21 = yn1.b(cursorB, "catalogsJson");
                    int iB22 = yn1.b(cursorB, "resourcesJson");
                    int iB23 = yn1.b(cursorB, "isQuickAdd");
                    int iB24 = yn1.b(cursorB, "debridInjectionType");
                    int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                    int iB26 = yn1.b(cursorB, "bundleId");
                    int iB27 = yn1.b(cursorB, "bundleUrl");
                    int iB28 = yn1.b(cursorB, "bundleVersion");
                    int i3 = iB14;
                    ArrayList arrayList = new ArrayList(cursorB.getCount());
                    while (cursorB.moveToNext()) {
                        String string2 = cursorB.getString(iB);
                        String string3 = cursorB.getString(iB2);
                        int i4 = cursorB.getInt(iB3);
                        String string4 = cursorB.getString(iB4);
                        String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                        String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                        String string7 = cursorB.getString(iB7);
                        String string8 = cursorB.getString(iB8);
                        String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                        boolean z = true;
                        if (cursorB.getInt(iB10) == 0) {
                            z = false;
                        }
                        String string10 = cursorB.getString(iB11);
                        String string11 = cursorB.getString(iB12);
                        String string12 = cursorB.isNull(iB13) ? null : cursorB.getString(iB13);
                        int i5 = i3;
                        if (cursorB.isNull(i5)) {
                            int i6 = iB15;
                            i = iB;
                            i2 = i6;
                            string = null;
                        } else {
                            string = cursorB.getString(i5);
                            int i7 = iB15;
                            i = iB;
                            i2 = i7;
                        }
                        int i8 = cursorB.getInt(i2);
                        int i9 = i2;
                        int i10 = iB16;
                        boolean z2 = cursorB.getInt(i10) != 0;
                        iB16 = i10;
                        int i11 = iB17;
                        boolean z3 = cursorB.getInt(i11) != 0;
                        iB17 = i11;
                        int i12 = iB18;
                        String string13 = cursorB.getString(i12);
                        iB18 = i12;
                        int i13 = iB19;
                        long j = cursorB.getLong(i13);
                        iB19 = i13;
                        int i14 = iB20;
                        Long lValueOf = cursorB.isNull(i14) ? null : Long.valueOf(cursorB.getLong(i14));
                        iB20 = i14;
                        int i15 = iB21;
                        String string14 = cursorB.isNull(i15) ? null : cursorB.getString(i15);
                        iB21 = i15;
                        int i16 = iB22;
                        String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                        iB22 = i16;
                        int i17 = iB23;
                        boolean z4 = cursorB.getInt(i17) != 0;
                        iB23 = i17;
                        int i18 = iB24;
                        String string16 = cursorB.isNull(i18) ? null : cursorB.getString(i18);
                        iB24 = i18;
                        int i19 = iB25;
                        String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                        iB25 = i19;
                        int i20 = iB26;
                        String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                        iB26 = i20;
                        int i21 = iB27;
                        String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                        iB27 = i21;
                        int i22 = iB28;
                        iB28 = i22;
                        arrayList.add(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string, i8, z2, z3, string13, j, lValueOf, string14, string15, z4, string16, string17, string18, string19, cursorB.isNull(i22) ? null : Integer.valueOf(cursorB.getInt(i22))));
                        i3 = i5;
                        iB = i;
                        iB15 = i9;
                    }
                    cursorB.close();
                    p58VarD.release();
                    return arrayList;
                } catch (Throwable th2) {
                    th = th2;
                    anonymousClass31 = this;
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public j43<List<AddonWithConfigs>> getAllAddonsWithConfigs() {
        final p58 p58VarD = p58.d(0, "SELECT * FROM installed_addons ORDER BY priority ASC");
        return mk1.a(this.__db, true, new String[]{"addon_configs", "installed_addons"}, new Callable<List<AddonWithConfigs>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.17
            public void finalize() {
                p58VarD.release();
            }

            @Override // java.util.concurrent.Callable
            @vo6
            public List<AddonWithConfigs> call() throws Exception {
                int i;
                InstalledAddonDao_Impl.this.__db.beginTransaction();
                try {
                    Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, true);
                    try {
                        int iB = yn1.b(cursorB, "instanceId");
                        int iB2 = yn1.b(cursorB, "addonId");
                        int iB3 = yn1.b(cursorB, "instanceNumber");
                        int iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                        int iB5 = yn1.b(cursorB, "version");
                        int iB6 = yn1.b(cursorB, "description");
                        int iB7 = yn1.b(cursorB, "baseUrl");
                        int iB8 = yn1.b(cursorB, "manifestUrl");
                        int iB9 = yn1.b(cursorB, "configuredUrl");
                        int iB10 = yn1.b(cursorB, "isConfigured");
                        int iB11 = yn1.b(cursorB, "addonType");
                        int iB12 = yn1.b(cursorB, "capabilities");
                        int iB13 = yn1.b(cursorB, "debridSupport");
                        int iB14 = yn1.b(cursorB, "configFields");
                        int iB15 = yn1.b(cursorB, "priority");
                        int iB16 = yn1.b(cursorB, "enabled");
                        int iB17 = yn1.b(cursorB, "isCustom");
                        int iB18 = yn1.b(cursorB, "targetScreen");
                        int iB19 = yn1.b(cursorB, "installedAt");
                        int iB20 = yn1.b(cursorB, "lastUsedAt");
                        int iB21 = yn1.b(cursorB, "catalogsJson");
                        int iB22 = yn1.b(cursorB, "resourcesJson");
                        int iB23 = yn1.b(cursorB, "isQuickAdd");
                        int iB24 = yn1.b(cursorB, "debridInjectionType");
                        int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                        int iB26 = yn1.b(cursorB, "bundleId");
                        int iB27 = yn1.b(cursorB, "bundleUrl");
                        int iB28 = yn1.b(cursorB, "bundleVersion");
                        int i2 = iB13;
                        ts tsVar = new ts(0);
                        while (cursorB.moveToNext()) {
                            String string = cursorB.getString(iB);
                            if (tsVar.containsKey(string)) {
                                i = iB12;
                            } else {
                                i = iB12;
                                tsVar.put(string, new ArrayList());
                            }
                            iB12 = i;
                        }
                        int i3 = iB12;
                        cursorB.moveToPosition(-1);
                        InstalledAddonDao_Impl.this.__fetchRelationshipaddonConfigsAscomStrmrPsDataLocalEntityAddonConfigEntity(tsVar);
                        ArrayList arrayList = new ArrayList(cursorB.getCount());
                        while (cursorB.moveToNext()) {
                            String string2 = cursorB.getString(iB);
                            String string3 = cursorB.getString(iB2);
                            int i4 = cursorB.getInt(iB3);
                            String string4 = cursorB.getString(iB4);
                            String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                            String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                            String string7 = cursorB.getString(iB7);
                            String string8 = cursorB.getString(iB8);
                            String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                            boolean z = cursorB.getInt(iB10) != 0;
                            String string10 = cursorB.getString(iB11);
                            int i5 = i3;
                            String string11 = cursorB.getString(i5);
                            int i6 = iB2;
                            int i7 = i2;
                            String string12 = cursorB.isNull(i7) ? null : cursorB.getString(i7);
                            i2 = i7;
                            int i8 = iB14;
                            String string13 = cursorB.isNull(i8) ? null : cursorB.getString(i8);
                            iB14 = i8;
                            int i9 = iB15;
                            int i10 = cursorB.getInt(i9);
                            iB15 = i9;
                            int i11 = iB16;
                            boolean z2 = cursorB.getInt(i11) != 0;
                            iB16 = i11;
                            int i12 = iB17;
                            boolean z3 = cursorB.getInt(i12) != 0;
                            iB17 = i12;
                            int i13 = iB18;
                            String string14 = cursorB.getString(i13);
                            iB18 = i13;
                            int i14 = iB19;
                            long j = cursorB.getLong(i14);
                            iB19 = i14;
                            int i15 = iB20;
                            Long lValueOf = cursorB.isNull(i15) ? null : Long.valueOf(cursorB.getLong(i15));
                            iB20 = i15;
                            int i16 = iB21;
                            String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                            iB21 = i16;
                            int i17 = iB22;
                            String string16 = cursorB.isNull(i17) ? null : cursorB.getString(i17);
                            iB22 = i17;
                            int i18 = iB23;
                            boolean z4 = cursorB.getInt(i18) != 0;
                            iB23 = i18;
                            int i19 = iB24;
                            String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                            iB24 = i19;
                            int i20 = iB25;
                            String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                            iB25 = i20;
                            int i21 = iB26;
                            String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                            iB26 = i21;
                            int i22 = iB27;
                            String string20 = cursorB.isNull(i22) ? null : cursorB.getString(i22);
                            iB27 = i22;
                            int i23 = iB28;
                            iB28 = i23;
                            arrayList.add(new AddonWithConfigs(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string13, i10, z2, z3, string14, j, lValueOf, string15, string16, z4, string17, string18, string19, string20, cursorB.isNull(i23) ? null : Integer.valueOf(cursorB.getInt(i23))), (ArrayList) tsVar.get(cursorB.getString(iB))));
                            iB2 = i6;
                            iB3 = iB3;
                            iB = iB;
                            i3 = i5;
                        }
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        cursorB.close();
                        return arrayList;
                    } catch (Throwable th) {
                        cursorB.close();
                        throw th;
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__db.endTransaction();
                }
            }
        });
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public j43<List<InstalledAddonEntity>> getEnabledAddons() {
        final p58 p58VarD = p58.d(0, "SELECT * FROM installed_addons WHERE enabled = 1 ORDER BY priority ASC");
        return mk1.a(this.__db, false, new String[]{"installed_addons"}, new Callable<List<InstalledAddonEntity>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.23
            public void finalize() {
                p58VarD.release();
            }

            @Override // java.util.concurrent.Callable
            @vo6
            public List<InstalledAddonEntity> call() throws Exception {
                String string;
                int i;
                int i2;
                Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, false);
                try {
                    int iB = yn1.b(cursorB, "instanceId");
                    int iB2 = yn1.b(cursorB, "addonId");
                    int iB3 = yn1.b(cursorB, "instanceNumber");
                    int iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                    int iB5 = yn1.b(cursorB, "version");
                    int iB6 = yn1.b(cursorB, "description");
                    int iB7 = yn1.b(cursorB, "baseUrl");
                    int iB8 = yn1.b(cursorB, "manifestUrl");
                    int iB9 = yn1.b(cursorB, "configuredUrl");
                    int iB10 = yn1.b(cursorB, "isConfigured");
                    int iB11 = yn1.b(cursorB, "addonType");
                    int iB12 = yn1.b(cursorB, "capabilities");
                    int iB13 = yn1.b(cursorB, "debridSupport");
                    int iB14 = yn1.b(cursorB, "configFields");
                    int iB15 = yn1.b(cursorB, "priority");
                    int iB16 = yn1.b(cursorB, "enabled");
                    int iB17 = yn1.b(cursorB, "isCustom");
                    int iB18 = yn1.b(cursorB, "targetScreen");
                    int iB19 = yn1.b(cursorB, "installedAt");
                    int iB20 = yn1.b(cursorB, "lastUsedAt");
                    int iB21 = yn1.b(cursorB, "catalogsJson");
                    int iB22 = yn1.b(cursorB, "resourcesJson");
                    int iB23 = yn1.b(cursorB, "isQuickAdd");
                    int iB24 = yn1.b(cursorB, "debridInjectionType");
                    int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                    int iB26 = yn1.b(cursorB, "bundleId");
                    int iB27 = yn1.b(cursorB, "bundleUrl");
                    int iB28 = yn1.b(cursorB, "bundleVersion");
                    int i3 = iB14;
                    ArrayList arrayList = new ArrayList(cursorB.getCount());
                    while (cursorB.moveToNext()) {
                        String string2 = cursorB.getString(iB);
                        String string3 = cursorB.getString(iB2);
                        int i4 = cursorB.getInt(iB3);
                        String string4 = cursorB.getString(iB4);
                        String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                        String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                        String string7 = cursorB.getString(iB7);
                        String string8 = cursorB.getString(iB8);
                        String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                        boolean z = true;
                        if (cursorB.getInt(iB10) == 0) {
                            z = false;
                        }
                        String string10 = cursorB.getString(iB11);
                        String string11 = cursorB.getString(iB12);
                        String string12 = cursorB.isNull(iB13) ? null : cursorB.getString(iB13);
                        int i5 = i3;
                        if (cursorB.isNull(i5)) {
                            int i6 = iB15;
                            i = iB;
                            i2 = i6;
                            string = null;
                        } else {
                            string = cursorB.getString(i5);
                            int i7 = iB15;
                            i = iB;
                            i2 = i7;
                        }
                        int i8 = cursorB.getInt(i2);
                        int i9 = i2;
                        int i10 = iB16;
                        boolean z2 = cursorB.getInt(i10) != 0;
                        iB16 = i10;
                        int i11 = iB17;
                        boolean z3 = cursorB.getInt(i11) != 0;
                        iB17 = i11;
                        int i12 = iB18;
                        String string13 = cursorB.getString(i12);
                        iB18 = i12;
                        int i13 = iB19;
                        long j = cursorB.getLong(i13);
                        iB19 = i13;
                        int i14 = iB20;
                        Long lValueOf = cursorB.isNull(i14) ? null : Long.valueOf(cursorB.getLong(i14));
                        iB20 = i14;
                        int i15 = iB21;
                        String string14 = cursorB.isNull(i15) ? null : cursorB.getString(i15);
                        iB21 = i15;
                        int i16 = iB22;
                        String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                        iB22 = i16;
                        int i17 = iB23;
                        boolean z4 = cursorB.getInt(i17) != 0;
                        iB23 = i17;
                        int i18 = iB24;
                        String string16 = cursorB.isNull(i18) ? null : cursorB.getString(i18);
                        iB24 = i18;
                        int i19 = iB25;
                        String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                        iB25 = i19;
                        int i20 = iB26;
                        String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                        iB26 = i20;
                        int i21 = iB27;
                        String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                        iB27 = i21;
                        int i22 = iB28;
                        iB28 = i22;
                        arrayList.add(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string, i8, z2, z3, string13, j, lValueOf, string14, string15, z4, string16, string17, string18, string19, cursorB.isNull(i22) ? null : Integer.valueOf(cursorB.getInt(i22))));
                        i3 = i5;
                        iB = i;
                        iB15 = i9;
                    }
                    return arrayList;
                } finally {
                    cursorB.close();
                }
            }
        });
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getEnabledAddonsByCapability(String str, Continuation<? super List<InstalledAddonEntity>> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM installed_addons WHERE enabled = 1 AND capabilities LIKE '%' || ? || '%' ORDER BY priority ASC");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<List<InstalledAddonEntity>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.25
            @Override // java.util.concurrent.Callable
            @vo6
            public List<InstalledAddonEntity> call() throws Exception {
                AnonymousClass25 anonymousClass25;
                int iB;
                int iB2;
                int iB3;
                int iB4;
                int iB5;
                int iB6;
                int iB7;
                int iB8;
                int iB9;
                int iB10;
                int iB11;
                int iB12;
                int iB13;
                int iB14;
                String string;
                int i;
                int i2;
                Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, false);
                try {
                    iB = yn1.b(cursorB, "instanceId");
                    iB2 = yn1.b(cursorB, "addonId");
                    iB3 = yn1.b(cursorB, "instanceNumber");
                    iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                    iB5 = yn1.b(cursorB, "version");
                    iB6 = yn1.b(cursorB, "description");
                    iB7 = yn1.b(cursorB, "baseUrl");
                    iB8 = yn1.b(cursorB, "manifestUrl");
                    iB9 = yn1.b(cursorB, "configuredUrl");
                    iB10 = yn1.b(cursorB, "isConfigured");
                    iB11 = yn1.b(cursorB, "addonType");
                    iB12 = yn1.b(cursorB, "capabilities");
                    iB13 = yn1.b(cursorB, "debridSupport");
                    iB14 = yn1.b(cursorB, "configFields");
                } catch (Throwable th) {
                    th = th;
                    anonymousClass25 = this;
                }
                try {
                    int iB15 = yn1.b(cursorB, "priority");
                    int iB16 = yn1.b(cursorB, "enabled");
                    int iB17 = yn1.b(cursorB, "isCustom");
                    int iB18 = yn1.b(cursorB, "targetScreen");
                    int iB19 = yn1.b(cursorB, "installedAt");
                    int iB20 = yn1.b(cursorB, "lastUsedAt");
                    int iB21 = yn1.b(cursorB, "catalogsJson");
                    int iB22 = yn1.b(cursorB, "resourcesJson");
                    int iB23 = yn1.b(cursorB, "isQuickAdd");
                    int iB24 = yn1.b(cursorB, "debridInjectionType");
                    int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                    int iB26 = yn1.b(cursorB, "bundleId");
                    int iB27 = yn1.b(cursorB, "bundleUrl");
                    int iB28 = yn1.b(cursorB, "bundleVersion");
                    int i3 = iB14;
                    ArrayList arrayList = new ArrayList(cursorB.getCount());
                    while (cursorB.moveToNext()) {
                        String string2 = cursorB.getString(iB);
                        String string3 = cursorB.getString(iB2);
                        int i4 = cursorB.getInt(iB3);
                        String string4 = cursorB.getString(iB4);
                        String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                        String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                        String string7 = cursorB.getString(iB7);
                        String string8 = cursorB.getString(iB8);
                        String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                        boolean z = true;
                        if (cursorB.getInt(iB10) == 0) {
                            z = false;
                        }
                        String string10 = cursorB.getString(iB11);
                        String string11 = cursorB.getString(iB12);
                        String string12 = cursorB.isNull(iB13) ? null : cursorB.getString(iB13);
                        int i5 = i3;
                        if (cursorB.isNull(i5)) {
                            int i6 = iB15;
                            i = iB;
                            i2 = i6;
                            string = null;
                        } else {
                            string = cursorB.getString(i5);
                            int i7 = iB15;
                            i = iB;
                            i2 = i7;
                        }
                        int i8 = cursorB.getInt(i2);
                        int i9 = i2;
                        int i10 = iB16;
                        boolean z2 = cursorB.getInt(i10) != 0;
                        iB16 = i10;
                        int i11 = iB17;
                        boolean z3 = cursorB.getInt(i11) != 0;
                        iB17 = i11;
                        int i12 = iB18;
                        String string13 = cursorB.getString(i12);
                        iB18 = i12;
                        int i13 = iB19;
                        long j = cursorB.getLong(i13);
                        iB19 = i13;
                        int i14 = iB20;
                        Long lValueOf = cursorB.isNull(i14) ? null : Long.valueOf(cursorB.getLong(i14));
                        iB20 = i14;
                        int i15 = iB21;
                        String string14 = cursorB.isNull(i15) ? null : cursorB.getString(i15);
                        iB21 = i15;
                        int i16 = iB22;
                        String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                        iB22 = i16;
                        int i17 = iB23;
                        boolean z4 = cursorB.getInt(i17) != 0;
                        iB23 = i17;
                        int i18 = iB24;
                        String string16 = cursorB.isNull(i18) ? null : cursorB.getString(i18);
                        iB24 = i18;
                        int i19 = iB25;
                        String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                        iB25 = i19;
                        int i20 = iB26;
                        String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                        iB26 = i20;
                        int i21 = iB27;
                        String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                        iB27 = i21;
                        int i22 = iB28;
                        iB28 = i22;
                        arrayList.add(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string, i8, z2, z3, string13, j, lValueOf, string14, string15, z4, string16, string17, string18, string19, cursorB.isNull(i22) ? null : Integer.valueOf(cursorB.getInt(i22))));
                        i3 = i5;
                        iB = i;
                        iB15 = i9;
                    }
                    cursorB.close();
                    p58VarD.release();
                    return arrayList;
                } catch (Throwable th2) {
                    th = th2;
                    anonymousClass25 = this;
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getEnabledAddonsByCapabilityWithConfigs(String str, Continuation<? super List<AddonWithConfigs>> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM installed_addons WHERE enabled = 1 AND capabilities LIKE '%' || ? || '%' ORDER BY priority ASC");
        return mk1.c(this.__db, true, vw2.f(p58VarD, 1, str), new Callable<List<AddonWithConfigs>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.20
            @Override // java.util.concurrent.Callable
            @vo6
            public List<AddonWithConfigs> call() throws Exception {
                int i;
                InstalledAddonDao_Impl.this.__db.beginTransaction();
                try {
                    Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, true);
                    try {
                        int iB = yn1.b(cursorB, "instanceId");
                        int iB2 = yn1.b(cursorB, "addonId");
                        int iB3 = yn1.b(cursorB, "instanceNumber");
                        int iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                        int iB5 = yn1.b(cursorB, "version");
                        int iB6 = yn1.b(cursorB, "description");
                        int iB7 = yn1.b(cursorB, "baseUrl");
                        int iB8 = yn1.b(cursorB, "manifestUrl");
                        int iB9 = yn1.b(cursorB, "configuredUrl");
                        int iB10 = yn1.b(cursorB, "isConfigured");
                        int iB11 = yn1.b(cursorB, "addonType");
                        int iB12 = yn1.b(cursorB, "capabilities");
                        int iB13 = yn1.b(cursorB, "debridSupport");
                        int iB14 = yn1.b(cursorB, "configFields");
                        int iB15 = yn1.b(cursorB, "priority");
                        int iB16 = yn1.b(cursorB, "enabled");
                        int iB17 = yn1.b(cursorB, "isCustom");
                        int iB18 = yn1.b(cursorB, "targetScreen");
                        int iB19 = yn1.b(cursorB, "installedAt");
                        int iB20 = yn1.b(cursorB, "lastUsedAt");
                        int iB21 = yn1.b(cursorB, "catalogsJson");
                        int iB22 = yn1.b(cursorB, "resourcesJson");
                        int iB23 = yn1.b(cursorB, "isQuickAdd");
                        int iB24 = yn1.b(cursorB, "debridInjectionType");
                        int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                        int iB26 = yn1.b(cursorB, "bundleId");
                        int iB27 = yn1.b(cursorB, "bundleUrl");
                        int iB28 = yn1.b(cursorB, "bundleVersion");
                        int i2 = iB13;
                        ts tsVar = new ts(0);
                        while (cursorB.moveToNext()) {
                            String string = cursorB.getString(iB);
                            if (tsVar.containsKey(string)) {
                                i = iB12;
                            } else {
                                i = iB12;
                                tsVar.put(string, new ArrayList());
                            }
                            iB12 = i;
                        }
                        int i3 = iB12;
                        cursorB.moveToPosition(-1);
                        InstalledAddonDao_Impl.this.__fetchRelationshipaddonConfigsAscomStrmrPsDataLocalEntityAddonConfigEntity(tsVar);
                        ArrayList arrayList = new ArrayList(cursorB.getCount());
                        while (cursorB.moveToNext()) {
                            String string2 = cursorB.getString(iB);
                            String string3 = cursorB.getString(iB2);
                            int i4 = cursorB.getInt(iB3);
                            String string4 = cursorB.getString(iB4);
                            String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                            String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                            String string7 = cursorB.getString(iB7);
                            String string8 = cursorB.getString(iB8);
                            String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                            boolean z = cursorB.getInt(iB10) != 0;
                            String string10 = cursorB.getString(iB11);
                            int i5 = i3;
                            String string11 = cursorB.getString(i5);
                            int i6 = iB2;
                            int i7 = i2;
                            String string12 = cursorB.isNull(i7) ? null : cursorB.getString(i7);
                            i2 = i7;
                            int i8 = iB14;
                            String string13 = cursorB.isNull(i8) ? null : cursorB.getString(i8);
                            iB14 = i8;
                            int i9 = iB15;
                            int i10 = cursorB.getInt(i9);
                            iB15 = i9;
                            int i11 = iB16;
                            boolean z2 = cursorB.getInt(i11) != 0;
                            iB16 = i11;
                            int i12 = iB17;
                            boolean z3 = cursorB.getInt(i12) != 0;
                            iB17 = i12;
                            int i13 = iB18;
                            String string14 = cursorB.getString(i13);
                            iB18 = i13;
                            int i14 = iB19;
                            long j = cursorB.getLong(i14);
                            iB19 = i14;
                            int i15 = iB20;
                            Long lValueOf = cursorB.isNull(i15) ? null : Long.valueOf(cursorB.getLong(i15));
                            iB20 = i15;
                            int i16 = iB21;
                            String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                            iB21 = i16;
                            int i17 = iB22;
                            String string16 = cursorB.isNull(i17) ? null : cursorB.getString(i17);
                            iB22 = i17;
                            int i18 = iB23;
                            boolean z4 = cursorB.getInt(i18) != 0;
                            iB23 = i18;
                            int i19 = iB24;
                            String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                            iB24 = i19;
                            int i20 = iB25;
                            String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                            iB25 = i20;
                            int i21 = iB26;
                            String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                            iB26 = i21;
                            int i22 = iB27;
                            String string20 = cursorB.isNull(i22) ? null : cursorB.getString(i22);
                            iB27 = i22;
                            int i23 = iB28;
                            iB28 = i23;
                            arrayList.add(new AddonWithConfigs(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string13, i10, z2, z3, string14, j, lValueOf, string15, string16, z4, string17, string18, string19, string20, cursorB.isNull(i23) ? null : Integer.valueOf(cursorB.getInt(i23))), (ArrayList) tsVar.get(cursorB.getString(iB))));
                            iB2 = i6;
                            iB3 = iB3;
                            iB = iB;
                            i3 = i5;
                        }
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        cursorB.close();
                        p58VarD.release();
                        return arrayList;
                    } catch (Throwable th) {
                        cursorB.close();
                        p58VarD.release();
                        throw th;
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__db.endTransaction();
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getEnabledAddonsByType(String str, Continuation<? super List<InstalledAddonEntity>> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM installed_addons WHERE addonType = ? AND enabled = 1 ORDER BY priority ASC");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<List<InstalledAddonEntity>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.24
            @Override // java.util.concurrent.Callable
            @vo6
            public List<InstalledAddonEntity> call() throws Exception {
                AnonymousClass24 anonymousClass24;
                int iB;
                int iB2;
                int iB3;
                int iB4;
                int iB5;
                int iB6;
                int iB7;
                int iB8;
                int iB9;
                int iB10;
                int iB11;
                int iB12;
                int iB13;
                int iB14;
                String string;
                int i;
                int i2;
                Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, false);
                try {
                    iB = yn1.b(cursorB, "instanceId");
                    iB2 = yn1.b(cursorB, "addonId");
                    iB3 = yn1.b(cursorB, "instanceNumber");
                    iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                    iB5 = yn1.b(cursorB, "version");
                    iB6 = yn1.b(cursorB, "description");
                    iB7 = yn1.b(cursorB, "baseUrl");
                    iB8 = yn1.b(cursorB, "manifestUrl");
                    iB9 = yn1.b(cursorB, "configuredUrl");
                    iB10 = yn1.b(cursorB, "isConfigured");
                    iB11 = yn1.b(cursorB, "addonType");
                    iB12 = yn1.b(cursorB, "capabilities");
                    iB13 = yn1.b(cursorB, "debridSupport");
                    iB14 = yn1.b(cursorB, "configFields");
                } catch (Throwable th) {
                    th = th;
                    anonymousClass24 = this;
                }
                try {
                    int iB15 = yn1.b(cursorB, "priority");
                    int iB16 = yn1.b(cursorB, "enabled");
                    int iB17 = yn1.b(cursorB, "isCustom");
                    int iB18 = yn1.b(cursorB, "targetScreen");
                    int iB19 = yn1.b(cursorB, "installedAt");
                    int iB20 = yn1.b(cursorB, "lastUsedAt");
                    int iB21 = yn1.b(cursorB, "catalogsJson");
                    int iB22 = yn1.b(cursorB, "resourcesJson");
                    int iB23 = yn1.b(cursorB, "isQuickAdd");
                    int iB24 = yn1.b(cursorB, "debridInjectionType");
                    int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                    int iB26 = yn1.b(cursorB, "bundleId");
                    int iB27 = yn1.b(cursorB, "bundleUrl");
                    int iB28 = yn1.b(cursorB, "bundleVersion");
                    int i3 = iB14;
                    ArrayList arrayList = new ArrayList(cursorB.getCount());
                    while (cursorB.moveToNext()) {
                        String string2 = cursorB.getString(iB);
                        String string3 = cursorB.getString(iB2);
                        int i4 = cursorB.getInt(iB3);
                        String string4 = cursorB.getString(iB4);
                        String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                        String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                        String string7 = cursorB.getString(iB7);
                        String string8 = cursorB.getString(iB8);
                        String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                        boolean z = true;
                        if (cursorB.getInt(iB10) == 0) {
                            z = false;
                        }
                        String string10 = cursorB.getString(iB11);
                        String string11 = cursorB.getString(iB12);
                        String string12 = cursorB.isNull(iB13) ? null : cursorB.getString(iB13);
                        int i5 = i3;
                        if (cursorB.isNull(i5)) {
                            int i6 = iB15;
                            i = iB;
                            i2 = i6;
                            string = null;
                        } else {
                            string = cursorB.getString(i5);
                            int i7 = iB15;
                            i = iB;
                            i2 = i7;
                        }
                        int i8 = cursorB.getInt(i2);
                        int i9 = i2;
                        int i10 = iB16;
                        boolean z2 = cursorB.getInt(i10) != 0;
                        iB16 = i10;
                        int i11 = iB17;
                        boolean z3 = cursorB.getInt(i11) != 0;
                        iB17 = i11;
                        int i12 = iB18;
                        String string13 = cursorB.getString(i12);
                        iB18 = i12;
                        int i13 = iB19;
                        long j = cursorB.getLong(i13);
                        iB19 = i13;
                        int i14 = iB20;
                        Long lValueOf = cursorB.isNull(i14) ? null : Long.valueOf(cursorB.getLong(i14));
                        iB20 = i14;
                        int i15 = iB21;
                        String string14 = cursorB.isNull(i15) ? null : cursorB.getString(i15);
                        iB21 = i15;
                        int i16 = iB22;
                        String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                        iB22 = i16;
                        int i17 = iB23;
                        boolean z4 = cursorB.getInt(i17) != 0;
                        iB23 = i17;
                        int i18 = iB24;
                        String string16 = cursorB.isNull(i18) ? null : cursorB.getString(i18);
                        iB24 = i18;
                        int i19 = iB25;
                        String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                        iB25 = i19;
                        int i20 = iB26;
                        String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                        iB26 = i20;
                        int i21 = iB27;
                        String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                        iB27 = i21;
                        int i22 = iB28;
                        iB28 = i22;
                        arrayList.add(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string, i8, z2, z3, string13, j, lValueOf, string14, string15, z4, string16, string17, string18, string19, cursorB.isNull(i22) ? null : Integer.valueOf(cursorB.getInt(i22))));
                        i3 = i5;
                        iB = i;
                        iB15 = i9;
                    }
                    cursorB.close();
                    p58VarD.release();
                    return arrayList;
                } catch (Throwable th2) {
                    th = th2;
                    anonymousClass24 = this;
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getEnabledAddonsByTypeWithConfigs(String str, Continuation<? super List<AddonWithConfigs>> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT * FROM installed_addons WHERE addonType = ? AND enabled = 1 ORDER BY priority ASC");
        return mk1.c(this.__db, true, vw2.f(p58VarD, 1, str), new Callable<List<AddonWithConfigs>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.19
            @Override // java.util.concurrent.Callable
            @vo6
            public List<AddonWithConfigs> call() throws Exception {
                int i;
                InstalledAddonDao_Impl.this.__db.beginTransaction();
                try {
                    Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, true);
                    try {
                        int iB = yn1.b(cursorB, "instanceId");
                        int iB2 = yn1.b(cursorB, "addonId");
                        int iB3 = yn1.b(cursorB, "instanceNumber");
                        int iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                        int iB5 = yn1.b(cursorB, "version");
                        int iB6 = yn1.b(cursorB, "description");
                        int iB7 = yn1.b(cursorB, "baseUrl");
                        int iB8 = yn1.b(cursorB, "manifestUrl");
                        int iB9 = yn1.b(cursorB, "configuredUrl");
                        int iB10 = yn1.b(cursorB, "isConfigured");
                        int iB11 = yn1.b(cursorB, "addonType");
                        int iB12 = yn1.b(cursorB, "capabilities");
                        int iB13 = yn1.b(cursorB, "debridSupport");
                        int iB14 = yn1.b(cursorB, "configFields");
                        int iB15 = yn1.b(cursorB, "priority");
                        int iB16 = yn1.b(cursorB, "enabled");
                        int iB17 = yn1.b(cursorB, "isCustom");
                        int iB18 = yn1.b(cursorB, "targetScreen");
                        int iB19 = yn1.b(cursorB, "installedAt");
                        int iB20 = yn1.b(cursorB, "lastUsedAt");
                        int iB21 = yn1.b(cursorB, "catalogsJson");
                        int iB22 = yn1.b(cursorB, "resourcesJson");
                        int iB23 = yn1.b(cursorB, "isQuickAdd");
                        int iB24 = yn1.b(cursorB, "debridInjectionType");
                        int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                        int iB26 = yn1.b(cursorB, "bundleId");
                        int iB27 = yn1.b(cursorB, "bundleUrl");
                        int iB28 = yn1.b(cursorB, "bundleVersion");
                        int i2 = iB13;
                        ts tsVar = new ts(0);
                        while (cursorB.moveToNext()) {
                            String string = cursorB.getString(iB);
                            if (tsVar.containsKey(string)) {
                                i = iB12;
                            } else {
                                i = iB12;
                                tsVar.put(string, new ArrayList());
                            }
                            iB12 = i;
                        }
                        int i3 = iB12;
                        cursorB.moveToPosition(-1);
                        InstalledAddonDao_Impl.this.__fetchRelationshipaddonConfigsAscomStrmrPsDataLocalEntityAddonConfigEntity(tsVar);
                        ArrayList arrayList = new ArrayList(cursorB.getCount());
                        while (cursorB.moveToNext()) {
                            String string2 = cursorB.getString(iB);
                            String string3 = cursorB.getString(iB2);
                            int i4 = cursorB.getInt(iB3);
                            String string4 = cursorB.getString(iB4);
                            String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                            String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                            String string7 = cursorB.getString(iB7);
                            String string8 = cursorB.getString(iB8);
                            String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                            boolean z = cursorB.getInt(iB10) != 0;
                            String string10 = cursorB.getString(iB11);
                            int i5 = i3;
                            String string11 = cursorB.getString(i5);
                            int i6 = iB2;
                            int i7 = i2;
                            String string12 = cursorB.isNull(i7) ? null : cursorB.getString(i7);
                            i2 = i7;
                            int i8 = iB14;
                            String string13 = cursorB.isNull(i8) ? null : cursorB.getString(i8);
                            iB14 = i8;
                            int i9 = iB15;
                            int i10 = cursorB.getInt(i9);
                            iB15 = i9;
                            int i11 = iB16;
                            boolean z2 = cursorB.getInt(i11) != 0;
                            iB16 = i11;
                            int i12 = iB17;
                            boolean z3 = cursorB.getInt(i12) != 0;
                            iB17 = i12;
                            int i13 = iB18;
                            String string14 = cursorB.getString(i13);
                            iB18 = i13;
                            int i14 = iB19;
                            long j = cursorB.getLong(i14);
                            iB19 = i14;
                            int i15 = iB20;
                            Long lValueOf = cursorB.isNull(i15) ? null : Long.valueOf(cursorB.getLong(i15));
                            iB20 = i15;
                            int i16 = iB21;
                            String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                            iB21 = i16;
                            int i17 = iB22;
                            String string16 = cursorB.isNull(i17) ? null : cursorB.getString(i17);
                            iB22 = i17;
                            int i18 = iB23;
                            boolean z4 = cursorB.getInt(i18) != 0;
                            iB23 = i18;
                            int i19 = iB24;
                            String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                            iB24 = i19;
                            int i20 = iB25;
                            String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                            iB25 = i20;
                            int i21 = iB26;
                            String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                            iB26 = i21;
                            int i22 = iB27;
                            String string20 = cursorB.isNull(i22) ? null : cursorB.getString(i22);
                            iB27 = i22;
                            int i23 = iB28;
                            iB28 = i23;
                            arrayList.add(new AddonWithConfigs(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string13, i10, z2, z3, string14, j, lValueOf, string15, string16, z4, string17, string18, string19, string20, cursorB.isNull(i23) ? null : Integer.valueOf(cursorB.getInt(i23))), (ArrayList) tsVar.get(cursorB.getString(iB))));
                            iB2 = i6;
                            iB3 = iB3;
                            iB = iB;
                            i3 = i5;
                        }
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        cursorB.close();
                        p58VarD.release();
                        return arrayList;
                    } catch (Throwable th) {
                        cursorB.close();
                        p58VarD.release();
                        throw th;
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__db.endTransaction();
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public j43<List<AddonWithConfigs>> getEnabledAddonsWithConfigs() {
        final p58 p58VarD = p58.d(0, "SELECT * FROM installed_addons WHERE enabled = 1 ORDER BY priority ASC");
        return mk1.a(this.__db, true, new String[]{"addon_configs", "installed_addons"}, new Callable<List<AddonWithConfigs>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.18
            public void finalize() {
                p58VarD.release();
            }

            @Override // java.util.concurrent.Callable
            @vo6
            public List<AddonWithConfigs> call() throws Exception {
                int i;
                InstalledAddonDao_Impl.this.__db.beginTransaction();
                try {
                    Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, true);
                    try {
                        int iB = yn1.b(cursorB, "instanceId");
                        int iB2 = yn1.b(cursorB, "addonId");
                        int iB3 = yn1.b(cursorB, "instanceNumber");
                        int iB4 = yn1.b(cursorB, AppMeasurementSdk.ConditionalUserProperty.NAME);
                        int iB5 = yn1.b(cursorB, "version");
                        int iB6 = yn1.b(cursorB, "description");
                        int iB7 = yn1.b(cursorB, "baseUrl");
                        int iB8 = yn1.b(cursorB, "manifestUrl");
                        int iB9 = yn1.b(cursorB, "configuredUrl");
                        int iB10 = yn1.b(cursorB, "isConfigured");
                        int iB11 = yn1.b(cursorB, "addonType");
                        int iB12 = yn1.b(cursorB, "capabilities");
                        int iB13 = yn1.b(cursorB, "debridSupport");
                        int iB14 = yn1.b(cursorB, "configFields");
                        int iB15 = yn1.b(cursorB, "priority");
                        int iB16 = yn1.b(cursorB, "enabled");
                        int iB17 = yn1.b(cursorB, "isCustom");
                        int iB18 = yn1.b(cursorB, "targetScreen");
                        int iB19 = yn1.b(cursorB, "installedAt");
                        int iB20 = yn1.b(cursorB, "lastUsedAt");
                        int iB21 = yn1.b(cursorB, "catalogsJson");
                        int iB22 = yn1.b(cursorB, "resourcesJson");
                        int iB23 = yn1.b(cursorB, "isQuickAdd");
                        int iB24 = yn1.b(cursorB, "debridInjectionType");
                        int iB25 = yn1.b(cursorB, "debridInjectionConfig");
                        int iB26 = yn1.b(cursorB, "bundleId");
                        int iB27 = yn1.b(cursorB, "bundleUrl");
                        int iB28 = yn1.b(cursorB, "bundleVersion");
                        int i2 = iB13;
                        ts tsVar = new ts(0);
                        while (cursorB.moveToNext()) {
                            String string = cursorB.getString(iB);
                            if (tsVar.containsKey(string)) {
                                i = iB12;
                            } else {
                                i = iB12;
                                tsVar.put(string, new ArrayList());
                            }
                            iB12 = i;
                        }
                        int i3 = iB12;
                        cursorB.moveToPosition(-1);
                        InstalledAddonDao_Impl.this.__fetchRelationshipaddonConfigsAscomStrmrPsDataLocalEntityAddonConfigEntity(tsVar);
                        ArrayList arrayList = new ArrayList(cursorB.getCount());
                        while (cursorB.moveToNext()) {
                            String string2 = cursorB.getString(iB);
                            String string3 = cursorB.getString(iB2);
                            int i4 = cursorB.getInt(iB3);
                            String string4 = cursorB.getString(iB4);
                            String string5 = cursorB.isNull(iB5) ? null : cursorB.getString(iB5);
                            String string6 = cursorB.isNull(iB6) ? null : cursorB.getString(iB6);
                            String string7 = cursorB.getString(iB7);
                            String string8 = cursorB.getString(iB8);
                            String string9 = cursorB.isNull(iB9) ? null : cursorB.getString(iB9);
                            boolean z = cursorB.getInt(iB10) != 0;
                            String string10 = cursorB.getString(iB11);
                            int i5 = i3;
                            String string11 = cursorB.getString(i5);
                            int i6 = iB2;
                            int i7 = i2;
                            String string12 = cursorB.isNull(i7) ? null : cursorB.getString(i7);
                            i2 = i7;
                            int i8 = iB14;
                            String string13 = cursorB.isNull(i8) ? null : cursorB.getString(i8);
                            iB14 = i8;
                            int i9 = iB15;
                            int i10 = cursorB.getInt(i9);
                            iB15 = i9;
                            int i11 = iB16;
                            boolean z2 = cursorB.getInt(i11) != 0;
                            iB16 = i11;
                            int i12 = iB17;
                            boolean z3 = cursorB.getInt(i12) != 0;
                            iB17 = i12;
                            int i13 = iB18;
                            String string14 = cursorB.getString(i13);
                            iB18 = i13;
                            int i14 = iB19;
                            long j = cursorB.getLong(i14);
                            iB19 = i14;
                            int i15 = iB20;
                            Long lValueOf = cursorB.isNull(i15) ? null : Long.valueOf(cursorB.getLong(i15));
                            iB20 = i15;
                            int i16 = iB21;
                            String string15 = cursorB.isNull(i16) ? null : cursorB.getString(i16);
                            iB21 = i16;
                            int i17 = iB22;
                            String string16 = cursorB.isNull(i17) ? null : cursorB.getString(i17);
                            iB22 = i17;
                            int i18 = iB23;
                            boolean z4 = cursorB.getInt(i18) != 0;
                            iB23 = i18;
                            int i19 = iB24;
                            String string17 = cursorB.isNull(i19) ? null : cursorB.getString(i19);
                            iB24 = i19;
                            int i20 = iB25;
                            String string18 = cursorB.isNull(i20) ? null : cursorB.getString(i20);
                            iB25 = i20;
                            int i21 = iB26;
                            String string19 = cursorB.isNull(i21) ? null : cursorB.getString(i21);
                            iB26 = i21;
                            int i22 = iB27;
                            String string20 = cursorB.isNull(i22) ? null : cursorB.getString(i22);
                            iB27 = i22;
                            int i23 = iB28;
                            iB28 = i23;
                            arrayList.add(new AddonWithConfigs(new InstalledAddonEntity(string2, string3, i4, string4, string5, string6, string7, string8, string9, z, string10, string11, string12, string13, i10, z2, z3, string14, j, lValueOf, string15, string16, z4, string17, string18, string19, string20, cursorB.isNull(i23) ? null : Integer.valueOf(cursorB.getInt(i23))), (ArrayList) tsVar.get(cursorB.getString(iB))));
                            iB2 = i6;
                            iB3 = iB3;
                            iB = iB;
                            i3 = i5;
                        }
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        cursorB.close();
                        return arrayList;
                    } catch (Throwable th) {
                        cursorB.close();
                        throw th;
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__db.endTransaction();
                }
            }
        });
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getInstanceCount(String str, Continuation<? super Integer> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT COUNT(*) FROM installed_addons WHERE addonId = ?");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<Integer>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.30
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public Integer call() throws Exception {
                Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, false);
                try {
                    int iValueOf = cursorB.moveToFirst() ? Integer.valueOf(cursorB.getInt(0)) : 0;
                    cursorB.close();
                    p58VarD.release();
                    return iValueOf;
                } catch (Throwable th) {
                    cursorB.close();
                    p58VarD.release();
                    throw th;
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object getUsedInstanceNumbers(String str, Continuation<? super List<Integer>> continuation) {
        final p58 p58VarD = p58.d(1, "SELECT instanceNumber FROM installed_addons WHERE addonId = ? ORDER BY instanceNumber ASC");
        return mk1.c(this.__db, false, vw2.f(p58VarD, 1, str), new Callable<List<Integer>>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.29
            @Override // java.util.concurrent.Callable
            @vo6
            public List<Integer> call() throws Exception {
                Cursor cursorB = sp1.b(InstalledAddonDao_Impl.this.__db, p58VarD, false);
                try {
                    ArrayList arrayList = new ArrayList(cursorB.getCount());
                    while (cursorB.moveToNext()) {
                        arrayList.add(Integer.valueOf(cursorB.getInt(0)));
                    }
                    return arrayList;
                } finally {
                    cursorB.close();
                    p58VarD.release();
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object replaceAllAddons(List<InstalledAddonEntity> list, Continuation<? super e6a> continuation) {
        return n58.a(this.__db, new q2(this, list, 10), continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object setAddonEnabled(final String str, final boolean z, Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.12
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                pe9 pe9VarAcquire = InstalledAddonDao_Impl.this.__preparedStmtOfSetAddonEnabled.acquire();
                pe9VarAcquire.bindLong(1, z ? 1L : 0L);
                pe9VarAcquire.bindString(2, str);
                try {
                    InstalledAddonDao_Impl.this.__db.beginTransaction();
                    try {
                        pe9VarAcquire.executeUpdateDelete();
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        return e6a.a;
                    } finally {
                        InstalledAddonDao_Impl.this.__db.endTransaction();
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__preparedStmtOfSetAddonEnabled.release(pe9VarAcquire);
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object updateLastUsed(final String str, final long j, Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.14
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                pe9 pe9VarAcquire = InstalledAddonDao_Impl.this.__preparedStmtOfUpdateLastUsed.acquire();
                pe9VarAcquire.bindLong(1, j);
                pe9VarAcquire.bindString(2, str);
                try {
                    InstalledAddonDao_Impl.this.__db.beginTransaction();
                    try {
                        pe9VarAcquire.executeUpdateDelete();
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        return e6a.a;
                    } finally {
                        InstalledAddonDao_Impl.this.__db.endTransaction();
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__preparedStmtOfUpdateLastUsed.release(pe9VarAcquire);
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object updatePriority(final String str, final int i, Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.13
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                pe9 pe9VarAcquire = InstalledAddonDao_Impl.this.__preparedStmtOfUpdatePriority.acquire();
                pe9VarAcquire.bindLong(1, i);
                pe9VarAcquire.bindString(2, str);
                try {
                    InstalledAddonDao_Impl.this.__db.beginTransaction();
                    try {
                        pe9VarAcquire.executeUpdateDelete();
                        InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                        return e6a.a;
                    } finally {
                        InstalledAddonDao_Impl.this.__db.endTransaction();
                    }
                } finally {
                    InstalledAddonDao_Impl.this.__preparedStmtOfUpdatePriority.release(pe9VarAcquire);
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object upsertAddon(final InstalledAddonEntity installedAddonEntity, Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.8
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                InstalledAddonDao_Impl.this.__db.beginTransaction();
                try {
                    InstalledAddonDao_Impl.this.__insertionAdapterOfInstalledAddonEntity.insert(installedAddonEntity);
                    InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                    return e6a.a;
                } finally {
                    InstalledAddonDao_Impl.this.__db.endTransaction();
                }
            }
        }, continuation);
    }

    @Override // com.strmr.ps.data.local.dao.InstalledAddonDao
    public Object upsertAddons(final List<InstalledAddonEntity> list, Continuation<? super e6a> continuation) {
        return mk1.b(this.__db, new Callable<e6a>() { // from class: com.strmr.ps.data.local.dao.InstalledAddonDao_Impl.9
            /* JADX WARN: Can't rename method to resolve collision */
            @Override // java.util.concurrent.Callable
            @vo6
            public e6a call() throws Exception {
                InstalledAddonDao_Impl.this.__db.beginTransaction();
                try {
                    InstalledAddonDao_Impl.this.__insertionAdapterOfInstalledAddonEntity.insert((Iterable) list);
                    InstalledAddonDao_Impl.this.__db.setTransactionSuccessful();
                    return e6a.a;
                } finally {
                    InstalledAddonDao_Impl.this.__db.endTransaction();
                }
            }
        }, continuation);
    }
}
