import re


def bundle_offset(fname):
    """
    >>> bundle_offset("path/to/R0000C0000.bundle")
    (0, 0)
    >>> bundle_offset("path/to/R0380C1380.bundle")
    (4992, 896)
    """
    match = re.search(r'R([A-F0-9]{4,})C([A-F0-9]{4,}).bundle$', fname, re.IGNORECASE)
    if match:
        r = int(match.group(1), 16)
        c = int(match.group(2), 16)
        return c, r