def _get_limb_section(asm_str):
    """decode the limb and the section (h or l) from limb (e.g "4l")"""
    if len(asm_str.split()) > 1:
        raise SyntaxError('Unexpected separator in limb reference')
    if asm_str.lower().endswith('l'):
        s = 0
    elif asm_str.lower().endswith('h'):
        s = 1
    else:
        raise SyntaxError('Expecting \'l\' or \'h\' at the end of limb section reference')
    limb = asm_str[:-1]
    if not limb.isdigit():
        raise SyntaxError('reg reference not a number')
    return int(limb), s