def _unpack_lookupswitch(bc, offset):
    """
    function for unpacking the lookupswitch op arguments
    """

    jump = (offset % 4)
    if jump:
        offset += (4 - jump)

    (default, npairs), offset = _unpack(_struct_ii, bc, offset)

    switches = list()
    for _index in range(npairs):
        pair, offset = _unpack(_struct_ii, bc, offset)
        switches.append(pair)

    return (default, switches), offset