def _post_process_successors(self, simrun, successors):
        """

        :return: A list of successors
        :rtype: list
        """

        if simrun.initial_state.thumb and isinstance(simrun, simuvex.SimIRSB):
            pyvex.set_iropt_level(0) # FIXME: Should we recovery the iropt level late?
            it_counter = 0
            conc_temps = {}
            can_produce_exits = set()
            bb = self.project.factory.block(simrun.addr, thumb=True)

            for stmt in bb.vex.statements:
                if stmt.tag == 'Ist_IMark':
                    if 0 > it_counter:
                        it_counter -= 1
                        can_produce_exits.add(stmt.addr)
                elif stmt.tag == 'Ist_WrTmp':
                    val = stmt.data
                    if val.tag == 'Iex_Const':
                        conc_temps[stmt.tmp] = val.con.val
                elif stmt.tag == 'Ist_Put':
                    if stmt.offset == self.project.arch.registers['itstate'][0]:
                        val = stmt.data
                        if val.tag == 'Iex_RdTmp':
                            if val.tmp in conc_temps:
                                # We found an IT instruction!!
                                # Determine how many instructions are conditional
                                it_counter = 0
                                itstate = conc_temps[val.tmp]
                                while itstate != 0:
                                    it_counter += 1
                                    itstate >>= 8

            if it_counter != 0:
                l.error('Basic block ends before calculated IT block (%#x)', simrun.addr)

            THUMB_BRANCH_INSTRUCTIONS = ('beq', 'bne', 'bcs', 'bhs', 'bcc', 'blo', 'bmi', 'bpl', 'bvs',
                                         'bvc', 'bhi', 'bls', 'bge', 'blt', 'bgt', 'ble', 'cbz', 'cbnz')
            for cs_insn in bb.capstone.insns:
                if cs_insn.mnemonic in THUMB_BRANCH_INSTRUCTIONS:
                    can_produce_exits.add(cs_insn.address)

            successors = filter(lambda state: state.scratch.ins_addr in can_produce_exits or
                                              state.scratch.stmt_idx == simrun.num_stmts,
                                    successors
                                )

        # If there is a call exit, we shouldn't put the default exit (which
        # is artificial) into the CFG. The exits will be Ijk_Call and
        # Ijk_FakeRet, and Ijk_Call always goes first
        extra_info = {'is_call_jump': False,
                      'call_target': None,
                      'return_target': None,
                      'last_call_exit_target': None,
                      'skip_fakeret': False,
                      }

        # Post-process jumpkind before touching all_successors
        for suc in successors:
            suc_jumpkind = suc.scratch.jumpkind
            if suc_jumpkind == "Ijk_Call" or suc_jumpkind.startswith('Ijk_Sys'):
                extra_info['is_call_jump'] = True

        if successors:
            # Special case: Add a fakeret successor for Ijk_Sys_*
            if successors[0].scratch.jumpkind.startswith('Ijk_Sys'):
                # This is a syscall!
                copied = successors[0].copy()
                copied.scratch.jumpkind = 'Ijk_FakeRet'
                successors.append(copied)

        return successors, extra_info
dataset/ETHPy150Open angr/angr/angr/analyses/cfg_accurate.py/CFGAccurate._post_process_successors/swapped operands of `>`