package g.i.a.c.p;

import io.netty.handler.codec.dns.DnsRecord;
import java.util.Locale;

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

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

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

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

    public h(int i2, int i3, int i4, byte b2, a aVar) {
        this.a = i2;
        this.f5641b = i3;
        this.f5642c = i4;
        this.f5643d = b2;
    }

    public byte[] a() {
        if (this.a == 20) {
            int i2 = this.f5642c;
            return new byte[]{3, (byte) (i2 & DnsRecord.CLASS_ANY), (byte) ((i2 >> 8) & DnsRecord.CLASS_ANY), this.f5643d};
        }
        if (this.f5641b >= 2) {
            int i3 = this.f5642c;
            return new byte[]{3, (byte) (i3 & DnsRecord.CLASS_ANY), (byte) ((i3 >> 8) & DnsRecord.CLASS_ANY), this.f5643d};
        }
        int i4 = this.f5642c;
        return new byte[]{3, (byte) (i4 & DnsRecord.CLASS_ANY), (byte) ((i4 >> 8) & DnsRecord.CLASS_ANY)};
    }

    public String toString() {
        return String.format("ValidateFwImageCmd(0x%04X-0x%02X:0x%02X) {", Integer.valueOf(this.a), Integer.valueOf(this.f5641b), (byte) 3) + String.format(Locale.US, "\n\timageId=0x%04X, flag=0x%02X", Integer.valueOf(this.f5642c), Byte.valueOf(this.f5643d)) + "\n}";
    }
}
