def get_jump_target_maps(code, opc):
offset2prev = {}<EOL>prev_offset = -<NUM_LIT:1><EOL>for offset, op, arg in unpack_opargs_bytecode(code, opc):<EOL><INDENT>if prev_offset >= <NUM_LIT:0>:<EOL><INDENT>prev_list = offset2prev.get(offset, [])<EOL>prev_list.append(prev_offset)<EOL>offset2prev[offset] = prev_list<EOL><DEDENT>if op in opc.NOFOLLOW:<EOL><INDENT>prev_offset = -<NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>prev_offset = offset<EOL><DEDENT>if arg is not None:<EOL><INDENT>jump_offset = -<NUM_LIT:1><EOL>if op in opc.JREL_OPS:<EOL><INDENT>op_len = op_size(op, opc)<EOL>jump_offset = offset + op_len + arg<EOL><DEDENT>elif op in opc.JABS_OPS:<EOL><INDENT>jump_offset = arg<EOL><DEDENT>if jump_offset >= <NUM_LIT:0>:<EOL><INDENT>prev_list = offset2prev.get(jump_offset, [])<EOL>prev_list.append(offset)<EOL>offset2prev[jump_offset] = prev_list<EOL><DEDENT><DEDENT><DEDENT>return offset2prev<EOL>
Returns a dictionary where the key is an offset and the values are
    a list of instruction offsets which can get run before that
    instruction. This includes jump instructions as well as non-jump
    instructions. Therefore, the keys of the dictionary are reachable
    instructions. The values of the dictionary may be useful in control-flow
    analysis.