package j;

import com.cvte.va.sdk.baseclass.PairList;
import com.cvte.vman.instance.InvokeCmd;
import io.netty.handler.codec.dns.DnsRecord;
import java.util.Arrays;
import t.b;
import u.g;

/* JADX INFO: loaded from: classes.dex */
public class a {
    public static final PairList.Pair<Integer, Integer> a = new PairList.Pair<>(32, 6);

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5818b = new PairList.Pair<>(32, 7);

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5819c = new PairList.Pair<>(32, 20);

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5820d = new PairList.Pair<>(32, 21);

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5821e = new PairList.Pair<>(32, 10);

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5822f = new PairList.Pair<>(32, 11);

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5823g = new PairList.Pair<>(32, Integer.valueOf(InvokeCmd.CMD_SYSTEMCTRL_GET_USB_CONNECT_STATE));

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5824h = new PairList.Pair<>(32, 133);

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5825i = new PairList.Pair<>(32, 134);

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5826j = new PairList.Pair<>(32, 135);

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5827k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5828l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public static final PairList.Pair<Integer, Integer> f5829m;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public boolean f5832p = false;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public b f5833q = new b();

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public byte[] f5830n = new byte[64];

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public byte[] f5831o = new byte[64];

    static {
        new PairList.Pair(32, 16);
        new PairList.Pair(32, 17);
        new PairList.Pair(32, 166);
        new PairList.Pair(32, 167);
        new PairList.Pair(32, 186);
        new PairList.Pair(32, 187);
        new PairList.Pair(36, 1);
        new PairList.Pair(36, 2);
        new PairList.Pair(32, 162);
        new PairList.Pair(32, 163);
        new PairList.Pair(34, 0);
        f5827k = new PairList.Pair<>(34, 1);
        new PairList.Pair(34, 2);
        f5828l = new PairList.Pair<>(34, 3);
        f5829m = new PairList.Pair<>(34, 4);
    }

    public boolean l(int i2, int i3, byte[] bArr) {
        boolean z2 = bArr != null && bArr.length > 0;
        Arrays.fill(this.f5831o, (byte) 0);
        byte[] bArr2 = this.f5831o;
        bArr2[0] = -86;
        bArr2[1] = -69;
        bArr2[2] = -52;
        bArr2[3] = (byte) (i2 & DnsRecord.CLASS_ANY);
        bArr2[4] = (byte) (i3 & DnsRecord.CLASS_ANY);
        if (z2) {
            bArr2[5] = (byte) (bArr.length & DnsRecord.CLASS_ANY);
        } else {
            bArr2[5] = 0;
        }
        bArr2[6] = 0;
        if (z2) {
            System.arraycopy(bArr, 0, bArr2, 7, bArr.length);
        }
        u.b.b().c("IspCommApi", this.f5831o);
        if (this.f5832p) {
            int iA = this.f5833q.a(this.f5831o, 64);
            if (iA == 64) {
                return true;
            }
            g.c("IspCommApi", "SendReports error.");
            if (iA == -1) {
                this.f5832p = false;
            }
        } else {
            g.c("IspCommApi", "device not find.");
        }
        return false;
    }
}
