package io.netty.handler.codec.haproxy;

import g.a.a.a.a;

/* JADX INFO: loaded from: classes.dex */
public enum HAProxyProtocolVersion {
    V1((byte) 16),
    V2((byte) 32);

    private static final byte VERSION_MASK = -16;
    private final byte byteValue;

    HAProxyProtocolVersion(byte b2) {
        this.byteValue = b2;
    }

    public static HAProxyProtocolVersion valueOf(byte b2) {
        int i2 = b2 & VERSION_MASK;
        byte b3 = (byte) i2;
        if (b3 == 16) {
            return V1;
        }
        if (b3 == 32) {
            return V2;
        }
        throw new IllegalArgumentException(a.l("unknown version: ", i2));
    }

    public byte byteValue() {
        return this.byteValue;
    }
}
