Stores content into memory.

        :param addr:        A claripy expression representing the address to store at.
        :param data:        The data to store (claripy expression or something convertable to a claripy expression).
        :param size:        A claripy expression representing the size of the data to store.

        The following parameters are optional.

        :param condition:       A claripy expression representing a condition if the store is conditional.
        :param add_constraints: Add constraints resulting from the merge (default: True).
        :param endness:         The endianness for the data.
        :param action:          A SimActionData to fill out with the final written value and constraints.
        :param bool inspect:    Whether this store should trigger SimInspect breakpoints or not.
        :param bool disable_actions: Whether this store should avoid creating SimActions or not. When set to False,
                                     state options are respected.

def store(self, addr, data, size=None, condition=None, add_constraints=None, endness=None, action=None,
              inspect=True, priv=None, disable_actions=False):
        """
        Stores content into memory.

        :param addr:        A claripy expression representing the address to store at.
        :param data:        The data to store (claripy expression or something convertable to a claripy expression).
        :param size:        A claripy expression representing the size of the data to store.

        The following parameters are optional.

        :param condition:       A claripy expression representing a condition if the store is conditional.
        :param add_constraints: Add constraints resulting from the merge (default: True).
        :param endness:         The endianness for the data.
        :param action:          A SimActionData to fill out with the final written value and constraints.
        :param bool inspect:    Whether this store should trigger SimInspect breakpoints or not.
        :param bool disable_actions: Whether this store should avoid creating SimActions or not. When set to False,
                                     state options are respected.
        """

        _inspect = inspect and self.state.supports_inspect

        if priv is not None: self.state.scratch.push_priv(priv)

        addr_e = _raw_ast(addr)
        data_e = _raw_ast(data)
        size_e = _raw_ast(size)
        condition_e = _raw_ast(condition)
        add_constraints = True if add_constraints is None else add_constraints

        if isinstance(addr, str):
            named_addr, named_size = self._resolve_location_name(addr, is_write=True)
            addr = named_addr
            addr_e = addr
            if size is None:
                size = named_size
                size_e = size

        if isinstance(data_e, str):
            data_e = data_e.encode()
            l.warning("Storing unicode string encoded as utf-8. Did you mean to use a bytestring?")

        # store everything as a BV
        data_e = self._convert_to_ast(data_e, size_e if isinstance(size_e, int) else None)

        # zero extend if size is greater than len(data_e)
        stored_size = size_e*self.state.arch.byte_width if isinstance(size_e, int) else self.state.arch.bits
        if size_e is not None and self.category == 'reg' and len(data_e) < stored_size:
            data_e = data_e.zero_extend(stored_size - len(data_e))

        if type(size_e) is int:
            size_e = self.state.solver.BVV(size_e, self.state.arch.bits)
        elif size_e is None:
            size_e = self.state.solver.BVV(data_e.size() // self.state.arch.byte_width, self.state.arch.bits)

        if len(data_e) % self.state.arch.byte_width != 0:
            raise SimMemoryError("Attempting to store non-byte data to memory")
        if not size_e.symbolic and (len(data_e) < size_e*self.state.arch.byte_width).is_true():
            raise SimMemoryError("Provided data is too short for this memory store")

        if _inspect:
            if self.category == 'reg':
                self.state._inspect(
                    'reg_write',
                    BP_BEFORE,
                    reg_write_offset=addr_e,
                    reg_write_length=size_e,
                    reg_write_expr=data_e,
                    reg_write_condition=condition_e,
                )
                addr_e = self.state._inspect_getattr('reg_write_offset', addr_e)
                size_e = self.state._inspect_getattr('reg_write_length', size_e)
                data_e = self.state._inspect_getattr('reg_write_expr', data_e)
                condition_e = self.state._inspect_getattr('reg_write_condition', condition_e)
            elif self.category == 'mem':
                self.state._inspect(
                    'mem_write',
                    BP_BEFORE,
                    mem_write_address=addr_e,
                    mem_write_length=size_e,
                    mem_write_expr=data_e,
                    mem_write_condition=condition_e,
                )
                addr_e = self.state._inspect_getattr('mem_write_address', addr_e)
                size_e = self.state._inspect_getattr('mem_write_length', size_e)
                data_e = self.state._inspect_getattr('mem_write_expr', data_e)
                condition_e = self.state._inspect_getattr('mem_write_condition', condition_e)

        # if the condition is false, bail
        if condition_e is not None and self.state.solver.is_false(condition_e):
            if priv is not None: self.state.scratch.pop_priv()
            return

        if (
            o.UNDER_CONSTRAINED_SYMEXEC in self.state.options and
            isinstance(addr_e, claripy.ast.Base) and
            addr_e.uninitialized
        ):
            self._constrain_underconstrained_index(addr_e)

        request = MemoryStoreRequest(addr_e, data=data_e, size=size_e, condition=condition_e, endness=endness)
        try:
            self._store(request) #will use state_plugins/symbolic_memory.py
        except SimSegfaultError as e:
            e.original_addr = addr_e
            raise

        if _inspect:
            if self.category == 'reg': self.state._inspect('reg_write', BP_AFTER)
            elif self.category == 'mem': self.state._inspect('mem_write', BP_AFTER)
            # tracer uses address_concretization_add_constraints
            add_constraints = self.state._inspect_getattr('address_concretization_add_constraints', add_constraints)

        if add_constraints and len(request.constraints) > 0:
            self.state.add_constraints(*request.constraints)

        if not disable_actions:
            if request.completed and o.AUTO_REFS in self.state.options and action is None and not self._abstract_backer:
                ref_size = size * self.state.arch.byte_width if size is not None else data_e.size()
                region_type = self.category
                if region_type == 'file':
                    # Special handling for files to keep compatibility
                    # We may use some refactoring later
                    region_type = self.id
                action = SimActionData(self.state, region_type, 'write', addr=addr_e, data=data_e, size=ref_size,
                                       condition=condition
                                       )
                self.state.history.add_action(action)

            if request.completed and action is not None:
                action.actual_addrs = request.actual_addresses
                action.actual_value = action._make_object(request.stored_values[0]) # TODO
                if len(request.constraints) > 0:
                    action.added_constraints = action._make_object(self.state.solver.And(*request.constraints))
                else:
                    action.added_constraints = action._make_object(self.state.solver.true)

        if priv is not None: self.state.scratch.pop_priv()