package p138.p377.p378.p379;

import java.io.IOException;
import java.util.Collection;
import java.util.Set;
import p138.p139.p143.p144.C2803;
import p138.p176.p177.p242.p246.p251.C4303;
import p138.p329.p351.p352.InterfaceC6289;
import p138.p377.p378.p379.p380.AbstractC6431;
import p138.p377.p378.p379.p380.C6432;
import p138.p377.p378.p379.p380.C6433;
import p138.p377.p378.p379.p380.InterfaceC6430;

/* JADX INFO: renamed from: ދ.ރ.֏.֏.֏, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C6425 extends AbstractC6431 implements InterfaceC6430 {

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public EnumC6428 f17932;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public Set<EnumC6429> f17933;

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public byte f17930 = 5;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public byte f17931 = 0;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public byte[] f17934 = {16, 0, 0, 0};

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public short f17935 = 16;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public short f17936 = 0;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public int f17937 = 0;

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo9650(C6432 c6432) throws IOException {
        this.f17930 = c6432.m9652();
        byte bM9652 = c6432.m9652();
        this.f17931 = bM9652;
        if (5 != this.f17930 || bM9652 != 0) {
            throw new IOException(String.format("Version mismatch: %d.%d != 5.0", Byte.valueOf(this.f17930), Byte.valueOf(this.f17931)));
        }
        EnumC6428 enumC6428 = (EnumC6428) C4303.m7063(c6432.m9652(), (Class<InterfaceC6289>) EnumC6428.class, (InterfaceC6289) null);
        if (enumC6428 == null) {
            throw new IOException(String.format("PDU type invalid: %d", enumC6428));
        }
        this.f17932 = enumC6428;
        this.f17933 = C4303.m7041(c6432.m9652(), EnumC6429.class);
        byte[] bArr = new byte[4];
        c6432.f18058.readFully(bArr);
        if (bArr[0] != 16) {
            throw new IOException(String.format("Integer and Character representation mismatch: %d", Byte.valueOf(bArr[0])));
        }
        if (bArr[1] != 0) {
            throw new IOException(String.format("Floating-Point representation mismatch: %d", Byte.valueOf(bArr[1])));
        }
        this.f17934 = bArr;
        this.f17935 = c6432.m9657();
        this.f17936 = c6432.m9657();
        this.f17937 = c6432.m9656();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo9651(C6433 c6433) throws IOException {
        if (this.f17932 == null) {
            StringBuilder sbM4889 = C2803.m4889("Invalid PDU type: ");
            sbM4889.append(this.f17932);
            throw new IllegalStateException(sbM4889.toString());
        }
        if (this.f17933 == null) {
            StringBuilder sbM48892 = C2803.m4889("Invalid PFC flag(s): ");
            sbM48892.append(this.f17933);
            throw new IllegalStateException(sbM48892.toString());
        }
        c6433.f18060.writeByte(this.f17930);
        c6433.f18060.writeByte(this.f17931);
        c6433.f18060.writeByte((byte) this.f17932.f18047);
        c6433.f18060.writeByte((byte) C4303.m7148((Collection) this.f17933));
        c6433.f18060.write(this.f17934);
        c6433.f18060.writeShort(this.f17935);
        c6433.f18060.writeShort(0);
        c6433.f18060.writeInt(this.f17937);
    }
}
