import re


def parse_cpuid_raw_file(filename):
    """Parse output from `cpuid --raw` command."""
    parsed = []
    with open(filename) as file:
        for line in file:
            match = re.match(r"\s*?(0x........) (0x..): eax=(0x........) ebx=(0x........) "
                         r"ecx=(0x........) edx=(0x........)\s*?", line)
            if not match:
                raise RuntimeError(f"Unexpected format in this line: '{line}'!"
                                    "Is the output of `cpuid --raw` used?")
            eax_in = int(match.group(1), 16)
            try_in = int(match.group(2), 16)
            eax = int(match.group(3), 16)
            ebx = int(match.group(4), 16)
            ecx = int(match.group(5), 16)
            edx = int(match.group(6), 16)
            parsed.append((eax_in, try_in, eax, ebx, ecx, edx))
    return parsed