import re


def get_branch_table_base_from_instrs(instrs):
    """
    Get the base addr of the call tables from the pc-relative branch instructions

    :param instrs: jmp and jsr instructions that contain PC in the operand
    :return: List of branch table base addresses
    """

    branch_table_addrs = []
    for mnem, opnd in instrs:
        match = re.match(r"^.*_(.*)\(pc,.*\)$", opnd)
        if match:
            addr = int(match.group(1), 16)
            branch_table_addrs.append(addr)
            print(hex(addr))
    return branch_table_addrs