package g.i.a.c.l.d;

import android.content.Context;
import g.h.a.i;
import java.util.Locale;

/* JADX INFO: loaded from: classes.dex */
public class a {
    public int a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public String f5551b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public int f5552c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public int f5553d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public long f5554e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public int f5555f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public int f5556g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public int f5557h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public int f5558i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public int f5559j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public byte[] f5560k;

    public a(int i2, int i3, String str, int i4, int i5, long j2, int i6, int i7, int i8) {
        this.a = i2;
        this.f5551b = str;
        this.f5552c = i4;
        this.f5553d = i5;
        this.f5554e = j2;
        this.f5555f = i6;
        this.f5556g = i7;
        this.f5557h = i8;
    }

    public g.i.a.c.l.e.a a(Context context, int i2) {
        try {
            g.i.a.c.l.e.a aVarI = g.i.a.c.o.a.i(context, i2, this.f5551b, this.f5554e);
            if (aVarI != null) {
                aVarI.H = this.f5560k;
            }
            return aVarI;
        } catch (Exception e2) {
            i.W3(e2.toString());
            return null;
        }
    }

    public g.i.a.c.l.e.a b(int i2) {
        try {
            g.i.a.c.l.e.a aVarJ = g.i.a.c.o.a.j(i2, this.f5551b, this.f5554e);
            if (aVarJ != null) {
                aVarJ.H = this.f5560k;
            }
            return aVarJ;
        } catch (Exception e2) {
            i.W3(e2.toString());
            return null;
        }
    }

    public int c() {
        int i2 = this.f5553d;
        return i2 == 0 ? this.f5552c : this.f5552c % i2;
    }

    public String toString() {
        return String.format(Locale.US, "icType=0x%02X, bitNumber=%d(%d）, binId=0x%04X, imageId=0x%04X, startAddr=%d, downloadAddr=0x%08x, size(include mp header+data)=0x%08x(%d), reserved=%d", Integer.valueOf(this.a), Integer.valueOf(this.f5552c), Integer.valueOf(this.f5553d), Integer.valueOf(this.f5558i), Integer.valueOf(this.f5559j), Long.valueOf(this.f5554e), Integer.valueOf(this.f5555f), Integer.valueOf(this.f5556g), Integer.valueOf(this.f5556g), Integer.valueOf(this.f5557h));
    }
}
