'Function constructor
:param addr:            The address of the function.
:param name:            (Optional) The name of the function.
:param syscall:         (Optional) Whether this function is a syscall or not.'

def __init__(self, function_manager, addr, name=None, syscall=False):

    self.transition_graph = networkx.DiGraph()
    self._local_transition_graph = None
    self.normalized = False
    self._ret_sites = set()
    self._jumpout_sites = set()
    self._callout_sites = set()
    self._endpoints = defaultdict(set)
    self._call_sites = {}
    self.addr = addr
    self._function_manager = function_manager
    self.is_syscall = syscall
    self._project = project = self._function_manager._kb._project
    self.is_plt = False
    self.is_simprocedure = False
    if project.is_hooked(addr):
        self.is_simprocedure = True
    if (project.loader.find_plt_stub_name(addr) is not None):
        self.is_plt = True
    if ((name is None) and (addr in function_manager._kb.labels)):
        name = function_manager._kb.labels[addr]
    if (name is None):
        if project.is_hooked(addr):
            hooker = project.hooked_by(addr)
            name = hooker.display_name
        else:
            syscall_inst = project._simos.syscall_from_addr(addr)
            name = syscall_inst.display_name
    if (name is None):
        name = ('sub_%x' % addr)
    binary_name = None
    if self.is_simprocedure:
        hooker = project.hooked_by(addr)
        if (hooker is not None):
            binary_name = hooker.library_name
    if ((binary_name is None) and (self.binary is not None)):
        binary_name = os.path.basename(self.binary.binary)
    self._name = name
    self.binary_name = binary_name
    self._argument_registers = []
    self._argument_stack_variables = []
    self.bp_on_stack = False
    self.retaddr_on_stack = False
    self.sp_delta = 0
    self.calling_convention = None
    self._returning = None
    self.prepared_registers = set()
    self.prepared_stack_variables = set()
    self.registers_read_afterwards = set()
    self.startpoint = None
    self._addr_to_block_node = {}
    self._block_sizes = {}
    self._block_cache = {}
    self._local_blocks = {}
    self._local_block_addrs = set()
    self.info = {}
