0
  7   ˆl–Ðz¾”*i?u8 p-\jbÑ¿‘äÇò 8à
ëR¸Ã?ÏÂƒh¹ÁÀ¿      acpi:LNXCPU:
  5   ˆl–Ðz¾”*i?u8 p,ÜêbÑ¿�þB g]hƒp |ÏÃƒh¹ÂÁÀ      256
  A   ˆl–äY>”ªj"Tâ�Æ[¸TÅ£�þcvUœnFemæã‘¢ùÄƒí3Ã_ŠI|¥�+Wé3ž¯ÃÂ     # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

from __future__ import annotations

from datetime import date, datetime, time, timedelta, timezone, tzinfo
from functools import lru_cache
import re
from typing import Any

from ._types import ParseFloat

# E.g.
# - 00:32:00.999999
# - 00:32:00
_TIME_RE_STR = r"([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(?:\.([0-9]{1,6})[0-9]*)?"

RE_NUMBER = re.compile(
    r"""
0
(?:
    x[0-9A-Fa-f](?:_?[0-9A-Fa-f])*   # hex
    |
    b[01](?:_?[01])*                 # bin
    |
    o[0-7](?:_?[0-7])*               # oct
)
|
[+-]?(?:0|[1-9](?:_?[0-9])*)         # dec, integer part
(?P<floatpart>
    (?:\.[0-9](?:_?[0-9])*)?         # optional fractional part
    (?:[eE][+-]?[0-9](?:_?[0-9])*)?  # optional exponent part
)
""",
    flags=re.VERBOSE,
)
RE_LOCALTIME = re.compile(_TIME_RE_STR)
RE_DATETIME = re.compile(
    rf"""
([0-9]{{4}})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])  # date, e.g. 1988-10-27
(?:
    [Tt ]
    {_TIME_RE_STR}
    (?:([Zz])|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))?  # optional time offset
)?
""",
    flags=re.VERBOSE,
)


def match_to_datetime(match: re.Match) -> datetime | date:
    """Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`.

    Raises ValueError if the match does not correspond to a valid date
    or datetime.
    """
    (
        year_str,
        month_str,
        day_str,
        hour_str,
        minute_str,
        sec_str,
        micros_str,
        zulu_time,
        offset_sign_str,
        offset_hour_str,
        offset_minute_str,
    ) = match.groups()
    year, month, day = int(year_str), int(month_str), int(day_str)
    if hour_str is None:
        return date(year, month, day)
    hour, minute, sec = int(hour_str), int(minute_str), int(sec_str)
    micros = int(micros_str.ljust(6, "0")) if micros_str else 0
    if offset_sign_str:
        tz: tzinfo | None = cached_tz(
            offset_hour_str, offset_minute_str, offset_sign_str
        )
    elif zulu_time:
        tz = timezone.utc
    else:  # local date-time
        tz = None
    return datetime(year, month, day, hour, minute, sec, micros, tzinfo=tz)


@lru_cache(maxsize=None)
def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone:
    sign = 1 if sign_str == "+" else -1
    return timezone(
        timedelta(
            hours=sign * int(hour_str),
            minutes=sign * int(minute_str),
        )
    )


def match_to_localtime(match: re.Match) -> time:
    hour_str, minute_str, sec_str, micros_str = match.groups()
    micros = int(micros_str.ljust(6, "0")) if micros_str else 0
    return time(int(hour_str), int(minute_str), int(sec_str), micros)


def match_to_number(match: re.Match, parse_float: ParseFloat) -> Any:
    if match.group("floatpart"):
        return parse_float(match.group())
    return int(match.group(), 0)
  5   	ˆl–Ðz¾”*i?u8 pÜÊbÑ¿�þB g]î6ZóÆƒh¹ÅÄÃ      	\_SB_.CPUS.C002
  5   ˆl–Ðz¾”*i?u8 pÜTÅ£�þB g]eÈÙ)#“ùÇƒh¹ÆÅÄ      0
  N   ˆl–Ðz¾”*i?u8 p-\ŠbÑ¿‘äÇò 8à
ëR¸Ø›~?çÈƒh¹Ça–Ðz¾”*i?u8 p-\ŠbÑ¿Æ      0
  5   ˆl–Ðz¾”*i?u8 p,ÜêbÑ¿�þB g]h€‘ç™{ùÊƒh¹É¿Ç      1
  5   ˆl–Ðz¾”*i?u8 p\êbÑ¿�þB g]ät?ÏËƒh¹ÊÀÈ      0
  5   ˆl–ß=¿Jõ4Ÿº‚ œPLÜ. JbÑ¿�þB g ßnI\€ÏóÌƒh¹ËÁÉ      -1
  L   ˆl–Ðz¾”*i?u8 pÜTÅ£�þB g]eÖ‡¬‹ùÍƒh¹Ìa–Ðz¾”*i?u8 p-\jbÑ¿Ë      nr_free_pages 59679
nr_zone_inactive_anon 2403141
nr_zone_active_anon 386840
nr_zone_inactive_file 483094
nr_zone_active_file 399514
nr_zone_unevictable 12030
nr_zone_write_pending 2280
nr_mlock 12030
nr_bounce 0
nr_zspages 0
nr_free_cma 0
numa_hit 1700785210
numa_miss 0
numa_foreign 0
numa_interleave 867
numa_local 1700785210
numa_o