'Note: simprocedure_name is not used to recreate the SimProcedure object. It\'s only there for better
__repr__.'

def __init__(self, addr, size, cfg, callstack=None, input_state=None, simprocedure_name=None, syscall_name=None, looping_times=0, no_ret=False, is_syscall=False, syscall=None, function_address=None, final_states=None, block_id=None, irsb=None, instruction_addrs=None, depth=None, callstack_key=None, creation_failure_info=None):

    self.callstack = callstack
    self.addr = addr
    self.input_state = input_state
    self.simprocedure_name = simprocedure_name
    self.syscall_name = syscall_name
    self.size = size
    self.looping_times = looping_times
    self.no_ret = no_ret
    self.is_syscall = is_syscall
    self.syscall = syscall
    self._cfg = cfg
    self.function_address = function_address
    self.block_id = block_id
    self.depth = depth
    self.creation_failure_info = None
    if (creation_failure_info is not None):
        self.creation_failure_info = CFGNodeCreationFailure(creation_failure_info)
    self._callstack_key = (self.callstack.stack_suffix(self._cfg.context_sensitivity_level) if (self.callstack is not None) else callstack_key)
    self.name = simprocedure_name
    if (self.name is None):
        sym = cfg.project.loader.find_symbol(addr)
        if (sym is not None):
            self.name = sym.name
    if ((self.name is None) and isinstance(cfg.project.arch, archinfo.ArchARM) and (addr & 1)):
        sym = cfg.project.loader.find_symbol((addr - 1))
        if (sym is not None):
            self.name = sym.name
    if (function_address and (self.name is None)):
        sym = cfg.project.loader.find_symbol(function_address)
        if (sym is not None):
            self.name = sym.name
        if (self.name is not None):
            offset = (addr - function_address)
            self.name = ('%s%+#x' % (self.name, offset))
    self.return_target = None
    self.instruction_addrs = (instruction_addrs if (instruction_addrs is not None) else [])
    if ((not instruction_addrs) and (not self.is_simprocedure)):
        if (irsb is not None):
            self.instruction_addrs = [s.addr for s in irsb.statements if (type(s) is pyvex.IRStmt.IMark)]
    self.final_states = ([] if (final_states is None) else final_states)
    self.irsb = irsb
    self.has_return = False
