Return the memory objects overlapping with the provided slice.

        :param start: the start address
        :param end: the end address (non-inclusive)
        :returns: tuples of (starting_addr, memory_object)
480865
def load_slice(self, state, start, end):
        
        keys = list(self._storage.irange(start, end-1))
        if not keys or keys[0] != start:
            try:
                key = next(self._storage.irange(maximum=start, reverse=True))
            except StopIteration:
                pass
            else:
                if self._storage[key].includes(start):
                    keys.insert(0, key)
        return [(max(start, key), self._storage[key]) for key in keys]
419057
def addressables(self):
    
    return {
      BuildFileAddress(rel_path=path, target_name=name): obj
      for name, (path, obj) in self.objects_by_name.items()
    }
1000542
def slice_sequence(self,start,end):
     
     #find the sequence length
     l = self.length
     indexstart = start
     indexend = end
     ns = []
     tot = 0
     for r in self._rngs:
        tot += r.length
        n = r.copy()
        if indexstart > r.length:  
           indexstart-=r.length
           continue
        n.start = n.start+indexstart
        if tot > end: 
           diff = tot-end
           n.end -= diff
           tot = end
        indexstart = 0
        ns.append(n)
        if tot == end: break
     if len(ns)==0: return None
     return MappingGeneric(ns,self._options)
240608
def source_range(start, end, nr_var_dict):
    

    return OrderedDict((k, e-s)
        for k, (s, e)
        in source_range_tuple(start, end, nr_var_dict).iteritems())
999554
def slice(self, start=0, end=0):
        """"""
        tmp = Gauged.map_new()
        if tmp is None:
            raise MemoryError
        if not Gauged.map_concat(tmp, self.ptr, start, end, 0):
            Gauged.map_free(tmp)  # pragma: no cover
            raise MemoryError
        return SparseMap(tmp)
337266
def _slice(self, start, end):
        """"""
        if end == start:
            return self.__class__()
        offset = self._offset
        startbyte, newoffset = divmod(start + offset, 8)
        endbyte = (end + offset - 1) // 8
        bs = self.__class__()
        bs._setbytes_unsafe(self._datastore.getbyteslice(startbyte, endbyte + 1), end - start, newoffset)
        return bs
587428
def read(self, start_position: int, size: int) -> memoryview:
        
        return memoryview(self._bytes)[start_position:start_position + size]
603964
def _find_x86_candidates(self, start_address, end_address):
        
        roots = []

        # find gadgets tail
        for addr in xrange(start_address, end_address + 1):
            # TODO: Make this 'speed improvement' architecture-agnostic
            op_codes = [
                0xc3,     # RET
                0xc2,     # RET imm16
                0xeb,     # JMP rel8
                0xe8,     # CALL rel{16,32}
                0xe9,     # JMP rel{16,32}
                0xff,     # JMP/CALL r/m{16,32,64}
            ]

            if self._mem[addr] not in op_codes:
                continue

            try:
                asm_instr = self._disasm.disassemble(
                    self._mem[addr:min(addr+16, end_address + 1)],
                    addr
                )
            except:
                asm_instr = None

            if not asm_instr:
                continue

            # restarts ir register numbering
            self._ir_trans.reset()

            try:
                ins_ir = self._ir_trans.translate(asm_instr)
            except:
                continue

            # build gadgets
            if ins_ir[-1] and (ins_ir[-1].mnemonic == ReilMnemonic.JCC and isinstance(ins_ir[-1].operands[2], ReilRegisterOperand)):

                # add for REX.W + FF /3 call instruction
                if ins_ir[-1].mnemonic == ReilMnemonic.JCC:
                    # try addr - 1
                    try:
                        asm_instr_1 = self._disasm.disassemble(
                            self._mem[addr-1:min(addr+15, end_address + 1)],
                            addr
                        )

                        self._ir_trans.reset()

                        ins_ir_1 = self._ir_trans.translate(asm_instr_1)

                        if ins_ir_1[-1].mnemonic == ReilMnemonic.JCC:
                            addr = addr - 1
                            asm_instr = asm_instr_1
                            ins_ir = ins_ir_1
                    except:
                            pass

                asm_instr.ir_instrs = ins_ir

                root = GadgetTreeNode(asm_instr)

                roots.append(root)

                self._build_from(addr, root, start_address, self._instrs_depth)

        # filter roots with no children
        roots = [r for r in roots if len(r.get_children()) > 0]

        # build gadgets
        root_gadgets = [self._build_gadgets(r) for r in roots]

        # flatten root gadgets list
        candidates = [item for l in root_gadgets for item in l]

        return candidates
113597
def slice(self, start, end):
        

        reverse = False
        if start > end:
            temp = start
            start = end
            end = temp
            reverse = True

        seg = self.copy()
        seg.points = seg.points[start:end+1]
        if reverse:
            seg.points = list(reversed(seg.points))

        return seg
452534
function(bytesIn,start,end,mode)
	{
		if(end - start > 16)
			end = start + 16;
		
		return bytesIn.slice(start, end);
	}
630615
function slice (args, start, end) {
  var len = args.length;
  start = start > 0 ? start : 0;
  end = end >= 0 && end < len ? end : len;

  var n = end - start;
  if (n <= 0) return [];

  var ret = new Array(n);
  for (var i = 0; i < n; ++i) {
    ret[i] = args[i + start];
  }
  return ret;
}
1102615
def _addr_in_exec_memory_regions(self, addr):
        

        for start, end in self._exec_mem_regions:
            if start <= addr < end:
                return True
        return False
337428
def get_blocks(self, chrom, start, end):
    
    if chrom not in self.block_trees:
      return []
    return self.block_trees[chrom].intersectingInterval(start, end)
1086553
def buckets(self, start, end):
    '''
    
    '''
    rval = [ self.to_bucket(start) ]
    step = 1

    # In theory there's already been a check that end>start
    # TODO: Not a fan of an unbound while loop here
    while True:
      bucket = self.to_bucket(start, step)
      bucket_time = self.from_bucket( bucket )
      if bucket_time >= end:
        if bucket_time==end:
          rval.append( bucket )
        break
      rval.append( bucket )
      step += 1

    return rval
662752
def memory_read_bytes(self, start_position: int, size: int) -> bytes:
        
        return self._memory.read_bytes(start_position, size)
154834
function(start, end){
        //subQueue to Array
        if(start >= 0 && start < end && end <= this._length) {
            var result = [],
                current = this._head,
                i = 0;
            while(i++ < start) {
                current = current.next;
            }

            while(start++ < end) {
                var value = current.data.value;
                if(value != null) {
                    result.push(current.data.value);
                }
                current = current.next;
            }

            return result;
        }

        var result = [],
            current = this._head;
        
        while(current){
            result.push(current.data);
            current = current.next;
        }
        
        return result;
    }
86781
def _get_content_range(start: Optional[int], end: Optional[int], total: int) -> str:
    
    start = start or 0
    end = (end or total) - 1
    return "bytes %s-%s/%s" % (start, end, total)