(self, state, return_val=None, prototype=None, force_callee_cleanup=False)
return ret_addr
This function performs the actions of the callee as it's getting ready to return.
        It returns the address to return to.

        :param state:                   The state to mutate
        :param return_val:              The value to return
        :param prototype:                 The prototype of the given function
        :param force_callee_cleanup:    If we should clean up the stack allocation for the arguments even if it's not
                                        the callee's job to do so

        TODO: support the stack_base parameter from setup_callsite...? Does that make sense in this context?
        Maybe it could make sense by saying that you pass it in as something like the "saved base pointer" value?
This function performs the actions of the callee as it's getting ready to return.
        It returns the address to return to.
This function performs the actions of the callee as it s getting ready to return . It returns the address to return to .
def teardown_callsite(self, state, return_val=None, prototype=None, force_callee_cleanup=False):
        """
        This function performs the actions of the callee as it's getting ready to return.
        It returns the address to return to.

        :param state:                   The state to mutate
        :param return_val:              The value to return
        :param prototype:                 The prototype of the given function
        :param force_callee_cleanup:    If we should clean up the stack allocation for the arguments even if it's not
                                        the callee's job to do so

        TODO: support the stack_base parameter from setup_callsite...? Does that make sense in this context?
        Maybe it could make sense by saying that you pass it in as something like the "saved base pointer" value?
        """
        if return_val is not None and not isinstance(prototype.returnty, SimTypeBottom):
            self.set_return_val(state, return_val, prototype.returnty)
            # ummmmmmmm hack
            loc = self.return_val(prototype.returnty)
            if isinstance(loc, SimReferenceArgument):
                self.RETURN_VAL.set_value(state, loc.ptr_loc.get_value(state))

        ret_addr = self.return_addr.get_value(state)

        if state.arch.sp_offset is not None:
            if force_callee_cleanup or self.CALLEE_CLEANUP:
                session = self.arg_session(prototype.returnty)
                if self.return_in_implicit_outparam(prototype.returnty):
                    extra = [self.return_val(prototype.returnty).ptr_loc]
                else:
                    extra = []
                state.regs.sp += self.stack_space(extra + [self.next_arg(session, x) for x in prototype.args])
            else:
                state.regs.sp += self.STACKARG_SP_DIFF

        return ret_addr
def teardown_callsite ( self , state , return_val = None , prototype = None , force_callee_cleanup = False ) : if return_val is not None and not isinstance ( prototype . returnty , SimTypeBottom ) : self . set_return_val ( state , return_val , prototype . returnty ) # ummmmmmmm hack loc = self . return_val ( prototype . returnty ) if isinstance ( loc , SimReferenceArgument ) : self . RETURN_VAL . set_value ( state , loc . ptr_loc . get_value ( state ) ) ret_addr = self . return_addr . get_value ( state ) if state . arch . sp_offset is not None : if force_callee_cleanup or self . CALLEE_CLEANUP : session = self . arg_session ( prototype . returnty ) if self . return_in_implicit_outparam ( prototype . returnty ) : extra = [ self . return_val ( prototype . returnty ) . ptr_loc ] else : extra = [ ] state . regs . sp += self . stack_space ( extra + [ self . next_arg ( session , x ) for x in prototype . args ] ) else : state . regs . sp += self . STACKARG_SP_DIFF return ret_addr