def unpack_flags(flags_hex):
    """Unpacks 4-digit hexadecimal flags string.

    Args:
        flags_hex (str): Hexadecimal flags string.

    Returns:
        int: Object type.
        int: Near Earth Object indicator.
        int: If object is 1-km (or larger) Near Earth Object.
        int: 1-opposition object seen at earlier opposition.
        int: Critical list numbered object.
        int: Object is PHA (Potentially Hazardous Asteroid).
    """
    flags = int(flags_hex, 16)

    pha = (flags & 2**15) >> 15
    critical_list_numbered = flags >> 14 & 1
    opposition_seen_earlier = flags >> 13 & 1
    neo_1km = flags >> 12 & 1
    neo = flags >> 11 & 1
    orbit_type = flags & (2**6 - 1)
    return (orbit_type, neo, neo_1km, opposition_seen_earlier,
            critical_list_numbered, pha)