'Append state into successor lists.
:param state: a SimState instance
:param target: The target (of the jump/call/ret)
:return: The state'

def _categorize_successor(self, state):

    self.all_successors.append(state)
    target = state.scratch.target
    if ((o.APPROXIMATE_GUARDS in state.options) and state.se.is_false(state.scratch.guard, exact=False)):
        if (o.VALIDATE_APPROXIMATIONS in state.options):
            if state.satisfiable():
                raise Exception('WTF')
        self.unsat_successors.append(state)
    elif ((o.APPROXIMATE_SATISFIABILITY in state.options) and (not state.se.satisfiable(exact=False))):
        if (o.VALIDATE_APPROXIMATIONS in state.options):
            if state.se.satisfiable():
                raise Exception('WTF')
        self.unsat_successors.append(state)
    elif ((not state.scratch.guard.symbolic) and state.se.is_false(state.scratch.guard)):
        self.unsat_successors.append(state)
    elif ((o.LAZY_SOLVES not in state.options) and (not state.satisfiable())):
        self.unsat_successors.append(state)
    elif ((o.NO_SYMBOLIC_JUMP_RESOLUTION in state.options) and state.se.symbolic(target)):
        self.unconstrained_successors.append(state)
    elif ((not state.se.symbolic(target)) and (not state.history.jumpkind.startswith('Ijk_Sys'))):
        self.successors.append(state)
        self.flat_successors.append(state)
    elif state.history.jumpkind.startswith('Ijk_Sys'):
        self.successors.append(state)
        state.regs.ip_at_syscall = state.ip
        try:
            (symbolic_syscall_num, concrete_syscall_nums) = self._resolve_syscall(state)
            if (concrete_syscall_nums is not None):
                for n in concrete_syscall_nums:
                    split_state = state.copy()
                    split_state.add_constraints((symbolic_syscall_num == n))
                    split_state.inspect.downsize()
                    self.flat_successors.append(split_state)
            else:
                self.flat_successors.append(state)
        except UnsupportedSyscallError:
            self.unsat_successors.append(state)
    else:
        try:
            if (o.KEEP_IP_SYMBOLIC in state.options):
                s = claripy.Solver()
                addrs = s.eval(target, 257, extra_constraints=tuple(state.ip_constraints))
                if (len(addrs) > 256):
                    l.debug('It    is    not    a    Library')
                    addrs = state.se.any_n_int(target, 257)
                    if (len(addrs) == 1):
                        state.add_constraints((target == addrs[0]))
                    l.debug('addrs    :%s', addrs)
            else:
                addrs = state.se.any_n_int(target, 257)
            if (len(addrs) > 256):
                l.warning('Exit    state    has    over    257    possible    solutions.    Likely    unconstrained;    skipping.    %s', target.shallow_repr())
                self.unconstrained_successors.append(state)
            else:
                for a in addrs:
                    split_state = state.copy()
                    if (o.KEEP_IP_SYMBOLIC in split_state.options):
                        split_state.regs.ip = target
                    else:
                        split_state.add_constraints((target == a), action=True)
                        split_state.regs.ip = a
                    split_state.inspect.downsize()
                    self.flat_successors.append(split_state)
                self.successors.append(state)
        except SimSolverModeError:
            self.unsat_successors.append(state)
    return state
